Forums Read-only archive

Need Deployment Pattern - Route Calls to Registered Users

10 posts · Brekeke SIP Server Forum

tblanchard Original post
1. Brekeke Product Name and Version:
3.9.2.7
2. Java version:

3. OS type and the version:

Window 10

4. UA (phone), gateway or other hardware/software involved:

Yealink SIP Phones

5. Your problem:

I have a connection to another specialized Telephony server that needs to route calls from that server to registered Yealink phones.

I create a Dial Plan rule to recognize the pattern of calls - 9916xxxx - and that Matching Pattern is working. I need to understand how to configure the Deployment Pattern that will look at the (16xxxxx) and route the call to the registered phone with that same pattern as the user name.
snuyzm
There are several ways.
Can you paste your Matching Pattern here?
tblanchard
$request=^INVITE
To=sip:(99(16.+)@xxx.xx.xxx.xx

Our user name and number is going to be a 5 digit number - e.g., 16000 to 16999 which is also a registered user name in the SIP server.

I want to strip out the digits from the To (e.g., 16998) and use that to route to a registered user phone URI.
snuyzm
Is "99" a prefix of the dialed number?
If you have ( ) in the Matching pattern, you can refer the matched value with %1 in the Deploy Pattern

For example:
[Matching Pattern]
$request=^INVITE
To = sip:99(16.+)@

[Deploy Pattern]
To = sip:%1@

sip:%1@ in Deploy Pattern means that SIP Server routes a call to the registered user.
tblanchard
I can try this but the IP address associated with the 16xxx number in the matching pattern isn't the IP address associated with the registered Yealink phone.

How would the server know to route the call in the Deployment Pattern since we have identified it as a registered user.

The yealink phone will be the 16xxx@a different IP address.
snuyzm
If a caller dials 9916998, do you want to route a call to 16998 which is Yealink's registered username?
If so, try the DialPlan I suggested in my previous post.

Or do you want to route any matched calls to the certain Yealink phone always?
If so, try the DialPlan rule below.

[Matching Patterns]
$request = ^INVITE
To = sip:99(16.+)@

[Deploy Patterns]
To = sip:16998@
tblanchard
We will have several hundred Yealink phones. We don't want to set up a rule for each phone. We know this rule will work.

We want a dynamic rule that will pull the string out and determine the registered user and then route based on that match.
snuyzm
My first rule will meet the requirement because sip:99(16.+)@ will pick any 16xxxxx values if it starts with 99.

%1 in Deploy Patterns refers the first () in the Matching Patterns.

so the rule matches from "16000" to "16999" if these Yealink phones are registered.
tblanchard
The Matching Pattern works but the Deploy Pattern doesn't route the call.
snuyzm
I tried the both Matching Pattern and Deploy Patten without any issues...

Check the log to see whether the rule is executed..