Adding Browser Calling to an Open‑Source CRM with Asterisk and WebRTC
Description and use
FARA CRM now supports click‑to‑call in the browser using Asterisk, JsSIP, and a TURN relay, eliminating the need for desktop softphones.
Problem
Users needed to click a phone number in the CRM and talk directly in the browser without installing a desktop softphone or using a paid cloud PBX.
Outcome
Click‑to‑call functionality was added to the CRM, enabling users to place and receive calls directly in the browser with minimal configuration and no external softphones.
Workflow
- 1. Configure FreePBX: enable WebRTC, create a browser extension, set up WSS with a real cert, open RTP ports, serve CRM over HTTPS.
- 2. Deploy a FastAPI WebSocket proxy that authenticates users, checks PBX line ownership, and forwards SIP signaling while keeping audio direct or via TURN.
- 3. In the CRM frontend, initialize JsSIP with the proxy WebSocket, register the browser UA, and expose a dialer button that calls or answers calls via JsSIP.
- 4. Add a coturn TURN server with short‑lived credentials generated by the backend to handle NAT traversal when direct media fails.
Evidence
The key idea: only SIP signaling goes through the backend. SIP messages are small text commands like "register", "call" and "hang up".
If you leave it out, the browser closes the connection right after connecting and nothing explains why.
- Record date: 2026-09-22T23:30:39.253Z