Changed BindPort now cant register ZoIPER remote ext

  • Changed bindport to, for example, 9500

  • Port Forwarded 9500 from internet to freepbx server

  • FreePBX extension settings have 9500 as port

  • ZoIPER app config

    domain: Public IP of freepbx
    username: 100
    password: mysecret

When I try to register

“Connection Error: 102, Connection Timeout”

No info on the debug side of freepbx…

All I want to do is connect remote office extensions securely without VPN, so I have changed the bindport and now have to reprogram all the phone configs, all the extension configs, and in the process I have now broken my SPA3102 FXS extension, and remote extensions arent working at all…

You did something wrong, check your work . . . . :wink:

Man, I don’t get it…

If I switch bindport back to 5060, and configure my freepbx extensions settings to 5060, and my phone config back to 5060 and port forward 5060, then it works and I can register my remote ZoIPER app

Same thing with my SPA3102 FXS extension, it works with bindport 5060 but when changed it doesnt.

Now you go to sip debug and tcpdump/wireshark and your routers logs to investigate why. Do that on both ends. IWFM


I got it working. Here’s what I did:

  • Read this article on changing bindport
  • Read this article on SIP over TCP

To summarize both articles:


  1. Set custom BindPort in SIP settings, but also set Bind Address to freepbx local IP (192.168.x.x)
  2. amportal restart
  3. Ignore extension SIP Port settings, they are ignored because I am using “dynamic IP”
  4. Check to make sure it is binding to the port with


  • In your PBX, Go to Applications–> Extensions --> Transport -> All TCP - Primary. That’s going to make it use TCP for your extension.
  • Still in your PBX, go to Settings --> Asterisk SIP settings --> Other SIP Settings, and add “tcpenable=yes”. That’s going to allow Asterisk to use TCP connection, otherwise the extension TCP setting is irrelevant.
  • In your phone, check “use TCP” box in your SIP app.
  • Change the “TCP keep alive” in your SIP app to 1200 seconds, or play with it. That’s right, 1200 seconds is 20 minutes. I’ve found that 15 minutes was not unnecessary, and 30 minutes was to much, gave to much time to unregister.
  • Go in your extension settings, and change the qualify option from “yes” to “no”.

Problems Discovered:

This lead me to discover that TCP was not binding to my custom port, but stayed listening on 5060, which is why ZoIPER would not register:

netstat -lnp | grep asterisk

[email protected]:~# netstat -lnp | grep asterisk
tcp 0 0* LISTEN 2968/asterisk
tcp 0 0* LISTEN 2968/asterisk
tcp 0 0* LISTEN 2968/asterisk
tcp 0 0* LISTEN 2968/asterisk
udp 0 0* 2968/asterisk
udp 0 0 192.1682…200:9997* 2968/asterisk
udp 0 0* 2968/asterisk
udp 0 0* 2968/asterisk
unix 2 [ ACC ] STREAM LISTENING 3819 2968/asterisk /var/run/asterisk/asterisk.ctl
[email protected]:~#

This was solved thanks to dicko

Also, as you can see in my config in original post, I did not put the “domain” settings correctly

it should be

domain Public-IP-of-FreePBXP:custom-bindport (for example 1.1.1:9997)


SPA3102 FXS extension STILL will not register since the bindport change. I dont know what to do or why

Everything in this post has been resolved!

Got SPA3102 FXS to register, I just had to add the custom bind port after the IP in the SPA PROXY setting, for example,


See this post for more info