Integration guide

Add a Call us button to any website.

A single <script> tag drops a floating call button onto your site. Visitors click it, land in a private CodeB meeting room, and the SIP bridge dials your team’s phone. No installs on either end. The visitor never sees your real phone number.

What it costs

Nothing per visitor. The widget is a static script you host yourself (no third-party CDN, no analytics). Each placed call uses one minute of whatever SIP trunk your CodeB SIP bridge is connected to — same as a normal outbound dial.

The minimum snippet

Paste this anywhere inside <body> — usually right before </body> so the script doesn’t block your page render:

<!-- CodeB Phone call-us button --> <script src="https://www.aloaha.com/embed.js" data-dial="610" defer></script>

Replace 610 with the destination you want clicks to dial. Accepts an internal extension (610) or full E.164 number (+49301234567). No per-page mapping — the bridge routes the dial string at call time.

Why an alias, not the raw number?

The dial value is the actual destination — 610 for an internal extension, an E.164 number like +49301234567 for external. To change which phone gets called, change the snippet’s data-dial attribute. No server-side configuration step.

Customisation options

All attributes are optional except data-dial:

AttributeDefaultWhat it does
data-dial — required Destination alias (or raw E.164 / extension if you accept that risk). Resolves through your WebPhone:NumberAliases table.
data-label Call us Text displayed on the floating button.
data-position bottom-right Corner to place the button. One of bottom-right, bottom-left, top-right, top-left.
data-color #f5a524 Background colour of the button. Any valid CSS colour.
data-host script origin Host serving room.html. Override only if you self-host the CodeB frontend on a different domain than where this script lives.

Examples

Brand-coloured "Talk to sales" button, bottom-left:

<script src="https://www.aloaha.com/embed.js" data-dial="610" data-label="Talk to sales" data-position="bottom-left" data-color="#1f6feb" defer></script>

"Support hotline" with the support extension:

<script src="https://www.aloaha.com/embed.js" data-dial="+49301234567" data-label="📞 Support hotline" defer></script>

Self-hosted CodeB at a custom domain:

<script src="https://meet.yourcompany.com/embed.js" data-dial="610" data-host="https://meet.yourcompany.com" defer></script>

How it works

1

Visitor clicks the button

The widget mints a fresh, unguessable meeting-room name (something like callus-7k3p2m) and opens it in a new tab. Two visitors who click at the same time never end up in the same room as each other.

2

The browser joins the CodeB meeting room

Camera and microphone are requested. The visitor sees the standard CodeB meeting UI with their tile and a "waiting for the other party" message until the phone picks up.

3

The SIP bridge resolves the alias and dials

Your CodeB signaling server validates the dial request against the whitelist + fraud caps, looks the alias up in WebPhone:NumberAliases, and forwards it to the SIP bridge. The bridge dials through the configured trunk.

4

The phone rings, your team picks up

The answering phone joins the meeting room as an audio-only participant. The visitor and your team can talk — voice is end-to-end encrypted between the visitor’s browser and the CodeB SIP bridge.

Security & abuse considerations

The button is public, so anyone could click it. The CodeB SIP bridge enforces several gates against abuse:

If you want to rate-limit clicks before they reach the CodeB bridge (for example, behind a CAPTCHA on your site), you can intercept the click yourself by initialising the widget manually. Drop us a line if you need that variant.

Last updated for embed.js shipped with CodeB Phone 2026-05-25-3.