Right.
I have Nokia E60 phone which is SIP-enabled. Unfortunately it has no setting for the SIP source port, dislike many hardware and software SIP-phones around. So it registers as 192.168.5.60:5060 with my SIP provider. My NAT device preserves the port number, so port 5060 on E60 became port 5060 on my WAN ip. Dynamic rule is created on the NAT device to pass all the traffic (from the external SIP proxy) which is coming on WAN:5060 to E60:5060.
Now, when I’m using my Asterisk, which is 192.168.5.77:5060, and it registers with the same external SIP proxy, the duplicate rule on the NAT cannot be created. I.e. I cannot have 2 NAT rules working at the same time:
If I will change the source port used by Asterisk for specific peer/registration only then the different port will be used on the NAT device and absolutely separate return path will be created.
So, I need something like this:
Ext.Proxy —> WAN:5077 —> Asterisk:5077
Generally, I can change the bindport globally, but this will force me to change the destination SIP ports on all the SIP phones connected to my Asterisk.
yuck, i feel your pain. i doubt asterisk has any hooks for this, since it is not a normal thing to have to do. maybe you could have the asterisk box’s linux iptables change the source port from the E60 to some higher numbered port?
i meant normal for asterisk, not the client. in any event, i find this whole problem very odd, to say the least. this issue is why it is not recommended for a tcp or udp client to specify the source port - you let the tcp/ip stack pick a random one for you. a proper stateful firewall should not have a problem directing the return packets. oh well…
E60 and other E-series phones are working perfectly with my provider through NAT, without any port forwarding on router.
I’ve also used E60 with public hot spots without any troubles.
The only problem I see with Nokia is the luck of user-configurable parameters, like SIP source port for example.