|
@@ -2286,10 +2286,21 @@ int reply_received( struct sip_msg *p_msg )
|
|
backup_xavps = xavp_set_list(&t->xavps_list);
|
|
backup_xavps = xavp_set_list(&t->xavps_list);
|
|
#endif
|
|
#endif
|
|
setbflagsval(0, uac->branch_flags);
|
|
setbflagsval(0, uac->branch_flags);
|
|
|
|
+ if(msg_status>last_uac_status) {
|
|
|
|
+ /* current response (msg) status is higher that the last received
|
|
|
|
+ * on the same branch - set it temporarily so functions in onreply_route
|
|
|
|
+ * can access it (e.g., avoid sending CANCEL by forcing another t_relply()
|
|
|
|
+ * in onreply_route when a negative sip response was received) */
|
|
|
|
+ uac->last_received = msg_status;
|
|
|
|
+ }
|
|
|
|
+
|
|
/* Pre- and post-script callbacks have already
|
|
/* Pre- and post-script callbacks have already
|
|
* been executed by the core. (Miklos)
|
|
* been executed by the core. (Miklos)
|
|
*/
|
|
*/
|
|
run_top_route(onreply_rt.rlist[onreply_route], p_msg, &ctx);
|
|
run_top_route(onreply_rt.rlist[onreply_route], p_msg, &ctx);
|
|
|
|
+
|
|
|
|
+ /* restore brach last_received as before executing onreply_route */
|
|
|
|
+ uac->last_received = last_uac_status;
|
|
/* transfer current message context back to t */
|
|
/* transfer current message context back to t */
|
|
if (t->uas.request) t->uas.request->flags=p_msg->flags;
|
|
if (t->uas.request) t->uas.request->flags=p_msg->flags;
|
|
getbflagsval(0, &uac->branch_flags);
|
|
getbflagsval(0, &uac->branch_flags);
|