Answer the question
In order to leave comments, you need to log in
Why does Asterisk OriginateResponse always return reason=0?
It is necessary to process the result of Originate through AMI. To do this, I wait for the originateResponse event, which constantly contains reason = 0
, regardless of the result of the call.
In which direction to dig?
Subject: Asterisk 12.0.0, [email protected] (node.js) Node.js
example
var AsteriskAmi = require('asterisk-ami'),
ami = new AsteriskAmi({"host": "192.168.0.22", "username": "***", "password": "***"});
ami.on('data', function(data){
console.log('AMI', data);
});
ami.on('login', function () {
ami.send({
action: 'originate',
channel: 'SIP/1102',
exten: '568',
Priority: 1,
context: 'test',
callerid: '1102',
async: true
});
});
ami.connect();
-- SIP/1102-00001162 is ringing
-- Got SIP response 486 "Busy Here" back from 192.168.1.100:5060
-- SIP/1102-00001162 is busy
{ event: 'OriginateResponse',
privilege: 'call,all',
actionid: '42075833072885870',
response: 'Failure',
channel: 'SIP/1102-00001162',
context: 'test',
reason: '0',
uniqueid: '1390211355.9012',
calleridnum: '1102',
calleridname: '<unknown>' }
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question