what if you are running some huge traffic e.g. 2000 calls with media?<br><br>a typical application for that is an IVR system handling several different services. I&#39;d like to &quot;dedicate&quot; some capacity for inbound on per service basis.<br>
<br><br>e.g. <br><br>DID 10001 limit to 500 calls<br>DID 10002 limit to 400 calls<br>DID 10003 limit to 100 calls<br>DID 10005 limit to 1000 calls<br><br><br>This will be a total of 2000 calls.<br><br><br>don&#39;t you think js is simply too weak for that? It should cont calls/channels, brake counts per service/DID and update the counters on every call hit.<br>
<br><br><br><br>in the DP you would have something like this for every DID:<br><br><br>&lt;include&gt;<br>  &lt;extension name=&quot;MY_DID_NUM&quot;&gt;<br>    &lt;condition field=&quot;destination_number&quot; expression=&quot;^MY_DID_NUMBER$&quot;&gt;<br>
    &lt;action application=&quot;set&quot; data=&quot;SERVICE_LIMIT=500&quot;/&gt;<br>     <br>      &lt;!-- <br>             count number of active channels going towards MY_DID_NUMBER and store it into COUNT_MY_DID_NUMBER<br>
      --&gt;<br><br>      &lt;action application=&quot;transfer&quot; data=&quot;do_MY_SERVICE XML public&quot;/&gt;<br>    &lt;/condition&gt;<br>  &lt;/extension&gt;<br>&lt;/include&gt;<br><br><br><br>&lt;include&gt;<br>

  &lt;extension name=&quot;SERVICE1&quot;&gt;<br>
    &lt;condition field=&quot;destination_number&quot; expression=&quot;^do_MY_SERVICE$&quot;/&gt;<br>    &lt;condition field=&quot;${COUNT_MY_DID_NUMBER}&quot; expression=&quot;^SERVICE_LIMIT$&quot;&gt;<br><br>       &lt;!-- do your service here --&gt;   <br>

      &lt;action application=&quot;playback&quot; data=&quot;I_Accept_Your_Call.wav&quot;/&gt;<br>      &lt;action application=&quot;hangup&quot; data=&quot;NORMAL_CLEARING&quot;/&gt;<br><br>       &lt;!-- do your limitation here --&gt;   <br>
      &lt;anti-action application=&quot;respond&quot; data=&quot;403 Forbidden&quot;/&gt; &lt;= put your response here!<br>
<br>    &lt;/condition&gt;<br>
  &lt;/extension&gt;<br>
&lt;/include&gt;<br><br><br><br><br><br>but the question is ... how powerful a JavaScript can be? Will it be enough to handle that load?<br><br><br><br>Tihomir.<br><br><br><br><br><br><div class="gmail_quote">On Fri, Oct 2, 2009 at 1:11 PM, Alberto Escudero <span dir="ltr">&lt;<a href="mailto:aep.lists@it46.se">aep.lists@it46.se</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;"><br>
You can use the api and check that the channel is occupied with &quot;show<br>
channels&quot;?<br>
You can write a small javascript that checks if the channel is occupied by<br>
means of session.execute api.<br>
<br>
/aep<br>
<font color="#888888">--<br>
Stopping junk mailers is good for the environment<br>
</font><div><div></div><div class="h5"><br>
&gt; My SIP provider allows only one call (incoming or outgoing) via one<br>
&gt; SIP account. For FreeSWITCH I have configured it as public DID<br>
&gt; extension and outgoing gateway. Now I would like to transfer to<br>
&gt; another gw (or generate &quot;limit exceded&quot;) when one tries to place an<br>
&gt; outgoing call while incoming call is in progress. How tho do that?<br>
&gt; Limiting the number of outgoing calls is easy (mod_limit), but how to<br>
&gt; take into account incoming one?<br>
&gt;<br>
&gt; - Dmitry Bely<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; FreeSWITCH-users mailing list<br>
&gt; <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt;<br>
&gt;<br>
<br>
<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>
</div></div></blockquote></div><br>