asterisk / node-ari-client

Node.js client for ARI. This library is best effort with limited support.
Other
253 stars 99 forks source link

can i make a call to an extension using node-ari-client (ARI APIs)? #99

Open sadeghrz opened 6 years ago

sadeghrz commented 6 years ago

hi gays i am new in asterisk and this question make me in problem. can i make a call to an extension using node-ari-client (ARI APIs)? if yes tell me how and if no give me a key for do it using api. thank you.

vcidst commented 2 years ago

Yes you can. Use the /channels/create endpoint or Channel().originate() method

client.Channel().originate({
    endpoint: 'PJSIP/+123456@siptrunk', formats: config.get('rtpServer.format'), app: ariConfig.appName,
}).then(() => {
    console.log('made a call to +123456!')
});