Alternative port to 5060 & Unable to log in from remote location

I am hoping to use my PBX on Alternative port i.e different than 5060. I have been successful in changing binding port and connecting on the alternative port over LAN, but cant login remotely. Here is what I have done already.
1.Change binding port in asterix.config. (through FTP) (successful)
2.PORT forwarded on the router to the PBX (UDP) (firewall)
3.Change binding port in sip setting on free pbx GUI. (I am not sure if this needed to be done as changed on asterix.config)
4. adding the alternative port at the end of ip on phone client i.e:

any suggestions. Help will be much appreciated.

What kind of phone client are you using?
Did you open up the new port in IPTables?

I am using a 3CX phone, and I have used it on alternative ports previously. It was a paid cloud service. I dont know the term IP tables. Is this in the Asterix PBX? Sorry You have to put up with my Asterisk ignorance, but on a positive side I am willing to learn …and experiment.

Found the IP Tables and change the ports from 5060 to my desired ports, but problem remains cant log in unless on LAN.
Please help

Possibly will be useful.

Otherwise, please post OS and version of 3CX phone. By “unable to log in”, do you mean that the phone does not register? What error message, if any is displayed? How is the phone connected to the Internet (home broadband, company LAN, 3G cellular data, etc.)? If you have administrative control of the network involved, please post: Modem make/model? Configured as router? Separate router, if any?

Ok here are the background details. Some one had set up the PBX for me. It is set to work on 1090 port rather that 5060. It works fine on 1090 from remote location or on LAN. I want to change this port, to a different port other than 1090. Regardless of what I change it to I can only make to work on LAN.

I have made changes in asterix.config file. (binding port)
I have also made changes to the tables.
I have opened the desired portal on the router and pointed it towards the router.
pretty much tried to replicate how it is already set up but some where I am missing a step.
3CX has been working well with 1090. it version is 6.0.26523.0


Given that you didn’t answer any of the questions in my previous post, I can only give some general advice:

Assuming that you’re running 3CX on Windows, Mac or Linux, start a Wireshark capture, then start 3CX. See whether REGISTER requests are going out to the proper IP address and port, and what responses, if any, are received.

Also, run a tcpdump capture on the FreePBX machine and see if proper REGISTER requests are coming in and what responses, if any, are being sent.

Then, use your common sense. For example, if the request is going out from the phone but not arriving at the PBX, you have a networking problem unrelated to FreePBX. If it’s not going out from the phone, the phone is configured improperly or a software firewall on the client machine is blocking the port. If it’s coming in to the PBX but a response isn’t being sent out, you have a problem with iptables. And so on.

Sorry about the previous reply, I think the more I cant do this the more frustrated I am with this.

  1. I am using a windows 8 64Bit
  2. 3CX phone client version is 6.0.26523.0.
  3. Its a home network and its a net gear modem wifi router. I have all admin rights and nothing is being blocked.
  4. i don’t have a fix IP so I use NoIP as an alternative.
  5. the PBX is set to fix LAN address i.e
  6. Port 5060, 10000-20000, and the alternative ports including IAX2 are also opened and forwarded to which (PBX) & its UDP.
  7. When I refer to remotely I use my 3G phone net work.

I am now hoping to get around using wireshark. I am sure I will come back with question’s on this, but what I gather from your summary is binding port changes are made in asterix.conf, on sip setting in WEB GUI, and IPTables, should be sufficecnt provided fire wall port fording is in place.

I have now removed all my previous setting and reverted to my backup, before I started making all these changes. I will Update here once I have done these hopefully with success.

I am how ever of the opinion (having almost no asterisk knowledge) that their is something that I am missing as when it was set in the first place on 1090 which is a fully working alternative port, That is something other than binding port on the GUI, and changes in asterisk.config, and even the IP tables.

I also use and alternate port and I had issues but got everything working. I am using FreePBX 5.211.65-9 with Asterisk 11.7.0

Here is my suggestion:

  1. Use the WEB GUI to make all changes. No need to go anywhere else and it is not advised.
    A: NAT YES
    B: In EXTERNAL IP: use STATIC IP, and put your current assigned Public IP, even if it is a DHCP IP.
    most ISPs don’t change this often unless you reboot your router several times
    or try the FQDN and make sure it points to your Public IP.
    C: BIND PORT: put your alternate port here. I assumed you already did this.
    D: For security, always disable ALLOW ANONYMOUS INBOUND SIP CALLS and SIP GUEST

nat = YES
port= put here the alternate port also

I use ZOIPER for my clients on their cellphones and for host IP use this format:
FQDN:alternate port . ex.
where it points to your public IP.

The trick is that you also set your router correctly.
Make sure you router routes that alternate port to your internal IP in addition to the corresponding RTP ports.
I use RTP ports 10000-20000 UDP

for trouble shooting and to make sure the client is hitting your pbx,
Log into your pbx using a telnet tool like putty and turn on asterisk logging from the CLI, type this from your Telnet session:
asterisk -rvvvvvc

then try your client and see if it actually hits the PBX from the outside.

Hope this helps

Riad63 thanks for the detailed message with instruction. I have now tried these, an seem to run into the same issue which is alternative port works fine over LAN but doesn’t work over WAN. (default port on my PBX being 1090).

Phone keeps saying discoveering network>>>connecting>>>not connected.

This will in normal circumstance mean my router fire wall is blocking it. But I have actually do have the ports opened.

Forwarded ports are

10000-20000 UDP 192.168.x.xx.
1090-1090 UDP 192.168.x.xx
1091-1091 UDP 192.168.x.xx

1091 being the experiment port which I can make to work.

If you have Windows Firewall turned on then you may need to open the port there also.

Thank-you all for replying, for those who may be in my situation and above do-not work, here is where the key is.

  1. make sure your binding port in sip stetting is set to what you want it (og course other than 5060)
  2. with good bit of help i was now understand what firewall (ip table is) make sure you make the change there and its not in the root it actually one etc folder
  3. make the change in the asterisk.config file as well.

best of luck