SUPPORT.TWILIO.COM END OF LIFE NOTICE: This site, support.twilio.com, is scheduled to go End of Life on February 27, 2024. All Twilio Support content has been migrated to help.twilio.com, where you can continue to find helpful Support articles, API docs, and Twilio blog content, and escalate your issues to our Support team. We encourage you to update your bookmarks and begin using the new site today for all your Twilio Support needs.

SIP Over Websocket Protocol

Question

Does Twilio supports SIP over Websocket protocol to conduct calls using SIP.js or jsSIP library?

 

Product

SIP Domain, WebRTC, Twilio Programmable Voice

 

Answer

No, Twilio does not support SIP over WebSocket (WS/WSS) transport, which is required by browser-based SIP libraries like SIP.js and JsSIP. Twilio SIP Domains only support SIP over UDP, TCP, or TLS.

SIP.js and JsSIP require a SIP server that supports SIP over WebSocket. Twilio’s SIP Domains do not provide a WebSocket endpoint for SIP signaling.

Supported transports for Twilio SIP Domains are UDP, TCP, and TLS. You can use SIP devices that support these transports.

Browser-based calling with Twilio should use the Twilio Voice JavaScript SDK, which uses WebRTC for signaling and media. This SDK allows you to make and receive calls from the browser to PSTN, SIP endpoints, or other Twilio clients.

Media Streams API: Twilio allows you to stream audio from a call to your own WebSocket server, but this is for media (audio) streaming only—not for SIP signaling or call control.

To establish SIP Domain calls, you will need to use a softphone like Linphone or Zoiper which use TCP/UDP/ TLS for transport.

 

Additional Information 

  • Twilio’s Voice JavaScript SDK is the recommended way to make or receive calls via a web browser. The destination can be a PSTN number, SIP endpoint, or another client identifier.
  • Twilio does not currently provide a SIP over WebSocket endpoint for browser-based SIP libraries.
  • Media Streams API is for audio streaming only and does not provide SIP signaling capabilities.

 

 

Have more questions? Submit a request
Powered by Zendesk