How to use only TCP protocol for PJSIP Extensions

I’ve problem using only TCP protocol for Extensions. I get no audio.
FreePBX is behind a NAT.
Created a PJSIP Extension, on SIP Settings enabled only TCP Transport and NAT information, I’m using Zoiper as a client.
Communication start, the client connect correctly with TCP on port 5060 but UDP traffic start to be sent and there are no audio and the call terminate after 30 second for “lack of audio RTP activity in 31 seconds”.
I’m using:
FreePBX 15.0.21
Asterisk Version: 18.6.0
and Just got all updates.
Why it send UDP?
Is it possibile to use only TCP?

Media (RTP) is only sent using UDP. The TCP transport only carries the SIP signaling.

OK, thanks.
Does it work if Zoiper is behind a Firewall so it can only send network traffic?

There are VoIP users behind NATs and firewalls and it works fine for them. Whether it would work for you, I don’t know. FreePBX/Asterisk has to be configured appropriately. It has to know it is behind NAT with its external IP address and port, and the traffic has to be forwarded. The endpoint in FreePBX also has to be configured to know the remote device is behind NAT as well if they are.

RTP traffic can easily be seen with

rtp set debug on

more specifically with

rtp set debug ip n.n.n.n

you can easily see the flows (or lack of) for both tx and rx by ip of all participating sessions, arranging correct forwarding and routing will usually fix lack of audio, this usually needs agreement of both asterisk and your networks points of egress and ingress for said routes.

understanding your edge routers implementation of ‘nat’ is important

commonly active “sip helpers/ALG’s” on the router can disrupt proper forwarding if you have more than one devices in your LAN needing connectivity

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.