[Freeswitch-users] Multiple DIDs per SIP trunk (how to configure?)

Michael Collins msc at freeswitch.org
Wed Aug 5 20:40:31 PDT 2009

On Wed, Aug 5, 2009 at 8:57 PM, Vladimir Rodionov <vladrodionov at gmail.com>wrote:

> No, it is more like static routing. I need my *script program* be invoked
> when somebody dial in. That is it. One script for all inbound DIDs. Suppose
> I have thousand of them.  I think I know how to accomplish this but I am not
> sure yet.

Have the external profile be used only for provider ABC, or define a new
profile. Then in the profile have the calls go to a specific context. You
could have something like this in the sip profile definition:

<param name="context" value="abc_calls"/>

Then create a dialplan context called "abc_calls" that handles all inbound
calls. Create a file in conf/dialplan/ called abc_calls.xml:

  <context name="abc_calls">
    <extension name="abc_calls">
      <condition field="destination_number" expression="^(.*)$">
        <action application="lua" data="myscript.lua"/>

Essentially you're just creating a SIP profile and a dialplan context that
are servicing your VoIP provider. You can add other profiles/contexts for
other providers if need be.

Let us know how it goes...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090805/9a6ff75c/attachment-0002.html 

More information about the FreeSWITCH-users mailing list