<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><a href="http://wiki.freeswitch.org/wiki/Mod_limit">http://wiki.freeswitch.org/wiki/Mod_limit</a><div><br></div><div><br><div><div>On Oct 2, 2009, at 8:32 AM, Tihomir Culjaga wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">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'd like to "dedicate" 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'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><include><br> <extension name="MY_DID_NUM"><br> <condition field="destination_number" expression="^MY_DID_NUMBER$"><br>
<action application="set" data="SERVICE_LIMIT=500"/><br> <br> <!-- <br> count number of active channels going towards MY_DID_NUMBER and store it into COUNT_MY_DID_NUMBER<br>
--><br><br> <action application="transfer" data="do_MY_SERVICE XML public"/><br> </condition><br> </extension><br></include><br><br><br><br><include><br>
<extension name="SERVICE1"><br>
<condition field="destination_number" expression="^do_MY_SERVICE$"/><br> <condition field="${COUNT_MY_DID_NUMBER}" expression="^SERVICE_LIMIT$"><br><br> <!-- do your service here --> <br>
<action application="playback" data="I_Accept_Your_Call.wav"/><br> <action application="hangup" data="NORMAL_CLEARING"/><br><br> <!-- do your limitation here --> <br>
<anti-action application="respond" data="403 Forbidden"/> <= put your response here!<br>
<br> </condition><br>
</extension><br>
</include><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"><<a href="mailto:aep.lists@it46.se">aep.lists@it46.se</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); margin-top: 0pt; margin-right: 0pt; margin-bottom: 0pt; margin-left: 0.8ex; padding-left: 1ex; position: static; z-index: auto; "><br>
You can use the api and check that the channel is occupied with "show<br>
channels"?<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>
> My SIP provider allows only one call (incoming or outgoing) via one<br>
> SIP account. For FreeSWITCH I have configured it as public DID<br>
> extension and outgoing gateway. Now I would like to transfer to<br>
> another gw (or generate "limit exceded") when one tries to place an<br>
> outgoing call while incoming call is in progress. How tho do that?<br>
> Limiting the number of outgoing calls is easy (mod_limit), but how to<br>
> take into account incoming one?<br>
><br>
> - Dmitry Bely<br>
></div></div></blockquote></div></blockquote></div></div></body></html>