On incoming calls, the ANI, DNIS, redirecting number, and service type are provided by the optional ISDN PRI feature (when available from the switch). On outgoing calls, the called number, service type, bearer capability, and outbound ANI can be specified using the optional ISDN PRI feature.
Note:
You can use the ANI and DNIS to specify an application for a caller by assigning *DNIS_SVC to a channel in the Assign Channel Service screen. Then assign ranges of ANIs and DNISs in the Assign Number Service screen. Specify the application in the Service Name field.
The following are instructions used by the ISDN PRI feature:
tic
The supported tic instruction options are listed in the following table. These options are used in the same manner for PRI as for T1.
Option |
Function |
a |
Answer an incoming call. |
h |
Disconnect (hangup) a call. |
o |
Originate a call, but do not wait for disposition. |
C, O |
Originate a call and wait for answer supervision. |
d |
Dial touch-tone digits. |
Some options to the tic instruction are not applicable to the PRI. These options are listed in the following table.
Option |
Function |
D |
Dial digits and wait for tones. |
setattr
The setattr instruction can be used to request the information provided from the network before starting the script. If the switch allows you to select the type of information provided for incoming calls, either calling party number (CPN) also called station identification (SID), or automatic number identification (ANI) also called billing number (BN), can be requested:
SID preferred |
Request SID. If not available, request ANI. |
SID only |
Request SID only. |
ANI preferred |
Request ANI. If not available, request SID. |
ANI only |
Request ANI only. |
Note:
The setattr instruction describes the environment in which scripts run. The setattr directives take effect before the script starts. Therefore, it is not possible to dynamically alter the attributes of a script. For this reason, the setattr instruction should be used only once in each script. For example, the following script fragment always requests ANI, regardless of the DNIS.
Begin:
strcmp (dnis.0,"6145555121")
jmp (r.0 == 0, gotdnis)
setattr (ATTR_ANI)
gotdnis:
The values in the following table (defined in tas_defs.h) can be used with the setattr instruction to specify the type of calling party information being requested.
ATTR_ANI |
ANI only |
ATTR_ANI_O |
ANI only |
ATTR_ANI_P |
ANI preferred |
ATTR_SID_O |
SID only |
ATTR_SID_P |
SID preferred |
For example, to request only the SID be returned in the CPN, use the following instruction:
setattr (ATTR_SID_O)
The following is an example of a script that uses setattr to request ANI.
#include "tas_defs.h" /* System provided header file */
#define NUMBER_TO_BE_CHECKED 0 /* User space allocation */
/* Specify attribute that causes the PRI to request ANI */
setattr(ATTR_ANI)
/* Specify the speech file you wish to use */
tfile(application)
Begin:
/* Retrieve the ANI number */
/* ANI is a character string stored in special register
* `IE_ANI' */
strcpy (ch.NUMBER_TO_BE_CHECKED, IE.IE_ANI)
/* Is the call from AREA code 614 ? */
jmp (ch.NUMBER_TO_BE_CHECKED != '6', WrongAreaCode )
jmp (ch.NUMBER_TO_BE_CHECKED+1 != '1', WrongAreaCode )
jmp (ch.NUMBER_TO_BE_CHECKED+2 != '4', WrongAreaCode )
/* Area Code OK */
/* Answer call */
tic(`a')
/* Begin transactions */
talk("Welcome ... ")
...
...
quit()
WrongAreaCode:
/* Wait for caller to Hangup */
goto WrongAreaCode
If an incoming call has been redirected from the originally dialed number to a PRI trunk on the Avaya IR system, a redirecting number is available as an ASCII character string in the script register IE.IE.REDIRECTING. The redirecting number is the originally dialed number.
The following figure shows a call placed to 1234 that has been redirected to 5678.
In this example, the system provides the telephone numbers shown in the following table to the script.
Script Register |
Number |
IE. IE_DNIS |
5678 |
IE.IE_REDIRECTING |
1234 |
IE.IE_ANI |
1111 |
If the PRI trunks are provided with multiple incoming services (for example, MEGACOM800 or MULTIQUEST), the script provides a register that contains the type of service which delivered the incoming call. The service type is determined by the network processing the incoming call and is stored in the IE_SERVICE register as an integer. Service types are listed in the setparam instruction in TAS Script Instructions.
setstring (OUTBOUND_ANI, ctype.src)
The setstring instruction allows an application to set a CPN for an outbound call.
The ctype.dst argument is a character string which represents the CPN. After setstring is invoked, subsequent outbound calls use the ctype.dst argument as the outbound CPN.
For example, the following instructions place an outbound call to ch.CALLED as the dialed number and with (614)555-1212 as the calling party number.
setstring (OUTBOUND_ANI, "6145551212")
tic (`o',ch.CALLED)
Note:
If the setstring command fails, r.0 is set to a negative number. Note that the setstring command failed if the destination operand (OUTBOUND_ANI) is incorrect or if the format of the number to use for outbound ANI is incorrect.
setparam (type.param, type.value)
The setparam instruction sets a parameter associated with a script. For example, setparam can be used to change the service type and bearer capability for outbound PRI calls by setting the SERVICE_TYPE and BEARER_CAP parameters. Valid parameters and their values are listed in TAS script instructions.