Telephony
SIP trunks
Bring your own carrier over SIP. A trunk holds your carrier's gateways (termination/origination), auth, and advanced dialing options. Provisioning sets up the underlying LiveKit SIP trunks + dispatch rule. Every number you add to a trunk becomes a callable Phone number.
/telephony/trunks agents:readList SIP trunks
List trunks with their gateways, status (active/pending), and attached numbers.
Example request
curl https://api.bolchoai.in/v1/telephony/trunks -H "Authorization: Bearer $VOXA_API_KEY"/telephony/trunks workspace:adminCreate SIP trunk
Create a trunk and provision the LiveKit SIP inbound/outbound trunks + dispatch rule. Saves as status=pending if LiveKit SIP isn't reachable yet (re-provision later).
Body
| name* | string | Trunk name. |
| gateways* | Gateway[] | One or more SIP gateways (see fields). |
| gateways[].ipOrDomain* | string | Carrier SIP host or IP, e.g. sip.telnyx.com. |
| gateways[].port | number | SIP port (default 5060). |
| gateways[].netmask | number | CIDR netmask for inbound allow-list (default 32). |
| gateways[].protocol | enum | udp | tcp | tls (outbound transport). |
| gateways[].inbound | boolean | Accept inbound calls on this gateway. |
| gateways[].outbound | boolean | Use this gateway for outbound calls. |
| authUsername | string | SIP digest auth username. |
| authPassword | string | SIP digest auth password. |
| techPrefix | string | Tech prefix prepended to outbound numbers. |
| leadingPlus | boolean | Force a leading + on outbound numbers. |
Example request
curl -X POST https://api.bolchoai.in/v1/telephony/trunks -H "Authorization: Bearer $VOXA_API_KEY" -H "Content-Type: application/json" \
-d '{
"name": "Telnyx",
"gateways": [{ "ipOrDomain": "sip.telnyx.com", "port": 5060, "protocol": "udp", "inbound": true, "outbound": true }],
"authUsername": "myuser",
"authPassword": "mypass"
}'Response
{ "id": "…", "status": "active", "livekitOutboundTrunkId": "ST_…", "hasPassword": true }/telephony/trunks/{id} workspace:adminUpdate SIP trunk
Update gateways/auth/advanced; re-provisions LiveKit SIP.
Path parameters
| id* | uuid | Trunk id. |
Example request
curl -X PATCH https://api.bolchoai.in/v1/telephony/trunks/$ID \
-H "Authorization: Bearer $VOXA_API_KEY"/telephony/trunks/{id}/provision workspace:adminRe-provision trunk
Re-run LiveKit SIP provisioning (e.g. after deploying SIP). Flips a pending trunk to active.
Path parameters
| id* | uuid | Trunk id. |
Example request
curl -X POST https://api.bolchoai.in/v1/telephony/trunks/$ID/provision \
-H "Authorization: Bearer $VOXA_API_KEY"/telephony/trunks/{id} workspace:adminDelete SIP trunk
Tear down the LiveKit SIP resources and delete the trunk (its numbers cascade).
Path parameters
| id* | uuid | Trunk id. |
Example request
curl -X DELETE https://api.bolchoai.in/v1/telephony/trunks/$ID \
-H "Authorization: Bearer $VOXA_API_KEY"