Voice API — calls and the softphone
Telnyx primary, Plivo secondary (chosen by the Super Admin switch). Numbers must be E.164, e.g. +12125550120.
POST /api/voice/tokenSoftphone login token. Body: { identity }. Demo: { configured: false, provider: "telnyx", identity, error: "Telnyx not configured — placeholder key. Softphone runs in demo mode." }
POST /api/voice/callPlace an outbound call. Body: { to, from, amd?, fallback?, workspaceId? }. amd is detect, detect_beep or disabled. Missing/invalid numbers → 400. Blocked number or zero credits → 403 from the service gate.
GET /api/voice/callCurrent voice provider and whether it is configured: { provider, configured, note }.
POST /api/voice/conferenceSupervisor Listen / Whisper / Barge. Body: { mode, agentId }. mode must be listen, whisper or barge (else 400). Live use needs a Super Admin, Admin or Supervisor session.
curl -X POST https://dialmora.appsnation.net/api/voice/call \
-H "Content-Type: application/json" \
-d '{"to": "+12125550120", "from": "+12125550101", "amd": "detect"}'
# Demo-mode response (no provider account live yet):
{"configured": false, "provider": "telnyx",
"error": "Telnyx not configured (placeholder key)"}