[OpenSIPS-Users] loose_route()
Bogdan-Andrei Iancu
bogdan at voice-system.ro
Thu Nov 11 12:15:59 CET 2010
Victor Gamov wrote:
>
> I hope that loose_route() will process Route headers not RURI.
>
> RFC-3261 16.4 says that
> "The proxy MUST inspect the Request-URI of the request. If the
> Request-URI of the request contains a value this proxy previously
> placed into a Record-Route header field (see Section 16.6 item 4),
> the proxy MUST replace the Request-URI in the request with the last
> value from the Route header field, and remove that value from the
> Route header field. The proxy MUST then proceed as if it received
> this modified request."
>
> So loose_route() inspect R-URI. But R-URI
> sip:74951000000 at X.X.X.X:5060
> is not the same as inserted into Route
> (sip:X.X.X.X;lr=on;ftag=2204003977).
A RR hdr cannot be completely copied to a RR, as syntactically speaking
they are different . RR is a name-addr spec, while RURI is a SIP
URI...what you see there as lr and ftag are RR hdr param, so cannot be
copied into RURI - just the URI part of RR is copied into RURI.
>
> So Route header
> Route: <sip:X.X.X.X;lr=on;ftag=2204003977>
> removed, R-URI untouched, next Route processed and $du is
> sip:X.X.X.X:50080 now.
not really :
1) opensips finds its IP in RURI -> previous hop was a strict router
2) next hop is in the first Route hdr
3) next hop has "lr" param, so next hop is a loose router -> strict
to loose conversion
A) last Route is moved into RURI (end point address)
B) send (via $du) the call to next hop (from top most Route).
Regards,
Bogdan
>
> As my script does not decide to call lookup() but t_relay(), then
> request forwarded to $du.
>
> This was my (incorrect) logic...
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
--
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
15 - 19 November 2010, Edison, New Jersey, USA
www.voice-system.ro
More information about the Users
mailing list