WebRTC Setup for Vicidial

Enable browser-based calling for agents — no softphone installation required

What is WebRTC?

WebRTC (Web Real-Time Communication) is a browser technology that enables real-time audio and video communication directly in the web browser without any plugins or software installation. For Vicidial, this means agents can make and receive calls using only their web browser and a headset.

Vicidial supports WebRTC through Asterisk's WebSocket transport and the built-in web phone (sometimes referred to as "Overkill" in the Vicidial community). This eliminates the need for agents to install and configure softphones like Zoiper or MicroSIP.

Benefits of WebRTC for Call Centers

No Software Install

Agents use only their web browser — no softphone download needed.

Encrypted by Default

WebRTC uses DTLS-SRTP encryption for secure audio transmission.

Works Anywhere

Any device with a modern browser and microphone can be an agent station.

Faster Onboarding

New agents can start in minutes — just open a URL and log in.

Better Security

No SIP credentials exposed on agent machines. All through browser.

Less IT Support

No softphone configuration issues. Fewer tickets from remote agents.

Prerequisites

Vicidial server with Asterisk 13+ (Asterisk 16+ recommended for best WebRTC support)
PJSIP module loaded (chan_pjsip, not chan_sip — WebRTC requires PJSIP)
Valid SSL/TLS certificate (Let’s Encrypt or commercial) — self-signed will NOT work
Domain name pointing to your Vicidial server (required for SSL)
Firewall ports open: 443 (HTTPS), 8089 (WSS), 10000-20000 (RTP/UDP)
Modern browser: Chrome 60+, Firefox 55+, Edge 79+, Safari 11+ (no IE support)
1

Install SSL Certificate (HTTPS Required)

  • WebRTC requires HTTPS. Browsers block WebRTC from insecure origins.
  • Install Let’s Encrypt or a commercial SSL certificate on your Vicidial server.
  • Use certbot for easy Let’s Encrypt setup: yum install certbot python3-certbot-apache
  • Run: certbot --apache -d your-vicidial-domain.com
  • Ensure Apache serves the Vicidial web interface over HTTPS (port 443).
# Install certbot (CentOS/Rocky)
yum install epel-release
yum install certbot python3-certbot-apache
 
# Obtain certificate
certbot --apache -d your-vicidial-domain.com
 
# Auto-renewal (add to crontab)
0 3 * * * certbot renew --quiet
2

Configure Asterisk for WebSocket Transport

  • Asterisk needs to accept WebSocket (WS/WSS) connections for WebRTC.
  • Edit /etc/asterisk/http.conf to enable the built-in HTTP server.
  • Enable TLS with your SSL certificate for WSS (secure WebSocket).
; /etc/asterisk/http.conf
[general]
enabled=yes
bindaddr=0.0.0.0
bindport=8088
tlsenable=yes
tlsbindaddr=0.0.0.0:8089
tlscertfile=/etc/letsencrypt/live/yourdomain/fullchain.pem
tlsprivatekey=/etc/letsencrypt/live/yourdomain/privkey.pem
3

Configure PJSIP WebSocket Transport

  • Add a WebSocket transport to PJSIP for handling WebRTC connections.
  • This goes in /etc/asterisk/pjsip.conf or the Vicidial carrier config.
; /etc/asterisk/pjsip.conf (or via Vicidial carrier entry)
[transport-wss]
type=transport
protocol=wss
bind=0.0.0.0:8089
cert_file=/etc/letsencrypt/live/yourdomain/fullchain.pem
priv_key_file=/etc/letsencrypt/live/yourdomain/privkey.pem
 
; WebRTC endpoint template
[webrtc_endpoint](!)
type=endpoint
transport=transport-wss
context=default
dtls_auto_generate_cert=yes
webrtc=yes
disallow=all
allow=opus
allow=ulaw
4

Update Vicidial System Settings

  • Navigate to Admin → System Settings in the Vicidial admin panel.
  • Set Web Socket URL to wss://your-vicidial-domain.com:8089/ws
  • Enable WebRTC phone features in the system settings.
  • Set the default phone protocol to include WebRTC option.
5

Configure Agent Phone Entry for WebRTC

  • Create a phone entry in Admin → Phones for each WebRTC agent.
  • Set the phone protocol to SIP and enable WebRTC mode.
  • The agent’s browser acts as the SIP endpoint via WebSocket.
# Phone Entry Settings (Admin → Phones)
Extension: 8001
Protocol: SIP
Server IP: (your Vicidial server)
Phone Type: SIP
WebRTC: Y
Transport: WSS
Phone Login: 8001
Phone Password: (strong password)
6

Test WebRTC Connection

  • Open the agent login page via HTTPS: https://your-domain/agc/vicidial.php
  • Log in with agent credentials and select the WebRTC phone.
  • Browser will prompt for microphone access — click Allow.
  • Make a test call to verify audio works in both directions.
  • Check Asterisk console: pjsip show contacts (should show WebSocket contact).

Browser Requirements & Permissions

  • Agents must use HTTPS to access the Vicidial agent page. HTTP will not work for WebRTC.
  • The browser will prompt for microphone permission on first use. Agents must click "Allow."
  • Some browsers require the page to be in foreground/focus for audio to work. Instruct agents not to minimize the browser tab.
  • Disable browser notification blocking that might interfere with call alerts.
  • For best audio quality, agents should use a USB headset (not laptop speakers/mic).

Troubleshooting WebRTC

WebSocket connection fails:Check port 8089 is open. Verify SSL certificate is valid (not self-signed). Test: wss://your-domain:8089/ws in browser console.
No audio after connect:Check browser microphone permissions. Ensure DTLS and ICE are configured. Verify RTP ports (10000-20000 UDP) are open.
SSL certificate error:Self-signed certs won't work. Use Let's Encrypt. Ensure fullchain.pem (not just cert.pem) is used in both Apache and Asterisk.
Agent can hear but caller can't:NAT/STUN issue. Configure externaddr in Asterisk. Consider adding a TURN server for complex NAT environments.
Calls fail intermittently:Browser tab may be throttled when not in focus. Instruct agents to keep the tab active. Check for WebSocket timeout settings.
Echo or feedback:Agent should use headset, not speakers. Enable echo cancellation in browser settings. Check for audio routing loops.

WebRTC vs Traditional Softphone

AspectWebRTCSoftphone (Zoiper/MicroSIP)
InstallationNone — browser onlyDownload and install required
ConfigurationMinimal — server-sidePer-agent SIP settings needed
Audio QualityGood (Opus codec)Excellent (G.711/G.729)
NAT TraversalBuilt-in ICE/STUN/TURNManual STUN config needed
EncryptionAlways encrypted (DTLS-SRTP)Optional (SRTP/TLS)
IT OverheadLowHigher (support each agent)
Browser DependencyYes — tab must stay openIndependent application
Codec SupportOpus, G.711Wide range (G.711, G.729, GSM)
Back to Vicidial Guide Remote Agents Installation Guide