Testing with Yealink T28P has exact behavior of the Grandstream. Making changes only to the codec priority on the phone (not to the PBX), it would never properly negotiate audio if both ulaw and g722 are included in the codec list, regardless of order. Remove one or the other and audio always works.
That’s actually consistent with what BullFrog noted here: here: FPBX13 RC, G722 and 1-way audio - even to voicemail
We are definitely getting somewhere now with your tests, Rob’s observations and what Bullfrog had noticed…
Have a nice day!
Another data point, ran into this ‘feature’ again today on an HTEK UC806 with firmware ver. 220.127.116.11. No audio until I forced it to use g722.
Whoa kids… this thread has generated a great deal of heat relative to light.
Part time outside Asterisk developer here.
The issue here, and the complexity around reproducing it, has to do with a common misreading of the SIP specification by a number of handset manufacturers, one that almost ironically may stem from hardware product development done against older versions of Asterisk itself.
In SIP, there is no requirement that your read and write codecs on a two way audio call leg need to be the same. When you configure a PJSIP endpoint to have ulaw and g722 (and your phone’s initial invite SDP contains those codecs), Asterisk properly assumes that the inbound RTP stream to the phone could be either codec, though the send SDP negotiation has determined the sending codec.
Asterisk is properly trying to avoid transcoding by conforming to both what the PBX configuration of the endpoint has said is allowed and what the device itself has confirmed it is capable of. It happens that a number of sloppy handset manufacturers simply expect to receive the codec they are sending on the ingress-to-handset RTP leg and just drop that RTP stream if it doesn’t meet format expectations. The real issue here is really with manufacturers of these devices. From my limited testing, Polycom, Digium, Aastra and most common softphones conform to the RFC and will work properly. Yealink, Grandstream, and Snom all improperly implement their SDP media expectations, giving you one way audio.
The immediate workaround is to simply restrict either what the phone sends via its own allowed codec configuration or to do what has been suggested in this thread, and lock the endpoint to g722.
It would also be great to put some pressure on these non-conforming manufacturers to do testing with Asterisk 13 + PJSIP in this configuration to see the issue for themselves. At least some of them should acknowledge the issue and produce corrected firmware.
While not necessarily the correct solution, in the interest of pragmatism, if enough people are interested, I might be willing to produce a patch to Asterisk 13 that would surface a new knob to resolve this issue in the Asterisk core. Let me know if there’s an appetite for this and we can discuss.
Hope that helps!
Hi and thank you for your analysis of the problem!
Sounds like déjà vu…
(I had similar problem for other network related RFCs…)
I am trying to convince some people (look in the “blog section”…) which are in a position to at least report the problem to do do but I have been unable to convince them to do so…
Thank you very much for your help and have a nice day!
You can report it yourself. We have no priority because we work for Sanomga. Please do not think that. It’s a community project.
(sorrrry for the delayed reply…)
I didn’t mean to report them to Digium but actually to Yealink since the problem is most likely in their firmware and FreePBX/Sangoma now having a more direct access to their engineers was in a perfect position to do this.
Preston has contacted Yealink about this so hopefully they will be able to replicate the problem and since they have access to their phone source code they will most likely more easily find what might be causing the problem (what joshelson mentioned seems pretty logical, hopefully this is what they will test first).
As to reporting a problem to Digium, you guys (ie FreePBX/Sangoma developers/employees) have a much higher credibility than most of us as far as these things are concerned so I am sure that it would definitely help.
Before you say that’s not important to have that kind of credibility I once reported a problem to an open source/community project concerning the non-respect of an RFC and got my ticket closed by someone who thought their interpretation of the RFC was correct…
I actually had to contact and ask for the help of the RFC author to have them reevaluate the problem and agree that there was a problem with their interpretation of that RFC.
(This was an email related RFC by the way… Quite a few years ago I “played” a lot with mail servers at work…)
Hopefully not all open source community projects are like that (I sure hope the one I a dev on never gave people that impression) but every little bit of added credibility helps and you guys have a lot more than most of us…
Have a nice day and Happy New Year!
Worked for me. Thanks
Is this still an issue. I just bought the Yealink T46G phones and am having the same issue when setup with pjsip extensions. Working fine with chan sip.
Yes, still an issue. Tested with .95 Yealink firmware and it is not fixed yet. Grandstream has not fixed it either.
Maybe we need to wait until PJSIP is more popular for the firmware developers to start feeling the pressure to get this fixed.
Contrary to what has been said here, the issue is very easy to reproduce, but one does need to be on PJSIP and have both u/alaw and g722 enabled in the codec list both on FreePBX and on phone. Then run the echo test (*43) and most likely you will not hear anything for the first ~23 seconds which is when a voice was supposed to play explaining how the echo test works. After that you will start hearing the actual echo test (whatever you say is played back to you).
I believe that the explanation message is encoded in a format equal to or similar to a/ulaw so Asterisk prefers to send it using a/ulaw format. However, during the echo test itself, when the phone is sending the voice using G722 it is likely that Asterisk is preferring to play it back using G722 which avoids transcoding. Just my guess, not an expert in how the codec encoding/transcoding work under the hood.
Well that stinks. I just recommended the T46G phones for someone I just built a a system for and couldn’t for the life of me figure out what was going on. It was also my first time using pjsip for everything so I thought I was doing something wrong. In my case, I only had 722, ulaw and 729 enabled. I disabled alaw, but still have the problem.
I have a support ticket with Yealink, but I’m assuming you already went that route.
This is, as far as I know, the ticket that addressed this problem on Asterisk’s side (though I believed they still considered it a phone problem)…
Have a nice day!
Mabled, you are right. However, it has not yet been tagged to any future release of Asterisk so it has not been released yet nor we know in which version it will be released.
Hopefully, it will be soon.
Don’t worry, I know… ***
If I read the commits correctly it was committed to master, the Asterisk 13 and the Asterisk 14 branch so it’s not like it was only committed to master and not yet backported to the other branches…
That means that the next time they tag a new Asterisk 13 or 14 it should contain the fix (unless they revert the commit).
Have a nice day!
*** I am an IT guy and also a dev for a relatively well known open source app so I know a thing or two about the release process…
Now tagged as target releases 13.13.0 and 14.2.0.
Hmm. I just installed 13.13.0 two days ago and ended up finding this thread just now because I’m having the exact same issue with my Yealink W52P. So either the fix didn’t work or it isn’t actually in 13.13.0.
Can anyone else see whether it was fixed for them in 13.13.0?
THANK YOU !
I had the same problem : pjsip, asterisk 13, no sound one way from incoming call. The communication was correct both ways during 1 or 2 seconds and after that external caller stop hearing from pbx.
It was not an Asterisk or nat problem but a codec bug in phone (Grandstream GXP2170).
I upgraded the phone to the last firmware (18.104.22.168) and it is now working.
This topic was automatically closed after 2 days. New replies are no longer allowed.