Я использую Twilio Client SDK и Salesforce для совершения звонков из браузера, это вызывает у меня странное поведение, иногда оно успешно устанавливает соединение, и я могу позвонить, а иногда выдает ошибку, что Toke не разрешает исходящиезвонки.Вот этот dbug:
VM3217 twilio.min.js:55 Setting up VSP
VM3217 twilio.min.js:55 WSTransport.open() called...
VM3217 twilio.min.js:55 Attempting to connect...
VM3217 twilio.min.js:55 Closing and cleaning up WebSocket...
VM3217 twilio.min.js:55 No WebSocket to clean up.
VM3217 twilio.min.js:55 Device callback handlers (connect, error, offline,
incoming, cancel, ready, disconnect) have been deprecated and will
be removed in the next breaking release. Instead, the EventEmitter
interface can be used to set event listeners. Example: device.on('incoming', handler)
Log.log @ VM3217 twilio.min.js:55
Log.warn @ VM3217 twilio.min.js:55
Device._addHandler @ VM3217 twilio.min.js:55
Device.incoming @ VM3217 twilio.min.js:55
(anonymous) @ TwilioClick2Dial?ph=923334178796&time=1:41
TwilioClick2Dial?ph=923334178796&time=1:61 before!!!
VM3217 twilio.min.js:55 WebSocket opened successfully.
VM3217 twilio.min.js:55 [PStream] Setting token and publishing listen
VM3217 twilio.min.js:55 [Twilio.PeerConnection] signalingState is "have-
local-offer"
VM3217 twilio.min.js:55 Received HANGUP from gateway
VM3217 twilio.min.js:55 Received an error from the gateway: {code: 31002,
connection: Connection, message: "Token does not allow outgoing calls."}
Log.log @ VM3217 twilio.min.js:55
Log.error @ VM3217 twilio.min.js:55
Connection._this._onHangup @ VM3217 twilio.min.js:55
emitOne @ VM3217 twilio.min.js:55
emit @ VM3217 twilio.min.js:55
PStream._handleTransportMessage @ VM3217 twilio.min.js:55
emitOne @ VM3217 twilio.min.js:55
emit @ VM3217 twilio.min.js:55
WSTransport._this._onSocketMessage @ VM3217 twilio.min.js:55
VM3217 twilio.min.js:55 Uncaught error event suppressed.
VM3217 twilio.min.js:55 Disconnecting...
VM3217 twilio.min.js:55 [Twilio.PeerConnection] iceConnectionState is
"closed"
VM3217 twilio.min.js:55 [Twilio.PeerConnection] signalingState is "closed"