Inbound Trunk Object#

Json API object with type voice_in_trunks. You can get several type of inbound trunks: SIP, PSTN.

Request#

URI Parameters#

Name

Type

Is Required?

Description

id

string

Yes

Unique ID identifier of the Trunk.

Data Attributes#

Name

Type

Description

priority

integer

The priority of this target host. DIDWW will attempt to contact the target trunk with the lowest-numbered priority; target trunk with the same priority will be tried in an order defined by the weight field. The range is 0-65535. See RFC 2782 for more details.

weight

integer

A trunk selection mechanism. The weight field specifies a relative weight for entries with the same priority. Larger weights will be given a proportionately higher probability of being selected. The range of this number is 0-65535. In the presence of records containing weights greater than 0, records with weight 0 will have a very small chance of being selected. See RFC 2782 for more details.

capacity_limit

integer

Maximum number of simultaneous calls for the trunk.

ringing_timeout

integer

Ring time in seconds. Supported values are integers from 1 to 32. Null uses the platform default. If the call is not connected within this time, the transaction is ended with the disconnect code Ringing timeout.

name

string

Friendly name of the trunk. Unique among the trunks and trunk groups of the account — they share one name space.

external_reference_id

string

Optional identifier for the inbound trunk in the customer’s external system. Maximum length is 100 characters.

cli_format

string

raw - Do not alter CLI. e164 - Attempt to convert CLI to E.164 format (default). local - Attempt to convert CLI to Localized format. CLI format conversion may not work correctly for phone calls originating from outside the country of that specific DID.

cli_prefix

string

You may prefix the CLI with an optional + sign followed by up to 6 characters, including digits and #.

description

string

Optional description of the trunk.

pop

string

Point of Presence the trunk is pinned to. Possible values: nyc, fra, lac, mia, sg, hk, ams. null lets DIDWW choose.

configuration

One of sip_configurations, pstn_configurations

Trunk configuration complex object.

created_at

DateTime

Trunk created at DateTime

Object Relationships#

Name

Type

Description

voice_in_trunk_group

to-one

Trunk Group Object

Attributes Configuration#

Name

Type

Nullable

Description

type

sip_configurations

No

SIP configuration complex object.

attributes

sip_configuration_attributes

No

SIP configuration attributes object.

Configuration Attributes#

Name

Type

Nullable

Description

username

string

Yes

User part of R-URI in INVITE request. You also may use “{DID}” pattern which will be replaced by called DID number in E164 format. For example, you can set Username to “+{DID}”; if you wish to have it in +E164 format

host

string

Yes

Host part of R-URI in INVITE request. Required while enabled_sip_registration is false, and rejected while it is true.

port

integer

Yes

Port part of R-URI in INVITE request (is not mandatory). If port is null, SRV record will be resolved (or A record if SRV is unavailable). Must be empty while enabled_sip_registration is true.

codecs

Array of strings

No

Codecs offered on calls to the trunk, in priority order: the first has the highest priority. Holds at least one value, without repeats. Possible values: telephone_event, g723, g729, pcmu, pcma, speex, gsm, g726_32, g721, g726_24, g726_40, g726_16, l16, amr, amr_wb. Defaults to pcmu, pcma, g729, g723, telephone_event. See Codecs.

rx_dtmf_format_id

integer

No

The method id for receiving DTMF signals from customers equipment. Possible values: 1 - RFC 2833; 2 - SIP INFO application/dtmf-relay or application/dtmf; 3 - RFC 2833 or SIP INFO.

tx_dtmf_format_id

integer

No

The method of sending DTMF signals to the customer’s equipment. Possible values: 0 - Disable sending; 1 - RFC 2833; 2 - SIP INFO application/dtmf-relay; 4 - SIP INFO application/dtmf.

resolve_ruri

boolean

No

Replace host part of the R-URI by resolved IP address.

auth_enabled

boolean

No

Enable authorization for the SIP server.

auth_user

string

Yes

Authorization user for the SIP server. Required while auth_enabled is true, and rejected while it is false.

auth_password

string

Yes

Authorization password for the SIP server. Required while auth_enabled is true, and rejected while it is false.

auth_from_user

string

Yes

Specify user in a from field instead of CallerID (overrides CallerID). Some equipment require from; to be equivalent to Auth user.

auth_from_domain

string

Yes

Sets default from domain in SIP messages. Some equipment may require specific From Domain.

sst_enabled

boolean

No

Enable SIP Session timers customization. SIP session timers are used to make sure that a session (dialog) is still alive, even though there may have been a long time since the last in-dialog message. If the other end is not responding, the dialog will be hung up automatically. SIP session timers need to be supported by all end points for it to work. It’s a SIP extension, standardized by the IETF. See RFC 4028 for more details.

sst_min_timer

integer

Yes

Minimal SIP Session timer value (Default 600 seconds). See RFC 4028 for more details.

