SIP trunks
Create SIP trunk API
Create a SIP trunk to your own carrier via POST /trunk/trunks, with gateways for outbound calls and carrier IPs for inbound calls.
POST
This endpoint returns
200, not 201. Send the carrier’s credentials only if it challenges Bolna’s outbound calls; a carrier that authenticates Bolna by IP needs Bolna’s signalling IPs from GET /trunk/pop on its allowlist instead.Next steps
- Add your carrier’s numbers to the trunk.
- Point your carrier at the values from
GET /trunk/pop.
Authorizations
Body
application/json
Username your carrier issued for Bolna's outbound calls, sent when the carrier challenges the INVITE (SIP 401/407). Set together with auth_password, or leave both out when the carrier authenticates Bolna by IP. Must not contain a quote, |, {, }, \ or a control character.
Minimum string length:
1Response
The created trunk. Bare IP addresses in ip_acls come back as /32 networks.
A SIP trunk with its gateways, carrier IPs, numbers and live status.
ready: calls have crossed the trunk and the carrier is not failing them.waiting_for_carrier: no call has crossed the trunk yet.degraded: the carrier failed three or more recent outbound calls with no answered call since.disabled:is_activeisfalse.
Available options:
ready, waiting_for_carrier, degraded, disabled