Brekeke Forum Index » Brekeke SIP Server Forum

Post new topic   Reply to topic
Dial Plan Rule for "DID List"
Author Message
AllstateTelecom
Brekeke Junior Member


Joined: 30 Aug 2011
Posts: 9
Location: Jupiter, FL

PostPosted: Tue Nov 14, 2017 8:52 am    Post subject: Dial Plan Rule for "DID List" Reply with quote

1. Brekeke Product Name and Version: SIP Server 3.7.7.8

2. Java version: 9.0.1

3. OS type and the version: Centos 7 (Kernel: 3.10.0-693.5.2.el7.x86_64)

4. UA (phone), gateway or other hardware/software involved: Vodia PBX

5. Your problem:

I'm trying to figure out a way to create a single dial plan rule to affect multiple DIDs. I have a few carriers that I process 911 calls through and specific DID's are registered with specific carriers for 911 calls. Is there a way to make this work without creating a rule for every DID? Perhaps a way of creating a DID list (similar to an IP address list in a firewall), or maybe using an OR operator in the rule?

Thanks in advance,

Brian
Back to top
View user's profile
ambrosio
Brekeke Master Guru


Joined: 27 Mar 2008
Posts: 215

PostPosted: Tue Nov 14, 2017 9:58 am    Post subject: Reply with quote

There are several ways.

You may find an example in the Tutorial.
http://www.brekeke.com/doc/sip/sip_tutorial_dialplan.pdf

DialPlan accepts Regular Expression so OR operator is |.
https://en.wikipedia.org/wiki/Regular_expression

If DID are 11111, 22222 and 33333, you can define them at MatchingPattern as the following.

For example:
$getSIPuser(To) = ^11111$|^22222$|^33333$


If there are many DID numbers (more than 10..), Alias Database will be a solution.
http://wiki.brekeke.com/wiki/How-to-use-Alias-function

For example:
$alias.lookup($getSIPuser(To)) = DID
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