Focus: VICIdial implementation, WebRTC calling, remote sales team solution
Industry: BPO (Business Process Outsourcing) / Call Center Operations
Key Technologies: VICIdial, Asterisk 18, PJSIP, WebRTC, ConfBridge, Let’s Encrypt SSL
Remote call centers face a critical challenge: deploying agents across locations without expensive hardware or complex VPN setups.
One growing BPO needed browser-based calling for 50+ remote sales agents. Traditional softphones created deployment nightmares and support overhead.
This case study reveals how we implemented a production-ready VICIdial WebRTC solution enabling secure, browser-based calling for distributed teams.
Client Background and Business Challenge
Our client operates a business process outsourcing (BPO) company specializing in B2B sales campaigns for technology clients.
Company profile:
50+ sales agents working remotely across multiple cities.
High-volume outbound calling (2,000-3,000 calls daily).
Existing legacy system requiring desktop softphones and VPN access.
Frequent IT support tickets for softphone configuration issues.
Why Traditional Solutions Failed
Client’s Initial Challenge
The BPO firm operated a traditional in-house call center. Agents sat in an office, using desk phones connected to an on-premises PBX system. Revenue was growing, but they faced a critical problem: remote work.
The constraints:
- Agents worked from multiple countries (USA, UK, Canada)
- In-office equipment could not reach them
- Softphone solutions (Zoiper, Bria) created IT support nightmares
- No unified call recording or compliance tracking
- Each agent needed separate VPN + VoIP client = complex setup
- Downtime in one location affected the entire operation
The business impact:
- Agent onboarding took 2-3 hours per person
- Remote agents experienced dropped calls (15% failure rate)
- No compliance audit trail for regulatory requirements
- Support tickets for “can’t hear agent” multiplied
- Scaling became impossible without IT hiring
Why Existing Solutions Did Not Work
Commercial call center platforms (Five9, NICE, Genesys):
- Cost: $50-150/month per agent (for 50 agents = $30K-90K/month)
- Long contracts (3-5 years)
- Overkill features agents would never use
- Vendor lock-in risk
- Setup time: 4-8 weeks
Basic Softphone approach (Zoiper, Yealink):
- No unified call center features
- No built-in recording
- Complex agent management
- Poor call quality on unstable internet
- No admin controls for supervisors
Self-hosted Asterisk with custom development:
- Required hiring dedicated DevOps team
- 6-month development timeline
- High technical risk
- Ongoing maintenance burden
- No out-of-box call center features
The client needed something, an open-source platform with professional features, fast deployment, and reasonable cost.
Solution: VICIdial with WebRTC
Why VICIdial?
VICIdial is an open-source call center platform built on Asterisk. It provides professional-grade features at a fraction of commercial software cost.
VICIdial advantages for this use case:
- Web-based agent interface (no software installation)
- Built-in call recording and compliance tools
- Multi-location agent management
- Real-time supervisor monitoring
- Call queue management and routing
- Automatic call distribution (ACD)
- Dialer modes (manual, preview, power, predictive)
- Database-driven (scales with MySQL)
- WebRTC support for in-browser calling
Why WebRTC specifically?
WebRTC (Web Real-Time Communication) means agents call through their web browser. No softphone installation, no configuration, no compatibility issues.
Agent logs in → Browser requests microphone permission → Agent makes calls → Calls happen in browser.
That is it. No IT tickets, no setup, no support calls.
Asterisk telephony engine:
Asterisk 18 LTS providing modern features and long-term support.
PJSIP channel driver replacing legacy chan_sip.
ConfBridge conferencing replacing deprecated MeetMe.
Optimized dialplan for WebRTC call flows.
WebRTC infrastructure:
Secure WebSocket (WSS) connections for SIP signaling.
SRTP (Secure Real-time Transport Protocol) for media encryption.
STUN/TURN servers handling NAT traversal.
Web audio codec optimization (Opus, G.722).
Important: deploy a TURN server (coturn) for NAT traversal in restrictive networks. For large deployments, front WebRTC with a SIP proxy/SBC (Kamailio/OpenSIPS) to manage registrations and scale signaling separately from media handling.
Security layer:
Let’s Encrypt SSL certificates for HTTPS access.
Automatic certificate renewal preventing expiration.
Web application firewall (WAF) protecting against attacks.
Rate limiting preventing brute force attempts.
Database infrastructure:
MariaDB cluster with master-slave replication.
Optimized queries reducing response times 60%.
Automated backups with point-in-time recovery.
Performance monitoring and query optimization.
For businesses that need a ready-to-deploy VICIdial environment, we also provide VICIdial dedicated server hosting optimized for WebRTC and remote agents.
System Architecture Diagram

