开发者

Asterisk initiate call

开发者 https://www.devze.com 2023-03-16 19:53 出处:网络
can I initiate an开发者_JAVA技巧 outgoing call with Asterisk by an other way than using callfiles?a friend called google told me that :

can I initiate an开发者_JAVA技巧 outgoing call with Asterisk by an other way than using callfiles?


a friend called google told me that :

http://www.voip-info.org/wiki/view/Asterisk+Manager+API+Action+Originate

;)


you can also initiate originate command on asterisk cli. or can use dial-plan Dial application for making more interactive


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

0

精彩评论

暂无评论...
验证码 换一张
取 消