-------- Original Message --------
Subject: Re: [Freeswitch-users] Multiple DIDs per SIP trunk (how to
configure?)
From: Vladimir Rodionov <vladrodionov@gmail.com>
Date: Wed, August 05, 2009 6:57 pm
To: freeswitch-users@lists.freeswitch.org
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.
in my dialplan I need to define:
<!-- Launch a JavaScript application if dialed in-->
<extension name="ProviderABC">
<condition field="source" expression="mod_sofia"/>
<condition field="destination_number" expression="^1NXXNXXXXXX$">
<action application="javascript" data="/usr/local/freeswitch/scripts/myapp.js"/>
</condition>
</extension>
In provider configuration:
<gateway name="voicepulse">
<!--/// account username *required* ///-->
<param name="username" value="your-username"/>
<!--/// auth realm: *optional* same as gateway name, if blank ///-->
<param name="realm" value="nyc.voicepulse.com"/>
<!--/// account password *required* ///-->
<param name="password" value="your-password"/>
<!--/// extension for inbound calls: *optional* same as username, if blank ///-->
<param name="extension" value="1NXXNXXXXXX"/>
<!--/// proxy host: *optional* same as realm, if blank ///-->
<param name="proxy" value="nyc.voicepulse.com"/>
<!--/// expire in seconds: *optional* 3600, if blank ///-->
<param name="expire-seconds" value="600"/>
<param name="register" value="true"/>
</gateway>
Something like this, yes? I can use regular expressions in destination_number?
Q: There is object Session in JavaScript, Lua. Is Session.destination == destination_number from incoming call? It is not clear for me from what I have read so far.
TIA,
-Vladimir Rodionov
_______________________________________________
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