Create a SIP trunk
Creates a SIP trunk an external voice platform (Retell, ElevenLabs,
Vapi, or any SIP endpoint) can import your Zernio numbers into. The
trunk carries both directions: inbound calls on attached numbers are
delivered to sipHost, and the platform originates outbound calls
through termination.uri with the digest credentials.
The digestPassword is returned only by this call (and by
rotate-credentials); store it immediately. Attach any number of numbers
to a trunk. Several trunks may point at the same host — each carries its
own credentials and spend cap, so separate destination workspaces (e.g.
an agency's clients) stay isolated.
API key authentication - use your Zernio API key as a Bearer token
In: header
Display name for the trunk.
length <= 80Fully-qualified hostname inbound calls are delivered to (e.g. sip.rtc.elevenlabs.io, sip.retellai.com).
Defaults to 5061 for tls, 5060 otherwise.
1 <= value <= 65535Signaling transport toward sipHost. Default tls (with SRTP media).
"tls" | "tcp" | "udp"Response Body
application/json
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.voice.createSipTrunk({ body: { label: 'string', sipHost: 'string', },});console.log(data);{
"id": "string",
"label": "string",
"sipHost": "string",
"sipPort": 0,
"transport": "tls",
"termination": {
"uri": "string",
"username": "string"
},
"numbersAttached": 0,
"createdAt": "2019-08-24T14:15:22Z",
"digestPassword": "string"
}{
"error": "string",
"type": "invalid_request_error",
"code": "string",
"param": "string",
"platform": "string",
"platformError": {},
"details": {}
}{
"error": "Unauthorized"
}List phone calls GET
Your PSTN voice calls (inbound + outbound), newest first. Cursor pagination: pass the returned `nextCursor` as `before` for the next page. For a history that also includes WhatsApp calls, use `GET /v1/calls`.
Place an outbound phone call POST
Dials `to` FROM one of your voice-enabled numbers and, on answer, bridges the callee to the number's stored forward destination, or to the per-call `forwardTo` override. Destinations can be your own AI voice agent (Vapi/Retell), a phone, or a SIP endpoint. An optional `greeting` is spoken to the callee before the bridge. The 200 response means the call is dialing; the lifecycle continues asynchronously (track it via `GET /v1/voice/calls/{id}` or the `call.*` webhooks). Outbound calls are capped per rolling hour (429 when hit). **Idempotency:** send an `Idempotency-Key` header to make retries safe; same key + same body replays the original response instead of dialing (and billing) a second call.