"no ip nat service sip udp port 5060"
I saw a network that, in order to have sip phone to be working behind NAT. The command above had to be enabled. I would like to understand what this command do.
I guess, this command means that all the sip traffic going through port 5060 will be nated using port 5060. But my question is... how does it work.
For my understanding, Let say there are 2 phones in the LAN, without this command applied, it will be NATed as following:
private IP phone A: 192.168.1.1:5060
pivate IP phone B:192.168.1.2:5060
NATed to
Public IP phone A: 4.4.4.4:5060
Public IP phone B: 4.4.4.4:5061
If the command above is applied, it will be NATed to:
Public IP phone A: 4.4.4.4:5060
Public IP phone B: 4.4.4.4:5060
If both phones are using port 5060, when there is a reply back from the SIP server to the phone, with destination 4.4.4.4:5060. How does it know the packet is belongs to which phone?