[SR-Users] Keep-Alive in dialog "freeing a free fragment"

Daniel-Constantin Mierla miconda at gmail.com
Tue Jun 16 15:34:22 CEST 2015


I just pushed the patch -- commit link is:

  -
https://github.com/kamailio/kamailio/commit/9c3ea838b31039ac067e17d519df67b64b0dada1

Testing and reporting the results will be really appreciated.

Cheers,
Daniel

On 16/06/15 14:32, Daniel-Constantin Mierla wrote:
> Hello,
>
> the respective patch was done to fix generating CDRs on local BYE. Maybe
> cnxcc is locking slots as well, I am not familiar with the module at all.
>
> Perhaps the best is to change the mutexes to be re-entrant, to avoid
> such conflicts between dialog and upper layer modules relying on it. I
> will push a patch for it.
>
> Cheers,
> Daniel
>
> On 16/06/15 13:59, Dirk Teurlings - SIGNET B.V. wrote:
>> Hello,
>>
>> Following up on this issue, though KA seems to work fine now. We're
>> running into another problem. We use a fork of CNXCC that terminates
>> all calls when the user doesn't have enough credit. But with these
>> patches that doesn't work anymore and the current thread even locks up
>> completely.
>>
>>
>> We've tracked it down to these changes:
>>
>> diff --git a/modules/dialog/dlg_req_within.c
>> b/modules/dialog/dlg_req_within.c
>> index 206d13e..5668c3c 100644
>> --- a/modules/dialog/dlg_req_within.c
>> +++ b/modules/dialog/dlg_req_within.c
>> @@ -214,7 +214,7 @@ void bye_reply_cb(struct cell* t, int type, struct
>> tmcb_params* ps){
>>                         unref++;
>>                 }
>>                 /* dialog terminated (BYE) */
>> -               run_dlg_callbacks( DLGCB_TERMINATED, dlg, ps->req,
>> ps->rpl, DLG_DIR_NONE, 0);
>> +               run_dlg_callbacks( DLGCB_TERMINATED_CONFIRMED, dlg,
>> ps->req, ps->rpl, DLG_DIR_NONE, 0);
>>
>>                 LM_DBG("first final reply\n");
>>                 /* derefering the dialog */
>> @@ -521,6 +525,9 @@ int dlg_bye_all(struct dlg_cell *dlg, str *hdrs)
>>         str all_hdrs = { 0, 0 };
>>         int ret;
>>
>> +       /* run dialog terminated callbacks */
>> +       run_dlg_callbacks( DLGCB_TERMINATED, dlg, NULL, NULL,
>> DLG_DIR_NONE, 0);
>> +
>>         if ((build_extra_hdr(dlg, hdrs, &all_hdrs)) != 0)
>>         {
>>                 LM_ERR("failed to build dlg headers\n");
>>
>>
>>
>>
>>
>> This is a diff between 4.2.3 and 4.2.5, once reverted, everthing works
>> fine.
>>
>> Can you tell me the reason for these additions? What is the expected
>> difference in behaviour?
>>
>>
>> Cheers,
>> Dirk
>>
>>
>> On 12-05-15 10:49, Daniel-Constantin Mierla wrote:
>>> Hello,
>>>
>>> master is still the code to be 4.3, we will make a dedicated branch
>>> sometime soon.
>>>
>>> The patch will be backported to 4.2 as well. Thanks for helping to
>>> troubleshoot and testing.
>>>
>>> Cheers,
>>> Daniel
>>>
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users at lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.com




More information about the sr-users mailing list