[sr-dev] alias_contact()/handle_alias() ready for testing
klaus.mailinglists at pernau.at
Mon Nov 9 12:47:57 CET 2009
Juha Heinanen schrieb:
> Iñaki Baz Castillo writes:
> > What about calling alias_contact() just in case nat_test() detects the
> > following two requeriments:
> > 1) The IP in Contact is private.
> > 2) There is no ";alias" param in Contact URI.
> > Of course a new nat_test flag would be needed for point 2.
> the rule is: do not call alias_contact(), when request or reply comes
> from a proxy. so even if there is no ;alias in contact, alias_contact()
> must not be called when request or reply comes from a proxy.
It is not possible to detect if a reply comes from a proxy or not. You
could add the alias anyway and handle the problem in "handle_alias": If
alias parameter is removed from RURI (in-dialog request), set $du only
if it was not already set by loose_route().
Further, alias_contact() must also be called on in-dialog
I think the functions are great to have, but would like different naming
(either have "alias" always at the beginning or at the end of the
e.g: add_alias(), handle_alias()
> the question is, is it possible to somehow detect it. for initial
> requests, proxy can be detected based on existence of an rr header.
> regarding in-dialog requests, perhaps that could be detected if proxy
> adds into rr header an param telling that request came from a proxy.
> it might then be possible to test that param in in-dialog requests.
> lets think it more.
> -- juha
> sr-dev mailing list
> sr-dev at lists.sip-router.org
More information about the sr-dev