Blog
VoIP

WebRTC and Click-to-Call: Integrating Voice into Your Website

Understand how WebRTC works and how to implement click-to-call on your company's website, connecting visitors directly to the contact center via browser, with no plugins required.

SipPulse - Technical TeamMay 30, 20257 min read
Share
WebRTC and Click-to-Call: Integrating Voice into Your Website

WebRTC and Click-to-Call: Integrating Voice into Your Website

Allowing a website visitor to click a button and speak directly with an agent, without installing anything or leaving the page, is already an accessible reality thanks to WebRTC. What once required months of development with scattered open source components can now be solved with an integrated platform. The SipPulse SBC offers native WebRTC support, acting as a gateway between the browser and the SIP infrastructure, while SipPulse BCW delivers a complete unified communications solution with click-to-call ready out of the box.

What Is WebRTC

WebRTC (Web Real-Time Communication) is an open standard natively supported by modern browsers (Chrome, Firefox, Safari, Edge). It enables real-time audio, video, and data communication directly in the browser, with no plugins or installations required.

The main WebRTC APIs are:

  • getUserMedia: accesses the device's microphone and camera
  • RTCPeerConnection: manages the peer-to-peer connection for media transmission
  • RTCDataChannel: enables real-time arbitrary data exchange

How Click-to-Call Works with SipPulse

The click-to-call flow using the SipPulse platform is straightforward:

  1. The visitor clicks the "Call now" button on the website
  2. The browser requests permission to access the microphone
  3. A WebRTC connection is established with the SipPulse SBC via secure WebSocket (WSS)
  4. The SipPulse SBC bridges WebRTC to SIP, converting both signaling and media
  5. The SIP call is routed by the SipPulse SoftSwitch to the company's contact center or PBX
  6. The agent receives the call on their extension as usual

For the agent, the experience is identical to receiving a conventional phone call. All WebRTC complexity is abstracted by the SBC.

SipPulse SBC: The Native WebRTC Gateway

The central element of any click-to-call architecture is the gateway that bridges WebRTC and SIP. The SipPulse SBC was designed to fulfill this role natively, without requiring additional components.

