Polycom 3725-76302-001O manual Sample Preliminary and Postliminary Scripts, Field Description

Models: 3725-76302-001O

1 425
Download 425 pages 7.92 Kb
Page 255
Image 255

 

 

Call Server Configuration

 

 

 

 

 

 

 

 

Field

Description

 

 

 

 

 

 

Caller variables

Lists variables that can be used in the script to represent caller alias values.

 

 

Enter an alias value to test for that variable.

 

 

 

 

 

Final result

Displays the outcome of running the script.

 

 

For a dial rule preliminary, if the script rejected the dial string (skipping the dial

 

 

rule action and passing it on to the next dial rule), a message tells you so.

 

 

Otherwise, the transformed dial string is displayed.

 

 

 

 

 

Script output

Displays any output produced by the script (e.g., println statements).

 

 

Output SIP headers

For an external SIP peer’s postliminary, displays the headers produced by the

 

 

script.

 

 

 

 

See also:

Preliminary/Postliminary Scripting on page 251

Sample Preliminary and Postliminary Scripts on page 255

Sample Preliminary and Postliminary Scripts

A preliminary is an executable script, written in the Javascript language, that defines processing actions (filtering or transformation) to be applied to a dial string before the dial rule’s action is performed.

A postliminary is an executable script, written in the Javascript language, that defines dial string transformations to be applied before querying an external device (gatekeeper, SIP peer, SBC, or MCU).

Transformation scripts output some modification of the DIAL_STRING variable (which is initially set to the dial string being evaluated).

Filtering scripts may pass the dial string on to the dial rule’s action (if the filter criteria aren’t met) or return one of the following:

NEXT_RULE: Skips the rule being processed and passes the dial string to the next rule.

BLOCK: Rejects the call.

The following sample scripts address many of the scenarios for which you might need a preliminary or postliminary script. You can use them as templates or starting points for your scripts.

// Example preliminary and postliminary scripts

///////////////////////////////

//STRIP PREFIX

//If the dial string has prefix 99, remove it

//991234 --> 1234

DIAL_STRING = DIAL_STRING.replace(/^99/,"");

///////////////////////////////

//ADD PREFIX

//Add prefix 99 to the dial string

//1234 --> 991234

DIAL_STRING = "99" + DIAL_STRING;

Polycom, Inc.

255

Page 255
Image 255
Polycom 3725-76302-001O manual Sample Preliminary and Postliminary Scripts, Field Description