[Freeswitch-users] Keeping local calls local

D'Arcy Cain darcy at Vex.Net
Mon Sep 24 00:04:41 MSD 2012


On Sun, 23 Sep 2012 11:17:37 -0700 (PDT)
Stanislav Sinyagin <ssinyagin at yahoo.com> wrote:

> here's a piece of my dialplan in "default" context. It simply catches
> such calls and transfers them directly to the public context. The
> public context matches local DID numbers and transfers them to
> corresponding extensions in default context:
> 
>     <extension name="internal_did">
>       <condition field="destination_number" expression="^($${default_did_prefix}\d+)$">
>         <action application="transfer" data="$1 XML public"/>
>       </condition>
>     </extension>
> 
> The "default_did_prefix" variable holds my DID number block. 

Looks good but my problem is that I do not have a DID block.  Clients
are porting their numbers so they are all over the place.  My first
three numbers in the system are from three different area codes.  I
would need to include all of my numbers in the expression somehow.  Wit
just three I can use '|' but that won't be practical when I have
hundreds or thousands.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:darcy at Vex.Net



Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list