Create SIP trunk
create_sip_trunkProvision a SIP trunk on Vobiz to link your PBX for inbound and outbound calling, with auto-generated domain, digest/IP authentication, and primary/fallback routing.
Instructions
Create a SIP trunk on this Vobiz account: a voice gateway with its own auto-generated SIP domain ({trunk_id}.sip.vobiz.ai), authentication, call limits and outbound routing. Only name is required; Vobiz defaults are transport udp, secure false and cps_limit 2. Authenticate the peer with credential_uuid (digest) and/or ipacl_uuid (source IP), and route outbound calls via primary_uri_uuid with fallback_uri_uuid for failover; create those first with create_trunk_credential, add_ip_acl_entry and create_origination_uri, or attach them later with update_sip_trunk. Returns the full trunk object with any credential fields redacted. Route numbers to the trunk afterwards with update_phone_number (trunk_id). Gated by VOBIZ_ENABLE_PROVISIONING and confirm: true; every call creates another trunk, so after a timeout check list_sip_trunks before retrying.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Display name of the trunk, 1-100 characters. | |
| secure | No | true encrypts media with SRTP (Vobiz default false). Signalling encryption is chosen with transport: tls. | |
| confirm | Yes | Must be true, set only after the user explicitly approved: creating this SIP trunk. If your client supports MCP elicitation, the server asks the user to approve directly and this flag is not relied on; otherwise it is your attestation that the user approved. | |
| cps_limit | No | Maximum new calls per second (flood protection), 1-100 (Vobiz default 2). Independent of concurrent_calls_limit; the enforced CPS is the account-level limit. | |
| recording | No | true records every call on the trunk (Vobiz default false). Required for enable_transcription and recording_webhook_enabled to have any effect. | |
| transport | No | SIP signalling transport: udp (Vobiz default), tcp or tls (encrypted signalling). | |
| ipacl_uuid | No | UUID of an IP ACL entry (id from list_ip_acl_entries or add_ip_acl_entry) so SIP from that address is accepted without a password. May be set together with credential_uuid. | |
| description | No | Free-text note on the trunk's purpose, up to 1000 characters. | |
| webhook_url | No | Public https URL (max 500 characters) that receives CallInitiated and Hangup events for calls on this trunk; private and local hosts are rejected. | |
| trunk_status | No | enabled or disabled. A disabled trunk keeps its configuration, credentials and routing but handles no calls; Vobiz reports the state as active/inactive on the trunk object. | |
| webhook_method | No | HTTP method for webhook_url deliveries: POST (Vobiz default) or GET. | |
| credential_uuid | No | UUID of a trunk credential (id from list_trunk_credentials or create_trunk_credential) for SIP digest authentication of this trunk's peer. | |
| trunk_direction | No | Which calls the trunk carries: inbound (to your numbers), outbound (from your PBX) or both. | |
| primary_uri_uuid | No | UUID of the origination URI (id from list_origination_uris or create_origination_uri) that outbound calls are sent to first; failover order is primary, then fallback. | |
| fallback_uri_uuid | No | UUID of the origination URI tried when the primary one fails. | |
| inbound_destination | No | Destination inbound calls on this trunk are delivered to (inbound trunks), up to 255 characters, in the form your Vobiz trunk setup uses. | |
| enable_transcription | No | true transcribes recordings automatically (Vobiz default false); only effective while recording is true. | |
| concurrent_calls_limit | No | Maximum simultaneous calls on the trunk, 1-1000 (Vobiz default 10). Stored on the trunk; the enforced concurrency is the account-level limit. | |
| recording_webhook_enabled | No | true also sends a recording.completed event to webhook_url after each recording is saved (Vobiz default false); needs recording true and a webhook_url. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | True on success. On a failure the result is isError with ok: false plus `error` (kind), `message`, `retryable` and sometimes `http_status`. | |
| trunk | No | The new trunk; its trunk_id is needed for update_sip_trunk, delete_sip_trunk and update_phone_number. | |
| created | No | True when the record was created by this call. | |
| http_status | No | HTTP status Vobiz answered with. |