Brekeke Forum Index » Brekeke SIP Server Forum

Post new topic   Reply to topic
rule for only 10 or 11 digits
Author Message
sm8651
Brekeke Member


Joined: 22 Nov 2013
Posts: 13

PostPosted: Tue Mar 12, 2019 8:59 am    Post subject: rule for only 10 or 11 digits Reply with quote

1. Brekeke Product Name and Version:
3.9

5. Your problem:
I would like to modify my rule so only calls that dialed 10 or 11 digits should go out from this rule.

my rule now is
$request = ^INVITE
To = sip:(.+)@
From = sip:(.+)@

how do I modify this to grab only 10 or 11 digits.

Then i need a rule after this that if you dialed anything that didnt route through this one should get a error so they dont try the calls again.

The reason is we have accounts misdialing like 3 digits and their pbx sends it to the server and the calls go to our carrier, the carriers dont like all these invalid destinations.
Back to top
View user's profile
Niloc
Brekeke Talented


Joined: 19 Sep 2017
Posts: 70
Location: NL

PostPosted: Tue Mar 12, 2019 3:29 pm    Post subject: Reply with quote

Modify "To=" definition like this.
To = sip:(.{10,11})@

FYI:
https://en.wikipedia.org/wiki/Regular_expression
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