The Line Groups feature is designed to make it easier to configure and control your CopiaFacts system. Named line groups can take the place of individual line numbers in CopiaFacts commands. A line group name is used to refer to a group of lines with common characteristics, or which is to be used for a specific task. A line can belong to more than one named group, and a group can include lines in more than one node.

Using line groups can make it much easier to specify configuration options on larger systems, and helps to make the specifications easier to understand.

Specifying Line Groups

The $line_group configuration command is used to specify a group of lines and the name you will use to refer to them. The name you define should have at least one non-numeric character, and should be both long enough to be meaningful and short enough to avoid unmanageable command lines. Uppercase and lower case are not significant, so "ANALOG" and "Analog" refer to the same group. Embedded blank space in names is permitted (but not recommended).

Following the name of the line group you specify ranges of lines which make up the group. A "range" may consist of just a single line number, or a pair of line numbers separated by a dash (minus sign). A "~" (tilde) preceding a range specifies exclusion. The ranges are separated by commas, and if you use embedded spaces as well you must enclose the whole list in a pair of double-quotes. Some examples of valid line group specifications are as follows:

$line_group BROADCAST "7 - 8"   ; lines seven and eight
$line_group BROADCAST 1-8,~3    ; lines 1, 2 and 4 through 8
$line_group "Testing Lines" 1,9 ; lines 1 and 9 used for test
$line_group Digital 1-30        ; 30-line digital board
$line_group Analog 31-46        ; 16-line analog board

It is often useful to specify a group which spans multiple machines. If you had two machines set up as in the last example above, you could use:

$line_group Digital 1-30,47-76 ; 30-line digital boards
$line_group Analog 31-46,77-92 ; 16-line analog boards

The line groups feature has been designed to accept almost any combination of line numbers you might possibly want to specify, but there are a few restrictions on the specification of line groups, best illustrated by examples:

$line_group Fax-on-Demand 4-1  ; WRONG! start and end reversed
$line_group TESTLINES 1-3-4,-8 ; WRONG! bad syntax
$line_group TESTLINES 1-4~     ; WRONG! tilde must precede range
$line_group BC1 1-7            ; OK: BC1 is lines 1 through 7
$line_group BC2 BC1,9-12       ; WRONG! cannot embed a group in another

In addition, a line group is "inclusive". You cannot specify a group containing only lines which you wish to exclude, nor exclude lines which you have not also included in the group:

$line_group Broadcast ~1-4     ; WRONG! group contains only exclusions
$line_group Broadcast 1-4,~7-8 ; WRONG! lines 7 and 8 not in group

Referencing Line Groups

You may use a line group in most places where CopiaFacts command syntax expected a single line number in earlier releases. Multiple line groups, separated by commas, may also be specified wherever a single group is valid. Preceding a group name with a "~" (tilde) causes lines in the group to be excluded from selection. You may also mix groups, individual lines and line ranges. The following examples show valid line group references:

$fax_send_line BROADCAST      ; send on any line in BROADCAST group

$fax_send_line BC1,BC2,~11-12 ; send on any line in BC1 or BC2 except

                              ; 11 and 12

$fax_send_line *,~BC3         ; send on any line other than those 

                              ; in group BC3

$settle_time ANALOG 10        ; set settle time for analog lines

$phone_mask 3-4 decline XXXXXXX ; no local calls on lines 3 and 4

If the group name or range contains embedded spaces, the entire group reference must be surrounded by double-quotes, not just the name that has embedded spaces. Spaces must not be used immediately preceding a comma separator:

$fax_send_line "Test Lines, 13 - 18"   ; OK

$fax_send_line "Test Lines", "13 - 18" ; WRONG!

$fax_send_line "Test Lines ,13-18"     ; WRONG!

When a line group is referenced for the purpose of line selection (as opposed to line specification or configuration) the lines selected are considered in numeric sequence or in the sequence that is defined by the $line_priority command, if used. The order in which you mention the different groups on a command is of no significance.

References to a line group in the CopiaFacts configuration file FAXFACTS.CFG must follow the definition of the line group in the same file.

Special Line Groups

The special line group * means that all lines are to be referenced. Since each node can only reference its own lines, the more precise meaning of the asterisk is "all lines in the node". There are also built-in line-group names which are the nodenames of each node, so that you can use the nodename on commands which specify a line-group parameter. These also mean "all lines in the node".

In addition, the numeric values 1xxxx still have the meaning "any line with number less than xxxx" and 2xxxx means "any line number greater than xxxx". These values are now treated as special group names. They may not be combined with any other group or range specification and are provided only for compatibility with earlier releases.

The line group names DTIBx, where x is from 1 to 8, are also special. These names should not be defined as normal line group names. A line group of this type indicates 'any CopiaFacts line which is dynamically connected to an incoming call on a telephony channel of board x'. This feature is used on Primary Rate ISDN systems only, and should be used on the $dnis_scan command to specify different DNIS processing for different trunks in the same node.