[OpenSIPS-Users] Dialogs get stuck
Erik Versaevel
e.versaevel at infopact.nl
Mon May 10 10:48:53 CEST 2010
Hi Bogdan,
As far as i have seen the stuck dialogs are in STATE 3 or state 4, i've traced allmost all state 3
calls to an invalid reply ( send_reply("486", "Busy Here : Channel limit exceeded\n"); instead of
send_reply("486", "Busy Here : Channel limit exceeded");)
The \n leads to an invalid sip message and calls stuck in state 3.
The state 4 calls seem to be caused by opensips crashing and therefore not getting the BYE for the calls,
after a crash i restart opensips and end up with the dialogs from the database (which may nog be accurate anymore)
I'm going to migrate to my opensips environment tomorrow evening, i'll keep you informed of the results.
Kind regards,
Erik Versaevel
Op 7-5-2010 17:53, Bogdan-Andrei Iancu schreef:
> Hi Erik,
>
> Dialog states are :
>
> #define DLG_STATE_UNCONFIRMED 1
> #define DLG_STATE_EARLY 2
> #define DLG_STATE_CONFIRMED_NA 3
> #define DLG_STATE_CONFIRMED 4
> #define DLG_STATE_DELETED 5
>
>
> Dialog may cumulate in state 3 or 4 (ongoing calls) because of a missing
> (or poorly routed) BYE request. Maybe you should check if you have the
> BYE for the dialogs that do not exist on CPE but do on opensips.
>
> Again, missing BYE is a common case for having some left-over dialogs.
>
> Regards,
> Bogdan
>
>
> Erik Versaevel wrote:
>> Hi all,
>>
>> i'm attempting to build a loadbalancer from opensips to loadbalance requests to an cluster of asterisk machines.
>> Users register to opensips and loadbalances the requests for those users to the asterisk machines.
>>
>> One of the checks opensips has to perform on a call is if there aren't more concurrent calls from this user than
>> his bandwidth would allow. I'm using a slightly modified version of the example on the website (mainly using other AVP's to
>> set the maximum allowed simultanious calls).
>> The problem i'm experiencing is that dialogs seem to get stuck in opensips, the CPE on the customers side doesn't list a call, the asterisk
>> machine on the other end of the call doesn't list a call but opensips does, this results in the CPE beeing unreachable because opensips
>> thinks it has reached the maximum allowed calls.
>>
>> I i look at the dialog state i find the following:
>> opensipsctl fifo dlg_list | grep state | sort | uniq -c
>> 1 state:: 1
>> 4 state:: 2
>> 14 state:: 3
>> 78 state:: 4
>> 5 state:: 5
>> Is there any documentation on those states?
>>
>> My routing logic uses loose route afaik so all request within the dialog should pass my opensips server:
>>
>> if (has_totag()) {
>> if (loose_route()) {
>> if (is_method("INVITE")) {
>> record_route();
>> route(1);
>> } else {
>> if ( is_method("ACK") ) {
>> if ( t_check_trans() ) {
>> t_relay();
>> exit;
>> } else {
>> exit;
>> }
>> }
>> if (is_method("CANCEL"))
>> {
>> if (t_check_trans())
>> t_relay();
>> exit;
>> }
>> sl_send_reply("404","Not here - seq no loose routing");
>> }
>> exit;
>> }
>>
>>
>> I could send you my complete config if that would help, but it's mostly the default config with some tweaks (to loadbalance calls to an asterisk
>> cluster and then send the calls from asterisk to the end users with a maximum number of concurrent calls
>>
>> Kind regards,
>>
>> Erik
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>
>
Erik Versaevel
More information about the Users
mailing list