Brekeke Forum Index » Brekeke SIP Server Forum

Post new topic   Reply to topic
7 digit and 10-11 digit dialing
Author Message
sm8651
Brekeke Member


Joined: 22 Nov 2013
Posts: 13

PostPosted: Fri Nov 22, 2013 9:09 am    Post subject: 7 digit and 10-11 digit dialing Reply with quote

1. Brekeke Product Name and Version:
Brekeke SIP Server , Version 2.4.8.6 Advanced


5. Your problem:
i need a rule that says if the caller is dialing 10 or 11 digits it should go to the carrier as is. but if the customer is dialing 7 digits it should add a 3 digit area code. see below my existing rule, but need the other expressions.

currently it is sending all calls to the deploy rule.
Thanks,

MATCH
$request=^INVITE
To=sip:(.+)@
From=sip:(.+)@

Deploy
$auth=false
From="%2" <sip:%2@google.com;user=phone>
To=sip:%1@111.111.111.111
$session=failover sip:%1@111.111.11.11 sip:%1@222.22.22.22
&failover.timer.inviting=5
&failover.timer.provisional=360
$continue=false
Back to top
View user's profile
hope
Brekeke Master Guru


Joined: 15 Jan 2008
Posts: 862

PostPosted: Fri Nov 22, 2013 1:57 pm    Post subject: Reply with quote

add following dial plan rule on top of current rule
such as 3-digit area code is 111

rule 1:
Matching Patterns
$request = ^INVITE
To = sip:([0-9]{7})@(.+)
Deploy Patterns
To = sip:111%1@%2
$target = 127.0.0.1
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    Brekeke Forum Index » Brekeke SIP Server Forum All times are GMT - 7 Hours
Page 1 of 1