[OpenSER-Users] OpenSER 1.2.2 and 302 Moved, funny log issue?

Bogdan-Andrei Iancu bogdan at voice-system.ro
Thu Feb 28 11:56:05 CET 2008


Hi Zahid,

To be honest, I do not see the purpose of this:

         # get last URI from destination-set and set it as R-URI
         avp_delete("$avp(s:tmp)/g");
         $avp(s:tmp) = $ds;
         avp_subst("$avp(s:tmp)", "/.*(sip:.+@[^:;>]+).*$/\1/");
         avp_pushto("$ru", "$avp(s:tmp)");

This code fetches the first branch (by using the $ds pv and the regexp) 
and push it as RURI; but if there is no following append_branch(), it 
has 0 effect. And if it does append_branch somewhere later, it will just 
duplicate a branch....

Maybe Andreas (here CCed) can give you some details on this.....

Regards,
Bogdan


Zahid Mehmood wrote:
> Hi,
>     If get_redirect() is already pushing the contacts as branches,  
> then what is the purpose /  benefit / drawback of doing something like  
> this:
>
> taken from sipwise online config:
>
>          if(!get_redirects("1:1"))
>          {
>
>              xlog("L_ERROR", "Failed to fetch contact '$ct' from  
> 301/302 - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
>              acc_db_request("480", "acc");
>              t_reply("480", "Temporarily Unavailable");
>              exit;
>          }
>          # get last URI from destination-set and set it as R-URI
>          avp_delete("$avp(s:tmp)/g");
>          $avp(s:tmp) = $ds;
>          avp_subst("$avp(s:tmp)", "/.*(sip:.+@[^:;>]+).*$/\1/");
>          avp_pushto("$ru", "$avp(s:tmp)");
>
>
> I'd greatly appreciate your answers as they will help me better  
> understand the use of branches/destination set.
>
> Thanks.
>
>   





More information about the Users mailing list