pipobscure / NodeJS-AsteriskManager

NodeJS Asterisk Manager API
Other
246 stars 102 forks source link

Call extension to extension #57

Open iruindegi opened 7 years ago

iruindegi commented 7 years ago

Hi,

First, thank you for this awesome library ;)

I'm developing a small app witch is working very well with this lib. But I have a problem when I need to Originate a call from a extension (6426) to another extension (6422) for example, both of them with a fisical terminal. Terminal1 6426 Terminal2 6422 If I use this code:

var ami = new require('asterisk-manager')('port','host','username','password', true); ami.action({ 'action':'originate', 'channel':'SIP/4123216082108749', 'context':'default', 'exten':6422, 'priority':1, }, function(err, res) {});

When I run this code the terminal (channel) start ringing, and if I answer the call is finished.

What i need is to make a call from terminal1 to terminal2 with this app. How to achieve that? I installed fop2 (https://www.fop2.com/) and they have implemented this: first original terminal (6426) rings and when you hang up it start ringing to the destination (6422). When destinarion terminal hangups, they can start speaking.

Is there any way to do that with yout library?

yeya commented 5 years ago

If you can run the originate command from cli you can run it with this library. https://www.voip-info.org/asterisk-cmd-originate If your question is what is the right command to run - please try stackoverflow. It's not related to this library