(Sorry... losed quotation symbol in the last post)<br><br>Bogdan,<br>thank you very much for help.<br><br><br>2008/4/16, Bogdan-Andrei Iancu <<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a>>:<br><br>
> So, if one of your SPAs is sending 302, this will not hit failure route as you still have the second branch still ringing. Only if the<br>> second branch will fail too, the whole transaction will fail and the failure route will be called.<br>
<br>So can I intercept the 302 response in an onreply_route? I tryied to put the below configuration taken from sipwise inside the onreply_route but some of the used functions cannot be used in the onreply_route.<br><br> -----------------------------------------------------------------------------------------------------------------------<br>
if(t_check_status("301|302"))<br> {<br> avp_delete("$avp(s:acc_caller_user)/g");<br> avp_delete("$avp(s:acc_caller_domain)/g");<br> avp_delete("$avp(s:acc_state)/g");<br>
avp_copy("$avp(s:acc_callee_user)", "$avp(s:acc_caller_user)");<br> avp_copy("$avp(s:acc_callee_domain)", "$avp(s:acc_caller_domain)");<br> $avp(s:acc_state) = "cfc";<br>
setflag(29);<br> if(!get_redirects("1:1"))<br> {<br><br> xlog("L_ERROR", "Failed to fetch contact '$ct' from 301/302 - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");<br>
acc_db_request("480", "acc");<br> t_reply("480", "Temporarily Unavailable");<br> exit;<br> }<br>
# get last URI from destination-set and set it as R-URI<br> avp_delete("$avp(s:tmp)/g");<br> $avp(s:tmp) = $ds;<br> avp_subst("$avp(s:tmp)", "/.*(sip:.+@[^:;>]+).*$/\1/");<br>
avp_pushto("$ru", "$avp(s:tmp)");<br> setflag(29);<br> append_branch();<br><br> t_on_branch("1");<br> xlog("L_INFO", "Redirect from UAC intercepted - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");<br>
route(13);<br> exit;<br> }<br><br> t_on_branch("1");<br> xlog("L_INFO", "CFC detected - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");<br>
route(13);<br> -----------------------------------------------------------------------------------------------------<br><br><br>> Regards,<br>> Bogdan<br><br>Best regards,<br>Antonio.<br>