Intermittent one-way audio issues on calls between two Asterisk FreePBX systems in same datacentre

As the title states, we have two FreePBX systems (hosted in same datacentre with different public IP addresses) that are experiencing intermittent on-way audio issues when calling each other. We have SIP trunks with different SIP providers that point to the public IPs of the PBXs in our datacentre.

These systems have no problem calling anywhere else except each other.

The call flow for calling external number would be like so:
Phone 1 <–> PBX1 <–> SIP Provider 1 <–> INTERNET <–> SIP Provider 2 <–> PBX2 <–> Phone 2

I have verified a few things:

  1. NAT ports are 10000-20000 on both PBX’s and are configured properly (they are since all other calls are working) I saw the RTP ports on both call attempts and they were both within the 10000-20000 range
  2. 5060 is properly accepting calls on both PBX (it is since other calls wouldn’t be working)
  3. The Internal networks (datacentre and LAN of phones) are configured as trusted on the both the PBX’s firewall and Asterisk SIP settings page
  4. I don’t see any logs in our firewalls blocking traffic

I have packet captures and asterisk core logs from when the call worked and from when it didn’t but I’m not versed enough in SIP / RTP to know where the problem lies. I did see a SIP 401 Unauthorized but I saw it on both call attempts (when it worked and when it didn’t).

Essentially I called the same number twice (from phone 1 to phone 2):

  1. It rang (heard ring), nobody answered, went to voicemail and I heard the voicemail prompts start (I could see live that the voicemail prompts were playing in FreePBX core logs with “core set verbose 100”)
  2. It rang (heard ring), nobody answered, went to voicemail but I did not hear the voicemail prompts and I could see the timer on my S500 phone still going, but I could still see the FreePBX logs live and I saw the logs were saying the voicemail prompts were playing but I couldn’t hear them.

The thing I find weird is the phone systems work fine except for when they call each other (remember they are in the same datacentre)
The other thing that is weird is we have other FreePBX systems in our datacentre that we can call no problem (so the issue I believe is with one of the two that are experiencing problems, not with network or SIP providers)

Hopefully I gave enough info and someone can point me in the right direction.
Thanks in advance for any help!

I’d start by running tcpdump on both systems and capture a failing call. Move the files to your workstation with sftp (or whatever) and look at them with Wireshark. Is PBX2 sending plausible RTP (correct address, port, codec)? If so, save the stream and listen to it to confirm that the prompts are present.

If the above is ok then look at what happened at PBX1. Did RTP come in as expected to the correct port with the right codec? If so, listen to that to confirm that the prompts are present.

Knowing the general area of the trouble should suggest what further testing is appropriate.

If SIP provider 1 doesn’t proxy media (so you can see from the RTP address which carrier they chose) or if they provide carrier info in their CDRs, check whether failing calls are all using the same carrier and working calls are using a different one.

I’ve done some more digging on this issue and have found that my SIP provider (Iristel) doesn’t proxy their media. (media would leave firewall and destined for itself).

I tried to mess around with firewall loopback rules but it didn’t work

So because both of my systems are in the same place all I did was create a trunk in between them and added an outbound route with the respective DID’s. So I bypass the SIP provider and don’t have to pay for mintues. Win / Win

1 Like

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