Hi! I'm integrating WhatsApp Business Calling API ...
# ask-ai
a
Hi! I'm integrating WhatsApp Business Calling API with LiveKit SIP. WhatsApp requires Opus codec (48kHz, 20ms ptime) but I'm getting "common audio codec not found" error. Does LiveKit SIP fully support Opus codec negotiation for SIP calls?
t
Thanks for reaching out, Yunus. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
LiveKit SIP fully supports Opus codec negotiation for SIP calls, including the specific parameters required by WhatsApp Business Calling API (48kHz sample rate and 20ms ptime). Here are the key details: • Default Opus Configuration: LiveKit SIP uses a 48kHz sample rate and 20ms sample duration for Opus codec. • WebRTC Opus Capability: The SDP format includes codec parameters like
minptime=10;useinbandfec=1
, ensuring compatibility with high-quality audio requirements. • Codec Transcoding: LiveKit SIP handles transcoding between telephony codecs (e.g., PCMU/PCMA) and WebRTC codecs (e.g., Opus), maintaining the 48kHz/20ms Opus format internally for LiveKit room participants. If you're encountering the "common audio codec not found" error, it may indicate an issue with codec negotiation between LiveKit SIP and the WhatsApp API. Ensure that the SIP endpoint is correctly configured to support Opus codec negotiation. If the issue persists, further investigation into the SDP exchange may be required. Sources: CHANGELOG.md | Configuring HD Voice for SIP | LiveKit Docs | Configuring HD Voice for SIP | LiveKit Docs | SIP Integration | livekit/livekit_composite | DeepWiki | pkg/sip/outbound.go
a
how do I ensure Opus codec priority in SIP negotiation? Any specific config parameters?
t
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!