A new feature in CopiaFacts version 8 allows sets of variables ('variable groups') to be defined in USR and UJP files, and selectively activated in processing FS files for outbound operations. This provides a powerful means for automatically varying the processing of a transmission depending on external conditions.
|Grouped variables can only be specified in USR and UJP files.|
Specifying Variable Groups
Grouped variables are identified by preceding the variable name with a number between 0 and 30 and a forward-slash character:
$var_def 0/NameA "DefaultValueA"
$var_def 0/NameB "DefaultValueB"
$var_def 1/NameA "valueA1"
$var_def 1/NameB "valueB1"
$var_def 2/NameA "valueA2"
$var_def 2/NameB "valueB2"
Grouped variables defined in a UJP file, unlike normal UJP variables, are not all copied to job FS files when the job is launched. However when a group of variables are activated, it is as if they had been read from the FS file, and they are retained in the FS file after processing the attempt during which they were activated.
Use Variable Group 0 to specify default values of variables, if required. These will always be activated first, and then overridden by the activation of a higher-numbered group if activated. If you do not specify a '0' variable group, then the last activated set of variables is applied to all subsequent transmission attempts for the FS file. No '0' group is needed if you ensure that at least one of your non-zero groups is always activated.
Trace Information Additional trace information on variable group activation can be obtained by selecting Trace Outbound Queue in the COPIAFACTS engine trace options.
Activating Variable Groups
There are three ways to activate a variable group:
•Activation based on the destination number or address, using action codes.
•Activation based on which line/thread is used to process the call
•Activation for the next attempt based on the outcome of the current attempt.
One or more variable groups can be activated for the processing of a specific FS file, but normally only one variable group would need to be activated for each type of activation. The group is activated AFTER the FS file has been completely parsed, when its user profile is linked to it, so the group variables OVERRIDE variables of the same name in the FS file. However the normal FS file variables (or other default values) are used in the expansion of any variable references in the FS file, not the group variables.
Activating using an ActionCode Variable
ActionCode values 201 through 230 can be used to activate variable groups 1 to 30 respectively based on looking up the phone number, e-mail address or e-mail domain name. This required an $action_phone or $action_email command in the CFG file as described in the topic for destination-specific processing. This action is currently available at transmit time only. An example of this usage is available in the examples section.
If more than one action code in this range is present, only the first is used.
From version 8.2, this activation method has replaced an earlier activation using 'phone masks'.
Activating for specific line(s)
Variables can be activated for use when an FS file is processed on a specific line/thread or line group. For example if you had two ATA devices on separate IP addresses you could specify the IP address to be used in variable groups tied to the FoIP ports configured for each ATA.
Activating for retries
A powerful feature of grouped variables is ability to activate a different set of variables for retries. To do this, use a prefix of Gn (where n is from 1 to 30) on the $retry_delays delay time, separated by a forward slash if it is the only prefix:
$retry_delays F "3 G3/3 G4/3" ; use group 3 vars for 2nd retry, group 4 for 3rd
When the FS file is written after processing, the variables in the activated group are included in the $var_def commands written, so these values are available for extraction and analysis. The values will be overridden if a subsequent attempt is made with a different variable group activated, or if a 'group 0' is specified and no specific group is activated.