[asterisk-app-dev] ARI Node JS Bridge.addChannel

Matt Riddell lists at venturevoip.com
Mon Jan 7 11:23:37 CST 2019


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: incoming.id
                                }, function(err) {
                                    console.log("Added to bridge")
                                    console.log(bridge.channels).   ; <ā€”ā€”ā€” This Line
                                    console.log(err);
                                });

Reason being, Iā€™m creating a queue need to move channels between bridges depending on agent/customer status etc

Cheers,

Matt Riddell


More information about the asterisk-app-dev mailing list