Hi,
I was using cdrtool (prepaid table) and callcontrol to limit concurrent calls. In fact this is only limiting the outbound calls, but I would like to use another mechanism which should limit the inbound calls too. So basically to limit voice channels.
So is there some reliable method/module how to achieve this?
Thanks, Mino
On 11/21/2011 05:42 AM, Mino Haluz wrote:
I was using cdrtool (prepaid table) and callcontrol to limit concurrent calls. In fact this is only limiting the outbound calls, but I would like to use another mechanism which should limit the inbound calls too. So basically to limit voice channels.
So is there some reliable method/module how to achieve this?
The 'dialog' module is a common approach to this problem. Organise both inbound and outbound dialogs into profiles, and then get_profile_size() in both your inbound and outbound call processing.
1) Is this method per user? 2) Another thing is, what happens if the BYE is not received (network issue or whatever), will the dialog expire on the kamailio side so the dialog count could me decremented? I mean, if the user has just 1 voice channel, he could not make a call anymore, that's why it should be reliable..
On Mon, Nov 21, 2011 at 11:43 AM, Alex Balashov abalashov@evaristesys.comwrote:
On 11/21/2011 05:42 AM, Mino Haluz wrote:
I was using cdrtool (prepaid table) and callcontrol to limit
concurrent calls. In fact this is only limiting the outbound calls, but I would like to use another mechanism which should limit the inbound calls too. So basically to limit voice channels.
So is there some reliable method/module how to achieve this?
The 'dialog' module is a common approach to this problem. Organise both inbound and outbound dialogs into profiles, and then get_profile_size() in both your inbound and outbound call processing.
-- Alex Balashov - Principal Evariste Systems LLC 260 Peachtree Street NW Suite 2200 Atlanta, GA 30303 Tel: +1-678-954-0670 Fax: +1-404-961-1892 Web: http://www.evaristesys.com/
______________________________**_________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/**cgi-bin/mailman/listinfo/sr-**usershttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
On 11/21/2011 05:53 AM, Mino Haluz wrote:
- Is this method per user?
This method is per any criterion you like. You can use arbitrary profile keys.
- Another thing is, what happens if the BYE is not received (network
issue or whatever), will the dialog expire on the kamailio side so the dialog count could me decremented? I mean, if the user has just 1 voice channel, he could not make a call anymore, that's why it should be reliable..
The dialog module has a dialog expiration timer:
http://www.kamailio.org/docs/modules/3.2.x/modules_k/dialog.html#default-tim...
When this timeout is hit, the dialog module expires the dialog and it stops being tracked, and therefore contributing to the channel utilisation count. You can also optionally have Kamailio spoof a bidirectional BYE upon this event, by setting $dlg_ctx(timeout_bye) = 1.
This dialog timeout has to be short enough to be useful, but long enough not to irritate your users, or, by the same token, allow them to defraud you. It's not necessarily a happy compromise. More advanced strategies for dealing with the lack of BYE problem usually involve some method of dead peer detection that are sometimes outside the scope of Kamailio, such as SIP Session Timers (RFC 4028). Although, I did notice that the rtpproxy module has evolved a parameter called 'timeout_socket':
http://www.kamailio.org/docs/modules/3.2.x/modules/rtpproxy.html#id2551006
If rtpproxy can signal RTP timeout back to the proxy now via RPC in a manner that can be caught in a route, that would do the trick.
o Mino Haluz on 11/21/2011 11:53 AM:
- Is this method per user?
- Another thing is, what happens if the BYE is not received (network
issue or whatever), will the dialog expire on the kamailio side so the dialog count could me decremented? I mean, if the user has just 1 voice channel, he could not make a call anymore, that's why it should be reliable..
if it's acceptable for you to use an external B2BUA, you could send the calls through SEMS' sbc, activating session timers there and using parallel calls cc_pcalls to limit.
e.g. sems.conf: load_plugins=sbc;session_timer
sbc.conf: profiles=limit_calls_sst active_profile=limit_calls_sst
limit_calls_sst.sbcprofile.conf: call_control=parallel_calls parallel_calls_module=cc_pcalls parallel_calls_uuid=$fU parallel_calls_max_calls=1 # enable session timers - will refresh # even if endpoint doesnt support it enable_session_timer=yes # refresh every minute session_expires=120
or, if you want to control it through some header: limit_calls_sst.sbcprofile.conf: call_control=parallel_calls parallel_calls_module=cc_pcalls parallel_calls_uuid=$H(P-Parallel-Calls-User) parallel_calls_max_calls=$H(P-Parallel-Calls-Max-Calls) header_filter=blacklist header_list=P-Parallel-Calls-User,P-Parallel-Calls-Max-Calls
hth Stefan
On Mon, Nov 21, 2011 at 11:43 AM, Alex Balashov <abalashov@evaristesys.com mailto:abalashov@evaristesys.com> wrote:
On 11/21/2011 05:42 AM, Mino Haluz wrote: I was using cdrtool (prepaid table) and callcontrol to limit concurrent calls. In fact this is only limiting the outbound calls, but I would like to use another mechanism which should limit the inbound calls too. So basically to limit voice channels. So is there some reliable method/module how to achieve this? The 'dialog' module is a common approach to this problem. Organise both inbound and outbound dialogs into profiles, and then get_profile_size() in both your inbound and outbound call processing. -- Alex Balashov - Principal Evariste Systems LLC 260 Peachtree Street NW Suite 2200 Atlanta, GA 30303 Tel: +1-678-954-0670 <tel:%2B1-678-954-0670> Fax: +1-404-961-1892 <tel:%2B1-404-961-1892> Web: http://www.evaristesys.com/ _________________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org> http://lists.sip-router.org/__cgi-bin/mailman/listinfo/sr-__users <http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
On 11/21/2011 06:06 AM, Stefan Sayer wrote:
o Mino Haluz on 11/21/2011 11:53 AM:
- Is this method per user?
- Another thing is, what happens if the BYE is not received (network
issue or whatever), will the dialog expire on the kamailio side so the dialog count could me decremented? I mean, if the user has just 1 voice channel, he could not make a call anymore, that's why it should be reliable..
if it's acceptable for you to use an external B2BUA, you could send the calls through SEMS' sbc, activating session timers there and using parallel calls cc_pcalls to limit.
That is, indeed, a good suggestion!