/sip-trunks/onboardOne-shot outbound SIP setup.
Onboard SIP Trunk
Creates an outbound SIP trunk and registers its E.164 caller ID numbers in one request. This is the happy path for BYO-carrier outbound SIP and requires both sip_trunks:write and phone_numbers:write. If set_as_tenant_default is true, Aethex uses this trunk when a call does not resolve to a more specific trunk from the from_number registration. If any step fails, Aethex rolls back the trunk and no partial phone-number registration is committed.
Request body
17namestringrequiredDisplay name for the trunk, 1-255 plain-text characters.
outbound_addressstringrequiredCarrier SIP host or
host:portthat Aethex sends INVITEs to.numbersstring[]requiredOne to 100 caller ID numbers to register to this trunk, in E.164 (
+14155557654) or as bare digits (14155557654) for carriers that reject a leading plus. The carrier sees the value exactly as given.auth_modestringoptionaldigest(default),ip_acl, ordigest_plus_ip_acl.auth_usernamestringoptionalDigest username. Required when
auth_modeincludes digest.auth_passwordstringoptionalDigest password. Required when
auth_modeincludes digest; never returned.transportstringoptionaludp(default),tcp, ortls.media_encryptionstringoptionalallow(default),disable, orrequirefor SRTP negotiation.outbound_dial_formatstringoptionalHow outbound destinations are dialed to the carrier.
e164(default) keeps+E.164;digitsstrips the leading+;nationalrenders the destination country's national dialing format (+15551234567->05551234567, required by some national-only carriers). Usenationalonly on single-calling-code trunks: a destination outside your trunk's own numbers' calling code is refused rather than dialed.agent_idstringoptionalAgent UUID for inbound calls to the registered numbers.
inboundobjectoptionalInitial fallback routing rules for the registered numbers.
outbound_enabledbooleanoptionalWhether the registered numbers can be used as outbound
from_numbervalues. Defaulttrue.destination_allowlistobjectoptional{ "mode": "allowlist" | "blocklist", "entries": ["+1800"] }outbound dial guard.max_concurrent_callsintegeroptionalPer-trunk concurrency cap. Default
10. Values above the platform ceiling are clamped.calls_per_hour_limitintegeroptionalOptional hourly cap on outbound calls through this trunk. Leave it out for no hourly cap, the default. Values above the platform ceiling are clamped.
calls_per_second_limitnumberoptionalOptional call attempts per second the carrier accepts on this trunk (its CAPS). Outbound calls above it wait their turn, in order, instead of being refused by the carrier. Fractions are allowed (
0.5is one call every 2 seconds). Leave it out to start every call as soon as it is ready, the default. The average rate is exact, but each call can reach the carrier up to about a second after its turn, so the busiest second can briefly see up to twice the limit. If your carrier counts strictly per second, set half its CAPS.set_as_tenant_defaultbooleanoptionalSet this trunk as the tenant default outbound trunk. Default
false.
Errors
5auth_mode, auth_username, auth_password, and outbound_address are inconsistent.
For digest, send both username and password. For ip_acl, omit both. For both controls, use digest_plus_ip_acl.
The supplied agent_id does not belong to the account.
Check the agent ID with GET /agents, or omit agent_id.
One of the requested numbers is already active on an account.
Use a different number or release the existing phone-number registration first.
A number is not E.164, the outbound address is invalid, or a field violates the schema.
Use + followed by 1-15 digits for numbers and a carrier host or host:port for outbound_address.
The SIP trunk could not be provisioned.
Retry after checking SIP service health. A failed onboard rolls back partial state.
