Integrate Comcent into your site
This guide is for web developers who want their own site or web application to make and receive calls through Comcent instead of having agents work in the Comcent web app. Everything here is available on Comcent Cloud and on a self-hosted instance.
How the pieces fit
Section titled “How the pieces fit”An integration has two parts, and each uses a different connection:
| Part | What it does | How it connects |
|---|---|---|
| Browser calling | Agents make and take calls inside your site | Your page registers with Comcent as a SIP phone, over a secure WebSocket (WebRTC). See Browser calling. |
| Call data | Your server receives every finished call: who called, which agent answered, the recording, and the transcript and summary when AI Insights are on | Comcent posts to your server with a webhook. |
Agent's browser (your site) Your server ┌─────────────────────────────┐ ┌──────────────────────────┐ │ SIP.js ── SIP over WSS ──────────┐ │ Webhook endpoint ◄──────┐ │ ◄── audio (WebRTC) ─────┐ │ └──────────────────────────┘ │ └─────────────────────────────┘ │ │ │ │ ▼ │ ┌──────────────────────────────────────────────┐ │ Comcent │ └──────────────────────────────────────────────┘ ▲ SIP trunk ▼ Your carrier (e.g. Twilio)Before you start
Section titled “Before you start”- Bring your own numbers. Comcent does not sell phone numbers or minutes. Buy your numbers, including toll-free numbers, from a carrier such as Twilio and connect them to Comcent. With Twilio the quickest way is Numbers → Connect a Twilio account: Comcent lists your Twilio numbers, creates the SIP trunk on your Twilio account and points the numbers you import at it. Any other carrier works through a SIP trunk; see SIP trunks and numbers. Your carrier bills you for the calls.
- Give each number an inbound flow, so incoming calls ring the right agents or queue. See Inbound call flows.
- Add your agents as members of your Comcent organisation. Every member gets their own SIP username and SIP password, which they use to sign in to the phone on your site.
- Note your organisation’s subdomain, e.g.
acme. It appears in the Comcent web app’s address (https://app.comcent.io/app/acme/…) and in every SIP address.
Connection values
Section titled “Connection values”| Value | Comcent Cloud | Self-hosted |
|---|---|---|
| SIP WebSocket (WSS) | wss://sip-ws.comcent.io | wss://<COMCENT_DOMAIN>:5063/sip-ws |
| SIP domain and digest realm | <subdomain>.sip.comcent.io | <subdomain>.<COMCENT_DOMAIN> |
| An agent’s SIP address | sip:<sip-username>@<subdomain>.sip.comcent.io | sip:<sip-username>@<subdomain>.<COMCENT_DOMAIN> |
A typical integration
Section titled “A typical integration”- Add a phone sign-in to your site. Each agent enters their own Comcent SIP username and SIP password, which they copy from My profile in the Comcent web app (see Browser calling → SIP credentials). Your page registers with SIP.js, and the agent can now take calls on your site.
- Click to call is a SIP call from the browser to
sip:+15551234567@acme.sip.comcent.io. The call starts in the agent’s browser. - Screen pops: an incoming call carries the caller’s number, so your page can look the customer up before the agent answers.
- After the call, the webhook delivers the full call record to your server. Attach it to the customer’s timeline.