[sr-dev] why new tcp connection?

Juha Heinanen jh at tutpro.com
Sun Nov 8 02:27:21 CET 2009


Juha Heinanen writes:

 > - when request comes in, script always calls alias_contact() on it.
 >   alias_contact() checks if request has contact header and if not, does
 >   nothing.  if request has contact header, alias_contact() adds
 >   ;alias=ip:port param to contact uri containing received ip:port if
 >   contact ip:port does not match received ip:port.  otherwise it does
 >   nothing.

turns out that there already exists a nathelper function very close to
what i propose above: add_rcv_param().  the difference is that it does
not check if there is a need to add any.  also, nat_uac_test() does not
have that kind of test (contact ip:port matches received ip:port).

-- juha



More information about the sr-dev mailing list