Preliminary/Postliminary Scripting

Call Server Configuration

 

 

Table 10-10Predefined variables for preliminary and postliminary scripts (continued)

Variable

Initial value

 

 

CALLER_SITE_NAME

The name of the caller’s site.

 

 

CALLER_SITE_SITE

The site code of the caller’s site.

_CODE

 

 

 

CALLER_TEL_URI

Array variable initially set to the set of Tel URI

 

addresses of the caller. The length of the array is 0

 

if the caller doesn’t have a Tel URI address.

 

 

DIAL_STRING

Initially set to the dial string being evaluated. If the

 

script modifies the DIAL_STRING value, the

 

modified value is used as the input to the dial rule

 

action.

 

For SIP, when the DIAL_STRING is modified by the

 

script, it’s used as shown in Table 10-11, depending

 

on the dial rule action:

 

 

INPUT_SIP_HEADERS

For SIP calls only, an associative array containing

 

the SIP headers in the received SIP INVITE

 

message.

 

Usage example:

 

if(INPUT_SIP_HEADERS["Supported"].matches

 

(/.*ms-forking.*/))

 

{

 

...

 

}

 

 

OUTPUT_SIP_HEADERS

An empty associative array. Headers that the script

 

adds to this array replace the corresponding

 

headers in the received SIP INVITE message. If a

 

header added to this array isn’t in the received

 

INVITE message, it’s added to the INVITE

 

message.

 

Usage example:

 

OUTPUT_SIP_HEADERS["User-Agent"] =

 

"Someone. Not a DMA 7000.";

 

OUTPUT_SIP_HEADERS["Some-Custom-Header"]

 

= "Whatever you want";

 

 

The following table shows how different dial rule actions apply a preliminary script’s modified dial string to the output SIP headers in a SIP call.

Polycom, Inc.

255

Page 267
Image 267
Polycom 3725-76302-001LI Ms-forking, OUTPUTSIPHEADERSUser-Agent =, Someone. Not a DMA, OUTPUTSIPHEADERSSome-Custom-Header