I am trying to set up outgoing calls on Meteor through Twilio. To do that, I have a method on the backend to generate a capability token.
When I try to actually initiate the call, I get a RangeError
that nobody else seems to have experienced.
// get capability token
Meteor.call('twilioCallToken', function(err, capToken) {
if (capToken) {
Twilio.Device.setup(capToken, { closeProtection: true }); // RangeError thrown on this line
}
});
The exact error is:
Exception in delivering result of invoking 'twilioCallToken': RangeError: Maximum call stack size exceeded
at a.addCommand.(anonymous function) [as setup] (https://static.twilio.com/libs/twiliojs/1.2/twilio.min.js:1:411)
at a.addCommand.(anonymous function) [as setup] (https://static.twilio.com/libs/twiliojs/1.2/twilio.min.js:1:411)
at a.addCommand.(anonymous function) [as setup] (https://static.twilio.com/libs/twiliojs/1.2/twilio.min.js:1:411)
at a.addCommand.(anonymous function) [as setup] (https://static.twilio.com/libs/twiliojs/1.2/twilio.min.js:1:411)
at a.addCommand.(anonymous function) [as setup] (https://static.twilio.com/libs/twiliojs/1.2/twilio.min.js:1:411)
at a.addCommand.(anonymous function) [as setup] (https://static.twilio.com/libs/twiliojs/1.2/twilio.min.js:1:411)
at a.addCommand.(anonymous function) [as setup] (https://static.twilio.com/libs/twiliojs/1.2/twilio.min.js:1:411)
at a.addCommand.(anonymous function) [as setup] (https://static.twilio.com/libs/twiliojs/1.2/twilio.min.js:1:411)
at a.addCommand.(anonymous function) [as setup] (https://static.twilio.com/libs/twiliojs/1.2/twilio.min.js:1:411)
at a.addCommand.(anonymous function) [as setup] (https://static.twilio.com/libs/twiliojs/1.2/twilio.min.js:1:411)