What the SipPulse SBC Does in WebRTC-SIP Bridging

  • WebSocket termination (WSS): receives secure WebSocket connections from the browser and translates to SIP/UDP or SIP/TCP on the network side
  • Codec transcoding: converts Opus (WebRTC's native codec, 20-40 kbps) to G.711 (64 kbps) or G.729 (8 kbps) on the SIP side, transparently
  • SRTP/DTLS management: WebRTC requires all media to be encrypted via DTLS and SRTP. The SipPulse SBC terminates this encryption and can deliver standard RTP or SRTP to the SIP side, as needed
  • NAT traversal with ICE/STUN/TURN: resolves connectivity issues when the visitor is behind firewalls or restrictive corporate networks

Capacity and Variants

The SipPulse SBC supports up to 4,000 concurrent calls per instance. The SBC NNI-CC variant is especially suited for click-to-call scenarios in contact centers, where concurrent call volume is high and routing requirements are complex.

For direct customer access scenarios, the SBC UNI variant is ideal, handling signaling normalization and call admission control (CAC).

Integrated Security

The SipPulse SBC provides additional layers of protection:

  • TLS for signaling: all SIP communication can be encrypted
  • STIR/SHAKEN: caller identity authentication
  • Rate limiting and SIP attack protection: shields the infrastructure from fraud attempts and denial-of-service attacks

SipPulse BCW: Click-to-Call and Unified Communications Out of the Box

While the SipPulse SBC provides the gateway infrastructure, SipPulse BCW (Business Communication Workspace) is the complete unified communications solution that includes click-to-call as one of its native features.

BCW is a UCaaS/CCaaS platform that offers:

  • Website click-to-call: embeddable widget that lets visitors call directly from the browser
  • Full VoIP: extensions, call queues, ring groups, IVR
  • Video conferencing: integrated meeting rooms, no need for external platforms
  • Corporate chat: instant messaging between team members
  • CRM integration: automatic customer record opening when the call connects, with contextual browsing data
  • Mobile apps: agents can receive click-to-call calls on smartphones via native app
  • Zoom and Microsoft Teams integration: interoperability with platforms the company already uses

BCW vs. Building with Open Source Components

The traditional approach to implementing click-to-call involves combining multiple open source components: a JavaScript library (JsSIP or SIP.js), a separate WebRTC-SIP gateway, a PBX, and manual integrations with CRM and queuing systems.

SipPulse BCW replaces that entire stack with a single platform:

AspectOpen Source (DIY)SipPulse BCW
WebRTC-SIP gatewayManual configurationIntegrated (SipPulse SBC)
Click-to-call widgetCustom developmentReady to use
Call queuesSeparate configurationIntegrated
CRM integrationManual developmentNative API
Mobile appsNot includedNative iOS/Android apps
Video conferencingExternal platformIntegrated
Support and SLACommunityProfessional support

Security: SRTP and DTLS

WebRTC requires all media communication to be encrypted. This is implemented via:

  • DTLS (Datagram Transport Layer Security): establishes key exchange for the media session
  • SRTP (Secure Real-time Transport Protocol): encrypts audio/video packets

The SipPulse SBC manages this entire encryption negotiation transparently. On the SIP side, the SBC can maintain end-to-end SRTP encryption or terminate to standard RTP, depending on the destination equipment's capability.

Codec Negotiation

WebRTC natively supports the Opus codec, which offers excellent audio quality with low bandwidth consumption (typically 20-40 kbps). On the SIP side, traditional equipment generally uses G.711 (64 kbps) or G.729 (8 kbps).

The SipPulse SBC performs transcoding between Opus and G.711/G.729 efficiently and transparently. With support for up to 4,000 concurrent calls per instance, the SBC is sized to handle transcoding load even in high-volume scenarios.

Integration with Existing Infrastructure

Click-to-call via SipPulse can be integrated with any existing SIP infrastructure:

  • IP PBX: the call enters as an external extension, following the normal routing flow
  • Contact center: the call enters the queue with additional metadata (source page, form data)
  • CRM: API integration to automatically open the customer record when the call connects
  • SipPulse NIVA: the visitor can interact with SipPulse's intelligent IVR before being directed to an agent, featuring neural TTS and speech recognition

Advantages Over Traditional Callback Forms

The traditional "leave your number and we will call you back" approach has serious limitations:

  • The customer must wait for the return call (high response time)
  • High abandonment rate (many customers give up while waiting)
  • The cost of the return call falls on the company

With click-to-call via SipPulse:

  • Immediate connection, while the visitor's interest is at its peak
  • Lower abandonment rate
  • Reduced call cost (IP traffic via SipPulse SBC)
  • Contextual browsing data can be passed to the agent via BCW/CRM integration

Implementation Considerations

  • SSL certificate: the site must use HTTPS for the browser to allow microphone access
  • Audio quality: depends on the visitor's internet connection. The SipPulse SBC optimizes quality via intelligent codec negotiation.
  • Compatibility: WebRTC is supported across all modern browsers
  • Business hours: SipPulse BCW allows configuring unavailability messages and IVR redirect outside of working hours

Conclusion

WebRTC has transformed voice communication in the browser, but implementing click-to-call with scattered open source components is still a complex project with costly maintenance. The SipPulse SBC provides the native WebRTC-SIP gateway, with codec transcoding, SRTP/DTLS management, and support for up to 4,000 concurrent calls. For those seeking a complete solution, SipPulse BCW delivers click-to-call, unified communications, video conferencing, and CRM integration in a single platform, ready to deploy.

References

#WebRTC#click-to-call#contact center#VoIP

Related Articles