[Spce-user] unset_dlg when CANCEL Method received

Klaus Peter v. Friedeburg friedeburg at aco.de
Wed Nov 14 05:41:01 EST 2012

Hi Jon,

I have figure out, that the dialog was NOT destroyed when the call is CANCELD while RINGING before 200 OK is received. The Dialog be active for 12 hours (the default timeout for dialogs in the modul until modparam("dialog", "default_timeout",xxxxx) not set.

The same behavior I see when instead concurent_max the value 1 is set in concurrent_max_out

I think that the reason is that the dialog is not destroy when a CANCEL Request is received.

For debug suppose I have activated the db_mode 3 and db_update_periode = 1
I can see that the dialog while initiating the call (befor receiving the 200 OK) are don’t written to the table. I think the status of the dialog in "incomplete". I think only "complete" dialogs are written in the database_table. Bute in the memory of the proxy the dialog is present in that moment when the script done the set_dlg _profile

In the docs (http://kamailio.org/docs/modules/stable/modules_k/dialog.html) I read that there exist a "event route logic" for dialog under point 11 of the docs. Is that a solution to solve my problem?

          Klaus Peter

> -----Ursprüngliche Nachricht-----
> Von: spce-user-bounces at lists.sipwise.com [mailto:spce-user-bounces at lists.sipwise.com] Im Auftrag von Jon
> Bonilla (Manwe)
> Gesendet: Mittwoch, 14. November 2012 11:28
> An: spce-user at lists.sipwise.com
> Betreff: Re: [Spce-user] unset_dlg when CANCEL Method received
> El Wed, 14 Nov 2012 11:14:37 +0100
> "Klaus Peter v. Friedeburg" <friedeburg at aco.de> escribió:
> > Hello sipwise,
> >
> > I am a little bit confuse fort he way to handelt he dialogs:
> > In the kamailio docs I read only when receiving a BYE the dialog is destroyed,
> > But what is when a CANCEL or some othe reply-code like 5xx received?
> > I don’t find any section in the kamailio-proxy-script to destroy the dialog
> > when a CANCEL received.
> >
> > My problem is:
> > Configure in www-admin max_concurrent_channel = 1,
> > When make a Call from this subscriber an terminate the call while ringing,
> > the subscriber are unable to place an other call for a while. In this case
> > the kamailio proxy log show "Max concurrent channels exeeded"
> >
> If a negative response is received the dialog should be destroyed
> automatically. Same when the negative response is created by the proxy.
> About the cancel it's the same, the dialog module should destroy the dialog.
> The problem when destroying the dialogs, and you notice it when you have
> concurrent_calls set to 1, is that the dialog is usually destroyed after 5
> seconds because the proxy needs to keep the dialog in mem to handle
> retransmissions.
> So if you are at your call limit and you try to place another call before 5
> seconds have past, you won't be able to do so as the counter has not been
> decremented yet. If for example you can't place sthe call after 30 seconds,
> that might be a bug in the dialog module and/or in our templates and we should
> check it out.
> Concurrent_calls should not IMHO be set to 1. This feature was introduced
>  to limit the number of calls of a subscriber in case the user was hacked. It's
>  also commonly valid for pbx customers where you set the limit to 30 or
>  something like that. But setting it to 1 is not a good idea because of those
>  5 seconds.
> Now: Is the dialog counter decremented after some few seconds or does it remain
> there for hours? In the second case we should reproduce and check.
> cheers,
> Jon

More information about the Spce-user mailing list