ding-dong icon indicating copy to clipboard operation
ding-dong copied to clipboard

Asterisk 13 not playing the audio

Open ghost opened this issue 6 years ago • 1 comments

Running following on Asterisk 13, centos 7:

var AGIServer = require('ding-dong');

var handler = function (context) {
    context.onEvent('variables')        
        .then(function (vars) {
            console.log('vars', vars);
            return context.streamFile('sorry-youre-having-problems');
        })
        .then(function (result) {
            return context.setVariable('RECOGNITION_RESULT', 'I\'m your father, Luc');
        })
        .then(function (result) {       
            return context.end();
        })
        .fail(console.log);
};

var agi = new AGIServer(handler, {debug: true});
agi.start(3000);

Asterisk CLI says: Playing 'sorry-youre-having-problems.gsm' (escape_digits=#) (sample_offset 0) (language 'en')

Running the NodeJs app with debug mode shows: command STREAM FILE "sorry-youre-having-problems" "#" err: null result: { code: 200, result: '0 endpos=16000' } command SET VARIABLE RECOGNITION_RESULT "I'm your father, Luc" err: null result: { code: 200, result: '1' }

But I cannot hear the audio playing on the zoiper software phone. My other non FastAGI scripts are playing audio and I can hear it.

Do you have any advise on what I might be doing wrong?

ghost avatar Apr 17 '18 20:04 ghost

I guess you need to answer channel first in extensions.conf

91Abdullah avatar Sep 25 '18 07:09 91Abdullah