SIP registration issue on Different Port

Hi there,

I am registering a trunk which is on different port i.e 8000 as i have 5060 is not available in my area.

The problem is, when i add the port=8000 in trunk, it does not get registered. But when i change the bindport to 8000 from 5060 is gets registered.
I have another voip carrier, they provide me sip on different port that 6000, and i can’t registered it with 8000 bindport. and when i change bindport to 6000 it get registered but trunk-1 gets unregistered.

Please let me know if there is any solution for that. I am really stuck here.

Thanks in advance.

Sohaib Khan

asterisk version is 1.4.42

Asterisk can only bind to one local SIP port at a time. If you really need to bind to multiple ones, you will need to run a different instance of Asterisk for each one.

However, if port 5060 is blocked, it seems to me that you may be breaking the law by trying to use other ports, as it sounds to me as though VoIP is banned, rather than port 5060, and blocking 5060 is just a way to enforce that ban.

Hi David,

When you say, you need to run different instance of asterisk, what does it means?

Actually my client got the call center license but the internet provider is not opening the specific 5060 port, they allow them to use SIP on other port. So, that is why we are using another port.


Sohaib Khan

Run Asterisk multiple times, with different incoming port numbers each time. You can either do this on one machine, or have one machine for each Asterisk. The instances can communicate with each other as it is only the local port number that must be the same for all trunks. You will need to explicitly specify the location of asterisk.conf, if you use the same machine.

Blocking port 5060 is generally done either to totally prevent the use of VoIP or to prevent the use of VoIP to bypass the PSTN. The underlying reasons for this tend to be either commercial impact, or national security. Mobile phone operators often block it to avoid it removing revenue from their mobile telephony services. In the case of national security it is done to make it easier for the authorities to monitor telephone traffic.

In both cases, non-5060 port numbers may be tolerated on the assumption that they represent internal communication within a signal organisation (probably less so in the mobile phone case). Using an alternative port to access an ITSP is likely to be seen as trying to circumvent the block.

VoIP traffic tends to severely stress data networks, because it is not the natural sort of traffic for them. In countries with lots of high speed networks, it may be too small a component of the traffic to cause problems, but I can imagine that there are still places where that is not true.

Basically, if your ISP is blocking 5060, they don’t want you to use VoIP to access the PSTN, and may not want you to use VoIP at all.