[OpenSIPS-Users] Module Path and function loose_route

Iñaki Baz Castillo ibc at aliax.net
Fri Aug 21 13:55:49 CEST 2009


El Viernes, 21 de Agosto de 2009, mayamatakeshi escribió:
> Thanks,
> in my case I will need an extra test as the registrar will actually be
> a B2BUA and may require not only termination of calls to users but
> also calls to be directed to GWs.
> So I came up with this:
>
> if(request came from B2BUA) {
> 	if($(hdr(Route)[0]{nameaddr.uri}{uri.host}) == "MY_IPADDRESS" &&
> $(hdr(Route)[1]) == null) {
> 		loose_route(); # this forces removal of the Route header detected above.
> 		t_relay();
> 		exit;
> 	}
> }

IMHO is 100% correct.


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



More information about the Users mailing list