← Playground Acme CRM Proxy Voice SDK demo
Phone offline

Proxy Voice, inside your CRM

Calls are real, and only go to the numbers you allow below.

  1. Start the phone

    It opens in the bottom corner of the page, and you are Available for calls.

    Set up — the demo CRM's backend mints the session

    The playground's backend does what your server's one call to POST /v1/voice/agent-sessions does, with the PHP SDK's voice()->agentSessionFor() and the secret key from .env: it takes your CRM's id for the user and their name, finds their agent or registers one, and mints the voice.agent session. Type the id here to try it; your CRM takes it from its own signed-in user, never from the browser. getSession renews it the same way.

    Integration Playground sk_live_…a532

    Minting a session on your server
    curl -X POST https://proxy.example/api/v1/client-sessions \
      -H "Authorization: Bearer sk_live_…" \
      -H "Content-Type: application/json" \
      -d '{"capability":"voice.agent","resource":{"type":"voice_agent","id":"vagt_…"}}'
    
    # → { "data": { "client_token": "cs_live_…", "expires_at": "…" } }

    Voice is live-only: Proxy refuses a test-mode session, because a call is a real call. The integration needs the voice:agents:manage scope. Sessions last an hour; getSession is asked for a fresh one five minutes before the end. The client token is never stored by this page.

  2. Make a call

    Type a number in the phone and press Call. Hold, transfer and the keypad are in the phone too.

Every SDK method For developers: mount options, guard rails and an event log.

1 · Connect

mountDock options
Guard rails:
Dock target
Tick “target” to draw the dock here instead of floating on the page.
mountSoftphone({ target })
The plain inline softphone, for a page that wants no dock.

Directory lookup

Callers no page has described are asked of the CRM's backend. Numbers asked for together arrive in one batch.

2 · The agent proxy.voice.agent

3 · Place a call agent.call()

Try +44 7700 900461 or 0044 (0)7700-900461: one number, one record.

4 · The call VoiceCall

No call yet. Place one, or ring this agent.

5 · Recent calls agent.recentCalls()

6 · Queues proxy.voice.queues

One poller per page — every 10s visible, 30s hidden — which is also the agent's presence. Counts only, never callers.

7 · Call lists proxy.voice.callLists

Proxy chooses the next client; the page only ever works the one it is given. Progressive lists count down and ring for the agent.

8 · Settings proxy.voice.settings

The agent's own, per browser and per agent, in localStorage. No token is ever stored. The dock's Settings view edits the same object — change one and watch the other.

9 · The dock Dock

Theming — --proxy-dock-* custom properties