Can't hear incoming caller's voice

When people call from outside we cannot hear their voice. They can hear our voice but we cannot hear them. In some cases the call will start ok with both parties being able to hear each other but then after ~30 seconds to a minute or two into the call, the caller’s voice will begin to degrade then cut out all together.

I have seen this issue posted before but the problem has usually been a firewall issue. In our case, there is no internal firewall. I have disabled the firewall in FreePBX and we are not using an external trunk. We are using the Vega 50 Europa Gateway FXO/FXS appliance to convert 2 analog phone lines to a SIP trunk. Both the FreePBX appliance and the Gateway are sitting inside our internal network.

Other similar issues were resolved by configuring the NAT settings. I’ve been over these several times and I can’t find anything wrong. Both the FreePBX and the Gateway are assigned fixed IP addresses by the router and I have changed the external IP address under Astrisk SIP Settings > General SIP Settings > External Address to be the assigned IP address of the FreePBX appliance.

For reference, this is the setup we’re using:
Sangoma FreePBX 60 Appliance
PBX Firmware: 10.13.66-16
PBX Service Pack: 1.0.0.0
FreePBX Version: 13.0.191.11
Vega 50 Gateway
Phones: Yealink SIP-T29G and SIP-T21E2

Thanks in advance for any advice.

Have a look at the RTP ranges on FreePBX Settings menu under Asterisk SIP Settings and then have a look at the similar settings on your gateway(cant tell you where, don’t know anything about the Vega, but it will be in the sip settings for it somewhere), make sure the ranges match, if they don’t then one could be trying to initiate audio on a port the other can’t reach

I would have suspected that as well but most calls connect successfully then after some time we begin to hear jitter which gets worse until the caller can no longer be heard at all. After that point the person on the receiving end of the call can be heard but the caller’s voice can not be heard.
I also considered whether this is a jitter issue but both the Vega 50 Gateway and the FreePBX appliance are inside our network on the same subnet. No NAT and no firewalls.

I would check the ranges anyway just in case, but you may need to start tracing where the problem actually is. I have a problem at the moment where the call is fine then degrades where they can hear us fine, but we hear really bad sound. I ran a pcapsipdump for an extension that experiences this. I then got the user to let me know when it happened again. Once it did, I then ran the dump for that call through wireshark and the conversation was clear for both throughout the call, I even got the user to listen and she identified there was a total difference between the dump and her experience on the phone. So that ruled out the server and the trunks. So our problem is somewhere between phone and server, so we are looking at QOS on the switches, the switches themselves and the settings of the phone itself. I can thoroughly recommend pcapsipdump to rule out your server(or rule it in)

I finally found the issue here. Turns out to be a known issue with the gateway. Seems it was only recently discovered:
https://wiki.freepbx.org/pages/viewpage.action?pageId=73728832

I upgraded the firmware and enabled the full_scale option and we have been able to sustain several phone calls without any issues.

I don’t know what full_scale does but we still have some noise being herd on the SIP side. I suspect that noise is also coming from the gateway because we don’t hear the same noise when calling from SIP to SIP.