Actions

CAS R2 scripting: Difference between revisions

(First edit.)
 
(Adding more text.)
Line 1: Line 1:
== Mandatory elements ==
This page contains information about Toolpack CAS R2 variant scripting.


=== Variant information ===
Refer to the default script (itu.lua) in the Toolpack Web Portal for a complete working variant script example.
==== VARIANT_ID ====


=== Group B conversion information ===
= Mandatory elements =
==== GROUPB_DIGIT_TO_MEANING ====
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 it in the Toolpack Web Portal.
==== GROUPB_MEANING_TO_DIGIT ====
==== GROUPB_DEFAULT_DIGIT ====
==== GROUPB_OTHER_DIGITS ====


=== Category conversion information ===
== VARIANT_ID ==
==== CATEGORY_DIGIT_TO_MEANING ====
The VARIANT_ID variable must be filled to distinguish variants from another. More precisely, it is used when transporting [[#Group B conversion information|group B]] and [[#Category conversion information|category]] information with calls in order to possibly convert information meaning across variants.
==== CATEGORY_MEANING_TO_DIGIT ====
==== CATEGORY_OTHER_DIGITS ====
==== CATEGORY_DEFAULT_DIGIT ====


=== Backward event handlers ===
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.
==== Bwd_HandleNewCall ====
==== Bwd_HandleFwdSignal ====


=== Forward event handlers ===
== Group B conversion information ==
==== Fwd_HandleNewCall ====
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.
==== Fwd_HandleBwdSignal ====


== Optional elements ==
=== 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|Group B meanings]]). Each digit must be present in the table.


=== SCRIPT_FILE_NAME ===
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.
=== VARIABLES ===
 
=== 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|GROUPB_OTHER_DIGITS]] table.
 
If a meaning is not found in this table, the meaning corresponding to [[#GROUPB_DEFAULT_DIGIT|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|GROUPB_MEANING_TO_DIGIT]] table fail.
 
=== GROUPB_OTHER_DIGITS ===
 
 
== Category conversion information ==
=== CATEGORY_DIGIT_TO_MEANING ===
=== CATEGORY_MEANING_TO_DIGIT ===
=== CATEGORY_OTHER_DIGITS ===
=== CATEGORY_DEFAULT_DIGIT ===
 
== Backward event handlers ==
=== Bwd_HandleNewCall ===
=== Bwd_HandleFwdSignal ===
 
== Forward event handlers ==
=== Fwd_HandleNewCall ===
=== Fwd_HandleBwdSignal ===
 
= Optional elements =
 
== SCRIPT_FILE_NAME ==
== VARIABLES ==
 
= Reference =
== Stack variables ==
== Group B meanings ==
== Category meanings ==

Revision as of 17:25, 21 June 2010

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.

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 it 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

Category conversion information

CATEGORY_DIGIT_TO_MEANING

CATEGORY_MEANING_TO_DIGIT

CATEGORY_OTHER_DIGITS

CATEGORY_DEFAULT_DIGIT

Backward event handlers

Bwd_HandleNewCall

Bwd_HandleFwdSignal

Forward event handlers

Fwd_HandleNewCall

Fwd_HandleBwdSignal

Optional elements

SCRIPT_FILE_NAME

VARIABLES

Reference

Stack variables

Group B meanings

Category meanings