Hi,<br>I just noticed a very stupid error in my script and after fixing it, it is working fine now. Please ignore this post. Sorry for the inconvenience.<br><br>JB<br><br><div class="gmail_quote">On Tue, Oct 28, 2008 at 1:39 PM, Juan Backson <span dir="ltr"><<a href="mailto:juanbackson@gmail.com">juanbackson@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><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" target="_blank">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><font color="#888888"><br>JB<br><br>
</font></blockquote></div><br>