WebRTC Implementation Specifics
Browser-based calling required specific Asterisk and VICIdial configurations.
PJSIP transport configuration:
; pjsip.conf
[transport-wss]
type=transport
protocol=wss
bind=0.0.0.0
[webrtc-1000]
type=endpoint
transport=transport-wss
context=from-internal
disallow=all
allow=opus,ulaw,alaw,g722
aors=webrtc-1000
webrtc=yes
ice_support=yes
media_encryption=dtls
dtls_auto_generate_cert=yes
Note: config syntax varies by Asterisk version .Test on a staging server and consult official Asterisk docs.
Browser compatibility:
Chrome/Edge: Full WebRTC support with optimal performance.
Firefox: Complete compatibility with standard configuration.
Safari: Supported with minor codec adjustments.
Mobile browsers: iOS Safari and Android Chrome fully functional.
Audio codec selection:
Opus codec prioritized for superior quality and bandwidth efficiency.
G.722 wideband fallback for compatibility.
G.711 (ulaw/alaw) as universal compatibility codec.
Codec negotiation ensuring optimal quality per connection.
Conference Bridge Optimization
Call conferencing required migration from deprecated MeetMe to modern ConfBridge.
ConfBridge advantages:
Better audio quality through mixing algorithms.
Lower CPU usage supporting more concurrent conferences.
Dynamic conference creation without pre-allocation.
Advanced features (muting, recording, announcement).
Performance impact:
Previous MeetMe: 100 concurrent conferences maximum.
ConfBridge implementation: 500+ concurrent conferences.
CPU utilization reduced 40% under equivalent load.
Audio quality improved through superior mixing.
Architecture: How We Built It
System Components
We deployed a three-tier VICIdial architecture:
Tier 1: Web Interface (Agent & Admin)
- VICIdial web application on Apache + PHP
- Responsive design (works on phones, tablets, desktops)
- Secure HTTPS with Let’s Encrypt SSL
- Agent dashboard: Shows queued calls, contact records, call history
- Admin panel: Supervisor monitoring, recording access, user management
Tier 2: VoIP Core (Asterisk 18 with PJSIP)
- Asterisk 18 handling SIP protocol
- PJSIP stack (modern, WebRTC-compatible)
- ConfBridge for conference handling
- Call recording to local disk
- Automatic failover for high availability
Tier 3: Database & Storage
- MySQL database storing agent records, calls, contacts
- Audio file storage (calls recorded to /var/spool/asterisk/recording)
- Backup system (nightly to off-site server)
Technology Stack
| Component | Technology | Purpose |
| VoIP Platform | VICIdial + Asterisk 18 | Call center operations |
| PBX Protocol | PJSIP | Modern SIP implementation, WebRTC compatible |
| Web Server | Apache 2.4 + PHP 7.4 | VICIdial application |
| Database | MySQL 5.7+ | Agent records, call logs, contact data |
| SSL/TLS | Let’s Encrypt | Secure HTTPS for web access |
| Calling | WebRTC (over HTTPS) | Browser-based calling without softphone |
| Recording | MPEG-4 Audio (mp4) | Recordings stored as WAV/MP3 by default; we transcode to MP3/MP4 for archival using ffmpeg where required |
| Monitoring | Asterisk native tools | Real-time call monitoring |
Implementation Process and Challenges
Deployment followed structured methodology addressing technical and operational requirements.
Phase 1: Infrastructure Provisioning
Server deployment:
4x application servers for web interface and database.
6x Asterisk servers for telephony processing.
2x load balancers for traffic distribution.
Database cluster with master and two replicas.
Network configuration:
Firewall rules allowing WebRTC ports (TCP 8089, UDP 10000-20000).
Load balancer configuration distributing WebSocket connections.
DNS setup for domain and SSL certificate validation.
Quality of Service (QoS) marking for RTP traffic prioritization.
SSL certificate installation:
Let’s Encrypt certificate generation for primary domain.
Wildcard certificate covering all subdomains.
Automated renewal via cron job preventing expiration.
Certificate chain verification ensuring browser compatibility.
Phase 2: VICIdial Installation and Configuration
Base VICIdial setup:
Deploy on a supported RHEL-compatible OS (AlmaLinux / Rocky or CentOS Stream) and keep packages current.
VICIdial installation from official repository.
Database schema creation and optimization.
Web interface installation and Apache configuration.
WebRTC enablement:
Asterisk compiled with WebRTC protocol support modules.
PJSIP configuration for WebSocket transport.
SSL certificates configured for secure WebSocket.
SIP.js library integration for browser-based clients.
Agent phone configuration:
WebRTC phones created for each agent.
Extension numbering scheme aligned with agent IDs.
Voicemail boxes configured for each extension.
Call forwarding and transfer capabilities enabled.
Phase 3: Call Recording Implementation
Recording access presented unexpected challenges requiring custom solutions.
Initial recording issue:
Recordings saved with restrictive permissions (owner-only access).
Web interface unable to access files for playback.
Agents and supervisors couldn’t review calls.
Root cause analysis:
Asterisk process running as different user than web server.
File permissions set to 600 (owner read/write only).
Directory permissions preventing web server traversal.
Result verification:
Recordings immediately accessible through web interface.
Agents could review own calls for self-improvement.
Supervisors gained quality assurance access.
Compliance team could retrieve calls for audits.
Phase 4: Stability Optimization
Production usage revealed “dead call” scenarios requiring investigation.
Dead call symptoms:
Agent appears on active call in system.
No actual audio connection exists.
Agent cannot make new calls until manual intervention.
System shows agent as unavailable indefinitely.
Causes identified:
Network disconnections not detected by Asterisk.
WebRTC reconnection failures leaving orphaned sessions.
SIP channel cleanup failures in edge cases.
Database state inconsistencies between VICIdial and Asterisk.
Channel hangup on disconnect:
Modified dialplan adding aggressive timeout detection.
Implemented periodic channel state validation.
Automated cleanup of stale database entries.
WebRTC keepalive:
Configured SIP OPTIONS ping every 30 seconds.
Automatic re-registration on connection loss.
Browser page visibility detection triggering re-connection.
Results achieved:
Dead call incidents reduced 95% (from 40/day to 2/day).
Automatic recovery in remaining cases within 60 seconds.
Agent satisfaction improved significantly.
IT support tickets for call issues dropped 87%.
Phase 5: Performance Tuning
System optimization ensured scalability and reliability under load.
Database query optimization:
Identified slow queries through performance monitoring.
Added indexes on frequently queried columns.
Optimized VICIdial reporting queries reducing execution time 70%.
Asterisk tuning:
Increased maximum channels to 2,000 per server.
Optimized RTP port allocation for WebRTC.
Adjusted codec negotiation priorities.
Enabled qualified SIP peers reducing registry overhead.
Load balancing refinement:
Implemented sticky sessions for agent connections.
Health checks detecting server issues within 10 seconds.
Automatic failover to healthy servers.
Geographic routing sending agents to nearest server.
Performance benchmarks:
| Metric | Before Optimization | After Optimization | Improvement |
| Page load time | 3.2 seconds | 0.8 seconds | 75% faster |
| Database query time | 850ms average | 180ms average | 79% faster |
| Call setup time | 4.1 seconds | 1.2 seconds | 71% faster |
| Concurrent calls capacity | 300 | 1,200 | 4x increase |
Results and Business Impact
Implementation delivered measurable improvements across operational and financial metrics.
Quantitative Results
Agent onboarding time:
Previous process: 2-3 days per agent.
New process: 2-4 hours per agent.
Reduction: 85% faster onboarding.
IT support reduction:
Previous volume: 120 tickets/month for softphone/VPN issues.
Current volume: 15 tickets/month for all telephony issues.
Reduction: 87.5% fewer support tickets.
System reliability:
Previous uptime: 97.2% (downtime primarily from VPN issues).
Current uptime: 99.7% (downtime only during planned maintenance).
Improvement: 2.5 percentage points uptime increase.
Call quality metrics:
Previous MOS (Mean Opinion Score): 3.2/5.0.
Current MOS: 4.1/5.0.
Improvement: 28% quality increase.
Qualitative Benefits
Agent experience improvements:
Single browser tab replacing multiple applications.
Work from anywhere without VPN or special software.
Instant call access improving responsiveness.
Simplified workflow reducing training requirements.
Management advantages:
Real-time dashboard visibility into all agent activity.
Historical reporting enabling data-driven decisions.
Quality assurance through accessible call recordings.
Scalability supporting business growth plans.
Operational flexibility:
Hybrid office/remote models supported seamlessly.
Disaster recovery enabling work-from-home during emergencies.
Geographic expansion without infrastructure replication.
Temporary agent capacity for campaigns and seasonal peaks.
Lessons Learned & Best Practices
What Worked Well
- Planning upfront: Spending time understanding the client’s needs (remote work, browser-based) shaped the entire architecture.
- WebRTC from day one: Building WebRTC into the core design instead of adding it later prevented rework.
- Modern Asterisk: Using Asterisk 18 PJSIP instead of outdated chan_sip prevented technical dead-ends.
- Automated SSL: Let’s Encrypt SSL eliminated security concerns and certificate management overhead.
- Thorough testing: Load testing before go-live caught issues early.
Challenges We Faced
- VICIdial is outdated: Last major update 2017. Required manual patches for modern Asterisk compatibility.
- WebRTC documentation sparse: Few examples of VICIdial + Asterisk 18 + WebRTC together. Required research and experimentation.
- Recording permissions initially broken: File permissions errors prevented agents from accessing their own recordings. Small fix, big impact.
- Session management: PHP sessions incompatible with long-running WebRTC calls. Required custom session handling.
What We Would Do Differently
- Start with Asterisk alone first: Get basic calling working, then layer VICIdial on top (instead of assuming VICIdial’s integration would work).
- Use SIPml5 library version lock: We updated JavaScript library mid-project. Small change caused compatibility issues. Lock versions upfront.
- Pre-provision more server capacity: First month we added 20 agents beyond initial 50. Server handled it, but ran close to limits. Better to over-provision initially.
Recommendations for Similar Deployments
If You Need Remote Call Center:
Option 1: Commercial (Five9, NICE)
- Pros: Fully managed, enterprise support, no technical work
- Cons: Expensive ($50-150/agent/month), vendor lock-in
- Best for: Large enterprises with budget
Option 2: VICIdial (like we did)
- Pros: Cheap ($0 software), flexible, full control
- Cons: Requires technical team, ongoing maintenance
- Best for: Mid-size operations with IT resources (our use case)
Option 3: Modern alternatives (FreeSWITCH, SipServer)
- Pros: Cleaner codebase than VICIdial, modern architecture
- Cons: Fewer out-of-box call center features
- Best for: Custom development teams building new platform
Infrastructure Best Practices
- Server sizing: 1 CPU core per 4-5 concurrent calls. 50 agents = 8+ cores minimum.
- Network capacity: 128 kbps per call × number of concurrent calls = required bandwidth. 50 calls = 6.4 Mbps minimum. Get 50 Mbps+ for headroom.
- Storage: Call recordings = 3-5 GB/day per 50 agents. Plan 6+ months retention = 500GB+ disk.
- Redundancy: Run two VICIdial servers in active-passive failover. If one fails, second takes over.
- Backups: Nightly backup of MySQL database (call records) and recording files. Off-site storage.
Conclusion
WebRTC-enabled VICIdial transformed client’s remote call center operations delivering measurable business value.
Organizations requiring browser-based call center capabilities should consider VICIdial WebRTC solutions for cost-effective, flexible operations.
Ucartz provides consultation, deployment, and ongoing support for VICIdial and WebRTC implementations customized to specific business requirements. Contact Ucartz for a free consultation and infrastructure assessment.




