[OpenSIPS-Devel] call_control, dialog and BYE messages patch

Mauro Davi' mauro.davi at acotel.com
Mon Mar 30 11:50:44 CEST 2009


Hi All,

 

using the callcontrol module I see that if the opensips server goes
down, on the next start the BYE message aren't sent to the call control
module (i.e. the stop message).

 

Attached there is the dialog module patch.

 

I modified the register_dlgcb (dialog, type, cb, param, free_param_cb)
function in this way:

 

If the dialog parameter is null and the type isn't equal to
DIALOG_CREATED, the callback function is registered to all the active
dialogs.

 

So in the call control module, in the mod_init function I simply added
this new lines:

 

    if (dlg_api.register_dlgcb(NULL, DLGCB_RESPONSE_FWDED,
__dialog_replies, NULL, NULL) != 0) {

        LM_CRIT("cannot register callback for dialog confirmation\n");

        return -1;

    }

 

    if (dlg_api.register_dlgcb(NULL, DLGCB_TERMINATED | DLGCB_FAILED |
DLGCB_EXPIRED | DLGCB_DESTROY, __dialog_ended, (void*)CCActive, NULL) !=
0) {

        LM_CRIT("cannot register callback for dialog termination\n");

        return -1;

    }

 

Now the BYE messages are sent to the call control module (stop messages)
also if the opensips server is previously killed.

 

I don't know if this is the best solution, but it is a solution :-)

 

Regards,

      MD

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/devel/attachments/20090330/9bb51a2c/attachment-0001.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dialogpatch.tgz
Type: application/x-compressed
Size: 550 bytes
Desc: dialogpatch.tgz
Url : http://lists.opensips.org/pipermail/devel/attachments/20090330/9bb51a2c/attachment-0001.bin 


More information about the Devel mailing list