Using the Sipnetic (https://www.sipnetic.com) Android app, registers fine and can make and receive calls when connected to my local WIFI network, but from outside it won’t register.
Asterisk 22.1.0
FreePBX 17.0.19.23
RaspberryPi 5 8gb
No firewalls enabled just yet as this is preliminary testing. I have not include any logging (including “pjsip show registrations”) because that extension 1121 doesn’t show up anywhere.
Anyone have any suggestions? I’m going to guess ahead-of-time that it’s something really stupid that is staring me in the face, but I’m mentally exhausted and would really appreciate another perspective. Thank you.
I don’t believe that Asterisk (or Sipnetic) supports SIP TLS over UDP.
If you are running unencrypted SIP over UDP with default settings, you should forward UDP port 5060 in your router. If running SIP over TLS with default settings, you should forward TCP port 5061 in your router.
If you have changed Port to Listen On in Settings → Asterisk SIP Settings → chan_pjsip, you should set your port forwarding accordingly.
I don’t believe that Asterisk (or Sipnetic) supports SIP TLS over UDP.
Would you happen to know an Android app that I should be using, at least for troubleshooting?
If you are running unencrypted SIP over UDP with default settings, you should forward UDP port 5060 in your router.
When I mentioned I was tired, this is an example of it. I had purposely changed the SIP Signaling Port from 5060 to 5061, so that I could positively confirm that my other device (blacked out), that has been using port 9000, was accessible on 5060 (i.e. no ISP blocking). It was, so I changed the forwarding back to that device and took a screenshot. Here is the current testing ports:
To make baby steps, get a TCP transport working first on any port
I changed the forwarding on the router from 5060 to 9000, so now it is:
9000 → 5060
The router settings just above reflect my current testing configuration.
Forwarding an external port to a different internal port is supported by Asterisk, but it’s a very advanced topic requiring special settings; I recommend not pushing your luck.
In Asterisk SIP Settings → chan_pjsip, set Port to Listen On for the UDP transport to 9000. Confirm that Sipnetic can connect when on the local LAN. Then, forward port 9000 to 9000 and test with Sipnetic on an external network. If it registers but doesn’t work properly (audio issues, call drops, etc.), paste the Asterisk log for a failing call, with pjsip logger turned on, at pastebin.com and post the link here.
Once the UDP connection is working, do the same for TLS (over TCP).
Unfortunately, your local extensions will also need to be changed to use port 9000 (or whatever obscure port you choose).
Thanks to your suggestion, I’ve learned that changing what I thought was the correct port in Sipnetic to 9000 failed (even locally), so we won’t say the name of that app again .
I then tried an app called MizuDroid, which did allow me to set the port to 9000 (i.e. 192.168.50.202:9000), and it worked fine, using *65 as a test call (as I haven’t changed any other devices to 9000 yet…they can wait). I then set the IP address in MizuDroid to my WAN IP, and it complains “No response from server”.
My logging (asterisk -vvr, core set debug 5, core set verbose 5, pjsip set logger on) does not show my test extension (other than my LAN test of course), so I’m not including logs here.
For clarity, I did restart Asterisks (core restart now) after changing the ports to 9000. I also left forwarding for 5060 in-place, as I couldn’t see how it would hurt anything.
I think I’m going to consider this topic closed, as I can’t figure out why my outside network can’t seemingly reach my inside network, even though I have devices that do.
Regardless, that’s my problem not a FreePBX problem.