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?

Cheers,
Roberto Fichera.


>
>> On 08/14/2013 11:51 AM, Roberto Fichera wrote:
>>> On 08/14/2013 11:31 AM, Daniel-Constantin Mierla wrote:
>>>
>>> Hi,
>>>
>>>> Hello,
>>>>
>>>> On 8/14/13 11:26 AM, Roberto Fichera wrote:
>>>>> On 08/14/2013 11:20 AM, Daniel-Constantin Mierla wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> On 8/14/13 11:16 AM, Roberto Fichera wrote:
>>>>>>> On 08/14/2013 10:19 AM, Daniel-Constantin Mierla wrote:
>>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>>> Hello,
>>>>>>>>
>>>>>>>> as you can see in the REGISTER, the phone give a public IP where it 
>>>>>>>> can be contacted and kamailio tries to
>>>>>>>> deliver to
>>>>>>>> that address sip:528@94.94.X.X:1274;transport=TCP
>>>>>>>>
>>>>>>>> REGISTER comes from another port, but that is allowed in SIP.
>>>>>>> Yep! That's the problem
>>>>>>>
>>>>>>>> You should disable stun in the client and let the server care of nat 
>>>>>>>> traversal.
>>>>>>> As already said all client doesn't use any stun-
>>>>>> then how they discover the public IP address if they are behind NAT? Or 
>>>>>> did I misunderstand that they are behind
>>>>>> NAT?
>>>>> Yes! They are behind NAT! Shouldn't kamailio detect such behaviour so it 
>>>>> will change the contact header and the other
>>>>> fields accordingly using the nat_fix_XXXX functions?
>>>> detection of whether a device is behind nat is done based on comparing 
>>>> source IP of the packet with the IP addresses
>>>> in the SIP message. It is no other way from application point of view.
>>>>
>>>> If you look at the trace, the REGISTER has only public IP addresses, no 
>>>> private address. Also, the Via header is
>>>> perfectly matching the the source IP and port of the packet.
>>> Mhhh!!! That's true!
>>>
>>>> Therefore, if the device is behind a nat in a private network, how does it 
>>>> discover the public IP or the NAT router?
>>>> Is the nat router running a SIP ALG? Can you get the SIP trace on the 
>>>> device itself?
>>> Good question! It's a cisco 877 but the conf doesn't have any kind of SIP 
>>> related configuration. Does it handle
>>> transparently the SIP traffic?
>>>
>>> Cisco IOS Software, C870 Software (C870-ADVIPSERVICESK9-M), Version 
>>> 12.4(15)T5, RELEASE SOFTWARE (fc4)
>>> Technical Support: http://www.cisco.com/techsupport
>>> Copyright (c) 1986-2008 by Cisco Systems, Inc.
>>> Compiled Thu 01-May-08 02:31 by prod_rel_team
>> Ok! There are two commands to disable it, since it's enabled by default!!!
>>
>> no ip nat service sip tcp port 5060
>> no ip nat service sip udp port 5060
>>
>> I'll test it right now!
>>>> Cheers,
>>>> Daniel
>>>>
>>> _______________________________________________
>>> 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
>>>
>>
>> _______________________________________________
>> 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
>
>
> _______________________________________________
> 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
>


_______________________________________________
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

Reply via email to