Hi,<br>I just noticed a very stupid error in my script and after fixing it, it is working fine now.&nbsp; 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">&lt;<a href="mailto:juanbackson@gmail.com">juanbackson@gmail.com</a>&gt;</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.&nbsp; I have a problem about handle the failure_route in Opensips.&nbsp; <br>
<br>I am using Opensips as SIP registry and SIP proxy.&nbsp; When my B2BUA sends a 404, I want Opensips to route the 404 back to the end point.&nbsp; 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).&nbsp;&nbsp; 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.&nbsp; What specific method I can use to do that determination?<br>

<br>&nbsp; if (t_check_status(&quot;404&quot;)) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; revert_uri();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; prefix(&quot;unf&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rewritehostport(&quot;<a href="http://192.168.1.111:5070" target="_blank">192.168.1.111:5070</a>&quot;);<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; append_branch();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; route(1);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br><br><br>route[1] {<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_on_reply(&quot;1&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_on_failure(&quot;1&quot;);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!t_relay()) {<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sl_reply_error();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit;<br>}<br><br><br>Thanks alot.<br><font color="#888888"><br>JB<br><br>
</font></blockquote></div><br>