[sr-dev] alias_contact()/handle_alias() ready for testing
Klaus Darilion
klaus.mailinglists at pernau.at
Mon Nov 9 15:12:33 CET 2009
Juha Heinanen schrieb:
> Klaus Darilion writes:
>
> > ok. depends in your NAT-traversal approach. In my pragmatic approach I
> > do NAT traversal anyway for all local users, thus it would work for me.
> >
> > If you have a more advanced NAT traversal approach, probably you need a
> > second bflag which will is activated either by NAT or TCP.
>
> klaus,
>
> i don't use mediaproxy if is not needed. the example implementation
> already takes care of what you suggest:
but shouldn't that be extended to detect of contact of response needs to
be converted?
> route [REGISTER_REQUESTS] {
> ...
> if (isflagset(FROM_NATED) || (proto == TCP)) {
> fix_nated_register();
> if (isflagset(FROM_NATED)) {
> setbflag("TO_NATED");
> };
if (proto == TCP) {
setbflag("TO_TCP");
};
> };
> save("location");
and after lookup() in branch route:
if (isbflagset(TO_TCP) || isbflagset(TO_NATED)) {
t_on_reply(REWRITE_RESPONSE_CONTACT);
};
regards
klaus
More information about the sr-dev
mailing list