Author |
Message |
sm8651 Brekeke Member
Joined: 22 Nov 2013 Posts: 13
|
Posted: Thu Dec 19, 2013 1:47 pm Post subject: local calling to one route |
|
|
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 |
|
janP Brekeke Master Guru
Joined: 25 Nov 2007 Posts: 336
|
Posted: Thu Dec 19, 2013 10:22 pm Post subject: |
|
|
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 |
|
sm8651 Brekeke Member
Joined: 22 Nov 2013 Posts: 13
|
Posted: Sun Dec 22, 2013 5:14 pm Post subject: strip 1 |
|
|
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 |
|
hope Brekeke Master Guru
Joined: 15 Jan 2008 Posts: 862
|
Posted: Sun Dec 22, 2013 7:24 pm Post subject: |
|
|
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 |
|
|