Forums Read-only archive

local calling to one route

4 posts · Brekeke SIP Server Forum

sm8651 Original post
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
janP
To check same area code, same 3 digits prefix.

Matching Pattern
From = sip:(...).+@
To = sip:(...)(.+)@
$str.equals("%1","%2") = true

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

Deploy pattern
To = sip:%2%3@carrier_ip_addr