Module: kamailio Branch: master Commit: e16372dc978c15fa0c30e25c9ba8cf7de284e60d URL: https://github.com/kamailio/kamailio/commit/e16372dc978c15fa0c30e25c9ba8cf7d...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2015-07-16T16:58:13+02:00
Merge pull request #246 from krieger-od/master
dialog: run event_route[dialog:end] in case of dialog termination by â¦
---
Modified: modules/dialog/dlg_handlers.c Modified: modules/dialog/dlg_req_within.c
---
Diff: https://github.com/kamailio/kamailio/commit/e16372dc978c15fa0c30e25c9ba8cf7d... Patch: https://github.com/kamailio/kamailio/commit/e16372dc978c15fa0c30e25c9ba8cf7d...
---
diff --git a/modules/dialog/dlg_handlers.c b/modules/dialog/dlg_handlers.c index aae6efb..591e410 100644 --- a/modules/dialog/dlg_handlers.c +++ b/modules/dialog/dlg_handlers.c @@ -1404,8 +1404,6 @@ void dlg_ontimeout(struct dlg_tl *tl) { if(dlg_bye_all(dlg, NULL)<0) dlg_unref(dlg, 1); - /* run event route for end of dlg */ - dlg_run_event_route(dlg, NULL, dlg->state, DLG_STATE_DELETED);
dlg_unref(dlg, 1); if_update_stat(dlg_enable_stats, expired_dlgs, 1); diff --git a/modules/dialog/dlg_req_within.c b/modules/dialog/dlg_req_within.c index f862ab2..c40a08d 100644 --- a/modules/dialog/dlg_req_within.c +++ b/modules/dialog/dlg_req_within.c @@ -545,6 +545,9 @@ int dlg_bye(struct dlg_cell *dlg, str *hdrs, int side) } ret = send_bye(dlg, side, &all_hdrs); pkg_free(all_hdrs.s); + + dlg_run_event_route(dlg, NULL, dlg->state, DLG_STATE_DELETED); + return ret; }
@@ -566,6 +569,9 @@ int dlg_bye_all(struct dlg_cell *dlg, str *hdrs) ret |= send_bye(dlg, DLG_CALLEE_LEG, &all_hdrs); pkg_free(all_hdrs.s); + + dlg_run_event_route(dlg, NULL, dlg->state, DLG_STATE_DELETED); + return ret;
}