Hi,
I am attempting to build a LUA dialplan that uses Jack() (https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+Application_JACK). When a user calls a specific extension, their audio needs to be routed outside of Asterisk for processing. I am running Asterisk 16.
This works fine when the dialplan is written into extensions.conf, the audio connects and works as expected. However, I have written what I believe to be the same dialplan in LUA, and it results in (buffer-size?) errors with Jack() that appear in the Asterisk CLI.
The hello-world extensions (#100, #200) work on both dialplans.
EXTENSIONS.CONF DIALPLAN
[from-internal]
exten = 100,1,Answer()
same = n,Wait(1)
same = n,Playback(hello-world)
same = n,Hangup()
exten = 101,1,Answer()
same = n,Wait(1)
same = n,Jack([i(SuperCollider:in_1), o(SuperCollider:out_1)])
same = n,Hangup()
EXTENSIONS.LUA DIALPLAN (equivalent to extensions.conf example?)
extensions = {
users = {
[200] = function()
app.playback("hello-world")
end;
[201] = function()
app.jack("[i(SuperCollider:in_1), o(SuperCollider:out_1)]")
end;
};
["from-internal"] = {
include = {"users"};
};
}
Error received in Asterisk, only on #201 (LUA app.jack extension)
WARNING[8554]: app_jack.c:293 handle_input: Tried to write 1024 bytes to the ringbuffer, but only wrote 0.
Despite receiving the error, in my Jack patchbay the SIP phone (visually) appears correctly routed. No audio is actually being routed by the conenction:
I am guessing the errors received in Asterisk are related to an audio buffer-size error. For lua dialplans, do I need to to specify the audio buffer-size for Jack() in Asterisk? And if so, how can I do that? I am curently running Jack with a buffer size of 512, sample rate 44.1khz.
I am very new to Asterisk, so sorry in advance if I am making an obvious error. Thank you for your help.