[sr-dev] alias_contact()/handle_alias() ready for testing
Klaus Darilion
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.
>
> inaki,
>
> 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
requests/responses.
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
function name).
e.g: add_alias(), handle_alias()
regards
klaus
>
> 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
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
More information about the sr-dev
mailing list