+91) only for now; up to 10 per account.
1. get the origination uri
GET /v1/sip-trunks/origination-uri returns the SIP address to configure at
your carrier for inbound calls. it is one address for the platform’s SIP host,
the same for every number, so you can set the carrier up before registering.
curl
2. register the number
POST /v1/sip-trunks.
string
required
your number, E.164 (
+91…; spaces and dashes tolerated).string
required
your carrier’s SIP endpoint for calls placed from the number:
sip: or
sips:, optional user@, port and ;transport= params.string
required
the digest username your carrier authenticates with.
string
required
the digest password. never returned.
string
a label. defaults to the number.
curl
502 sip_trunk_provision_failed, the message says why) nothing is
stored. a number already registered — on any account — is
409 sip_trunk_number_taken.
3. assign an agent
POST /v1/sip-trunks/{id}/assign chooses which agent answers the number.
curl
409 agent_not_deployed). the
number is detached from any previous agent; "agentId": null unassigns.
inbound calls are billed to your account like any other call and show up in
GET /v1/calls with channel: "phone".
dialing out from it
pass the trunk toPOST /v1/calls as fromTrunkId, or its
number as fromNumber. the call goes out through your carrier’s
terminationUri with the number as caller id; no platform number and no
carrier charge from us are involved.
list, get, remove
curl
DELETE removes the SIP objects first, then the assignment, then the number
(204). a refusal from the SIP host keeps everything as it was (502).
next: back to the agents api overview, or the
api reference.