sst_max_timer

integer

Yes

Maximal SIP Session timer value (Default 900 seconds). See RFC 4028 for more details.

sst_accept_501

boolean

No

Do not drop the call after receiving SIP 501 response for non-critical messages.

sip_timer_b

integer

No

INVITE transaction timeout (Default 8000ms). See RFC 3261 Section 17.1.1.2 for more details.

dns_srv_failover_timer

integer

Yes

Invite transaction timeout for each of gateways with DNS SRV rerouting (Default 2000ms).

rtp_ping

boolean

Yes

Use RTP PING when connecting a call. After establishing the call, DIDWW will send empty RTP packet RTP PING. It is necessary if both parties operate in Symmetric RTP / Comedia mode and expect the other party to start sending RTP first.

rtp_timeout

integer

No

Disconnect the call if the RTP packets do not arrive within the specified time.

force_symmetric_rtp

boolean

Yes

Forced to work in Symmetric RTP / COMEDIA mode.

symmetric_rtp_ignore_rtcp

boolean

Yes

Avoid switching RTP session based on RTCP packet while working in Symmetric RTP / COMEDIA. Only RTP packets will be considered.

rerouting_disconnect_code_ids

array

Yes

Rerouting disconnect codes.

sst_session_expires

integer

Yes

Session-Expires header value. Optional, should be in range with sst_min_timer and sst_max_timer. See RFC 4028 for more details.

sst_refresh_method_id

integer

No

SIP method which will be used for session update. See RFC 4028 for more details. Possible values: 1 - Invite; 2 - Update; 3 - Update fallback Invite.

transport_protocol_id

integer

No

Transport protocol ID. Possible values: 1 - UDP; 2 - TCP; 3 - TLS.

max_transfers

integer

No

Max count of the REFER requests.

max_30x_redirects

integer

No

Max count of 301/302 redirects.

media_encryption_mode

string

No

Media encryption mode. See RFC4568 about SRTP SDES, RFC5764 about SRTP DTLS, and RFC6189 about ZRTP for more details. Possible values: disabled - Disabled; srtp_sdes - SRTP SDES; srtp_dtls - SRTP DTLS; zrtp - ZRTP.

ice_mode

string

No

ICE (Interactive Connectivity Establishment) for calls to the trunk: not used, accepted when the trunk offers it, or initiated by DIDWW. Possible values: disabled, accept, initiate. Defaults to disabled.

rtcp_mux_mode

string

No

RTP and RTCP multiplexed on one port: not used, accepted when the trunk offers it, or initiated by DIDWW. Possible values: disabled, accept, initiate. Defaults to disabled.

rtcp_feedback_mode

string

No

RTCP feedback (AVPF): not used, accepted when the trunk offers it, or initiated by DIDWW. Possible values: disabled, accept, initiate. Defaults to disabled.

stir_shaken_mode

string

No

Stir/Shaken mode. See STIR/SHAKEN for more details. Possible values: disabled - Do not send identity; original - Transit Identity header as is; pai - Add PAI, P-Attestation-Indicator, P-Origination-ID; original_pai - Transit Identity header as is and add PAI, P-Attestation-Indicator, P-Origination-ID; verstat - Add P-Stir-Verstat, P-Attestation-Indicator, P-Origination-ID.

allowed_rtp_ips

Array of strings

Yes

The allowed RTP IPs: IPv4 or IPv6, single or subnet. Up to 10 items. Null means no restriction.

network_protocol_priority

string

No

Network protocol priority for SIP routing. Possible values: force_ipv4 - Use IPv4 exclusively. force_ipv6 - Use IPv6 exclusively. any - Use either IPv4 or IPv6. prefer_ipv4 - Prefer IPv4 but fall back to IPv6. prefer_ipv6 - Prefer IPv6 but fall back to IPv4.

enabled_sip_registration

boolean

No

Enables SIP registration for the trunk. Enabling it generates incoming_auth_username and incoming_auth_password.

use_did_in_ruri

boolean

No

Uses the called DID in the R-URI. Can be true only while enabled_sip_registration is true: a request that would leave it true with SIP registration disabled returns 422 Unprocessable Entity.

incoming_auth_username

string

Yes

Generated SIP registration username. Read-only: sending it is rejected.

incoming_auth_password

string

Yes

Generated SIP registration password. Read-only: sending it is rejected.

diversion_relay_policy

string

No

Controls how Diversion information is relayed. Possible values: none - Do not relay the Diversion header. as_is - Relay the Diversion header as received. sip - Relay the Diversion header as a SIP URI. tel - Relay the Diversion header as a TEL URI.

diversion_inject_mode

string

No

Controls how Diversion information is injected. Possible values: none - Do not add a Diversion header. did_number - Add a Diversion header using the DID number in E.164 format.

cnam_lookup

boolean

No

Enables inbound CNAM lookup.