Set JITTERBUFFER on PJSIP Channel created with ARI

Any suggestions on how I would go about turning on the JITTERBUFFER on a PJSIP channel created with ARI?

Would it be possible to use AMI after the channel is created to add the JITTERBUFFER function?

I tried adding the following to my status app in the extensions.conf file…

exten => 1000,1,Set(JITTERBUFFER(adaptive)=default)
same => n,Answer()
same => n,Stasis(myapp)
same => n,Hangup()

But that had no effect and didn’t think it would as it was a long shot. :slight_smile:

Welcome any suggestions.


Dialplan functions can be executed on originated channels in ARI using the variables field. You can use it just like you would in the dialplan for setting. As for having no effect on what you’ve already done, you’d need to provide more information such as console output and the originate information to show how things were actually done.

Ok so I’m submitting the variables in the body of the post. I’m submitted JITTERBUFFER(adaptive) as the variable name and default as the value.

Here’s the wireshark of the post…

POST /ari/channels?endpoint=PJSIP%2F62441d1ded3d4027a3a8eea9236a258a&timeout=60&callerId=Call+with+Test+User&api_key=user:password&app=bookacall HTTP/1.1
User-Agent: Mozilla
Accept-Language: en-US,en;q=0.5
Accept: application/json
Content-type: text/plain;charset=UTF-8
Connection: keep-alive
Content-Length: 56

{ “variables”: { “JITTERBUFFER(adaptive)”: “default” } }

And the response…

HTTP/1.1 200 OK
Server: Asterisk/13.13.1
Date: Mon, 31 Jul 2017 06:30:13 GMT
Cache-Control: no-cache, no-store
Content-type: application/json
Content-Length: 346

{“id”:“1501482613.153”,“state”:“Down”,“name”:“PJSIP/62441d1ded3d4027a3a8eea9236a258a-00000013”,“caller”:{“name”:“Call with Test User”,“number”:“unknown”},“language”:“en”,“connected”:{“name”:“Call with Test User”,“number”:""},“accountcode”:"",“dialplan”:{“context”:“default”,“exten”:“s”,“priority”:1},“creationtime”:“2017-07-31T00:30:13.494-0600”}

I’m not sure if its supposed to return the variables that were posted or not?

Also the example I saw included the endpoint in the JSON but I left that out. I assume it’s not needed since it’s the parameters in the URL.

The ARI post was accepted. However I’m not certain if it actually took. I’ve used the swagger ui to check for the variable and it’s not available.

Using http://[MY IP]:8088/ari/channels/1501482613.153/variable?variable=JITTERBUFFER(adaptive)&api_key=user:password

returns :

“message”: “Unable to read provided function”

So maybe it is on? Any other way to confirm that the Jitter Buffer is on?

The jitterbuffer dialplan function can’t be read. If you didn’t get an error then it was set on the channel.

Perfect. Thank you again jcolp!