One Way Audio when External Call gets picked up

Hello Folks,

i hope someone can point me in the right direction. I have a good old one way Audio Problem. Before you say “Nah, another dude who doesn’t know anything about NAT and Firewall” let me describe the situation:
Customer has a remote office where the Phones are located (Yealink VP59)and they have a cloud FreePBX ( There are 2 external SIP Trunks registered. So far so good, everything is working as expected, in and outgoing Calls are working in both directions, they can call themselves internally and do not have any issues at all.
But when thy want to pick a call from a co-worker or they want to forward the call to another person the audio from the caller gets lost.
The Firewall infront of the PBX is a opnsense where all relevant Ports a forwarded, SIP and RTP. I adjusted the RTP Port Range in Freepbx to match the rules on the firewall, so there are around 500 UDP Ports opened.
Here is a log with “pjsip set logger on” where i changed the following: > Public IP of the PBX > Public IP of the SIP Trunk Registrar
siptrunk > dns name of the siptrunk
0152XXXXXXXX > Calling Number
4921XXXXXXXX > Target Number

The called extension is the 100 and the call was forwarded to the extension 150.
When 100 accepts the Call, audio is 2 ways but when the Call gets forwarded to 150 (attended and unattended) the Aduio from the Caller gets lost. And i am looking at the logs and can’t see the error.

So when anyone can give me a good hint where to look at i would be thankful.

Greetings, Edge

Have you run a tcpdump on the console? That might narrow down where the problem is occurring.

tcpdump -w dumpfile.pcap

Run your test and then Ctrl-c will stop the capture and create the pcap file.

Then pull that file using winscp or other file transfer software, and load it into Wireshark. Wireshark has tools that allow you to listen to the audio by channel and determine if the audio is even leaving the FreePBX.

Not all that familiar with Yealink, but I suspect that the offending phone may have a similar pcap capture procedure on the phone end as well.

Do you have direct media path turned on for that phone? Try toggling that value. Don’t have one in front of me at the moment, but I think it’s in the extension’s advanced tab of not the main page.

1 Like

Well thanks for the answer. Direct Media was indeed turned off. Turned it on and it made no difference.

I made the pcap File but i do not have any knowledge about Wireshark or Tracing in general. What should i do the mark down the error / the misconfiguration?

Best Regards

What ports are being used according to the wireshark, for the offending test?

You mean sth like this?:

It seems like these are the used Ports:

And yes, they are directed through the Firewall and there are Rules for the Ports.

Did you disable port rewriting on OPNsense?

On a normal call, you see four RTP streams:
Caller → PBX
PBX-> Callee
Callee → PBX
PBX → Caller

Which of these are present? Are they going to the correct IP address and port?

You show a G.722 packet. Does your trunking provider support g722 (and is using it on this call)?
If not, is Asterisk transcoding the audio?

Which you can easily see in real-time (or not) with

rtp set debug on

from the CLI

Yeah, all Port Mapping is static at the opnsense rules. And the other suggestions (conservative system setting on opnsense) are also set.

Just to be clear again:
A normal Call is working fine, i am only talking about redirected or picked Calls where i have this one way audio issue.
When something is picked, it looks like this:

Where 212.x.x.x is the public IP of the Phones / the Customers Office and 79.x.x.x is the public IP of the FreePBX.

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