Open Source — Drop-in Call & SMS Script

Calls & texts,
seamless in any app.

One line of code. Every tel: and sms: link becomes a choice — route calls and texts to 40 VoIP & SMS providers, app or web, with the visitor's pick remembered.

<script src="https://cdn.jsdelivr.net/gh/Spuds0588/PhoneLayer-Embedded@main/phonelayer.js"></script>

Also served from GitHub Pages: spuds0588.github.io/PhoneLayer-Embedded/phonelayer.js

Zero Setup

No backend required. No VoIP credentials or server API keys to configure. Drop the script onto your page and start intercepting tel: and sms: links immediately.

Instant Routing

Native desktop apps launch via OS URI schemes; web apps open a clean, centered popup window — visitors route the call or text in one click and never lose their place.

49 Providers

Every provider PhoneLayer routes to — tap any logo to see the library in action.

Remember My Choice

Visitors can save their preferred provider on the device — later clicks route straight through, no modal, no friction. Reset it anytime with a single API call.

Sanitized & Mobile-Safe

Messy numbers like (555) 123-4567 are stripped to clean digits before execution — and on mobile, native OS dialing wins, with declarative triggers falling back to tel:/sms:.

Open Source

Built with transparency and privacy in mind. Zero dependencies, one global (window.PhoneLayer), and fully free to use in your personal or commercial projects.

Live Demo

Every button below is live — PhoneLayer is already intercepting these triggers.

<a href="tel:+15551234567">

Call Support

Auto-intercepted tel: link — opens the provider picker.

<a href="sms:+15551234567?body=Need%20help">

Text Support

SMS body payload ("Need help") is carried through to the provider.

<button class="phonelayer-trigger" data-phonelayer-to="+15551234567">

Any element becomes a call trigger with one attribute.

data-phonelayer-to="(555) 123-4567" + color/theme

Sanitized to 5551234567 and themed per-trigger — try a light, teal modal.

Usage Example

<!-- Intercept standard links -->
<a href="tel:+15551234567">Call Support</a>
<a href="sms:+15551234567?body=Need%20help">Text Support</a>

<!-- Or use declarative triggers with per-trigger theming -->
<button class="phonelayer-trigger" 
        data-phonelayer-to="(555) 123-4567"
        data-phonelayer-color="4fd1c5"
        data-phonelayer-theme="light">
    Call Sales
</button>