[OpenSIPS-Users] I need some help in failover scenario while TCP connection breaks .

Sasmita Panda spanda at 3clogic.com
Thu May 9 07:26:05 EDT 2019

My scenario :

Register Request flow
*B --> opensips (tcp proxy )  --> opesips (registrar)*

tcp proxy add itself in the path .. so that whenevr any request come for B
that goes through TCP proxy .

Invite Request flow
*A -- > opensips (registrar) -->  opensips (tcp proxy) --> B*

Problem . Sometime tcp connection between TCP proxy and B breaks down , at
that time TCP proxy sends "477 Send Failed " .

*A--> Opensips (registrar)--> opensips (tcp proxy) -\\-> B*
*A <-- Opensips (registrar) <-- (477 send Failed) Opensips (tcp proxy)*

What I am trying to do is , If B is register from 2 location and registrar
server has 2 contact in the data base .When Invite come for B , then it try
1st contact and if TCP proxy not able to send that request to B and sends
back "477  send failed " to registrar .

Now My registrar server sends that 477 back to A . But I want  registrar o
do failover and send the same Invite to 2nd destination rather than sending
error message Back to A .

As for my understanding it not doing failover because proxy 1st sends "100
trying " for invite then "477 send failed " .

Is there any option through which I can do this ,

Failover block in my registrar config :
failure_route[3] {
        # the previous contact is not good

        if (t_check_status("408|404|477|486|50[234]|603")) {
                # route to the next contact
                if (next_branches()) {
                        # prepare for lcr failover
                        xlog( "L_NOTICE", "[$Tf] FR: $ci Next contact $fU
-> $tU via $rd\n" );
                        if (!t_relay()){
                } else {
                        xlog( "L_WARN", "[$Tf] FR: $ci No more buscuits in
the biscuit tin -> 503.\n" );
                        #t_reply("503", "Service unavailable -- no more


Please do help . I am blocked in a production environment .

*Thanks & Regards*
*Sasmita Panda*
*Senior Network Testing and Software Engineer*
*3CLogic , ph:07827611765*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20190509/bf966d77/attachment.html>

More information about the Users mailing list