asterisk / node-ari-client

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

bridges.addChannel does not result in a bridge with channels #123

Closed MattRiddell closed 5 years ago

MattRiddell commented 5 years ago

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)
                                    console.log(err);
                                });
MattRiddell commented 5 years ago

You need to update the bridge again - it doesn't get updated automatically

Rojina99 commented 4 years ago

@MattRiddell Can you elaborate how can I approach this ........... like updating bridge ?