Avaya Logo

Home

Previous Topic

Next Topic

Book Contents

Book Index

PRI script instructions

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:

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.

The PRI implementation of the tic(`C') (Call) or the similar tic(`O') (Originate) instruction provides additional return code information beyond the T1 (E&M) interface implementations. r.1 returns the ISDN cause value (if available) in the event of an incomplete call. These cause values are returned by the network and are passed through to the script. The cause value is also passed in register r.1 upon a disconnect event. TAS script instructions, contains a list of ISDN cause values returned in register r.1.

The include (header) file (/att/include/tas_defs.h) provides macro definitions of these values. This file can be used by your application by including the following line in your script source file:

#include "tas_defs.h"

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.

Diag Retrieving the Redirection Number - Example

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.

� 2003 Avaya Inc. All Rights Reserved.