OPUS > Yealink choppy audio

Yealink recently released OPUS capable firmware for some of their phones. I’m trying to get this to work but am having some final issues I need some help with.

My codecs.conf

[opus16v]
type=opus
packet_loss=20
complexity=2
signal=voice
application=voip
max_playback_rate=24000
bitrate=16000
cbr=no
fec=yes
dtx=no

Asterisk version is 13.14.0

I can place calls and everything is functional.

The problem is that the audio is choppy from asterisk>yealink. Not completely, but it has little breaks like g.711 with a bit of packet loss. yealink>asterisk is fine, if I connect up a g.711 call the yealink(opus)>asterisk>g.711 endpoint is clean.

PBX is remote, but 10ms away with no packet loss and jitter peaks at about 10ms. I run icmp pings across to try to track the gaps to any kind of loss but see no correlation. I capture a PCAP and there are no missing packets.


Any ideas what might be causing this? I’ve tried many different bitrates and complexity but they all behave the same. Evan a complexity=1 8kbps stream has this as does a compleixty=10 48kbps stream…

Thanks for any help.

I should add that if asterisk is just passing through opus (ie, both endpoints are opus) then it sounds great. Asterisk is definitely where the issue is.

If you just use the normal “opus” built in format what happens?

I’ll try now, I honestly didn’t know there was a built in [opus]… I dont have an [opus] entry in codecs.conf…

The codec_opus module automatically creates it. It’s there for most cases if you don’t need to tightly control things.

still does it. verified it’s just ‘opus’ in sip show channels.

I’m not able to reproduce this using a Digium D65 as an endpoint w/ that same opus16v codec in my codecs.conf. Local network; no loss or substantial jitter. Other endpoint is a D80. Tried w/ D80 using both G.722 and G.711 u-law. Audio towards Digium phone is good; audio from Digium phone is good. Echo app from Digium phone is fine. Playbacks of prompts (source file is slin44) are good. Asterisk-14 branch. Don’t have a 13.14 handy.

I can’t move to asterisk 14 yet, I could move up to 13.15 and see if that improves it.

Not really “the same” but there was recently an issue created for Choppy audio when using the open source opus codec with Snom handsets.

Now - the codec from Digium is completely different (I would presume) to the open source one - but Snom had to fix their handsets with an update - maybe Yealink went down a similar route?

The timestamp problem would impact both, as it is in the RTP layer and not the codec translation.

I was suspicious of the yealink implementation, or maybe some oddity between the yealink and asterisk implementations, but I’ve tested with Bria (android) , X-Lite, and Grandstream HT802 and they all do it. X-lite does it a tiny bit less, or rather it seems to have a shorter and less noticeable gap than the others but it’s still there.

I don’t have Bria, X-Lite or a Grandstream HT802. I do have Linphone and Jitsi. They’re both fine for me. Source device is still a Digium D80.

which version of asterisk are you running?

Asterisk GIT-14-0cec000

13.14.0 here and I can’t go to 14. I’m going to do 13.15 after hours and see if that changes anything.