Call Server Configuration

//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/))

{

return NEXT_RULE;

}

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

//PRINTLN

//Print out the information available to the script for this call.

Polycom, Inc.

260

Page 260
Image 260
Polycom 7000 manual Substitute Domain SIP