No, it is more like static routing. I need my <b>script program</b> 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.<br>
<br>
in my dialplan I need to define:<br>
<br>
<pre><font size="4">&lt;!-- Launch a JavaScript application if dialed in--&gt;<br>   &lt;extension name=&quot;ProviderABC&quot;&gt;<br>    &lt;condition field=&quot;source&quot; expression=&quot;mod_sofia&quot;/&gt;<br>    <b>&lt;condition field=&quot;destination_number&quot; expression=&quot;^1NXXNXXXXXX$&quot;&gt;</b><br>
     &lt;action application=&quot;javascript&quot; data=&quot;/usr/local/freeswitch/scripts/myapp.js&quot;/&gt;<br>    &lt;/condition&gt;<br>   &lt;/extension&gt;</font><br></pre>
<br>
In provider configuration:<br>
<br>
<pre><font size="4">&lt;gateway name=&quot;voicepulse&quot;&gt;<br>           &lt;!--/// account username *required* ///--&gt;<br>           &lt;param name=&quot;username&quot; value=&quot;your-username&quot;/&gt;<br>           &lt;!--/// auth realm: *optional* same as gateway name, if blank ///--&gt;<br>
           &lt;param name=&quot;realm&quot; value=&quot;<a href="http://nyc.voicepulse.com">nyc.voicepulse.com</a>&quot;/&gt;<br>           &lt;!--/// account password *required* ///--&gt;<br>           &lt;param name=&quot;password&quot; value=&quot;your-password&quot;/&gt;<br>
           &lt;!--/// extension for inbound calls: *optional* same as username, if blank ///--&gt;<br><b>           </b> <b>&lt;param name=&quot;extension&quot; value=&quot;1NXXNXXXXXX&quot;/&gt; </b><br>           &lt;!--/// proxy host: *optional* same as realm, if blank ///--&gt;<br>
           &lt;param name=&quot;proxy&quot; value=&quot;<a href="http://nyc.voicepulse.com">nyc.voicepulse.com</a>&quot;/&gt;<br>           &lt;!--/// expire in seconds: *optional* 3600, if blank ///--&gt;<br>           &lt;param name=&quot;expire-seconds&quot; value=&quot;600&quot;/&gt;<br>
<br>           &lt;param name=&quot;register&quot; value=&quot;true&quot;/&gt;<br>         &lt;/gateway&gt;</font></pre>
<br>Something like this, yes? I can use regular expressions in destination_number?<br><br>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.<br>
<br>TIA,<br><br>-Vladimir Rodionov<br><br><div class="gmail_quote">On Wed, Aug 5, 2009 at 6:26 PM, Seven Du <span dir="ltr">&lt;<a href="mailto:dujinfang@gmail.com">dujinfang@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
mod_easyroute?<br><br><div class="gmail_quote">2009/8/6 Vladimir Rodionov <span dir="ltr">&lt;<a href="mailto:vladrodionov@gmail.com" target="_blank">vladrodionov@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="h5">
Hi, everybody<br><br>This is a newbie question: Suppose I have XX (variable dynamic number) DIDs assigned to one sip trunk (from VOIP provider ABC ). All calls coming from VOIP provider ABC MUST be routed to the same lua/js/whatever script. Is it possible in FS? If yes, how everything should be configuered? Dialplan, sip gateway? One more question: suppose it is doeable as I hope then how can I get in my script CalleeID (not a CallerID)? Basicaly, <br>


<br>I want to acomplish the following:<br><br>1. Avoid re-configuring FS every time I got new bunch of DIDs assigned/released from/to my Voip provider.<br>2. Have a way of extracting CalleeID in my script.<br><br>TIA,<br>

<font color="#888888">
<br>Vladimir Rodionov<br><br>
</font><br></div></div>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br>
<br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br>