[Freeswitch-users] How to limit the number of incoming+outgoing calls via specific gateway?

Tihomir Culjaga tculjaga at gmail.com
Fri Oct 2 05:32:31 PDT 2009


what if you are running some huge traffic e.g. 2000 calls with media?

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.


e.g.

DID 10001 limit to 500 calls
DID 10002 limit to 400 calls
DID 10003 limit to 100 calls
DID 10005 limit to 1000 calls


This will be a total of 2000 calls.


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.




in the DP you would have something like this for every DID:


<include>
  <extension name="MY_DID_NUM">
    <condition field="destination_number" expression="^MY_DID_NUMBER$">
    <action application="set" data="SERVICE_LIMIT=500"/>

      <!--
             count number of active channels going towards MY_DID_NUMBER and
store it into COUNT_MY_DID_NUMBER
      -->

      <action application="transfer" data="do_MY_SERVICE XML public"/>
    </condition>
  </extension>
</include>



<include>
  <extension name="SERVICE1">
    <condition field="destination_number" expression="^do_MY_SERVICE$"/>
    <condition field="${COUNT_MY_DID_NUMBER}" expression="^SERVICE_LIMIT$">

       <!-- do your service here -->
      <action application="playback" data="I_Accept_Your_Call.wav"/>
      <action application="hangup" data="NORMAL_CLEARING"/>

       <!-- do your limitation here -->
      <anti-action application="respond" data="403 Forbidden"/> <= put your
response here!

    </condition>
  </extension>
</include>





but the question is ... how powerful a JavaScript can be? Will it be enough
to handle that load?



Tihomir.





On Fri, Oct 2, 2009 at 1:11 PM, Alberto Escudero <aep.lists at it46.se> wrote:

>
> You can use the api and check that the channel is occupied with "show
> channels"?
> You can write a small javascript that checks if the channel is occupied by
> means of session.execute api.
>
> /aep
> --
> Stopping junk mailers is good for the environment
>
> > My SIP provider allows only one call (incoming or outgoing) via one
> > SIP account. For FreeSWITCH I have configured it as public DID
> > extension and outgoing gateway. Now I would like to transfer to
> > another gw (or generate "limit exceded") when one tries to place an
> > outgoing call while incoming call is in progress. How tho do that?
> > Limiting the number of outgoing calls is easy (mod_limit), but how to
> > take into account incoming one?
> >
> > - Dmitry Bely
> >
> > _______________________________________________
> > FreeSWITCH-users mailing list
> > FreeSWITCH-users at lists.freeswitch.org
> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> > http://www.freeswitch.org
> >
> >
>
>
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20091002/dbfae6a6/attachment-0002.html 


More information about the FreeSWITCH-users mailing list