I use the Asterisk-Manager package for NodeJs
and have a string that needs to get passed to Festival. I want to originate a call and Festival should translate the string into spoken text.
My current syntax
ami.action({
action: 'originate',
channel: 'SIP/mySipUserUsingPhoner',
application: `Festival("${announcement}")`
}, (err, res) => {
console.log(err);
console.log(res);
});
The response object returns me this
{ response: 'Success',
actionid: '1556537544484',
message: 'Originate successfully queued' }
but I only get beep sounds for three seconds. How can I originate a call using Festival?
The CLI returns
WARNING[24853]: pbx.c:7615 pbx_outgoing_exec: No such application ‘Festival(" my text to be spoken")’
Step 1. Install and/or load the module for it to work.
jcolp
3
I don’t know that library, but the action defines the data being passed to the application as a separate field[1]. Not as part of application.
[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+ManagerAction_Originate
Calling the application from the dialplan works fine
I changed my code to
ami.action({
action: 'originate',
channel: 'SIP/mySipUserUsingPhoner',
application: 'Festival',
data: announcement
}, (err, res) => {
console.log(err);
console.log(res);
});
and I get no error anymore. But I still get beep sounds only.
Oh sorry, I missed it before.
You can’t call the Application in full on one line. You need to use the data:
setting. Where the application data goes.
https://wiki.asterisk.org/wiki/display/AST/ManagerAction_Originate
Well after restarting the machine we got it working … So my updated code in the reply to jcolp works …
system
Closed
8
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.