[OpenSIPS-Users] 302 redirect question

Bogdan-Andrei Iancu bogdan at voice-system.ro
Thu Mar 25 11:38:58 CET 2010


Hi Brett,

As Jeff already pointed out (and I'm making it official ;) ), the 
get_redirects() creates parallel branches. If you want to use them in a 
serial approach, you need to use the serialize_branches() function right 
after the get_redirects() -> it will order the branches according to q 
value and prepare them for serial forking.

Regards,
Bogdan

Brett Nemeroff wrote:
> Hello All,
> I have a question about 302 redirects.Maybe I'm just misunderstanding 
> how it's supposed to work..
>
> I get the following redirect:
>
> SIP/2.0 302 Moved temporarily.
>
> Via:SIP/2.0/UDP 
> 192.168.21.10;branch=z9hG4bK6cd5.ae1f6c43.0,SIP/2.0/UDP 
> 10.10.10.11:5060;branch=z9hG4bK-a96e3-4baac9a7-8c685c67-5898d54b.
>
> From:<sip:+5125551212 at 10.10.10.11:5060 
> <http://sip:+5125551212@10.10.10.11:5060>>;tag=a9d5ed0-13c4-4baac9a7-8c685c67-19c2a61a.
>
> To:<sip:15205551212 at 192.168.21.10:5060 
> <http://sip:15205551212@192.168.21.10:5060>>;tag=100063687-1269483944267.
>
> Call-ID:CXC-410-65762490-a9d5ed0-13c4-4baac9a7-8c685c67-17d5873c at 10.10.10.11 
> <mailto:Call-ID%3ACXC-410-65762490-a9d5ed0-13c4-4baac9a7-8c685c67-17d5873c at 10.10.10.11>.
>
> CSeq:1 INVITE.
>
> Record-Route:<sip:192.168.21.10;lr=on;did=f8d.623e93f6>.
>
> Contact:<sip:5205551212 at 192.168.50.10:5060;user=phone>;q=0.5,<sip:5205551212 at 192.168.30.10:5060;user=phone>;q=0.25.
>
> Content-Length:0.
>
>
> And in my failure route I have:
>
>         if (t_check_status("302")) {
>
>                 get_redirects("*");
>
>                 t_relay();
>
>                 exit;
>
>         }
>
>
> Now when I watch a sip trace, right after the 302, an INVITE fires off 
> to BOTH 192.168.50.10 and 192.168.30.10 at the exact same time. The q 
> values are different, shouldn't they be serial?
>
> I'm not entirely sure how much "magic" is handled in the q-value and 
> how much needs to be scripted.. But I was under the impression that 
> this magic was "fully automatic"
>
> Thanks!
> -Brett
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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