Skip to content

Commit

Permalink
Fixed error reporting for dialog DID matching when dealing with BIN i…
Browse files Browse the repository at this point in the history
…nterface replication

(cherry picked from commit 246d3d8)
  • Loading branch information
vladpaiu committed Aug 12, 2014
1 parent 870cee9 commit 4fda9a1
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 20 deletions.
4 changes: 2 additions & 2 deletions modules/dialog/dialog.c
Expand Up @@ -120,8 +120,8 @@ extern int last_dst_leg;
str cdb_url = {0,0};

/* dialog replication using the bpi interface */
int accept_replicated_dlg;
struct replication_dest *replication_dests;
int accept_replicated_dlg=0;
struct replication_dest *replication_dests=NULL;

static int pv_get_dlg_count( struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
Expand Down
43 changes: 25 additions & 18 deletions modules/dialog/dlg_handlers.c
Expand Up @@ -1058,25 +1058,32 @@ void dlg_onroute(struct sip_msg* req, str *route_params, void *param)
return;
}
if (match_dialog(dlg,&callid,&ftag,&ttag,&dir, &dst_leg )==0){
LM_WARN("tight matching failed for %.*s with "
"callid='%.*s'/%d,"
" ftag='%.*s'/%d, ttag='%.*s'/%d and direction=%d\n",
req->first_line.u.request.method.len,
req->first_line.u.request.method.s,
callid.len, callid.s, callid.len,
ftag.len, ftag.s, ftag.len,
ttag.len, ttag.s, ttag.len, dir);
LM_WARN("dialog identification elements are "
"callid='%.*s'/%d, "
"caller tag='%.*s'/%d, callee tag='%.*s'/%d\n",
dlg->callid.len, dlg->callid.s, dlg->callid.len,
dlg->legs[DLG_CALLER_LEG].tag.len,
dlg->legs[DLG_CALLER_LEG].tag.s,
dlg->legs[DLG_CALLER_LEG].tag.len,
dlg->legs[callee_idx(dlg)].tag.len,
ZSW(dlg->legs[callee_idx(dlg)].tag.s),
dlg->legs[callee_idx(dlg)].tag.len);
if (!accept_replicated_dlg) {
/* not an error when accepting replicating dialogs -
we might have generated a different h_id when
accepting the replicated dialog */
LM_WARN("tight matching failed for %.*s with "
"callid='%.*s'/%d,"
" ftag='%.*s'/%d, ttag='%.*s'/%d and direction=%d\n",
req->first_line.u.request.method.len,
req->first_line.u.request.method.s,
callid.len, callid.s, callid.len,
ftag.len, ftag.s, ftag.len,
ttag.len, ttag.s, ttag.len, dir);
LM_WARN("dialog identification elements are "
"callid='%.*s'/%d, "
"caller tag='%.*s'/%d, callee tag='%.*s'/%d\n",
dlg->callid.len, dlg->callid.s, dlg->callid.len,
dlg->legs[DLG_CALLER_LEG].tag.len,
dlg->legs[DLG_CALLER_LEG].tag.s,
dlg->legs[DLG_CALLER_LEG].tag.len,
dlg->legs[callee_idx(dlg)].tag.len,
ZSW(dlg->legs[callee_idx(dlg)].tag.s),
dlg->legs[callee_idx(dlg)].tag.len);
}
unref_dlg(dlg, 1);
/* potentially fall through to SIP-wise dialog matching,
depending on seq_match_mode */
dlg = NULL;
}
}
Expand Down

0 comments on commit 4fda9a1

Please sign in to comment.