7 digit and 10-11 digit dialing

Discuss any topic about Brekeke SIP Server.

Moderator: Brekeke Support Team

Post Reply
sm8651
Posts: 13
Joined: Fri Nov 22, 2013 9:05 am

7 digit and 10-11 digit dialing

Post by sm8651 »

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
hope
Posts: 862
Joined: Tue Jan 15, 2008 4:08 pm

Post by hope »

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
Post Reply