[OpenSIPS-Users] Avpops failure route

Bogdan-Andrei Iancu bogdan at voice-system.ro
Tue Dec 1 23:00:57 CET 2009


Hi Andrew,

Andrew Pogrebennyk wrote:
> Hello,
>
> I have a similar setup. It could be that you just need to call 
> append_branch() somewhere in the failure_route[3], unless you do it in 
> route[4]. At least it works for me.
>   
That is true for versions older than 1.5 . Starting with 1.5, in failure 
route you have the same behaviour as in request route - $ru is the first 
destination (default) and you need to use append_branch() only if you 
want to do parallel forking (at one stage).

> However I have faced another problem that you can't use the same 
> gateway/UA several times as a target for sequential forwarding, since 
> INVITEs to different targets are part of the same dialog, besides 
> OpenSIPS sends new INVITE a few ms prior to canceling previous branch 
> (well, I'm about to submit it as a bug). I thought you could have some 
> clue about it since I see you are also using one IP address. I have 
> written about it here:
> http://www.mail-archive.com/users@lists.opensips.org/msg07999.html
> but Bogdan didn't reply yet.
>   
Sorry - missed  that one :D....
It is interesting what you are saying, but I wouldn't say it is a bug in 
OpenSIPS, but rather a bug in the GW - even if the first and the second 
INVITE belong to the same call, they are different branches (different 
VIA headers) and any SIP entity must accept (in parallel,as individual 
attempts) multiple branches of the same call.

Regards,
Bogdan

> Andrew
>
> Indiver wrote:
>   
>> hi bodgan,
>>
>> Thanks for your reply. I made some changes and call is now going to
>> destination. But when no answer or busy it is not going to failure route.
>> here are the changes i did.
>>
>>
>>         #unconditional call forward
>>        if(avp_db_load("$ruri/username","$avp(s:callfwd)")) 
>>        {
>>             avp_pushto("$ruri", "$avp(s:callfwd)");
>>             avp_print(); 
>>             route(4);
>>             exit;
>>
>>         }
>>
>>        #fwd on busy
>>
>> if (avp_db_load("$ruri/username", "$avp(s:fwdbusy)")) { 
>>     if (!avp_check("$avp(s:fwdbusy)", "eq/$ruri/i")) { 
>>       setflag(26);
>>     };
>>   };
>>
>> fwd on noanswer
>>
>>   if (avp_db_load("$ruri/username", "$avp(s:fwdnoanswer)")) { 
>>     if (!avp_check("$avp(s:fwdnoanswer)", "eq/$ruri/i")) { 
>>       setflag(27);
>>     };
>>   };
>> t_on_failure("3");
>>
>> #########Failure Route#########
>>
>> failure_route[3]
>> {
>>
>>  if (isflagset(26) && t_check_status("486")) { 
>>     if (avp_pushto("$ruri","$avp(s:fwdbusy)")) {
>>       avp_delete("$avp(s:fwdbusy)");
>>       resetflag(26);
>>       route(4);
>>       exit;
>>     };
>>   };
>>
>>   if (isflagset(27) && t_check_status("408") && t_check_status("487")) { 
>>     if (avp_pushto("$ruri", "$avp(s:fwdnoanswer)")) { 
>>       avp_delete("$avp(s:fwdnoanswer)");
>>       resetflag(27);
>>       route(4); 
>>       exit;
>>     };
>>   };
>>
>> It does not going to failure route and just hanging up!
>>     
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>   


-- 
Bogdan-Andrei Iancu
www.voice-system.ro




More information about the Users mailing list