Create SIP Voice IN Trunk
create_sip_trunkCreate a SIP Voice IN Trunk (inbound voice trunk) for the authenticated customer. A minimal trunk only needs name and host (the host part of R-URI in the INVITE request). Set ONLY the parameters the user explicitly asked for and never invent values — every omitted field keeps the same default the customer panel applies. To register a SIP endpoint instead of pointing at a host, set enabled_sip_registration to true and omit host/port — registration credentials are generated server-side and returned in the configuration (password masked). For a PSTN call-forwarding trunk use create_pstn_trunk; for a phone.systems™ trunk use create_phone_systems_trunk. Returns the created trunk id and its configuration, or a readable error if the configuration is invalid.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pop | No | DIDWW Point of Presence the trunk is served from. Omit to let DIDWW pick. | |
| host | No | Host part of R-URI in the INVITE request (SIP host/IP). Required unless enabled_sip_registration is true. | |
| name | Yes | Friendly name of the Voice IN Trunk (must be unique for the customer). | |
| port | No | Optional. Port part of R-URI in the INVITE request (default 5060; if omitted, the SRV/A record is resolved). | |
| codecs | No | Optional. Codecs which will be sent with the SDP Offer, in order of preference. Replaces the whole list, so keep "telephone-event" in it unless the user asked otherwise — it carries RFC 2833 DTMF, and dropping it stops DTMF from reaching the customer equipment. | |
| weight | No | Load-balancing weight among trunk-group members of the same priority; higher is preferred (default 65535). | |
| priority | No | Priority of this trunk; DIDWW contacts the lowest-numbered priority first. Range 0-65535. | |
| rtp_ping | No | Optional. Send RTP keep-alive packets to the customer equipment (default false). | |
| username | No | Optional. User part of R-URI in the INVITE request. You may use the "{DID}" pattern, which is replaced by the called DID number in E.164 format. | |
| auth_user | No | Optional. Username for outgoing SIP authentication. Only with auth_enabled true. | |
| cli_format | No | Format of the caller ID sent to the customer equipment (default e164). | |
| cli_prefix | No | Prefix prepended to the caller ID. Letters, digits, "+" and "#" only, up to 7 characters. | |
| cnam_lookup | No | Optional. Enable CNAM lookup on the trunk (default false/disabled). | |
| description | No | Description of the Voice IN Trunk. | |
| rtp_timeout | No | Optional. Drop the call after this many seconds without inbound RTP (default 30). | |
| sip_timer_b | No | Optional. INVITE transaction timeout in MILLISECONDS (default 8000). | |
| sst_enabled | No | Optional. Enable SIP Session Timers (default false). Requires sst_min_timer and sst_max_timer. | |
| auth_enabled | No | Optional. Enable outgoing SIP digest authentication (requires auth_user and auth_password). | |
| resolve_ruri | No | Optional. Resolve the R-URI host to an IP before sending the INVITE (default false). | |
| auth_password | No | Optional. Password for outgoing SIP authentication. Only with auth_enabled true. | |
| max_transfers | No | Optional. Maximum number of SIP transfers (REFER) to follow (default 0). | |
| sst_max_timer | No | Optional. Maximum session timer in seconds (default 900); must be >= sst_min_timer. | |
| sst_min_timer | No | Optional. Minimum session timer in seconds (default 600). Only with sst_enabled. | |
| auth_from_user | No | Optional. Custom From-header user part used with outgoing authentication. | |
| capacity_limit | No | Maximum number of simultaneous calls for the Voice IN Trunk. | |
| rx_dtmf_format | No | Optional. How DTMF is RECEIVED from the DIDWW network. | |
| sst_accept_501 | No | Optional. Treat a 501 answer to the session refresh as success (default true). | |
| trunk_group_id | No | Optional Voice IN Trunk Group UUID to assign the trunk to. | |
| tx_dtmf_format | No | Optional. How DTMF is SENT to the customer equipment. | |
| allowed_rtp_ips | No | Optional. Restrict the RTP source to these IPs/subnets (CIDR notation, e.g. "203.0.113.0/24"). Up to 10 entries; 0.0.0.0/0 and ::/0 are rejected. Omit to accept RTP from any address. | |
| ringing_timeout | No | Seconds to wait for a 200 OK after a 18x ringing response before ending the routing attempt with the "Ringing timeout" disconnect code. Omit to use the platform default. | |
| use_did_in_ruri | No | Optional. Only with enabled_sip_registration: put the called DID (instead of the registered username) in the R-URI user part. | |
| auth_from_domain | No | Optional. Custom From-header domain part used with outgoing authentication. | |
| stir_shaken_mode | No | Optional. How STIR/SHAKEN attestation is passed to the customer equipment. | |
| max_30x_redirects | No | Optional. Maximum number of 3xx redirects to follow (default 0). | |
| src_number_list_id | No | Optional Voice IN Number List UUID (from list_voice_in_number_lists) to apply as the caller-ID (source number) filter on this trunk. | |
| sst_refresh_method | No | Optional. SIP method used to refresh the session (default Invite). | |
| transport_protocol | No | Optional. SIP transport protocol (default UDP). | |
| force_symmetric_rtp | No | Optional. Send RTP back to the source address of the received stream instead of the SDP address (default false). | |
| sst_session_expires | No | Optional. Session-Expires value in seconds; must be between sst_min_timer and sst_max_timer. | |
| diversion_relay_mode | No | Optional. How the Diversion header is relayed to the customer equipment. | |
| diversion_inject_mode | No | Optional. Whether to add a Diversion header with the called DID number. | |
| media_encryption_mode | No | Optional. SRTP media encryption mode (default Disable). | |
| dns_srv_failover_timer | No | Optional. Milliseconds before failing over to the next DNS SRV record (default 2000). Must not exceed sip_timer_b. | |
| enabled_sip_registration | No | Optional. When true the trunk accepts a SIP registration instead of forwarding to a fixed host: incoming registration credentials are generated server-side and host/port must be omitted. | |
| network_protocol_priority | No | Optional. IP version preference when resolving the host (default "force IPv4"). | |
| symmetric_rtp_ignore_rtcp | No | Optional. With force_symmetric_rtp, ignore RTCP when learning the source address (default false). | |
| rerouting_disconnect_codes | No | Optional. SIP response codes that trigger rerouting to the next trunk-group member ("486" Busy Here, "503" Service Unavailable, ...), plus "Ringing timeout" — the no-answer disconnect reason, which has no SIP code and is not a timeout setting. Replaces the whole list; omit the argument to keep the platform defaults. |