JITTERBUFFER(jitterbuffer type)
Jitterbuffers are constructed in two different ways. The first always take four arguments: max_size, resync_threshold, target_extra, and sync_video. Alternatively, a single argument of default can be provided, which will construct the default jitterbuffer for the given jitterbuffer type.
The arguments are:
max_size: Length in milliseconds of the buffer. Defaults to 200 ms.
resync_threshold: The length in milliseconds over which a timestamp difference will result in resyncing the jitterbuffer. Defaults to 1000ms.
target_extra: This option only affects the adaptive jitterbuffer. It represents the amount time in milliseconds by which the new jitter buffer will pad its size. Defaults to 40ms.
sync_video: This option enables video synchronization with the audio stream. It can be turned on and off. Defaults to off.
``` title="Fixed with defaults" exten => 1,1,Set(JITTERBUFFER(fixed)=default)
``` title="Fixed with 200ms max size"
exten => 1,1,Set(JITTERBUFFER(fixed)=200)
``` title="Fixed with 200ms max size and video sync support" exten => 1,1,Set(JITTERBUFFER(fixed)=200,,,yes)
``` title="Fixed with 200ms max size, resync threshold 1500"
exten => 1,1,Set(JITTERBUFFER(fixed)=200,1500)
``` title="Adaptive with defaults" exten => 1,1,Set(JITTERBUFFER(adaptive)=default)
``` title="Adaptive with 200ms max size, 60ms target extra"
exten => 1,1,Set(JITTERBUFFER(adaptive)=200,,60)
``` title="Adaptive with 200ms max size and video sync support" exten => 1,1,Set(JITTERBUFFER(adaptive)=200,,,yes)
``` title="Set a fixed jitterbuffer with defaults; then remove it"
exten => 1,1,Set(JITTERBUFFER(fixed)=default)
exten => 1,n,Set(JITTERBUFFER(disabled)=)
Note
If a channel specifies a jitterbuffer due to channel driver configuration and the JITTERBUFFER function has set a jitterbuffer for that channel, the jitterbuffer set by the JITTERBUFFER function will take priority and the jitterbuffer set by the channel configuration will not be applied.
jitterbuffer typerequiredfixed- Set a fixed jitterbuffer on the channel.adaptive- Set an adaptive jitterbuffer on the channel.disabled- Remove a previously set jitterbuffer from the channel.
User Notes
No notes yet. Be the first to contribute a tip or example.
Contribute a note
Share a tip, gotcha, or practical example. Keep it under 2000 characters. No questions (use the Asterisk community forums for support). Wrap code in backticks.