Polycom 7000 manual Preliminary/Postliminary Scripting Functions, Usage example

Models: 7000

1 437
Download 437 pages 17.13 Kb
Page 255
Image 255

Call Server Configuration

Variable

Initial value

 

 

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 use depends

 

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 1:

 

var list = OUTPUT_SIP_HEADERS.get("User-Agent");

 

if (list == null)

 

{

 

list = new java.util.LinkedList();

 

OUTPUT_SIP_HEADERS.put("User-Agent", list);

 

}

 

list.add("Someone. Not a RealPresence DMA 7000.");

 

Usage example 2:

 

var list = OUTPUT_SIP_HEADERS.get("Some-Custom-Header");

 

if (list == null)

 

{

 

list = new java.util.LinkedList();

 

OUTPUT_SIP_HEADERS.put("Some-Custom-Header", list);

 

}

 

list.add("Whatever you want");

Preliminary/Postliminary Scripting Functions

The following table describes the functions you can use in a preliminary or postliminary script. The parentheses at the end of the function name contain the parameters, if any, that the function accepts.

Polycom, Inc.

255

Page 255
Image 255
Polycom 7000 manual Preliminary/Postliminary Scripting Functions, Usage example