asterisk / node-ari-client

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

Difference between " channel.originate() " and " channels.create()+channels.dial() " #92

Closed mpbanna closed 7 years ago

mpbanna commented 7 years ago

Hello , is ari.channels.create() actually originate a call, OR, a call will originate only when use ari.channels.create() then ari.channels.dial()

jcolp commented 7 years ago

A call will only be sent to an endpoint once dial is executed. Create does just that, creates it within Asterisk but does not dial the endpoint. There's a blog post[1] which might provide more information for you.

[1] http://blogs.asterisk.org/2016/08/24/asterisk-14-ari-create-bridge-dial/

samuelg commented 7 years ago

Thanks @jcolp

mpbanna commented 7 years ago

Hello, I have face a new issue that is when i originate call by ari.channels.create(); function then event named 'StasisStart' will fire when phone picked , But when i originate a call by create() + dial(), then event named 'StasisStart' will not fire when phone picked, but fired when dial(); function execute.