[Users] What causes loose_route() to return false ?

Klaus Darilion klaus.mailinglists at pernau.at
Tue Sep 26 09:30:07 CEST 2006


Hi!

loose_route is true if the received request contains routes - either 
loose routed or strict routed. Thus, the naming is wrong, but this has 
historical reasons. The loose route function also removes the Route 
headers which points to the proxy itself (the matching is done via the 
IP addresses the proxy is listening on, and via the configured 'alias') 
and performs translation from loose-routing to strict-routing and 
vice-versa if the needed.

If the message does not contain a Route set, loose_route return false.

In usual cases, this means that for out-of-dialog requests the 
loose_route function returns false whereas for in-dialog requests (which 
usually have route headers due to record-route) the loose_route function 
returns true.



regards
klaus

Jeremie Le Hen wrote:
> Hi list,
> 
> in numerous example configuration files, I saw the following statement
> (where "route(1)" is the final routing block):
> 
> % if (loose_route()) {
> % 	route(1);
> % }
> % 
> % ...
> % 
> % route(1);
> 
> It works for me, but I am just wondering what causes the loose_route()
> function to return a failure ?  In this case, it seems number of actions
> used to be performed before calling the final message routing block.
> 
> Naturally, I checked the rr module documentation, but the descriptions is
> very small and only refers to RFC 3161.  I have read some parts of this
> RFC, thus I know what loose routing means (basically, it uses always the
> same URI all along the proxy string, removing IP addresses in the Route
> header gradually, contrariwise to strict routing which puts the real URI
> at the end of the Route header and use the next proxy as URI).  In spite
> of this, I cannot figure why this function should fail.
> 
> I'm pretty confident this is to help for the scripting logic, and I was
> supplied with some explanations.
> 
> Thank you.
> Regards,





More information about the Users mailing list