Reputation: 9
can I initiate an outgoing call with Asterisk by an other way than using callfiles?
Upvotes: 0
Views: 1760
Reputation: 329
using asterisk-manager node-js module then
var Ami = require('asterisk-manager');
var ami = Ami("5038", "127.0.0.1", "admin", "AMIpassword", true);
//call someone and move him to ivr-4
ami.action({
'action':'originate',
'channel':'SIP/trunk/0875421989',
'context':'ivr-4',
'CallerID': '0123456789',
'exten':'s',
'priority':1,
'async': true,
'Codecs': 'g729'
}, function(err, res) {
console.log(err);
console.log(res);
});
the number in channel going to be dialed The CallerID is the number that should appear to the receiver the context is where you are sending the receiver after call answered
Upvotes: 0
Reputation: 126
you can also initiate originate command on asterisk cli. or can use dial-plan Dial application for making more interactive
Upvotes: 0