[Devel] Re: [Users] loose_route() function
Bogdan-Andrei Iancu
bogdan at voice-system.ro
Mon Nov 27 18:51:13 CET 2006
Hi Klaus,
this is more than correct - I will replace the current description with
this both on CVS and web.
thanks and regards,
bogdan
Klaus Darilion wrote:
> I think the README needs some refurbishment. How about this?
> Corrections welcome.
>
> 1.5.1. loose_route()
>
> The function performs routing of SIP requests which contain a route
> set. The name is a little bit confusing, as this function also routes
> requests which are in the "strict router" format.
>
> This function is usually used to route in-dialog requests (like ACK,
> BYE, reINVITE). Nevertheless also out-of-dialog requests can have a
> "pre-loaded route set" and my be routed with loose_route. It also
> takes care of translating between strict-routers and loose-router.
>
> The loose_route function analyzes the Route: headers in the requests.
> If there is no Route: header, the function returns 0 and routing
> should be done with normal lookup functions. If a Route: header is
> found, the function returns 1 and behaves as described in section
> 16.12 of RFC 3261. There is only one exception: If the request is
> out-of-dialog (no to-tag) and there is only one Route: header
> indicating the local proxy, then the Route: header is removed and the
> function returns 0.
>
> Make sure your loose_routing function can't be used by attackers to
> bypass proxy authorization.
>
> The loose_routing topic is very complex. See the RFC3261 for more
> details (grep for "route set" is a good starting point in this
> comprehensive RFC)
>
> This function can be used from REQUEST_ROUTE
>
>
>
> regards
> klaus
>
>
> Christian Schlatter wrote:
>
>> Quoting Gregoire <mlgg at hispeed.ch>:
>>
>>> -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA1
>>>
>>> Hi!
>>>
>>> I am wondering where I can find more information about the
>>> loose_route() function. On Wiki, I can see that it is RFC 3261
>>> compliant and understand what it's the difference between loose
>>> routing and strict routing, but in my conf. file I have a test like:
>>> if(loose_route()){...}
>>> and I 'd like to know what kind of value this function can return or
>>> when can it return something else than true?
>>
>>
>> To my knowledge, loose_route() returns a negative value in case of
>> invalid headers in the sip message or other "internal" errors. It
>> returns 1 (or TRUE) in case it finds a Route: header including the
>> proxy's domain. In this case, the function will also remove the
>> proxy's domain from the Route: header and sets the destination URI to
>> the next hop address found in the Route: header.
>>
>> The function returns 0 (FALSE) if there is no Route: header present
>> in the message.
>>
>> Also have a look at the source file /modules/rr/loose.c, in
>> particular functions loose_route() and after_loose().
>>
>> Christian
>>
>>
>>>
>>> Does someone have some information about that?
>>>
>>> Thanks
>>>
>>> Greg
>>> -----BEGIN PGP SIGNATURE-----
>>> Version: GnuPG v1.4.2.2 (GNU/Linux)
>>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>>>
>>> iD8DBQFFZv/iI8gmGeMTr0sRAgg8AKCA9CGb6hI9FEhdE8BMm5nlnXDKkACgjZBA
>>> NFrRWixi2BtEE6e2YrAfg9g=
>>> =ucXk
>>> -----END PGP SIGNATURE-----
>>>
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at openser.org
>>> http://openser.org/cgi-bin/mailman/listinfo/users
>>>
>>
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at openser.org
>> http://openser.org/cgi-bin/mailman/listinfo/users
>
>
>
More information about the Devel
mailing list