Skip to content

Commit

Permalink
dialog: run both DLGCB_TERMINATED and DLGCB_TERMINATED_CONFIRMED call…
Browse files Browse the repository at this point in the history
…backs for local BYE

- only DLGCB_TERMINATED was run, but that resulted in CDRs not being
  stored by acc for that situation
- on a report by Mickael Marrache

(cherry picked from commit 265dc95)
  • Loading branch information
miconda committed May 12, 2015
1 parent e6c9a20 commit cf9e203
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions modules/dialog/dlg_handlers.c
Expand Up @@ -1424,6 +1424,7 @@ void dlg_ontimeout(struct dlg_tl *tl)
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);
return;
Expand Down
5 changes: 4 additions & 1 deletion modules/dialog/dlg_req_within.c
Expand Up @@ -214,7 +214,7 @@ void bye_reply_cb(struct cell* t, int type, struct tmcb_params* ps){
unref++;
}
/* dialog terminated (BYE) */
run_dlg_callbacks( DLGCB_TERMINATED, dlg, ps->req, ps->rpl, DLG_DIR_NONE, 0);
run_dlg_callbacks( DLGCB_TERMINATED_CONFIRMED, dlg, ps->req, ps->rpl, DLG_DIR_NONE, 0);

LM_DBG("first final reply\n");
/* derefering the dialog */
Expand Down Expand Up @@ -521,6 +521,9 @@ int dlg_bye_all(struct dlg_cell *dlg, str *hdrs)
str all_hdrs = { 0, 0 };
int ret;

/* run dialog terminated callbacks */
run_dlg_callbacks( DLGCB_TERMINATED, dlg, NULL, NULL, DLG_DIR_NONE, 0);

if ((build_extra_hdr(dlg, hdrs, &all_hdrs)) != 0)
{
LM_ERR("failed to build dlg headers\n");
Expand Down

0 comments on commit cf9e203

Please sign in to comment.