Hi everyone,
I’m trying to force a packetization time (ptime) of 80ms for the Opus codec in my Asterisk setup. I have tried setting SDP_AUDIO_PTIME=80 in the dialplan like this:
exten = _X.,1,NoOp(Forcing ptime to 80)
same = n,Progress()
same = n,Set(SDP_AUDIO_PTIME=80)
same = n,Dial(PJSIP/${EXTEN})
However, when I check the SDP in the SIP INVITE, it still shows ptime=20, and the endpoints don’t seem to honor the 80ms packetization time.
Additional info:
- Codec: Opus
direct_mediais set tono- Dialplan reloads and PJSIP reloads done after changes
- Tried setting
Answer()before Dial, but no change - Endpoint is a softphone (or WebRTC client)
- Tried
opus.confbut unsure if it’s applied or configured correctly
I understand that Opus negotiates maxptime and ptime differently than legacy codecs, but I’d like to know:
- What is the correct way to force Opus
ptime=80in Asterisk? - Is it possible at all to do it purely via dialplan or CLI?
- Do I need to configure
opus.confor something else? - Are there any known limitations or workarounds to enforce this setting for Opus?
- How can I verify the setting is actually applied during calls?
Any example configurations or tips would be highly appreciated.