|
@@ -453,9 +453,9 @@ static void dlg_onreply(struct cell* t, int type, struct tmcb_params *param)
|
|
return;
|
|
return;
|
|
|
|
|
|
unref = 0;
|
|
unref = 0;
|
|
- if (type==TMCB_RESPONSE_IN) {
|
|
|
|
- /* Set the dialog context so it is available in onreply_route */
|
|
|
|
- set_current_dialog( req, dlg);
|
|
|
|
|
|
+ if (type & (TMCB_RESPONSE_IN|TMCB_ON_FAILURE)) {
|
|
|
|
+ /* Set the dialog context so it is available in onreply_route and failure_route*/
|
|
|
|
+ set_current_dialog(req, dlg);
|
|
dlg_set_ctx_iuid(dlg);
|
|
dlg_set_ctx_iuid(dlg);
|
|
goto done;
|
|
goto done;
|
|
}
|
|
}
|
|
@@ -927,7 +927,7 @@ int dlg_set_tm_callbacks(tm_cell_t *t, sip_msg_t *req, dlg_cell_t *dlg,
|
|
goto error;
|
|
goto error;
|
|
}
|
|
}
|
|
if ( d_tmb.register_tmcb( req, t,
|
|
if ( d_tmb.register_tmcb( req, t,
|
|
- TMCB_RESPONSE_IN|TMCB_RESPONSE_READY|TMCB_RESPONSE_FWDED,
|
|
|
|
|
|
+ TMCB_RESPONSE_IN|TMCB_RESPONSE_READY|TMCB_RESPONSE_FWDED|TMCB_ON_FAILURE,
|
|
dlg_onreply, (void*)iuid, dlg_iuid_sfree)<0 ) {
|
|
dlg_onreply, (void*)iuid, dlg_iuid_sfree)<0 ) {
|
|
LM_ERR("failed to register TMCB\n");
|
|
LM_ERR("failed to register TMCB\n");
|
|
goto error;
|
|
goto error;
|
|
@@ -1198,7 +1198,7 @@ void dlg_onroute(struct sip_msg* req, str *route_params, void *param)
|
|
if(iuid!=NULL)
|
|
if(iuid!=NULL)
|
|
{
|
|
{
|
|
/* register callback for the replies of this request */
|
|
/* register callback for the replies of this request */
|
|
- if ( d_tmb.register_tmcb( req, 0, TMCB_RESPONSE_IN,
|
|
|
|
|
|
+ if ( d_tmb.register_tmcb( req, 0, TMCB_RESPONSE_IN|TMCB_ON_FAILURE,
|
|
dlg_onreply, (void*)iuid, dlg_iuid_sfree)<0 ) {
|
|
dlg_onreply, (void*)iuid, dlg_iuid_sfree)<0 ) {
|
|
LM_ERR("failed to register TMCB (3)\n");
|
|
LM_ERR("failed to register TMCB (3)\n");
|
|
shm_free(iuid);
|
|
shm_free(iuid);
|