Crackling on Inbound Calls - Twilio Elastic SIP Trunk

We are experiencing crackling on some inbound calls when dialing into our PBX via Twilio SIP trunk. We have two way audio fine, and we do not experience this going outbound. We make very few internal calls, most are in or out via Twilio trunk.

Sometimes there are no quality problems when calling in, other times the external caller can hear it as soon as the PBX receives the call, even when ringing or playing a recording in a IVR. I would describe it as a crackling or popping sound. There is never any garble.

When it happens, it happens as soon as the call comes into the PBX, so I do not believe the endpoints are involved.

Anyone have any thoughts? It seems to me to be either related to Twilio Trunk itself or some sort of packet issues from the trunk to the PBX?


FreePBX -
Current System Version - 12.7.8-2306-1.sng7
Asterisk Version - 19.8.0
V2 Azure VM with 2 vCPUs and 8 GB RAM
Twilio Trunk via PJSIP

Probably excessive network packet loss or excessive network jitter.

Sounds are difficult to describe in a useful way, so you really need to run wireshark on it, and do an RTP analysis.

We have Twilio wildly deployed and nobody is reporting the same issue. Ours is primary North America region.

You’ll need to look at your packet captures to see if there is a local network issue or something that’s upstream from the PBX.

Thanks for your feedback, @dobrosavljevic and @david55 ! It did turn out to be a network issue, but not in the way you might expect…

It hit me earlier today to check the call recordings on the Twilio trunk itself. When listening to these recordings, there was no crackling audible at all. This led me to think that it was less about the PBX and the Twilio trunk, but further upstream. Maybe this was not an accurate assumption, but it ended up leading me to the answer regardless…

Before we get to the answer, reminder that this cracking is only heard from external callers, not inside of our PBX.

The problem ended up being using wifi calling on our cell phones on the same network as our SIP phones. When we were testing, we were onsite with our new Sangoma P series phones, so we could watch what they were doing, test audio, etc. We were calling into trunk from our cell phones, and getting this crackling somewhere between 50-75% of the time. We thought we had a major issue that hadn’t been reported to us yet! Turns out, if we disabled wifi on cell phone, and dialed into the PBX again, the crackling went away entirely. Get back on the wireless network with cell phone, crackling would start again. Swap to an isolated guest wireless network that is broadcasted from the same APs and router, no crackling…

I went to a different site later in the day, and was able to get the same results there as well.

My question now is what causes this? Are the SIP phones saturating the network somehow? Is there some sort of port overlap conflict with AT&T Wi-Fi calling? I am super curious to figure out why this occurs. I lost a good portion of two days over this thinking we had major problems, when it turns out it was really only just effecting us during this testing! :upside_down_face: