First off, thanks for being here, this is a great place for information.
This issue is a result of the wonderful health hysteria currently happening. We are having to consider having our techs work remotely from home. We presently run Yealinks internally on CHAN_SIP and want to put in a set of softphones on home PCs/Mobiles. We have created secondary extensions for these softphones.
Our Phones run on a dedicated 10.x network to the EGS Gateway unit owned by the SIP Trunk provider. The Main FreePBX has dual NIC, one fo rthis phone network, and one for the business network so we can admin and use voice mail etc. Now I am testing on my Android using Mizudroid. We setup a firewall rule (SonicWALL) for 5160/5161 and 10000-20000 UDP and a NAT policy to match to send those ports to the phone server.
I can get the softphone to register and authenticate via the internet and business IP (not the dedicated 10.x network), and we can even dial extensions between the desk phones and the softphone in both directions, but once connected, we get no audio. I checked the codec on the softphone and is matches the preferred one in the server.
We are running FreePBX 220.127.116.11 on Asterisk 16.6.2
Confirm that your SonicWALL is set up correctly, especially Consistent NAT:
Confirm that in Asterisk SIP Settings, External Address and Local Networks are correctly set. If you change these, you must restart (not just reload) Asterisk.
Confirm that the extension has NAT Mode set to Yes, and that any NAT related settings in the client are turned off.
If you still have trouble, at the Asterisk command prompt, type sip set debug peer xxx
where xxx is the extension number. Make a failing test call, paste the relevant section of the Asterisk log at https://pastebin.freepbx.org and post the link here. Also, report whether the desk phone user can hear the softphone user, and vice-versa.
Unfortunately, the log does not contain a SIP trace. Did you get an error when you issued sip set debug peer 205
Possibly, if you typed that before it came online, it did not recognize the address.
Give the command again and make another test call. If the trace does not appear in the log, try sip set debug on
which will trace all SIP traffic on the system, then try again. After you get the log, do sip set debug off
because on a busy system, all the SIP traffic can be a lot of data.
There was enough other noise that the INVITE to 205 and its responses are absent. In your first log, you see a line containing Called SIP/205 and one containing Spawn extension (ext-local, 205, 2) exited non-zero – these lines should be found in your log with the trace; paste everything between them.
However, there is a clue in what you posted. Line 109 has Via: SIP/2.0/UDP 18.104.22.168:10182;branch=z9hG4bK-417p6632505073162535216r;received=22.214.171.124;rport=20946
which shows that the phone was NATted as expected by T-Mobile (the source port numbers are different), but that MizuDroid was attempting NAT traversal (public IP in the Via header).
I would expect that not to fool chan_sip into thinking there was no NAT, but there might be a bug.
Confirm that ext. 205 has NAT Mode set to Yes (force_rport, comedia).
But the SIP trace is gone. The sip set debug on
gets cancelled by a restart or reload. If you made any config changes since you gave that command, that would explain it. In any case, set the debug on right before you make the test call, confirm that the SIP trace is in the log, then paste it and post the link.
If you are using T-mobile, it isn’t going to work using cellular data. They block RTP, so you will need to use a VPN and softphone together, or use wifi from a network that supports it. For example, I have a tmobile phone and use zoiper to my PBX fine over wifi, but over cellular, the calls ring, but no audio. Connect the VPN to the PBX, and its all fixed. I don’t need the VPN anywhere else or on wifi, so it is definitely an issue with Tmobile. Anyone NOT having this issue with tmobile LTE I would be curious to know about.
Hmm, perhaps it is market based or perhaps something has changed recently. I use TLS with SRTP and it has never worked. Today after I posted to this thread, it is magically working over cellular. If it breaks again, I might have to blame zoiper, but there are plenty of threads on reddit blaming tmobile, and since I had the exact same issues, I didn’t waste much time on it since a vpn was a simple enough work around.