[OpenSIPS-Users] Module Path and function loose_route

Iñaki Baz Castillo ibc at aliax.net
Fri Aug 21 12:50:24 CEST 2009


El Viernes, 21 de Agosto de 2009, mayamatakeshi escribió:
> > and the inbound/outbound proxy should remove the Route header and route
> > the request based on the RURI as usual.
>
> How my cfg should accomplish this then? If loose_route returned TRUE,
> I would simply relay the request to the address in the RURI.
> Do you mean I should not be using loose_route() for this? Should I
> perform the checking in another way?

Exactly. Loose_routing mechanism is just for in-dialog requests. In fact, RFC 
3261 defines loose routing as a way for a proxy to remain in the dialog path.


> Well, of course I could come up with something else, but it seems to
> me loose_route() would be the simplest way to do it if there was not
> that exception clause that I really don't understand why is there.

Using loose route makes no sense since its purpose is handling in-dialog 
requests.
IMHO what you want to achieve is easier:
- If the proxy receives an initial request from the registrar (no To tag), 
then do loose_route (just to take off the Route header even if it returns 
false) and route the call normally. based on RURI, no more:

  if $si == "REGISTRAR_IP" {
    loose_route();  # returns false but removes the Route header.
    t_relay();  # Route based on RURI since the Route header has been removed.
  } 


-- 
Iñaki Baz Castillo <ibc at aliax.net>



More information about the Users mailing list