Skip to main content

Overview

An embedded web call puts your assistant on a page you host. A visitor clicks, talks, and the agent answers — with SMS, bookings and live handoff working exactly as they do on a call placed from the Voxworks app. Two requests make it work. Your server mints a session; the visitor’s browser uses it to reach the Voxworks media edge over SIP-over-WebSocket.
Audio goes browser-to-edge directly. Nothing proxies it, and the API never sees it. This page covers the developer integration. For web calls placed inside the Voxworks app — the In Browser option in the Test Call dialog — see Web Calls.

What the session token is

create-web-session returns a single-use token, valid for about two minutes, for one call on one script — chosen by your server, not by the page. The script, contact and destination are fixed when your server mints the token. A page holding it cannot point it at a different script, and cannot start a second call with it. That’s what makes it safe to hand to a browser. The connection bootstrap in the same response is not a credential and grants no access on its own — the token is what authorises the call. Treat it as configuration, not as a secret.
Mint the session on your own server so your API key never reaches a browser. An API key can read your calls and contacts and start outbound ones; anything in a page bundle is public.

1. Find your script_id

Open Call Scripts, select the script the call should run, go to its Settings tab, and read the Script UUID field on the Call Settings card. You’ll also need an API key — see API Quickstart if you haven’t generated one.

2. Mint a session on your server

Check the endpoint works before wiring anything up:
A successful call returns 201 Created:
Everything from ws_url down is connection bootstrap. Your page passes it straight to the browser client in the next step — you never need to read, construct or understand any of it. The response has no call_id. The call doesn’t exist until the visitor actually connects; it shows up in your call log at that point. Now expose that as an endpoint of your own. Your page calls your endpoint; only your server holds the API key.

Node — Express

TypeScript — Next.js route handler

Python — FastAPI

Python — Flask

Mint the session when the visitor clicks, not when the page loads. The token expires in about two minutes.

3. Connect the browser

The browser speaks SIP over a secure WebSocket. JsSIP handles that:
Fetch a session from your endpoint, then dial the media edge with the values it returned:
Hang up by calling ua.stop().

A complete page

Everything above, as a page you can serve and click:
The page must be served over HTTPS or from localhost — browsers only grant microphone access to a secure context.

React


Always configure an ICE server

The pcConfig block in every example above is not optional:
Until a visitor has granted microphone permission, browsers withhold the local network details needed to set up the audio path. Without an ICE server there’s nothing to fall back on and the call cannot connect. The symptom is easy to misread: the call fails on a visitor’s first click and works on the next one, because by then the permission grant is persistent. Configure a STUN server and it works the first time. If your visitors sit behind restrictive corporate networks, supply a TURN server here as well.
Ask for microphone permission on a click. Browsers only prompt in response to a user gesture, and a call started without a gesture cannot play the agent’s audio back.

Request options

Response fields

Read ws_url, sip_domain, sip_username, sip_password and target from the response on every call — never hardcode them. They can change without notice, and a page pinned to stale values fails with nothing more than a generic connection error, which is very hard to diagnose.

Errors worth handling

Every error uses the standard shape:

Limits

  • The token expires in about two minutes. Mint it when the visitor clicks, not on page load.
  • One token, one call. Reloading the page needs a new session.
  • Concurrency is per team and shared with phone calls. A team at its ceiling on outbound calls cannot start a web call either.
  • The page must be a secure context — HTTPS, or localhost while developing.

Next Steps

Web Calls

How web calls behave once connected — the Call Log, web contacts, handoff, and recordings.

API Quickstart

Generate a key, create a contact, and run your first request against the API.

Live handoff

Hand a web call to a human, dialled on one of your team’s numbers.

Rate Limits & Request Limits

Rate-limit buckets, the 429 headers, and the request body size cap.