[sr-dev] problem with locally generated ACKs

Andrei Pelinescu-Onciul andrei at iptel.org
Fri Dec 18 12:27:41 CET 2009


On Dec 17, 2009 at 15:52, Juha Heinanen <jh at tutpro.com> wrote:
> even if i call fix_nated_contact() when sr receives 200 ok to locally
> generated invite, it is still trying to send the ack to local address of
> the ua.  looks like modifications done in reply_route to 200 ok are not
> visible to sr when it generates the ack.
> 
> andrei, can you confirm this?  are there any means to solve this
> problem?

Yes, onreply_route modifications are not taken into account by tm.
In fact final responses are processed by tm _before_ executing the
onreply_route. The onreply_route changes will only appear in the
forwarded reply.

Right now the only way to solve this without code changes is to add
another hop (e.g. route the message once through localhost or another
proxy and fix the contact there).

With coding changes I see 2 possible workarounds:
1. add a param. for using the local INVITE dst. when generating the ACK
 (instead of obeying the rfc) (easy)
2. add a t_reply_fake_contact() command for changing the contact seen by
tm and maybe modifiying fix_nated_contact() to use it.


Andrei



More information about the sr-dev mailing list