local calling to one route

Discuss any topic about Brekeke SIP Server.

Moderator: Brekeke Support Team

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

local calling to one route

Post by sm8651 »

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
Posts: 336
Joined: Sun Nov 25, 2007 2:55 pm

Post by 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
Posts: 13
Joined: Fri Nov 22, 2013 9:05 am

strip 1

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

Post by hope »

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

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