[sr-dev] git:4.1:e1e3389c: modules/dialog: make dialog context available in event route tm:local-request

Federico Cabiddu federico.cabiddu at gmail.com
Wed Aug 26 13:01:46 CEST 2015


Module: kamailio
Branch: 4.1
Commit: e1e3389c946af67fd132c2121188a36a67328188
URL: https://github.com/kamailio/kamailio/commit/e1e3389c946af67fd132c2121188a36a67328188

Author: Federico Cabiddu <federico.cabiddu at gmail.com>
Committer: Federico Cabiddu <federico.cabiddu at gmail.com>
Date: 2015-08-26T13:00:37+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/e1e3389c946af67fd132c2121188a36a67328188.diff
Patch: https://github.com/kamailio/kamailio/commit/e1e3389c946af67fd132c2121188a36a67328188.patch

---

diff --git a/modules/dialog/dlg_handlers.c b/modules/dialog/dlg_handlers.c
index 9ccdfe8..1991eee 100644
--- a/modules/dialog/dlg_handlers.c
+++ b/modules/dialog/dlg_handlers.c
@@ -1388,8 +1388,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);
 			dlg_unref(dlg, 1);




More information about the sr-dev mailing list