sip icon indicating copy to clipboard operation
sip copied to clipboard

Support Opus on SIP Trunks

Open ruhnet opened this issue 11 months ago • 22 comments

When trying to enable OPUS with "OPUS/48000/2": true in the config file, SIP invites still don't offer the Opus codec over the trunk.

According to the contents of sip/pkg/sip /media_codecs.go the only codecs supported on the SIP side of things are G711 and G722.

I looked at the pkg/media/opus/opus.go file and compared it to pkg/media/g722/g722.go and I see that some functions are similar, but the opus.go file is missing the init() function and doesn't register itself.

Many SIP trunks (particularly when connecting to a PBX of some sort) support the Opus codec, so it would be very useful to have it available for use on the SIP side.

ruhnet avatar Feb 12 '25 19:02 ruhnet

It's definitely on our roadmap, especially because LiveKit uses OPUS internally.

dennwc avatar Feb 24 '25 11:02 dennwc

This would be really awesome with the whatsapp calling api - any update on timings?

lchavasse avatar Jul 17 '25 18:07 lchavasse

No specific date yet, but we are considering rising a priority of it. WA is definitely one of the important use cases for it.

dennwc avatar Jul 17 '25 18:07 dennwc

We're also very interested in using the new WhatsApp Business Call API, but currently unable to proceed due to the Opus codec limitation in the SIP bridge. This is becoming a critical integration point for us, as WhatsApp is a major channel for our voice agent infrastructure.

It would be really helpful if you could share whether support for this is on the roadmap, and if so, when it might be available. If there's anything we can do to help prioritize or test this feature, we're happy to contribute.

kaantezgel avatar Jul 30 '25 15:07 kaantezgel

@dennwc Do you have any updates regarding the WA issue? We are eagerly awaiting your response.

No specific date yet, but we are considering rising a priority of it. WA is definitely one of the important use cases for it.

kaantezgel avatar Aug 11 '25 15:08 kaantezgel

+1 as another very interested in Whatsapp Calling and unable to proceed due to lack of Opus support

yuyuma avatar Aug 13 '25 00:08 yuyuma

+1 essential for whatsapp voice.

flaviogoncalves avatar Aug 18 '25 12:08 flaviogoncalves

+1 whatsapp calling

rodrigogonn avatar Aug 19 '25 12:08 rodrigogonn

+1 Opus SIP please

edgarwideman avatar Aug 19 '25 16:08 edgarwideman

https://kb.livekit.io/articles/5987869072-whatsapp-integration-with-livekit

source: https://livekit-users.slack.com/archives/C07FRP66XGE/p1755638133569199?thread_ts=1752642962.140529&cid=C07FRP66XGE

yuyuma avatar Aug 19 '25 21:08 yuyuma

+1 very important feature to have Opus support at SIP end

PatroxGaurab avatar Sep 03 '25 04:09 PatroxGaurab

+1 Opus SIP!

alec-bell avatar Sep 03 '25 22:09 alec-bell

+1 Opus SIP

Omarimai avatar Sep 12 '25 09:09 Omarimai

+1 Opus SIP

RolexAlexander avatar Sep 22 '25 19:09 RolexAlexander

+1 Opus SIP - very important for our use case both with Whatsapp calling and creating high-quality connections to our internal PBX for human+ai hybrid conversations

maxbickett avatar Sep 24 '25 16:09 maxbickett

+1 Opus SIP +1 WA

Beibit-ds avatar Sep 25 '25 14:09 Beibit-ds

+1 Opus SIP

rajvas-1 avatar Sep 25 '25 15:09 rajvas-1

+1

keenborder786 avatar Oct 13 '25 16:10 keenborder786

+1 Opus SIP +1 WHATSAPP

mercuryyy avatar Nov 13 '25 19:11 mercuryyy

While we are waiting for this feature request, has anyone tried the SIP Proxy workaround mentioned here?

I'm trying to figure it out using FreeSwitch, would appreciate any insights into this.

jatin-javis avatar Nov 18 '25 06:11 jatin-javis

+1 OPUS +1 SIP I'm trying with Freeswitch while we are waiting for it 🚀

Leeaandrob avatar Nov 19 '25 01:11 Leeaandrob

@dennwc will this issue be resolved with https://github.com/livekit/agents/issues/3375#issuecomment-3556164066? Or OPUS support in Livekit SIP will be addressed separately? If so, is this issue still on the roadmap?

jatin-javis avatar Nov 26 '25 05:11 jatin-javis