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:

http://www.skelleton.net/2012/08/02/linksys-spa-3102/

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

dicko!

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:

BindPort

  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

TCP:

  • 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

root@raspbx:~# netstat -lnp | grep asterisk
tcp 0 0 192.168.2.200:5060 0.0.0.0:* LISTEN 2968/asterisk
tcp 0 0 127.0.0.1:5038 0.0.0.0:* LISTEN 2968/asterisk
tcp 0 0 0.0.0.0:2000 0.0.0.0:* LISTEN 2968/asterisk
tcp 0 0 0.0.0.0:1720 0.0.0.0:* LISTEN 2968/asterisk
udp 0 0 0.0.0.0:4569 0.0.0.0:* 2968/asterisk
udp 0 0 192.1682…200:9997 0.0.0.0:* 2968/asterisk
udp 0 0 0.0.0.0:5000 0.0.0.0:* 2968/asterisk
udp 0 0 0.0.0.0:4520 0.0.0.0:* 2968/asterisk
unix 2 [ ACC ] STREAM LISTENING 3819 2968/asterisk /var/run/asterisk/asterisk.ctl
root@raspbx:~#

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)

EVERYTHING IS WORKING EXCEPT

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,

192.168.9.204:9901

(FreePBX-LAN-IP:FreePBX-custom-bindport)

See this post for more info