[asterisk-users] [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
_______________________________________________
asterisk-app-dev mailing list
asterisk-app-dev at lists.digium.com
http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev


More information about the asterisk-users mailing list