Module: kamailio
Branch: 4.2
Commit: 3fadd1197e634f56b5a71fdf2cce507229213aba
URL:
https://github.com/kamailio/kamailio/commit/3fadd1197e634f56b5a71fdf2cce507…
Author: Federico Cabiddu <federico.cabiddu(a)gmail.com>
Committer: Federico Cabiddu <federico.cabiddu(a)gmail.com>
Date: 2015-08-26T12:56:20+02:00
modules/dialog: make dialog context available in event route tm:local-request
(cherry picked from commit 5002f66a98b6104702c8c862e7335ff189e7b7d8)
---
Modified: modules/dialog/dlg_handlers.c
---
Diff:
https://github.com/kamailio/kamailio/commit/3fadd1197e634f56b5a71fdf2cce507…
Patch:
https://github.com/kamailio/kamailio/commit/3fadd1197e634f56b5a71fdf2cce507…
---
diff --git a/modules/dialog/dlg_handlers.c b/modules/dialog/dlg_handlers.c
index ac61fbb..5341fcc 100644
--- a/modules/dialog/dlg_handlers.c
+++ b/modules/dialog/dlg_handlers.c
@@ -1421,8 +1421,13 @@ void dlg_ontimeout(struct dlg_tl *tl)
if(dlg->iflags&DLG_IFLAG_TIMEOUTBYE)
{
+ /* set the dialog context so that it's available in
+ * tm:local-request event route */
+ dlg_set_ctx_iuid(dlg);
if(dlg_bye_all(dlg, NULL)<0)
dlg_unref(dlg, 1);
+ dlg_reset_ctx_iuid();
+
/* run event route for end of dlg */
dlg_run_event_route(dlg, NULL, dlg->state, DLG_STATE_DELETED);