Call Server Configuration
Polycom, Inc. 255
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.
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");
Variable Initial value