CAS R2 scripting
This page contains information about Toolpack CAS R2 variant scripting.
Refer to the default script (itu.lua) in the Toolpack Web Portal for a complete working variant script example.
Contents |
Mandatory elements
In order for CAS R2 variant scripts to work, some variables, tables and events must be defined from within scripts. All of the following elements are required; if one of these elements is not present, it will not be possible to save the script in the Toolpack Web Portal.
VARIANT_ID
The VARIANT_ID variable must be filled to distinguish variants from another. More precisely, it is used when transporting group B and category information with calls in order to possibly convert information meaning across variants.
Default CAS R2 TelcoBridges scripts have variant IDs starting from 1. To avoid future conflicts, user scripts variant IDs should be prefixed with a sufficiently high value. For example, a modified ITU variant could have a ID equal to 0x0001001.
Group B conversion information
Group B conversion information in scripts is used to convert group B information between CAS R2 variants and between other signaling types. The following elements must be filled so that these conversions can be completed successfully.
GROUPB_DIGIT_TO_MEANING
Each GROUPB_DIGIT_TO_MEANING table element must contain two values: a digit and a meaning. The digit must be a valid digit value (1 to 15) and the meaning must be a valid meaning (see Group B meanings). Each digit must be present in the table.
This table is used to convert group B digits to meaning in the context of an outgoing call. For a given digit, the specified meaning will be propagated to Toolpack.
GROUPB_MEANING_TO_DIGIT
Each GROUPB_MEANING_TO_DIGIT table element must contain two values: a meaning and a digit. All meanings must not appear more than once in the table.
This table is used to convert meanings to digits for an incoming call. This is mostly used for calls where the other leg belongs to another signaling type, although it will be used if the other leg's signaling type is CAS R2 but the variant is different and there was no match in the GROUPB_OTHER_DIGITS table.
If a meaning is not found in this table, the meaning corresponding to GROUPB_DEFAULT_DIGIT will be used.
GROUPB_DEFAULT_DIGIT
This variable must be filled with a valid digit value. It will be used when lookups in the GROUPB_MEANING_TO_DIGIT table fail.
GROUPB_OTHER_DIGITS
Each GROUPB_OTHER_DIGITS table element must contain three values: a variant ID and two valid digit values. This table may be empty but cannot be omitted.
This table is used to convert a variant ID and a digit combination to a digit for the current variant in an outgoing call scenario.