How to limit the number of incoming+outgoing calls via specific gateway?
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
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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
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@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@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
http://wiki.freeswitch.org/wiki/Mod_limit On Oct 2, 2009, at 8:32 AM, Tihomir Culjaga wrote:
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@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
On Mon, Oct 5, 2009 at 2:30 AM, Michael Jerris <mike@jerris.com> wrote:
Of course I've read that. But it only affects the number of outgoing calls (at least for gateways - chapter "Using mod_limit with an outbound gateway"). But I would like to limit the number of all calls (incoming+outgoing) via specific gateway. Any idea? - Dmitry Bely
Direction doesn't matter, it uses realm's and a few other vars. Use the same vars for both directions. On Mon, Oct 5, 2009 at 14:57, Dmitry Bely <dmitry.bely@gmail.com> wrote:
On Mon, Oct 5, 2009 at 2:30 AM, Michael Jerris <mike@jerris.com> wrote:
Of course I've read that. But it only affects the number of outgoing calls (at least for gateways - chapter "Using mod_limit with an outbound gateway"). But I would like to limit the number of all calls (incoming+outgoing) via specific gateway. Any idea?
- Dmitry Bely
_______________________________________________ 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
-- Shannon
Incoming Call-Limit http://www.howtonix.com/?p=89 Outbound Call-Limit http://www.howtonix.com/?p=86 On Tue, Oct 6, 2009 at 2:19 AM, SP <sprice@gmail.com> wrote:
Direction doesn't matter, it uses realm's and a few other vars. Use the same vars for both directions.
On Mon, Oct 5, 2009 at 14:57, Dmitry Bely <dmitry.bely@gmail.com> wrote:
On Mon, Oct 5, 2009 at 2:30 AM, Michael Jerris <mike@jerris.com> wrote:
Of course I've read that. But it only affects the number of outgoing calls (at least for gateways - chapter "Using mod_limit with an outbound gateway"). But I would like to limit the number of all calls (incoming+outgoing) via specific gateway. Any idea?
- Dmitry Bely
_______________________________________________ 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
-- Shannon
_______________________________________________ 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
-- Regards ---------- M Emran Managing Director E-SOFT BILLING PTE. LTD. Web: www.e-softbilling.com
On Tue, Oct 6, 2009 at 12:32 AM, M.Emran <monemran@gmail.com> wrote:
Incoming Call-Limit http://www.howtonix.com/?p=89
Outbound Call-Limit http://www.howtonix.com/?p=86
But what if I need to limit the total number of calls (in my case == 1)?
On Tue, Oct 6, 2009 at 2:19 AM, SP <sprice@gmail.com> wrote:
Direction doesn't matter, it uses realm's and a few other vars. Use the same vars for both directions.
On Mon, Oct 5, 2009 at 14:57, Dmitry Bely <dmitry.bely@gmail.com> wrote:
On Mon, Oct 5, 2009 at 2:30 AM, Michael Jerris <mike@jerris.com> wrote:
Of course I've read that. But it only affects the number of outgoing calls (at least for gateways - chapter "Using mod_limit with an outbound gateway"). But I would like to limit the number of all calls (incoming+outgoing) via specific gateway. Any idea?
- Dmitry Bely
On Tue, Oct 6, 2009 at 12:19 AM, SP <sprice@gmail.com> wrote:
Direction doesn't matter, it uses realm's and a few other vars. Use the same vars for both directions.
Unfortunately it does. <action application="limit" data="$${domain} my_provider 1"/> generates limit_exceeded for the second outbound call, but if an incoming call is active FreeSWITCH still tries to use this gateway.
On Mon, Oct 5, 2009 at 14:57, Dmitry Bely <dmitry.bely@gmail.com> wrote:
On Mon, Oct 5, 2009 at 2:30 AM, Michael Jerris <mike@jerris.com> wrote:
Of course I've read that. But it only affects the number of outgoing calls (at least for gateways - chapter "Using mod_limit with an outbound gateway"). But I would like to limit the number of all calls (incoming+outgoing) via specific gateway. Any idea?
- Dmitry Bely
_______________________________________________ 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
-- Shannon
_______________________________________________ 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
Dmitry Bely
did you use the application limit on the inbound call? You'll need to in order to account for it. On Mon, Oct 5, 2009 at 15:39, Dmitry Bely <dmitry.bely@gmail.com> wrote:
On Tue, Oct 6, 2009 at 12:19 AM, SP <sprice@gmail.com> wrote:
Direction doesn't matter, it uses realm's and a few other vars. Use the same vars for both directions.
Unfortunately it does.
<action application="limit" data="$${domain} my_provider 1"/>
generates limit_exceeded for the second outbound call, but if an incoming call is active FreeSWITCH still tries to use this gateway.
On Mon, Oct 5, 2009 at 14:57, Dmitry Bely <dmitry.bely@gmail.com> wrote:
On Mon, Oct 5, 2009 at 2:30 AM, Michael Jerris <mike@jerris.com> wrote:
Of course I've read that. But it only affects the number of outgoing calls (at least for gateways - chapter "Using mod_limit with an outbound gateway"). But I would like to limit the number of all calls (incoming+outgoing) via specific gateway. Any idea?
- Dmitry Bely
_______________________________________________ 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
-- Shannon
_______________________________________________ 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
Dmitry Bely
_______________________________________________ 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
-- Shannon
On Tue, Oct 6, 2009 at 12:52 AM, SP <sprice@gmail.com> wrote:
did you use the application limit on the inbound call? You'll need to in order to account for it.
Can you provide more detail? I have DID and gateway <extension name="public_did"> <condition field="destination_number" expression="^(1234567)$"> <action application="transfer" data="incoming_call XML default"/> </condition> </extension> <gateway name="my_provider"> <param name="username" value="1234567"/> (...) </gateway> <extension name="my_provider_local"> <condition field="${toll_allow}" expression="local"/> (...) <action application="bridge" data="sofia/gateway/my_provider/$1"/> </condition> </extension> that correspond to the same provider account. Then an incoming call is active, outgoing one is not possible (provider will reject the it). How to generate "limit_exceeded" then? - Dmitry Bely
participants (6)
-
Alberto Escudero
-
Dmitry Bely
-
M.Emran
-
Michael Jerris
-
SP
-
Tihomir Culjaga