Thanks, I will give it it a try and let you know. On Wed, Aug 5, 2009 at 8:40 PM, Michael Collins <msc@freeswitch.org> wrote:
On Wed, Aug 5, 2009 at 8:57 PM, Vladimir Rodionov <vladrodionov@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:
<include> <context name="abc_calls"> <extension name="abc_calls"> <condition field="destination_number" expression="^(.*)$"> <action application="lua" data="myscript.lua"/> </condition> </extension> </context> </include>
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... -MC
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org