Brekeke Forum Index » Brekeke SIP Server Forum

Post new topic   Reply to topic
local calling to one route
Author Message
sm8651
Brekeke Member


Joined: 22 Nov 2013
Posts: 13

PostPosted: Thu Dec 19, 2013 1:47 pm    Post subject: local calling to one route Reply with quote

1. Brekeke Product Name and Version:
sip server.

Hi,

I would like to make a rule, basically that looks at the calling from number, if the caller is calling someone in the same area code it should go to one carrier.

any ideas?

Thanks
Back to top
View user's profile
janP
Brekeke Master Guru


Joined: 25 Nov 2007
Posts: 336

PostPosted: Thu Dec 19, 2013 10:22 pm    Post subject: Reply with quote

To check same area code, same 3 digits prefix.

Matching Patterns
From = sip:(...).+@
To = sip:(...)(.+)@
$str.equals("%1","%2") = true
Deploy Patterns
To = sip:%2%3@carrier_ip_addr
Back to top
View user's profile
sm8651
Brekeke Member


Joined: 22 Nov 2013
Posts: 13

PostPosted: Sun Dec 22, 2013 5:14 pm    Post subject: strip 1 Reply with quote

Hi,

Thanks for the response, it actually works, but i would like it to work on all calls even if they call from number has a 1 before the 10digits, and also if they called a number with or without a 1 before the 10 digits.

Basically, when i call from 12123332222 to 2124445555 or from 2123331111 to 12124445556 it does not go to that rule.
Back to top
View user's profile
hope
Brekeke Master Guru


Joined: 15 Jan 2008
Posts: 862

PostPosted: Sun Dec 22, 2013 7:24 pm    Post subject: Reply with quote


Matching Patterns
From = sip:1?(...).+@
To = sip:1?(...)(.+)@
$str.equals("%1","%2") = true
Deploy Patterns
To = sip:%2%3@carrier_ip_addr
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