hello all
Using kamailio 5.4 version, we have seen that dlg_isflagset is not detecting a dialog flag set in the request route for the initial INVITE, when a CANCEL request arrives. We have applied this change to set the dialog context unique ide for this request. Since it's done on dlg_onreply, dlg_onroute and dlg_ontimeout functions. This way, dlg_get_by_iuid(&dctx->iuid) in the function ki_dlg_isflagset is not NULL and dialog flags are detected. Is this change correct? Or can it generate any kind of issues?
diff --git a/src/modules/dialog/dlg_handlers.c b/src/modules/dialog/dlg_handlers.c index 3f8adefb79..f1df4a76c5 100644 --- a/src/modules/dialog/dlg_handlers.c +++ b/src/modules/dialog/dlg_handlers.c @@ -1255,6 +1255,9 @@ dlg_cell_t *dlg_lookup_msg_dialog(sip_msg_t *msg, unsigned int *dir) msg->callid->body.len, msg->callid->body.s); return NULL; } + if(msg->first_line.u.request.method_value == METHOD_CANCEL) { + dlg_set_ctx_iuid(dlg); + } if(dir) *dir = vdir; return dlg; }
thanks a lot and regards David
Hello,
thanks for the message. Please open a pull request against git master branch for easier review and possible discussion on our github tracker.
Cheers,
Henning
-- Henning Westerholt – https://skalatan.de/blog/ Kamailio services – https://gilawa.comhttps://gilawa.com/
From: sr-dev sr-dev-bounces@lists.kamailio.org On Behalf Of David Escartín Sent: Monday, April 11, 2022 3:56 PM To: Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org; Javier Gallart jgallart@sonoc.io; Vicente Hernando vhernando@sonoc.io Subject: [sr-dev] dlg_isflagset not working on CANCEL request
hello all
Using kamailio 5.4 version, we have seen that dlg_isflagset is not detecting a dialog flag set in the request route for the initial INVITE, when a CANCEL request arrives. We have applied this change to set the dialog context unique ide for this request. Since it's done on dlg_onreply, dlg_onroute and dlg_ontimeout functions. This way, dlg_get_by_iuid(&dctx->iuid) in the function ki_dlg_isflagset is not NULL and dialog flags are detected. Is this change correct? Or can it generate any kind of issues?
diff --git a/src/modules/dialog/dlg_handlers.c b/src/modules/dialog/dlg_handlers.c index 3f8adefb79..f1df4a76c5 100644 --- a/src/modules/dialog/dlg_handlers.c +++ b/src/modules/dialog/dlg_handlers.c @@ -1255,6 +1255,9 @@ dlg_cell_t *dlg_lookup_msg_dialog(sip_msg_t *msg, unsigned int *dir) msg->callid->body.len, msg->callid->body.s); return NULL; } + if(msg->first_line.u.request.method_value == METHOD_CANCEL) { + dlg_set_ctx_iuid(dlg); + } if(dir) *dir = vdir; return dlg; }
thanks a lot and regards David
-- [https://www.sonoc.io/wp-content/uploads/2020/07/Logo_SONOC_emails.png]http://www.sonoc.io/ David Escartín NOC engineer www.sonoc.iohttp://www.sonoc.io/ [LinkedIn]https://www.linkedin.com/company/sonoc [Twitter]https://twitter.com/sonoc_ [Facebook]https://www.facebook.com/SONOCio/ This e-mail is for the exclusive use of its recipients and may contain business secrets or other confidential or privileged information. Any unauthorised use, copying, publication or distribution of this e-mail is strictly prohibited. If you are not the intended recipient, please inform us immediately by replying to this e-mail and delete it, including any attachments or copies on your system.
In accordance with the GDPR (EU) 2016/679 and the LOPDGDD 3/2018, we inform you that this e-mail address and/or any other personal data you have provided us with will be treated by SONOC with absolute confidentiality and with the only purpose of providing you with the requested services, due to your condition as a client, supplier or because you have requested information from us at any time. These data will only be kept for as long as required to comply with legal obligations. You can exercise your rights at any time by sending an e-mail to: dataprotection@sonoc.iomailto:dataprotection@sonoc.io.mailto:dataprotection@sonoc.io