didww/ai / skills/didww-to-xai
didww-to-xai
VerifiedPoint a DIDWW phone number at xAI's Grok voice over SIP. Use whenever the user wants Grok answering a real phone number via DIDWW, mentions sip.voice.x.ai, xAI realtime calls, registering a phone number with xAI, or debugging calls between DIDWW and Grok. Developer-grade: agent behavior is configured per call over a websocket the user's code owns.
DIDWW to xAI (Grok voice)
xAI's SIP interface mirrors OpenAI's shape with one improvement: the number is REGISTERED with xAI first (an API object carrying its own SIP auth), so ingress is gated by digest credentials or an IP allowlist rather than webhook-only. Like OpenAI, there is no stored agent: on each incoming call a webhook fires and your code connects a websocket to configure voice, instructions and turn detection. Not a no-code path; offer the hosted platforms if the user cannot run a small backend.
The flow
- Confirm in one message: number (or country to buy), agent behavior (becomes the per-call session config), transfer target, where the webhook backend runs.
- Register the number (
scripts/register_number.py):POST https://api.x.ai/v2/phone-numberswithorigin: "byo_trunk"(the customer-owned-number type), the number,webhook: {url}for incoming-call events (an object, not a bare string) andsip_auth: digest credentials asauth_username/auth_password(preferred; invent a pair) and/orallowed_addresseswith DIDWW's signaling IPs. The response carries the webhook signing secret exactly once and the SIP password is never returned again: the script writes the full response toxai-<number>.json(mode 0600, never overwritten;--outpicks another path), shows a redacted copy, and reads the password fromXAI_SIP_PASSif set. Move the secret into the backend's environment and delete the file; the password goes into the DIDWW trunk. - DIDWW side (MCP, OAuth): inbound trunk with destination
sip:{number}@sip.voice.x.ai;transport=tls, digest auth from step 2. Attach the DID. Setcapacity_limit= expected concurrent calls (it caps how many calls run at once, and so the cost). No DIDWW outbound trunk is involved, so there is no 24-hour limit to set. - Backend: on the incoming-call webhook (carries
call_id), connectwss://api.x.ai/v1/realtime?call_id={call_id}and sendsession.updatewith voice, instructions and turn detection. Call control:POST /v1/realtime/calls/{call_id}/referwith atel:target for transfers,/hangupto end; DTMF arrives asinput_audio_buffer.dtmf_event_receivedevents. The OpenAI variant server in the didww-to-openai-realtime skill is the closest template; adapt its accept step to the websocket model. - Verify: inbound call, transfer phrase, hangup handling.
Failure map
- Call never reaches xAI: TLS missing on the trunk, or digest pair mismatch with the registration object.
- Webhook fires but silence: the websocket connect or
session.updatefailed; log both. - Lost the SIP password: it is unreadable after creation; rotate by updating the registration and the DIDWW trunk together.
- Lost the webhook signing secret: also shown only at registration; re-register the number and update the backend's environment.
- 422 on registration: field names drifted; the API's error names the
accepted fields (
auth_username,webhook.url, ...), adjust and rerun.
Panel map and money
xAI keys: console.x.ai, API Keys page. Billing: Billing, API spend
management: prepaid credits with a 25 USD minimum top-up and no free
credits documented; calls hard-fail the instant credits hit zero, so
configure auto top-up (threshold, amount, monthly cap) at setup. DIDWW
side: prepaid; top-up, Auto-charge and Low Balance Notification (OFF by
default) in Billing, Payment Methods.
Built around DIDWW SIP trunking and xAI's speech-to-speech SIP docs; verified August 2026.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |