Mint a browser softphone session
Step 1 of the two-step browser softphone handshake. Mints a WebRTC
session (token + credential) the browser registers with the
@telnyx/webrtc SDK. Once registered, call
POST /v1/voice/calls/web/dial with the returned credentialId to
place the call. The split avoids bridging to a browser that has not
finished registering. The token lives ~1 hour (it must outlive the
whole call, not only the handshake).
Authorization
bearerAuth API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
In: header
Response Body
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.voice.createVoiceWebSession();console.log(data);{ "success": true, "token": "string", "credentialId": "string", "expiresAt": "2019-08-24T14:15:22Z", "sdk": "string"}Estimate call cost
Pre-call cost estimate for a PSTN call: the carrier leg plus optional recording and transcription add-ons. Same billing formula as the post-call invoice, so the quote and the final charge can't disagree. The per-minute figure is deliberately conservative (the real cost comes from the settled carrier record after the call), so estimates trend slightly over the actual invoice. Parity endpoint of `GET /v1/whatsapp/calls/estimate`, minus the Meta line (PSTN calls have no separate Meta bill, so `totalCostUSD` equals `billableCostUSD`).
Dial from the browser softphone
Step 2 of the browser softphone handshake: places an outbound call whose answered leg is bridged to the browser registered with the credential from `POST /v1/voice/calls/web`. The call runs through the normal outbound lane, so it is logged as outbound (from = your number, to = target) and recorded per the number's settings.