S
S
Stanislav Lomadurov2014-01-20 12:55:36
Asterisk
Stanislav Lomadurov, 2014-01-20 12:55:36

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();

Asterisk if I reset my phone
-- SIP/1102-00001162 is ringing
-- Got SIP response 486 "Busy Here" back from 192.168.1.100:5060
-- SIP/1102-00001162 is busy

OriginateResponse if I reset my phone
{ event: 'OriginateResponse',   
  privilege: 'call,all',            
  actionid: '42075833072885870',    
  response: 'Failure',              
  channel: 'SIP/1102-00001162',     
  context: 'test',          
  reason: '0',                      
  uniqueid: '1390211355.9012',      
  calleridnum: '1102',              
  calleridname: '<unknown>' }

I would not like to broadcast on other events.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stanislav Lomadurov, 2014-01-20
@lomadurov

Rollback to 11.7.0 helped

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question