<br>Hi,<br><br>I am a bit new to Opensips scripting. I have a problem about handle the failure_route in Opensips. <br><br>I am using Opensips as SIP registry and SIP proxy. When my B2BUA sends a 404, I want Opensips to route the 404 back to the end point. But when Opensips initiate the 404 because the user is not registered, I would like Opensips to forward the INVITE request to B2BUA to play voicemail( shown as below). The problem I am having is how to detect from the Opensips script that the 404 is initiated from the B2BUA, so in that situation Opensips would just relay the 404 message back to the end point. What specific method I can use to do that determination?<br>
<br> if (t_check_status("404")) {<br> revert_uri();<br> prefix("unf");<br> rewritehostport("<a href="http://192.168.1.111:5070">192.168.1.111:5070</a>");<br>
append_branch();<br> route(1);<br> exit;<br> <br><br><br>route[1] {<br><br> t_on_reply("1");<br> t_on_failure("1");<br><br> if (!t_relay()) {<br>
sl_reply_error();<br> };<br> exit;<br>}<br><br><br>Thanks alot.<br><br>JB<br><br>