twilio / twilio-voice.js

Twilio's JavaScript Voice SDK
Other
53 stars 53 forks source link

[BUG] Device is registered and can make outgoing calls but can not receive incoming calls. #59

Closed eglove closed 2 years ago

eglove commented 2 years ago

Code to reproduce the issue:

const device = new Device(voiceToken, {
  logLevel: 1,
});

await device.register();

device.on('incoming', (call: Call) => {
  handleCallStateChange(call);
  // Or some other stuff
});

Expected behavior:

Receive incoming calls, see something in the console for debug, or be able to console log something on the incoming event. Support has asked me to verify that I'm using Device.setup() which is a method of twilio-client. Not @twilio/voice-sdk. twilio-client no longer works with my project.

Actual behavior:

When attempting to make the call, it immediately hangs up, nothing is logged to Twilio Console. I can, however, make outgoing calls.

Logs for outgoing call:

  1. Setting up VSP
  2. Initializing transport backoff using config: {factor: 2, initialDelay: 100, maxDelay: 20000, randomisationFactor: 0.4}
  3. WSTransport.open() called...
  4. Attempting to connect...
  5. Closing and cleaning up WebSocket...
  6. No WebSocket to clean up.
  7. WebSocket opened successfully.
  8. Setting token and publishing listen
  9. Stream is ready
  10. signalingState is "have-local-offer"
  11. dtlsTransportState is "new"
  12. pc.iceGatheringState is "gathering"
  13. ICE Candidate: {"candidate":"candidate:2047522363 1 udp 2122260223 10.0.24.180 64237 typ host generation 0 ufrag a0X0 network-id 1","sdpMid":"0","sdpMLineIndex":0}
  14. ICE Candidate: {"candidate":"candidate:881412811 1 tcp 1518280447 10.0.24.180 9 typ host tcptype active generation 0 ufrag a0X0 network-id 1","sdpMid":"0","sdpMLineIndex":0}
  15. pc.iceGatheringState is "complete"
  16. ICE Candidate: null
  17. pc.iceConnectionState is "checking"
  18. signalingState is "stable"
  19. pc.connectionState is "connecting"
  20. dtlsTransportState is "connecting"
  21. pc.iceConnectionState is "connected"
  22. Media connection established.
  23. dtlsTransportState is "connected"
  24. pc.connectionState is "connected"
  25. Disconnecting... dtlsTransportState is "closed"

Software versions:

ryan-rowland commented 2 years ago

Hi @eglove, for technical support for issues such as this please go through our ticketing system in your Twilio console, where our Technical Support team can give you their full attention. We're not able to provide the same level of support here on the GitHub issues as the engineering team.