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:
Ext.Proxy —> WAN:5060 —> E60:5060
Ext.Proxy —> WAN:5060 —> Asterisk:5060
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.