Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asterisk 13 not playing the audio #13

Open
ghost opened this issue Apr 17, 2018 · 1 comment
Open

Asterisk 13 not playing the audio #13

ghost opened this issue Apr 17, 2018 · 1 comment

Comments

@ghost
Copy link

ghost commented Apr 17, 2018

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?

@91Abdullah
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant