[OpenSIPS-Users] t_relay behavior with 477 send failed

Amit Sharma asharma at 3clogic.com
Tue Apr 5 08:31:09 CEST 2011


Bogdan,
    I set the flag with t_relay and it resolved the issue. I am able
to handle failure from t_relay now.

Thanks,
Amit

On Mon, Mar 21, 2011 at 10:33 PM, Bogdan-Andrei Iancu
<bogdan at opensips.org> wrote:
> Hi Amit,
>
> have you set the 0x02 flag for t_relay ? See:
>      http://www.opensips.org/html/docs/modules/1.6.x/tm.html#id293378
>
> This flag will prevent the t_relay() function do internally deal with errors
> (by sending back a negative reply).
>
> Regards,
> Bogdan
>
> Amit Sharma wrote:
>>
>> I tried the fix from the 1.6 branch. The issue I still face is that now
>> t_relay returns with a value of 1 even when the relaying has failed.
>>
>> How do you figure out if t_relay has failed (!t_relay()) does not work in
>> this case? Does a return value 1 also signify an error?
>>  -Amit
>>
>> On Tue, Mar 15, 2011 at 3:51 PM, Bogdan-Andrei Iancu <bogdan at opensips.org
>> <mailto:bogdan at opensips.org>> wrote:
>>
>>    Hi Amit,
>>
>>    Following your report, Anca did a fix on SVN - see:
>>      http://lists.opensips.org/pipermail/devel/2011-March/007893.html
>>
>>    Please update from SVN and try again.
>>
>>    Regards,
>>    Bogdan
>>
>>    Amit Sharma wrote:
>>
>>        I am facing an issue similiar to the one outlined in the thread
>>
>>        http://lists.opensips.org/pipermail/users/2010-April/011783.html
>>
>>
>>         I am using the latest stable version of opensips (1.6.4) and
>>        tried the solution outlined in the thread above.
>>        The issue I have observed is that t_relay function doesn't
>>        return control to the script in case of a send failure (e.g
>>        inability to establish TCP connection etc)  and I recieve a
>>        477 send failure on the client.
>>
>>        This is the relevant and simplified route block that I am using
>>
>>         route{
>>                   lookup();
>>                 serialize_branches(1);
>>                 next_branches();
>>                 route(1);
>>         }
>>
>>        route[1]{
>>                xlog("L_ERR", "Before t_relay");
>>                t_relay();
>>                xlog("L_ERR", "After t_relay");
>>
>>        }
>>
>>          The log statement after the call to t_relay doesn't get
>>        printed in case the highest priority contact (TCP)  is
>>        unreachable.
>>          In essence any failover logic written on the return value of
>>        t_relay doesn't execute.
>>
>>        Thanks,
>>        Amit
>>
>>
>>
>>  ------------------------------------------------------------------------
>>
>>        _______________________________________________
>>        Users mailing list
>>        Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>>        http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>
>>    --     Bogdan-Andrei Iancu
>>    OpenSIPS eBootcamp - 28th February 2011
>>    OpenSIPS solutions and "know-how"
>>
>>
>>    _______________________________________________
>>    Users mailing list
>>    Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>>    http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>
>
> --
> Bogdan-Andrei Iancu
> OpenSIPS eBootcamp - 28th February 2011
> OpenSIPS solutions and "know-how"
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>



More information about the Users mailing list