Yealink T21P E2 - Specific one way audio issue

Hi guys!

We’ve got a big problem in our company and I thought that maybe you could help us. At the beginning of the October, we’ve had a problem with our PBX that led us to hard disk replacement and setting up a fresh copy of FreePBX with Asterisk 13. Before this situation we were using very old copy of FreePBX, that was set up by another company, but it was working decently.

Now everything seems to be okay, but there’s one thing, that we need to solve fast. We’ve got offices in one city, and a branch with call center in another. Each of us has its own PBX (the HDD was replaced in the one used by call center). PBX in call center is connected with GSM trunks (3 via IAX, 3 via SIP). PBX in our main location is connected to PRA/ISDN/digital lines. Both of these machines are connected to each other via IAX.

We’ve got a configuration that allows consultants in our call center to place calls via these digital lines, so it goes like this: consultant phone → call center’s PBX → main PBX → digital line. Also we do it the other way around, for example for IVR.

Internal calls in call center work fine, internal calls from CC to our main location work fine too, calls placed via GSM trunks also work fine for all phones too. The problem is that the employees that use two models of phones can’t hear the dialed person (they hear the signal, but after call being answered, they hear nothing).

In our call center we are using three models of Yealink phones - SIP-T20P, SIP-T21P E2 and one VP530. The last two are the ones that have this problem.

The problem lies somewhere between PBX in call center and the phone. Why I think so? Because if you listen to the recording of the call, there are voices of both people recorded.

Another interesting thing is that SIP-T20P phones are displayed by Asterisk as registered on the port 5062, while the SIP-T21 are being registered on port 5060, but the VP530 phone registers on port 5062 as the SIP-T20P do, but it has the same problem as the SIP-T21. I’ve tried changing local port to 5062 and enabling RPort in the phone settings. Now the phone registers on the port 5062, but it still doesn’t work properly.

Earlier I was thinking that this problem may be related to the fact, that in new version of FreePBX I’ve tried to use PJSIP instead of regular SIP, but switching back to the legacy SIP didn’t help.

Do you have any idea how can we solve it? I’ll provide any additional information if you’ll need it.

Thanks in advance! You’ll save my life if we can get rid of this problem :smiley:

The easy answers are:

  1. You have a firewall issue. This is likely since your “ancient” PBX didn’t have one built in. The new one does, and can easily be convinced to not allow audio.
  2. You have a codec issue. Personally, it sounds to me like your problem is more codec than firewall. I’m basing that on the fact that your call recording is working in both directions, but not at the phones. I’m also thinking that since the GSM connections work, your GSM codecs would be the chosen codec and allow the system to work properly there.

Since you manage all of the bandwidth in the network and we assume that you have enough, one easy test would be to check the configurations of the phones and extensions (the part in FreePBX) and just set everything to your regional “*-law” codec. If you’re in the States. that would be U-Law, otherwise it will be “A-Law”.

The codec issue is harder to diagnose, but if you do a SIP trace of a call that fails, you should be able to see the codec election. There was a problem with one of the Asterisk versions where, once a codec was asked for, the negotiation for the rest of the process failed. Limiting your codec choices (or upgrading Asterisk) would fix that.

Since you’re dealing with a new installation (for half of your network), you might need to look closely at the built-in firewall. You don’t need the “adaptive” part of the firewall - it sounds like all of your phones are on your own networks, so setting everything up static should get you where you want to go.

I’m sure that this problem isn’t related to the firewall. We only use our router’s firewall, I didn’t enable the adaptive one in FreePBX.

I’ve tried to use different codecs - μ-Law, A-Law (proper for our location) and G.722. During these tests I was capturing packets both on the PBX and the phone. Independently of the codec I was using, the one-way audio problem was persisting.

Later I analyzed the packets captured from the phone and PBX. Everything was fine there! Wireshark was even able to play audio of both sides of the conversation (not for the G.722, because Wireshark can’t play this format as far as I know, but the sound data was there).

At this moment I’ve forced SIP and IAX to only use A-Law. What else can I do?

There are two parts to the FreePBX firewall. One is the Adaptive Firewall that manages SIP connections to outside connections. The second is the INTEGRATED Firewall, which is enabled by default.

Make sure you have consciously disabled the integrated firewall AND the Adaptive Firewall.

If your packet captures at the phone are showing good bi-directional traffic, the problem has to be with the phone itself. Perhaps it is configured to send/receive RTP traffic outside of the ‘standard’ port range (10000-20000). We’ve seen an instance or two where the port that the RTP traffic was supposed to travel through was not correct. Another possibility is that the phone itself is having some kind of an issue.

Without being there and watching the SIP traces and WireShark, I’m kind of at a loss.

Check this out and see if it sounds familiar.

I’ve got iptables enabled, but without any rules for traffic and policy set to ACCEPT in main chains. But as you can clearly see, there isn’t any problem with traffic. I checked RTP ports settings and they’re correct - ports visible in screenshots above are in range, both for PBX and phone.

Issue with phone could be possible, but we’ve got about 14 pieces of this model, and all of them have the same problem.

The problem from the thread that you’ve sent to me sounds familiar in some aspects, but it’s different story. His phones were working correctly after switching to another codec and he had a liitle bit messed up configuration. My PBX have standard FreePBX installed with basic configuration. It was deployed straight into “production”, not in some kind of testing network. And I’m a big fan of cleanliness, so I was careful to keep the configuration straight and precise. The only “big” change I’ve made was to switch (by removing them all and adding again) all extensions and SIP trunks from PJSIP to chan_sip, because I wasn’t sure if maybe that’s the cause of this problem (our previous version of FreePBX didn’t even have the PJSIP available, I decided to give it a try when I saw it in new version).

I made also one more test - I’ve opened SIP and RTP ports in router’s firewall, added chan_sip extension for this test and connected to this PBX from Internet via softphone. Then I called the same way I’m trying to do on the phones that aren’t working properly. And you know what? It worked! So even if the call looks like this:
Softphone -> Internet -> FreePBX in another city (the one that we’re talking about in this thread) -> Another FreePBX (with old version of FreePBX) -> PRA/ISDN lines
it’s working. So I don’t see there a place for problems with firewall, etc.

This issue is irrational, it seems like the problem exists only for humans, users of the phones, and from technical perspective everything is working like a charm. But I’ve checked it in person - you make a call, hear the signal, then, after another side answers the phone, you hear nothing. There isn’t even any kind of silent white noise, just pure silence.

Do you have any other idea? I can send you some logs, PCAP file from phone or PBX, anything you want, just tell me what you need :slight_smile:

Silly question but when you were changing the codecs were you just changing on PBX side? What is the order of codecs on the phone itself? I know in the past i’ve made changes on PBX’s then had to go make the same adjustments phone side in the allowed codec order.

Can you provide full pcap and identify the IP’s on it?