[OpenSIPS-Users] Dialogs get stuck

Erik Versaevel e.versaevel at infopact.nl
Fri May 7 10:54:48 CEST 2010


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




More information about the Users mailing list