Guides

Web Voice

A call button for your website. Visitors talk to you from the browser — no phone, no app, nothing to install. Calls land wherever the number you pick already goes.

Web Voice is one line of HTML. Paste it into your site and a call button appears in the corner. When a visitor presses it, their browser places a real call to one of your CallNode numbers, and it is handled exactly like any other call to that number — your AI agent, your SIP endpoint, whatever that number already does.

Add it to your site

  1. Go to Dashboard → Web Voice and create a widget.
  2. Pick the number web callers should reach, and list the websites the button may appear on.
  3. Copy the snippet and paste it just before your closing body tag.
html
<script src="https://callnode.io/widget/callnode-web-voice.js"
        data-callnode-key="wv_pub_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"></script>
The key is not a secret
The data-callnode-keyships in your public HTML, and that is fine. What actually authorises a call is the allowed-websites list you configure, checked server-side against the browser's Origin, together with the widget's hourly limit. A key copied to another site will not place calls.

Allowed websites

The button only works on the origins you list. Include every address visitors actually use — www and non-www are different origins, as are staging domains.

Your site is served atList this
https://example.comhttps://example.com
https://www.example.comhttps://www.example.com
both of the aboveadd both entries
A widget with no origins refuses every call
An empty list means deny-all, not allow-all. The dashboard blocks you from saving one, but it is worth knowing if you manage widgets programmatically.

Appearance

Everything is optional; the defaults work without configuration.

AttributeDefaultNotes
data-callnode-labelTalk to usFallback button text. A label set on the widget in the dashboard wins, and reaches every page without a re-paste.
data-callnode-color#2563ebHex, a CSS colour name, or rgb()/hsl().
data-callnode-positionbottom-rightOr bottom-left.
data-callnode-mic-gainautoSee microphone levels below. Leave it alone unless you have a reason.
html
<script src="https://callnode.io/widget/callnode-web-voice.js"
        data-callnode-key="wv_pub_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
        data-callnode-label="Talk to sales"
        data-callnode-color="#0f766e"
        data-callnode-position="bottom-left"></script>

Content Security Policy

The widget adds no inline styles and no inline scripts, so it runs under a strict policy with nothing loosened — no 'unsafe-inline', no style hashes. If your site sends a CSP, it needs these three directives:

HTTP
Content-Security-Policy:
  script-src  'self' https://callnode.io;
  connect-src 'self' https://api.callnode.io wss://*.callnode.io;
  media-src   'self' blob:;
connect-src and ports
A CSP host source with no port matches only the scheme's default port. Our signalling runs on 443, so wss://*.callnode.io matches it — but if you pin a port anywhere in that directive, make sure it is 443. A mismatch makes the browser refuse the connection before any packet leaves, and the button simply reports that calling is unavailable.

Very old browsers

Styling uses constructed stylesheets, which are not inline CSS and need no permission at all. Browsers older than roughly 2022 fall back to a <style> element, which a strict style-src will refuse — the button still works, it just renders unstyled. Pass your nonce if you care about that case:

html
<script src="https://callnode.io/widget/callnode-web-voice.js"
        data-callnode-key="wv_pub_..."
        data-callnode-nonce="THE-SAME-NONCE-AS-YOUR-CSP"></script>

Microphone levels

Visitors arrive on every imaginable microphone. The widget measures each caller's speech in the first couple of seconds and scales it toward normal telephone level, so a quiet laptop mic is lifted and a hot headset is brought down. It adjusts on speech only and never during pauses, which keeps silence genuinely silent — voice agents rely on that contrast to tell when a caller has started and stopped talking.

Set data-callnode-mic-gain to a number to pin a fixed multiplier, or to 1 to send the raw capture untouched.

What a visitor can do

Press call, talk, hang up. That is the entire surface. There is no dial pad and no way to choose a destination — a web caller reaches the one number you configured and nothing else.

Web Voice cannot reach emergency services
Because a visitor cannot dial, they cannot dial 911 or any other emergency number. Web Voice is a contact channel for your business, not a phone service, and it is not a replacement for one. Say so on your site if visitors might assume otherwise.

Limits and billing

LimitDefaultWhat happens
Calls per hour, per widget60Further presses report that calling is unavailable.
Maximum call length10 minutesThe call ends; the visitor can press call again.
Session validity120 seconds, single useMinted when the button is pressed and consumed by the call.

Web calls bill exactly like an inbound call to that number, at that number's normal per-minute rate, and appear in Call Logs against it. There is no separate Web Voice charge.

If the button does not work

The visitor seesUsual cause
Calling is unavailable right now.Origin not in your allowed list, hourly limit reached, or the widget is disabled.
Could not reach the calling service.Network or CSP is blocking the connection. Check connect-src, then any corporate firewall.
Microphone access is needed.The visitor declined the browser prompt, or the page is not served over HTTPS.
Calling needs a secure (https) page.Browsers only allow microphone capture on HTTPS.

The widget logs detail to the browser console under [CallNode], which is usually enough to tell these apart.