On 08/14/2013 09:58 PM, Vitaliy Aleksandrov wrote:
On 08/14/2013 07:32 PM, Roberto Fichera wrote:
On 08/14/2013 04:36 PM, Vitaliy Aleksandrov wrote:
If you won't be able to disable SIP ALG on your router you can fill $avp(received) manually before calling save(): $avp(received) = "sip:" + $si + ":" + $sp + ";transport=" + $proto;
In this case all user location records will have the "received" attribut even if a UA isn't behind NAT, but I don't see any problems with that.
This one looks working, but the callee doesn't answer correctly because the TCP isn't correct:
Contact:: sip:528@94.94.X.X:1380;transport=TCP;ob;q=;expires=294;flags=0x0;cflags=0x0;state=0;socket=tcp:178.79.X.X:5060;methods=0x1FDF;received=sip:94.94.X.X:37030;transport=tcp;user_agent=<PJSUA
v2.1-svn Linux-3.10.5.201/x86_64/glibc-2.17>;reg-id=0
The contact uses a port which isn't translated inside by the router, the received field shows the right one. Should I change the Contact header instead? In case, how can I do that?
I didn't understand what "callee doesn't answer correctly" means. Callee doesn't know what's in the received field of its registration.
Sorry! My typo! I meant why kamilio wasn't reusing the TCP port specified in the REGISTER even for the INVITE. I mean, kamailio now knows the received field so I'm expecting it routes the requests for the called UA through the address:port specified in this field.
The only problem I see is that your router changes ip in the contact field of REGISTER requests and then kamailio puts this value (new_ip:old_port) to INVITEs destined to UAs behind your NAT router.
Indeed, my testing router is affected by this ALG "problem"! I guess it's better to disable it and complete simple TCP tests then move to TLS.
It's not likely, but maybe pjsip doesn't like INVITEs with RURI which differs from what it put to the contact during registration. IIRC pjsua prints lots of debugging information. So you can check if pjsua shows anything when INVITE comes in its log and also attach a trace of such a call.
pjsua doesn't report any problem so far, so seems accepting the INVITE.
P.S. IMHO the best way to pass sip through such routers is sip over TLS.
Yep! I'll do that.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users