Call Server Configuration

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

//STRIP PREFIX (SIP)

//If the dial string is a SIP URI with prefix 99 in the user part, remove it

//SIP:991234@abc.com --> sip:1234@abc.com

DIAL_STRING = DIAL_STRING.replace(/^sip:99([^@]*@)/i,"sip:$1");

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

//ADD PREFIX (SIP)

//If the dial string is a SIP URI, add prefix 99 to the user part

//SIP:1234@abc.com --> sip:991234@abc.com

DIAL_STRING = DIAL_STRING.replace(/^sip:([^@]*@)/i,"sip:99$1");

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

//SUBSTITUTE DOMAIN (SIP)

//If the dial string is a SIP URI, change the domain part to "example.com"

//SIP:1234@abc.com --> sip:1234@example.com

DIAL_STRING = DIAL_STRING.replace(/^sip:([^@]*)@(.*)/i,"sip:$1@example.com");

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

//FILTER

//If the dial string has prefix 99, do not match on this rule. Skip to the next rule.

//991234 --> NEXT_RULE

if (DIAL_STRING.match(/^99/))

{

return NEXT_RULE;

}

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

//FILTER (Inverted)

//Do not match on this rule unless the dial string has prefix 99.

//1234 --> NEXT_RULE

if (!DIAL_STRING.match(/^99/))

{

return NEXT_RULE;

}

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

//FILTER (SIP)

//If the dial string is a SIP URI with domain "example.com", do not match on this rule.

//Skip to the next rule.

//sip:1234@example.com --> NEXT_RULE

if (DIAL_STRING.toLowerCase().match(/^sip:[^@]*@example\.com/))

{

Polycom, Inc.

256

Page 256
Image 256
Polycom 3725-76302-001O manual Strip Prefix SIP