[OpenSIPS-Users] Value of PATH is not being used in next_branches() in Faliure Route

Bogdan-Andrei Iancu bogdan at opensips.org
Mon Jun 11 12:04:42 CEST 2012


Hi Gomtesh,

Do your saved contacts contain a PATH field at all ? check with 
"opensipsctl ul show" to see if the path was stored in usrloc cache.

Maybe your problem is not at "lookup" time, but rather at "save" time.

Regards,
Bogdan

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 06/11/2012 10:56 AM, Gomtesh Jain wrote:
> Hi ,
>    I am using opensips 1.6 . I am facing an issue here . It seems In 
> faliure route when I do next_branches() it does not set value of 
> "path" (from lookup) as distination/route . Which results , opensips 
> try to send message directly to UA .
> Here I give N/w diagram
>
>   UA1(115.X.X.X)-------[PROXY]--------|                               
>     |
>                                                           | 
> Registrar/Opensips   |
>   UA2 (122.x.x.x)--------[PROXY]-------|                               
>     |
>
>
> The issue I am facing is ...
> 1. On any INVITE to Opensips after lookup Opensips sends invite to Proxy
> 2. On any faliure response in "Faiure Route"
> 3. When I do next_branches() it tries to send INVITE directly to 
> 122.X.X.X .
>
> -----------------HERE I GIVE PIECE OF Opnesips.cfg--------------------
>
>
>        xlog("L_NOTICE", "SERIALIZE BRANCHES ($rm) r-uri ($ru) : 
> Contact : $ct  :callID $ci : CSeq $cs \n");
>                         if (!serialize_branches(1)){
>                                 sl_send_reply("500","Unable to load 
> contacts");
>                                 exit;
>                         }else{
>                       xlog("L_NOTICE", "PREPARE FIRST BRANCH ($rm) 
> r-uri ($ru) : Contact : $ct  :callID $ci : CSeq $cs \n");
>                                 if (next_branches()){
>                                     xlog("L_NOTICE", "NEXT BRANCH 
> After Seri :callID $ci : CSeq $cs \n");
>                                         t_on_failure("1");
>                                 }
>                                 #else{
>                                 #       sl_send_reply("504","Not found ");
>                                 #       exit;
>                                 #}
>                         }
>                         append_hf("P-hint: lcr applied\r\n");
>
>                 }else{
>                         append_hf("P-hint: usrloc applied\r\n");
>                 }
>
>         };
>
>         route(1);
> }
>
> route[1] {
>
>
>         if (nat_uac_test("7")) {
>             fix_nated_contact();
>         };
>         # send it out now; use stateful forwarding as it works reliably
>         # even for UDP2TCP
>         xlog("L_NOTICE", " IN ROUTE BLOCK method ($rm) r-uri ($rs) 
> :callID $ci \n");
>         if (!t_relay()) {
>                 sl_reply_error();
>         };
>         t_on_reply("1");
>         exit;
> }
>
> onreply_route[1]{
>   xlog("L_NOTICE", " ON REPLY BLOCK  method ($rm) r-uri ($rs) :callID 
> $ci :CSeq $cs \n");
> }
>
>
>
> failure_route[1] {
>    if ( t_check_status("404|477|408|486|50[234]")){
>                 xlog("L_NOTICE", " ERROR RESPONSE MATCHED  method 
> ($rm) r-uri ($rs) :callID $ci :CSeq $cs \n");
>          if (next_branches())
>          {
>                 xlog("L_NOTICE", " ON FAILURE BLOCK  method ($rm) 
> r-uri ($rs) :callID $ci :CSeq $cs \n");
>                 t_on_failure("1");
>                 route(1);
>
>          }
>
>     }
> }
>
> -----------------------------------------------------------------------------
>
>
> I attach the log of the call in debug=9 mode.
>
>
> Please have a look at this if anyone can help me .
>
> Thanx,
> Gomtesh
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20120611/a3440fab/attachment.htm>


More information about the Users mailing list