[OpenSIPS-Users] SOLVED: Question about failure-route handling

Juan Backson juanbackson at gmail.com
Tue Oct 28 06:47:58 CET 2008


Hi,
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.

JB

On Tue, Oct 28, 2008 at 1:39 PM, Juan Backson <juanbackson at gmail.com> wrote:

>
> Hi,
>
> I am a bit new to Opensips scripting.  I have a problem about handle the
> failure_route in Opensips.
>
> 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?
>
>   if (t_check_status("404")) {
>                revert_uri();
>                 prefix("unf");
>                 rewritehostport("192.168.1.111:5070");
>                 append_branch();
>                 route(1);
>                 exit;
>
>
>
> route[1] {
>
>         t_on_reply("1");
>         t_on_failure("1");
>
>         if (!t_relay()) {
>                 sl_reply_error();
>         };
>         exit;
> }
>
>
> Thanks alot.
>
> JB
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20081028/f848dddb/attachment.htm 


More information about the Users mailing list