Re: ARI Node JS Bridge.addChannel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Mon, Jan 7, 2019, at 1:23 PM, Matt Riddell wrote:
> Hiya,
> I would have expected this to show the channels in the bridge inside 
> the anonymous function - it shows the bridge is empty though?
>                         var bridge = ari.Bridge();
>                         bridge.create({
>                                 type: 'holding',
>                                 name: event.application+" bridge"
>                             }, function(err, bridge) {
>                                 bridge.addChannel({
>                                     channel:
>                                 }, function(err) {
>                                     console.log("Added to bridge")
>                                     console.log(bridge.channels).   ; 
> <——— This Line
>                                     console.log(err);
>                                 });

I believe you are accessing the snapshot, essentially, of the bridge at the time it was created in which case there would be no channels. You would need to retrieve an up to date snapshot to get the current state.

Joshua C. Colp
Digium - A Sangoma Company | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: &

asterisk-app-dev mailing list

[Index of Archives]     [Asterisk SS7]     [Asterisk Announcements]     [Asterisk Users]     [PJ SIP]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Linux API]

  Powered by Linux