Vobiz SIP trunking skill
Use this when the user is provisioning their own SIP infrastructure - connecting an on-prem PBX, a BYOC carrier, or restricting trunk access by IP.
Base URL: https://api.vobiz.ai/api/v1. Auth on every request: X-Auth-ID and X-Auth-Token headers (your Auth ID / Auth Token). JSON bodies use Content-Type: application/json.
Resources
- Trunks - the parent SIP container.
POST /Account/{auth_id}/trunks,GET(list and/{trunk_id}),PUT /{trunk_id},DELETE /{trunk_id}. Creating a trunk auto-generates a SIP domain{trunk_id}.sip.vobiz.ai, returned astrunk_domain. - Credentials - username/password for SIP digest auth.
POST /Account/{auth_id}/credentials, list atGET /Account/{auth_id}/trunks/credentials,PUT/DELETE /Account/{auth_id}/credentials/{credential_id}. - IP ACL - IPv4 address/CIDR allowlist for inbound SIP traffic.
POST /Account/{auth_id}/ip-acl, list atGET /Account/{auth_id}/trunks/ip-acl,PUT/DELETE /Account/{auth_id}/ip-acl/{ip_acl_id}. - Origination URIs - outbound SIP routing destinations with priority/weight failover.
POST /Account/{auth_id}/origination-uris, list atGET /Account/{auth_id}/trunks/origination-uris,PUT/DELETE /Account/{auth_id}/origination-uris/{uri_id}. - Number assignment - route a DID to a trunk.
POST /Account/{auth_id}/numbers/{phone_number}/assignwith body{ "trunk_group_id": "<trunk_id>" };DELETEon the same path unassigns. Both return204.
The four auth/routing layers
A trunk can combine four independent controls. Know which one the user needs before reaching for an endpoint:
- Credentials (SIP digest) - username/password. Use for dynamic IPs, softphones, remote workers, AI agents. Works behind NAT. The SIP client must present the
realmreturned on the credential object alongside the username and password. - IP ACL - allowlist a source IPv4 address or CIDR. Use for static-IP PBXs, SBCs, and carrier interconnects. No per-client config, faster (no auth exchange), but public-IP only.
- Origination URI - outbound termination targets.
priority(lower wins, tried first) selects the route;weightsplits traffic across same-priority URIs (weight 20 gets 2x the traffic of weight 10). - Webhooks (callbacks) - informational only. Set
webhook_url(public http/https) andwebhook_method(POSTdefault, orGET) on the trunk. Events:CallInitiated(withAllowed/Reason),Hangup(withBillsec/MOS/Cost), andrecording.completed(only when recording is enabled on the trunk). Fail-open and non-blocking; a webhook response cannot accept or reject a call.
Credentials and IP ACL can be combined for defense-in-depth (require both a whitelisted IP AND valid digest auth).
Trunk lifecycle
POST /Account/{auth_id}/trunks. Per the OpenAPI contract onlynameis required; optional fields includetrunk_direction(inboundoroutbound),transport(udp/tcp/tls),secure(SRTP media; signalling encryption is set bytransport),concurrent_calls_limit,cps_limit,webhook_url,webhook_method,recording,recording_webhook_enabled,credential_uuid,ipacl_uuid,primary_uri_uuid,fallback_uri_uuid. Returnstrunk_idand autotrunk_domain. See the note under Pitfalls about the create page's three-field form.- (optional)
POST /credentialsand/orPOST /ip-aclfor inbound auth. - (optional)
POST /origination-urisfor outbound BYOC routing (setpriority;weightis Console-managed after creation). POST /Account/{auth_id}/numbers/{number}/assignto route a DID inbound.PUT /Account/{auth_id}/trunks/{trunk_id}to update. The OpenAPI contract lists every field as optional (same field set as create, withtrunk_statusenabled/disabled); the update page body shows a three-field replace (name,max_concurrent_calls,enabled). Fetch the trunk first and resend values you want to keep.DELETE /Account/{auth_id}/trunks/{trunk_id}to remove (or disable it viaPUTto keep config).
End-to-end BYOC recipe
AUTH=MA_XXXXXXXX
BASE=https://api.vobiz.ai/api/v1/Account/$AUTH
H=(-H "X-Auth-ID: $AUTH" -H "X-Auth-Token: $TOKEN" -H "Content-Type: application/json")
# 1. Create the trunk (OpenAPI contract: only name is required)
TRUNK=$(curl -s -X POST "$BASE/trunks" "${H[@]}" \
-d '{"name":"Acme BYOC","trunk_direction":"outbound","transport":"udp","concurrent_calls_limit":10}' \
| jq -r .trunk_id)
# trunk_domain is now $TRUNK.sip.vobiz.ai
# 2a. Inbound auth via IP ACL (name + ip_address required; CIDR allowed)
curl -s -X POST "$BASE/ip-acl" "${H[@]}" \
-d '{"name":"Prod SBC","ip_address":"10.20.30.0/24"}'
# 2b. ...or via digest credentials (username + password required; save the password now)
curl -s -X POST "$BASE/credentials" "${H[@]}" \
-d '{"username":"acme_sip_user_01","password":"S3cure-Pass-!2025"}'
# 3. Outbound routing: primary + failover (name + sip_uri + priority required)
curl -s -X POST "$BASE/origination-uris" "${H[@]}" \
-d '{"name":"Primary SBC","sip_uri":"sip:sbc1.example.com:5060","priority":1}'
curl -s -X POST "$BASE/origination-uris" "${H[@]}" \
-d '{"name":"Backup SBC","sip_uri":"sip:sbc2.example.com:5060","priority":2}'
# 4. Route an inbound DID to the trunk (URL-encode + as %2B)
curl -s -X POST "$BASE/numbers/%2B919876543210/assign" "${H[@]}" \
-d "{\"trunk_group_id\":\"$TRUNK\"}"Webhook verification
Trunk webhooks (callbacks) are not signed: there is no signing secret and no signature header. To verify a request came from Vobiz, allow-list the Vobiz callback IPs listed on IP Whitelisting, and use an unguessable path or token in the webhook URL.
Headers sent: Content-Type: application/json, User-Agent: Vobiz/1.0, X-Vobiz-Event (CallInitiated, Hangup, or recording.completed), and X-Vobiz-Request-ID. Link CallInitiated and Hangup for the same call by SIPCallID - CallUUID in Hangup is Vobiz's internal ID and can differ. X-Vobiz-Request-ID is unique per delivery; use it only to de-duplicate retries. recording.completed uses snake_case fields (sip_call_id, recording_url, ...).
webhook_url is SSRF-validated: it must be a public http/https URL. Localhost, private (RFC 1918), and link-local/cloud-metadata addresses are rejected with invalid webhook_url.
Pitfalls
- Path casing: Trunk, credential, IP ACL, origination-URI, and number-to-trunk endpoints all use uppercase
Account(/api/v1/Account/...). The lowercase/api/v1/account/...form is used only by a few number endpoints (sub-account assign/unassign, number health, cancel-release) - do not copy that casing onto trunk routes. - List paths differ from create paths. You create at
/Account/{auth_id}/credentials(and/ip-acl,/origination-uris) but list at/Account/{auth_id}/trunks/credentials(and/trunks/ip-acl,/trunks/origination-uris). Thetrunks/segment appears only on the list routes. Update/delete use the create path plus/{id}. - Create vs response field names diverge. Origination URI create body uses
name+sip_uri; the response returns them asdescription+uri. IP ACL create usesname+ip_address; the response returnsdescription+ip_address. Credential responses echousernameand addrealm. Read the response schema, not the request. - Trunk create/update field names: two forms in the docs. The OpenAPI contract (and the API playground on the create page) uses
trunk_direction(inbound/outbound),concurrent_calls_limit,cps_limit,trunk_status(enabled/disabled), with onlynamerequired. The body text oftrunks/create-trunkandtrunks/update-trunkinstead showsname+trunk_type(INBOUND/OUTBOUND) +max_concurrent_calls(andenabledon update) as the required set. The response always reportstrunk_direction,concurrent_calls_limit,cps_limit, andtrunk_status. If a request is rejected, check the other form and the page. - Required create fields are minimal. IP ACL:
name+ip_address. Credential:username+password(duplicateusernamereturns409). Origination URI:name+sip_uri+priority;weight(default10) andtransportare set after creation in the Console. Trunk:name(see above). - Origination URI format. The API pages (
trunks/origination-uri/create-origination-uri,origination-uri-object) showsip:examples (sip:host,sip:user@host:port); some vendor integration pages ask for the hostname orhost:portonly in the Console URI field. Follow the create page for API calls. - Origination URI update is a replace of
name+priorityonly. The PUT body does not takeuri,weight, orenabled. To change the destination, create a new URI and delete the old one; to rebalanceweightor toggleenabled, use the Console. - IP ACL accepts CIDR, not just single IPs (e.g.
10.20.30.0/24). IPv4 only; IPv6 is rejected. The field isip_address(notcidr_ipas one spec example shows). The create page states that RFC 5737 documentation prefixes (such as203.0.113.0/24) are rejected; use a real public or RFC 1918 (10.0.0.0/24) range. Update is a replace ofname+ip_address; theenabledtoggle is Console-managed. - Write-only secrets. Credential
passwordis never returned (shows as<redacted>). Save it at creation;usernameis immutable - rotate by creating a new credential and deleting the old one. The OpenAPI contract for credential update takespassword; the update page also documentsenabledanddescription. - Disable vs delete. Prefer disabling a trunk via
PUT(trunk_status: disabledper the OpenAPI contract;enabled: falseon the update page) overDELETEto preserve config.DELETEon a trunk cascades to its credentials, IP ACLs, and origination URIs, stops active calls, and can return 409 if calls are active. Deleting a credential can also return409while it is in use by active calls. - Number assignment body field is
trunk_group_id(the trunk's UUID), nottrunk_id. URL-encode the phone number with%2Bfor+or you get a 404. Assigning a number that is already on a trunk returns400- unassign it first. cps_limitvsconcurrent_calls_limit: CPS caps new call attempts per second (flood protection); concurrent caps simultaneous live calls (capacity/cost). Defaults seen in responses:cps_limit: 2,concurrent_calls_limit: 10. The OpenAPI contract notes these values are stored on the trunk while the enforced limits are account-level.
When to search docs
- "How do I attach a number to a trunk?" →
trunks/assign-number - "What IP ranges / CIDR work?" →
trunks/ip-acl/create-ip-acl - "Outbound routing with priority + fallback / load balancing" →
trunks/origination-uri/create-origination-uri - "Credentials vs IP ACL - which auth?" →
trunks/ip-acl(comparison table) - "Trunk webhook events / payloads / verification" →
trunks/webhook - "Which Vobiz IPs to allow for SIP, RTP, and callbacks?" →
concepts/ip-whitelisting