Connections V1

Connection operations

List all connections

Returns a list of your connections.

Request
query Parameters
with_ips
boolean

Specify as true to include authorized IPs along with connections

with_auth
boolean

Specify as true to include credential authentication details along with connections. Please note this only affects connections for which the authorization type is credential-based authentication.

with_fqdns
boolean

Specify as true to include FQDN / domain details along with connections. Please note this only affects connections for which the authorization type is FQDN-based authentication.

mode
string

Optional parameter to specify typeahead mode. Doing so limits the amount of details returned but speeds up calls.

Value: "typeahead"
order_by
string

Specify an ordering for the results. Optional parameter. If present, must be one of four values: "created_at", "connection_name", "auth_type", or "active". Other values are invalid and will result in the call failing. "created_at" will order them based on when the connections were created. "connection_name" will order results alphabetically by the connection name. "auth_type" will order the connections with those having credential-based auth first, followed by those with IP-based auth, and then those with no authentication type set at the end. "active" will order them with active/enabled connections first and inactive/disabled connections at the end. If no ordering is specified, "created_at" will be used.

Enum: "created_at" "connection_name" "auth_type" "active"
sort_direction
string

The sort_direction specifies in which way the ordering of the connections is applied. The default for connection_name is from A-Z, for created_at it is newest-first, and for auth_type it is credential, then IP-based, then no auth type. active shows enabled connections first and disabled/inactive connections at the end. You may invert this by specifying "reverse" as the sort_direction. This parameter is optional.

Value: "reverse"
filter_connection_name
string

Optional filtering parameter. If present, connections with at least a partial match will be returned. Matching is not case-sensitive. Requires at least three characters.

filter_ip_address
string

Optional filtering parameter. If present, only connections with one or more matching authorized IP addresses will be returned. No connections where the authorization type is not set or the authorization type is credential-based will be returned if this is set.

filter_auth_user_name
string

Optional filtering parameter. If present, only connections of credential-based authentication will be returned, and only those with a user_name that is at least a partial match with the value provided. Requires at least three characters.

page
integer
Default: 1

Page number of results to load

per_page
integer <= 1000
Default: 100

Number of results per page

Responses
200

Connection response

Response Schema: application/json
Array
id
required
string
connection_name
required
string
tech_prefix
required
string
Default: ""

Numerical chars only, exactly 4 characters.

authentication_type
required
integer
Default: 1

Unspecified = 1, IP Auth = 2, Credential Auth = 3

active
required
boolean

Defaults to true

dnis_number_format
required
integer
Default: 1

0 = E.164
1 = Strip-1
2 = Strip-2

timeout_1xx
required
string
Default: ""

Time(sec) before aborting if connection is not made (min: 1, max: 20).

timeout_2xx
required
string
Default: ""

Time(sec) before aborting if call is unanswered (min: 1, max: 600).

forward_only
required
boolean
Default: false

Every Telnyx user automatically gets and only one forward-only connection. This
is useful for setting up call forwarding on Telnyx numbers.

ani_override_type
string
Default: "always"

Specifies when we apply your ani_override setting. Only applies when ani_override is not blank.

Enum: "always" "normal" "emergency"
ani_override
string
Default: ""

Set a phone number as the ani_override value to override caller id number on outbound calls.

registration_status
integer
Default: 0

0 = Not Applicable
1 = Not Registered
2 = Failed
3 = Expired
4 = Success
5 = Unregistered

last_registered_ip
string

IP from the last successful registration attempt.

registration_status_updated_at
string
sip_compact_headers_enabled
required
boolean
Default: true

Defaults to true.

transport_protocol
required
string
Default: "UDP"

One of UDP, TLS, or TCP. Applies only to connections with IP authentication or FQDN authentication.

third_party_control_enabled
required
boolean
Default: false

Applies to calls sent TO this connection.

privacy_zone_enabled
required
boolean
Default: false

By default, Telnyx does not send caller-id information when the caller has chosen to hide this information. When this option is enabled, Telnyx will send the SIP header Privacy:id plus the caller-id information so that the receiver side can choose when to hide it.

codecs
required
Array of strings
Default: ["G722","G711U","G711A","G729","OPUS","H.264"]

Defines the list of codecs that Telnyx will send for inbound calls to a specific number on your portal account, in priority order. This only works when the Connection the number is assigned to uses Media Handling mode: default. OPUS and H.264 codecs are available only when using TCP or TLS transport for SIP.

prack_enabled
boolean
Default: false

Enable PRACK messages as defined in RFC3262.

default_routing_method
string

Default routing method to be used when a number is associated with the connection. Must be one of the routing method types or left blank, other values are not allowed.

Enum: "sequential" "round-robin"
default_primary_authorized_ip_id
integer

The default primary IP to use for the number. Only settable if the connection is of IP authentication type. Value must be the ID of an authorized IP set on the connection.

default_secondary_authorized_ip_id
integer

The default secondary IP to use for the number. Only settable if the connection is of IP authentication type. Value must be the ID of an authorized IP set on the connection.

default_tertiary_authorized_ip_id
integer

The default tertiary IP to use for the number. Only settable if the connection is of IP authentication type. Value must be the ID of an authorized IP set on the connection.

anchorsite_override
string

Latency directs Telnyx to route media through the site with the lowest round-trip time to the user's connection. Telnyx calculates this time using ICMP ping messages. This can be disabled by specifying a site to handle all media.

Enum: "Latency" "Chicago, IL" "Ashburn, VA" "San Jose, CA" "Sydney, Australia" "Amsterdam, Netherlands" "London, UK" "Toronto, Canada" "Vancouver, Canada"
encrypted_media
required
string

Enable use of SRTP or ZRTP for encryption. Valid values are those listed or null. Cannot be set to non-null if the transport_portocol is TLS.

Enum: "SRTP" "ZRTP"
call_failure_check_enabled
boolean
Default: false

Disable connection IPs temporarily after call timeout or rejection

instant_ringback_enabled
boolean
Default: true

When set, ringback will not wait for indication before sending ringback tone to calling party.

t38_reinvite_source
string
Default: "telnyx"

This setting only affects connections with Fax-type Outbound Profiles. The setting dictates whether or not Telnyx sends a t.38 reinvite.

By default, Telnyx will send the re-invite. If set to customer, the caller is expected to send the t.38 reinvite.

Enum: "telnyx" "customer" "disabled" "passthru" "caller-passthru" "callee-passthru"
ani_number_format
string
Default: "E.164-national"

This setting allows you to set the format with which the caller's number (ANI) is sent for inbound phone calls.

Enum: "+E.164" "E.164" "+E.164-national" "E.164-national"
isup_headers_enabled
boolean
Default: false

When set, inbound phone calls will receive ISUP parameters via SIP headers. (Only when available and only when using TCP or TLS transport.)

Enum: true false
encode_contact_header_enabled
boolean
Default: false

Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios.

Enum: true false
inbound_generate_ringback_tone
boolean
Default: false

Generate ringback tone through 183 session progress message with early media.

Enum: true false
outbound_generate_ringback_tone
boolean
Default: false

Generate ringback tone through 183 session progress message with early media.

Enum: true false
rtcp_report_enabled
boolean
Default: true

DEPRECATED - RTCP reports are always sent to customers/vendors. For backwards compatibility, the value is always true.

rtcp_report_frequency_seconds
integer
Default: 10

RTCP reports are sent to customers based on the frequency set. Frequency is in seconds and it can be set to values from 5 to 3000 seconds.

rtcp_port
any
Default: "rtp+1"

RTCP port by default is rtp+1, it can also be set to rtcp-mux

Enum: "rtcp-mux" "rtp+1"
dtmf_type
string
Default: "RFC 2833"

Sets the type of DTMF digits sent from Telnyx to this Connection. Note that DTMF digits sent to Telnyx will be accepted in all formats.

Enum: "RFC 2833" "Inband" "SIP INFO"
outbound_localization
string
Default: null

A 2-character country code specifying the country whose national dialing rules should be used. For example, if set to US then any US number can be dialed without preprending +1 to the number. When left blank, Telnyx will try US and GB dialing rules, in that order, by default.

inbound_channel_limit
integer
Default: null

When set, this will limit the total number of inbound calls to phone numbers associated with this connection.

outbound_channel_limit
integer
Default: null

When set, this will limit the total number of outbound calls to phone numbers associated with this connection.

onnet_t38_passthrough_enabled
integer
Default: false

Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly if both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call depending on each leg's settings.

sip_region
string
Default: "US"

Selects which sip_region to receive inbound calls from. If null, the default region (US) will be used.

Enum: "US" "Europe" "Australia"
sip_uri_calling_preference
string
Default: "disabled"

This feature enables inbound SIP URI calls to your Credential Auth Connection. If enabled for all (unrestricted) then anyone who calls the SIP URI @telnyx.com will be connected to your Connection. You can also choose to allow only calls that are originated on any Connections under your account (internal).

Enum: "disabled" "unrestricted" "internal"
sip_subdomain
string

Specifies a subdomain that can be used to receive Inbound calls to a Connection, in the same way a phone number is used, from a SIP endpoint. Example: the subdomain "example.sip.telnyx.com" can be called from any SIP endpoint by using the SIP URI "sip:@example.sip.telnyx.com" where the user part can be any alphanumeric value. Please note TLS encrypted calls are not allowed for subdomain calls.

sip_subdomain_receive_settings
string

This option can be enabled to receive calls from: "Anyone" (any SIP endpoint in the public Internet) or "Only my connections" (any connection assigned to the same Telnyx user).

Enum: "only_my_connections" "from_anyone"
webhook_api_version
string
Default: "1"

Determines which webhook format will be used, Telnyx API v1, v2, or a legacy 2010-04-01 format.

Enum: "1" "2"
401

Unauthorized

422

Unprocessable entity. Can be caused by improper use of filters or modes.

get/security/connections
Request samples
Response samples
application/json
[
  • {
    • "id": "string",
    • "connection_name": "string",
    • "tech_prefix": "",
    • "authentication_type": 1,
    • "active": true,
    • "dnis_number_format": 1,
    • "timeout_1xx": "",
    • "timeout_2xx": "",
    • "forward_only": false,
    • "ani_override_type": "always",
    • "ani_override": "",
    • "registration_status": 0,
    • "last_registered_ip": "string",
    • "registration_status_updated_at": "string",
    • "sip_compact_headers_enabled": true,
    • "transport_protocol": "UDP",
    • "third_party_control_enabled": false,
    • "privacy_zone_enabled": false,
    • "codecs": [
      • "G722",
      • "G711U",
      • "G711A",
      • "G729",
      • "OPUS",
      • "H.264"
      ],
    • "prack_enabled": false,
    • "default_routing_method": "sequential",
    • "default_primary_authorized_ip_id": 0,
    • "default_secondary_authorized_ip_id": 0,
    • "default_tertiary_authorized_ip_id": 0,
    • "anchorsite_override": "Latency",
    • "encrypted_media": "SRTP",
    • "call_failure_check_enabled": false,
    • "instant_ringback_enabled": true,
    • "t38_reinvite_source": "telnyx",
    • "ani_number_format": "+E.164",
    • "isup_headers_enabled": true,
    • "encode_contact_header_enabled": true,
    • "inbound_generate_ringback_tone": true,
    • "outbound_generate_ringback_tone": true,
    • "rtcp_report_enabled": true,
    • "rtcp_report_frequency_seconds": 10,
    • "rtcp_port": "rtcp-mux",
    • "dtmf_type": "RFC 2833",
    • "outbound_localization": null,
    • "inbound_channel_limit": null,
    • "outbound_channel_limit": null,
    • "onnet_t38_passthrough_enabled": false,
    • "sip_region": "US",
    • "sip_uri_calling_preference": "disabled",
    • "sip_subdomain": "string",
    • "sip_subdomain_receive_settings": "only_my_connections",
    • "webhook_api_version": "1"
    }
]

Create a connection

Creates a new connection object.

Request
Request Body schema: application/json
required

Connection to add

connection_name
required
string
active
boolean
Default: true

Defaults to true

dnis_number_format
integer
Default: 1

0 = E.164
1 = Strip-1
2 = Strip-2

timeout_1xx
string
Default: "3"

Time(sec) before aborting if connection is not made (min: 1, max: 20).

timeout_2xx
string
Default: "90"

Time(sec) before aborting if call is unanswered (min: 1, max: 600).

ani_override_type
string
Default: "always"

Specifies when we apply your ani_override setting. Only applies when ani_override is not blank.

Enum: "always" "normal" "emergency"
ani_override
string
Default: ""

Set a phone number as the ani_override value to override caller id number on outbound calls.

sip_compact_headers_enabled
boolean
Default: true

Defaults to true.

transport_protocol
string
Default: "UDP"

One of UDP, TLS, or TCP. Applies only to connections with IP authentication or FQDN authentication.

third_party_control_enabled
boolean
Default: false

Applies to calls sent TO this connection.

privacy_zone_enabled
boolean
Default: false

By default, Telnyx does not send caller-id information when the caller has chosen to hide this information. When this option is enabled, Telnyx will send the SIP header Privacy:id plus the caller-id information so that the receiver side can choose when to hide it.

codecs
Array of strings
Default: ["G722","G711U","G711A","G729","OPUS","H.264"]

Defines the list of codecs that Telnyx will send for inbound calls to a specific number on your portal account, in priority order. This only works when the Connection the number is assigned to uses Media Handling mode: default. OPUS and H.264 codecs are available only when using TCP or TLS transport for SIP.

prack_enabled
boolean
Default: false

Enable PRACK messages as defined in RFC3262.

default_routing_method
string

Default routing method to be used when a number is associated with the connection. Must be one of the routing method types or left blank, other values are not allowed.

Enum: "sequential" "round-robin"
default_primary_authorized_ip_id
integer

The default primary IP to use for the number. Only settable if the connection is of IP authentication type. Value must be the ID of an authorized IP set on the connection.

default_secondary_authorized_ip_id
integer

The default secondary IP to use for the number. Only settable if the connection is of IP authentication type. Value must be the ID of an authorized IP set on the connection.

default_tertiary_authorized_ip_id
integer

The default tertiary IP to use for the number. Only settable if the connection is of IP authentication type. Value must be the ID of an authorized IP set on the connection.

anchorsite_override
string

Latency directs Telnyx to route media through the site with the lowest round-trip time to the user's connection. Telnyx calculates this time using ICMP ping messages. This can be disabled by specifying a site to handle all media.

Enum: "Latency" "Chicago, IL" "Ashburn, VA" "San Jose, CA" "Sydney, Australia" "Amsterdam, Netherlands" "London, UK" "Toronto, Canada" "Vancouver, Canada"
encrypted_media
string

Enable use of SRTP or ZRTP for encryption. Valid values are those listed or null. Cannot be set to non-null if the transport_portocol is TLS.

Enum: "SRTP" "ZRTP"
instant_ringback_enabled
boolean
Default: true

When set, ringback will not wait for indication before sending ringback tone to calling party.

t38_reinvite_source
string
Default: "telnyx"

This setting only affects connections with Fax-type Outbound Profiles. The setting dictates whether or not Telnyx sends a t.38 reinvite.

By default, Telnyx will send the re-invite. If set to customer, the caller is expected to send the t.38 reinvite.

Enum: "telnyx" "customer" "disabled" "passthru" "caller-passthru" "callee-passthru"
ani_number_format
string
Default: "E.164-national"

0 = E.164
1 = Strip-1
2 = Strip-2

Enum: "+E.164" "E.164" "+E.164-national" "E.164-national"
isup_headers_enabled
boolean
Default: false

When set, inbound phone calls will receive ISUP parameters via SIP headers. (Only when available and only when using TCP or TLS transport.)

Enum: true false
encode_contact_header_enabled
boolean
Default: false

Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios.

Enum: true false
inbound_generate_ringback_tone
boolean
Default: false

Generate ringback tone through 183 session progress message with early media.

Enum: true false
outbound_generate_ringback_tone
boolean
Default: false

Generate ringback tone through 183 session progress message with early media.

Enum: true false
rtcp_report_enabled
boolean
Default: true

DEPRECATED - RTCP reports are always sent to customers/vendors. For backwards compatibility, the value is always true

rtcp_report_frequency_seconds
integer
Default: 5

RTCP reports are sent to customers based on the frequency set. Frequency is in seconds and it can be set to values from 5 to 3000 seconds. The default is 10 seconds.

rtcp_port
any
Default: "rtp+1"

RTCP port by default is rtp+1, it can also be set to rtcp-mux

Enum: "rtcp-mux" "rtp+1"
dtmf_type
string
Default: "RFC 2833"

Sets the type of DTMF digits sent from Telnyx to this Connection. Note that DTMF digits sent to Telnyx will be accepted in all formats.

Enum: "RFC 2833" "Inband" "SIP INFO"
outbound_localization
string
Default: null

A 2-character country code specifying the country whose national dialing rules should be used. For example, if set to US then any US number can be dialed without preprending +1 to the number. When left blank, Telnyx will try US and GB dialing rules, in that order, by default.

inbound_channel_limit
integer
Default: null

When set, this will limit the total number of inbound calls to phone numbers associated with this connection.

outbound_channel_limit
integer
Default: null

When set, this will limit the total number of outbound calls to phone numbers associated with this connection.

onnet_t38_passthrough_enabled
integer
Default: false

Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly if both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call depending on each leg's settings.

sip_region
string
Default: "US"

Selects which sip_region to receive inbound calls from. If null, the default region (US) will be used.

Enum: "US" "Europe" "Australia"
sip_uri_calling_preference
string
Default: "disabled"

This feature enables inbound SIP URI calls to your Credential Auth Connection. If enabled for all (unrestricted) then anyone who calls the SIP URI @telnyx.com will be connected to your Connection. You can also choose to allow only calls that are originated on any Connections under your account (internal).

Enum: "disabled" "unrestricted" "internal"
sip_subdomain
string

Specifies a subdomain that can be used to receive Inbound calls to a Connection, in the same way a phone number is used, from a SIP endpoint. Example: the subdomain "example.sip.telnyx.com" can be called from any SIP endpoint by using the SIP URI "sip:@example.sip.telnyx.com" where the user part can be any alphanumeric value. Please note TLS encrypted calls are not allowed for subdomain calls.

sip_subdomain_receive_settings
string

This option can be enabled to receive calls from: "Anyone" (any SIP endpoint in the public Internet) or "Only my connections" (any connection assigned to the same Telnyx user).

Enum: "only_my_connections" "from_anyone"
outbound_call_parking_enabled
boolean
Default: false

Forces all SIP calls originated on this connection to be "parked" instead of "bridged" to the destination specified on the URI. Parked calls will return ringback to the caller and will await for a Call Control command to define which action will be taken next.

webhook_api_version
string
Default: "1"

Determines which webhook format will be used, Telnyx API v1, v2, or a legacy 2010-04-01 format.

Enum: "1" "2"
Responses
200

Connection created response

Response Schema: application/json
id
required
string
connection_name
required
string
tech_prefix
required
string
Default: ""

Numerical chars only, exactly 4 characters.

authentication_type
required
integer
Default: 1

Unspecified = 1, IP Auth = 2, Credential Auth = 3

active
required
boolean

Defaults to true

dnis_number_format
required
integer
Default: 1

0 = E.164
1 = Strip-1
2 = Strip-2

timeout_1xx
required
string
Default: ""

Time(sec) before aborting if connection is not made (min: 1, max: 20).

timeout_2xx
required
string
Default: ""

Time(sec) before aborting if call is unanswered (min: 1, max: 600).

forward_only
required
boolean
Default: false

Every Telnyx user automatically gets and only one forward-only connection. This
is useful for setting up call forwarding on Telnyx numbers.

ani_override_type
string
Default: "always"

Specifies when we apply your ani_override setting. Only applies when ani_override is not blank.

Enum: "always" "normal" "emergency"
ani_override
string
Default: ""

Set a phone number as the ani_override value to override caller id number on outbound calls.

registration_status
integer
Default: 0

0 = Not Applicable
1 = Not Registered
2 = Failed
3 = Expired
4 = Success
5 = Unregistered

last_registered_ip
string

IP from the last successful registration attempt.

registration_status_updated_at
string
sip_compact_headers_enabled
required
boolean
Default: true

Defaults to true.

transport_protocol
required
string
Default: "UDP"

One of UDP, TLS, or TCP. Applies only to connections with IP authentication or FQDN authentication.

third_party_control_enabled
required
boolean
Default: false

Applies to calls sent TO this connection.

privacy_zone_enabled
required
boolean
Default: false

By default, Telnyx does not send caller-id information when the caller has chosen to hide this information. When this option is enabled, Telnyx will send the SIP header Privacy:id plus the caller-id information so that the receiver side can choose when to hide it.

codecs
required
Array of strings
Default: ["G722","G711U","G711A","G729","OPUS","H.264"]

Defines the list of codecs that Telnyx will send for inbound calls to a specific number on your portal account, in priority order. This only works when the Connection the number is assigned to uses Media Handling mode: default. OPUS and H.264 codecs are available only when using TCP or TLS transport for SIP.

prack_enabled
boolean
Default: false

Enable PRACK messages as defined in RFC3262.

default_routing_method
string

Default routing method to be used when a number is associated with the connection. Must be one of the routing method types or left blank, other values are not allowed.

Enum: "sequential" "round-robin"
default_primary_authorized_ip_id
integer

The default primary IP to use for the number. Only settable if the connection is of IP authentication type. Value must be the ID of an authorized IP set on the connection.

default_secondary_authorized_ip_id
integer

The default secondary IP to use for the number. Only settable if the connection is of IP authentication type. Value must be the ID of an authorized IP set on the connection.

default_tertiary_authorized_ip_id
integer

The default tertiary IP to use for the number. Only settable if the connection is of IP authentication type. Value must be the ID of an authorized IP set on the connection.

anchorsite_override
string

Latency directs Telnyx to route media through the site with the lowest round-trip time to the user's connection. Telnyx calculates this time using ICMP ping messages. This can be disabled by specifying a site to handle all media.

Enum: "Latency" "Chicago, IL" "Ashburn, VA" "San Jose, CA" "Sydney, Australia" "Amsterdam, Netherlands" "London, UK" "Toronto, Canada" "Vancouver, Canada"
encrypted_media
required
string

Enable use of SRTP or ZRTP for encryption. Valid values are those listed or null. Cannot be set to non-null if the transport_portocol is TLS.

Enum: "SRTP" "ZRTP"
call_failure_check_enabled
boolean
Default: false

Disable connection IPs temporarily after call timeout or rejection

instant_ringback_enabled
boolean
Default: true

When set, ringback will not wait for indication before sending ringback tone to calling party.

t38_reinvite_source
string
Default: "telnyx"

This setting only affects connections with Fax-type Outbound Profiles. The setting dictates whether or not Telnyx sends a t.38 reinvite.

By default, Telnyx will send the re-invite. If set to customer, the caller is expected to send the t.38 reinvite.

Enum: "telnyx" "customer" "disabled" "passthru" "caller-passthru" "callee-passthru"
ani_number_format
string
Default: "E.164-national"

This setting allows you to set the format with which the caller's number (ANI) is sent for inbound phone calls.

Enum: "+E.164" "E.164" "+E.164-national" "E.164-national"
isup_headers_enabled
boolean
Default: false

When set, inbound phone calls will receive ISUP parameters via SIP headers. (Only when available and only when using TCP or TLS transport.)

Enum: true false
encode_contact_header_enabled
boolean
Default: false

Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios.

Enum: true false
inbound_generate_ringback_tone
boolean
Default: false

Generate ringback tone through 183 session progress message with early media.

Enum: true false
outbound_generate_ringback_tone
boolean
Default: false

Generate ringback tone through 183 session progress message with early media.

Enum: true false
rtcp_report_enabled
boolean
Default: true

DEPRECATED - RTCP reports are always sent to customers/vendors. For backwards compatibility, the value is always true.

rtcp_report_frequency_seconds
integer
Default: 10

RTCP reports are sent to customers based on the frequency set. Frequency is in seconds and it can be set to values from 5 to 3000 seconds.

rtcp_port
any
Default: "rtp+1"

RTCP port by default is rtp+1, it can also be set to rtcp-mux

Enum: "rtcp-mux" "rtp+1"
dtmf_type
string
Default: "RFC 2833"

Sets the type of DTMF digits sent from Telnyx to this Connection. Note that DTMF digits sent to Telnyx will be accepted in all formats.

Enum: "RFC 2833" "Inband" "SIP INFO"
outbound_localization
string
Default: null

A 2-character country code specifying the country whose national dialing rules should be used. For example, if set to US then any US number can be dialed without preprending +1 to the number. When left blank, Telnyx will try US and GB dialing rules, in that order, by default.

inbound_channel_limit
integer
Default: null

When set, this will limit the total number of inbound calls to phone numbers associated with this connection.

outbound_channel_limit
integer
Default: null

When set, this will limit the total number of outbound calls to phone numbers associated with this connection.

onnet_t38_passthrough_enabled
integer
Default: false

Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly if both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call depending on each leg's settings.

sip_region
string
Default: "US"

Selects which sip_region to receive inbound calls from. If null, the default region (US) will be used.

Enum: "US" "Europe" "Australia"
sip_uri_calling_preference
string
Default: "disabled"

This feature enables inbound SIP URI calls to your Credential Auth Connection. If enabled for all (unrestricted) then anyone who calls the SIP URI @telnyx.com will be connected to your Connection. You can also choose to allow only calls that are originated on any Connections under your account (internal).

Enum: "disabled" "unrestricted" "internal"
sip_subdomain
string

Specifies a subdomain that can be used to receive Inbound calls to a Connection, in the same way a phone number is used, from a SIP endpoint. Example: the subdomain "example.sip.telnyx.com" can be called from any SIP endpoint by using the SIP URI "sip:@example.sip.telnyx.com" where the user part can be any alphanumeric value. Please note TLS encrypted calls are not allowed for subdomain calls.

sip_subdomain_receive_settings
string

This option can be enabled to receive calls from: "Anyone" (any SIP endpoint in the public Internet) or "Only my connections" (any connection assigned to the same Telnyx user).

Enum: "only_my_connections" "from_anyone"
webhook_api_version
string
Default: "1"

Determines which webhook format will be used, Telnyx API v1, v2, or a legacy 2010-04-01 format.

Enum: "1" "2"
400

Bad request

401

Unauthorized

post/security/connections
Request samples
application/json
{
  • "connection_name": "string",
  • "active": true,
  • "dnis_number_format": 1,
  • "timeout_1xx": "3",
  • "timeout_2xx": "90",
  • "ani_override_type": "always",
  • "ani_override": "",
  • "sip_compact_headers_enabled": true,
  • "transport_protocol": "UDP",
  • "third_party_control_enabled": false,
  • "privacy_zone_enabled": false,
  • "codecs": [
    • "G722",
    • "G711U",
    • "G711A",
    • "G729",
    • "OPUS",
    • "H.264"
    ],
  • "prack_enabled": false,
  • "default_routing_method": "sequential",
  • "default_primary_authorized_ip_id": 0,
  • "default_secondary_authorized_ip_id": 0,
  • "default_tertiary_authorized_ip_id": 0,
  • "anchorsite_override": "Latency",
  • "encrypted_media": "SRTP",
  • "instant_ringback_enabled": true,
  • "t38_reinvite_source": "telnyx",
  • "ani_number_format": "+E.164",
  • "isup_headers_enabled": true,
  • "encode_contact_header_enabled": true,
  • "inbound_generate_ringback_tone": true,
  • "outbound_generate_ringback_tone": true,
  • "rtcp_report_enabled": true,
  • "rtcp_report_frequency_seconds": 5,
  • "rtcp_port": "rtcp-mux",
  • "dtmf_type": "RFC 2833",
  • "outbound_localization": null,
  • "inbound_channel_limit": null,
  • "outbound_channel_limit": null,
  • "onnet_t38_passthrough_enabled": false,
  • "sip_region": "US",
  • "sip_uri_calling_preference": "disabled",
  • "sip_subdomain": "string",
  • "sip_subdomain_receive_settings": "only_my_connections",
  • "outbound_call_parking_enabled": false,
  • "webhook_api_version": "1"
}
Response samples
application/json
{
  • "id": "string",
  • "connection_name": "string",
  • "tech_prefix": "",
  • "authentication_type": 1,
  • "active": true,
  • "dnis_number_format": 1,
  • "timeout_1xx": "",
  • "timeout_2xx": "",
  • "forward_only": false,
  • "ani_override_type": "always",
  • "ani_override": "",
  • "registration_status": 0,
  • "last_registered_ip": "string",
  • "registration_status_updated_at": "string",
  • "sip_compact_headers_enabled": true,
  • "transport_protocol": "UDP",
  • "third_party_control_enabled": false,
  • "privacy_zone_enabled": false,
  • "codecs": [
    • "G722",
    • "G711U",
    • "G711A",
    • "G729",
    • "OPUS",
    • "H.264"
    ],
  • "prack_enabled": false,
  • "default_routing_method": "sequential",
  • "default_primary_authorized_ip_id": 0,
  • "default_secondary_authorized_ip_id": 0,
  • "default_tertiary_authorized_ip_id": 0,
  • "anchorsite_override": "Latency",
  • "encrypted_media": "SRTP",
  • "call_failure_check_enabled": false,
  • "instant_ringback_enabled": true,
  • "t38_reinvite_source": "telnyx",
  • "ani_number_format": "+E.164",
  • "isup_headers_enabled": true,
  • "encode_contact_header_enabled": true,
  • "inbound_generate_ringback_tone": true,
  • "outbound_generate_ringback_tone": true,
  • "rtcp_report_enabled": true,
  • "rtcp_report_frequency_seconds": 10,
  • "rtcp_port": "rtcp-mux",
  • "dtmf_type": "RFC 2833",
  • "outbound_localization": null,
  • "inbound_channel_limit": null,
  • "outbound_channel_limit": null,
  • "onnet_t38_passthrough_enabled": false,
  • "sip_region": "US",
  • "sip_uri_calling_preference": "disabled",
  • "sip_subdomain": "string",
  • "sip_subdomain_receive_settings": "only_my_connections",
  • "webhook_api_version": "1"
}

Retrieve a connection

Retrieves the details of an existing connection.

Request
path Parameters
id
required
string

Connection ID

Responses
200

success

Response Schema: application/json
id
required
string
connection_name
required
string
tech_prefix
required
string
Default: ""

Numerical chars only, exactly 4 characters.

authentication_type
required
integer
Default: 1

Unspecified = 1, IP Auth = 2, Credential Auth = 3

active
required
boolean

Defaults to true

dnis_number_format
required
integer
Default: 1

0 = E.164
1 = Strip-1
2 = Strip-2

timeout_1xx
required
string
Default: ""

Time(sec) before aborting if connection is not made (min: 1, max: 20).

timeout_2xx
required
string
Default: ""

Time(sec) before aborting if call is unanswered (min: 1, max: 600).

forward_only
required
boolean
Default: false

Every Telnyx user automatically gets and only one forward-only connection. This
is useful for setting up call forwarding on Telnyx numbers.

ani_override_type
string
Default: "always"

Specifies when we apply your ani_override setting. Only applies when ani_override is not blank.

Enum: "always" "normal" "emergency"
ani_override
string
Default: ""

Set a phone number as the ani_override value to override caller id number on outbound calls.

registration_status
integer
Default: 0

0 = Not Applicable
1 = Not Registered
2 = Failed
3 = Expired
4 = Success
5 = Unregistered

last_registered_ip
string

IP from the last successful registration attempt.

registration_status_updated_at
string
sip_compact_headers_enabled
required
boolean
Default: true

Defaults to true.

transport_protocol
required
string
Default: "UDP"

One of UDP, TLS, or TCP. Applies only to connections with IP authentication or FQDN authentication.

third_party_control_enabled
required
boolean
Default: false

Applies to calls sent TO this connection.

privacy_zone_enabled
required
boolean
Default: false

By default, Telnyx does not send caller-id information when the caller has chosen to hide this information. When this option is enabled, Telnyx will send the SIP header Privacy:id plus the caller-id information so that the receiver side can choose when to hide it.

codecs
required
Array of strings
Default: ["G722","G711U","G711A","G729","OPUS","H.264"]

Defines the list of codecs that Telnyx will send for inbound calls to a specific number on your portal account, in priority order. This only works when the Connection the number is assigned to uses Media Handling mode: default. OPUS and H.264 codecs are available only when using TCP or TLS transport for SIP.

prack_enabled
boolean
Default: false

Enable PRACK messages as defined in RFC3262.

default_routing_method
string

Default routing method to be used when a number is associated with the connection. Must be one of the routing method types or left blank, other values are not allowed.

Enum: "sequential" "round-robin"
default_primary_authorized_ip_id
integer

The default primary IP to use for the number. Only settable if the connection is of IP authentication type. Value must be the ID of an authorized IP set on the connection.

default_secondary_authorized_ip_id
integer

The default secondary IP to use for the number. Only settable if the connection is of IP authentication type. Value must be the ID of an authorized IP set on the connection.

default_tertiary_authorized_ip_id
integer

The default tertiary IP to use for the number. Only settable if the connection is of IP authentication type. Value must be the ID of an authorized IP set on the connection.

anchorsite_override
string

Latency directs Telnyx to route media through the site with the lowest round-trip time to the user's connection. Telnyx calculates this time using ICMP ping messages. This can be disabled by specifying a site to handle all media.

Enum: "Latency" "Chicago, IL" "Ashburn, VA" "San Jose, CA" "Sydney, Australia" "Amsterdam, Netherlands" "London, UK" "Toronto, Canada" "Vancouver, Canada"
encrypted_media
required
string

Enable use of SRTP or ZRTP for encryption. Valid values are those listed or null. Cannot be set to non-null if the transport_portocol is TLS.

Enum: "SRTP" "ZRTP"
call_failure_check_enabled
boolean
Default: false

Disable connection IPs temporarily after call timeout or rejection

instant_ringback_enabled
boolean
Default: true

When set, ringback will not wait for indication before sending ringback tone to calling party.

t38_reinvite_source
string
Default: "telnyx"

This setting only affects connections with Fax-type Outbound Profiles. The setting dictates whether or not Telnyx sends a t.38 reinvite.

By default, Telnyx will send the re-invite. If set to customer, the caller is expected to send the t.38 reinvite.

Enum: "telnyx" "customer" "disabled" "passthru" "caller-passthru" "callee-passthru"
ani_number_format
string
Default: "E.164-national"

This setting allows you to set the format with which the caller's number (ANI) is sent for inbound phone calls.

Enum: "+E.164" "E.164" "+E.164-national" "E.164-national"
isup_headers_enabled
boolean
Default: false

When set, inbound phone calls will receive ISUP parameters via SIP headers. (Only when available and only when using TCP or TLS transport.)

Enum: true false
encode_contact_header_enabled
boolean
Default: false

Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios.

Enum: true false
inbound_generate_ringback_tone
boolean
Default: false

Generate ringback tone through 183 session progress message with early media.

Enum: true false
outbound_generate_ringback_tone
boolean
Default: false

Generate ringback tone through 183 session progress message with early media.

Enum: true false
rtcp_report_enabled
boolean
Default: true

DEPRECATED - RTCP reports are always sent to customers/vendors. For backwards compatibility, the value is always true.

rtcp_report_frequency_seconds
integer
Default: 10

RTCP reports are sent to customers based on the frequency set. Frequency is in seconds and it can be set to values from 5 to 3000 seconds.

rtcp_port
any
Default: "rtp+1"

RTCP port by default is rtp+1, it can also be set to rtcp-mux

Enum: "rtcp-mux" "rtp+1"
dtmf_type
string
Default: "RFC 2833"

Sets the type of DTMF digits sent from Telnyx to this Connection. Note that DTMF digits sent to Telnyx will be accepted in all formats.

Enum: "RFC 2833" "Inband" "SIP INFO"
outbound_localization
string
Default: null

A 2-character country code specifying the country whose national dialing rules should be used. For example, if set to US then any US number can be dialed without preprending +1 to the number. When left blank, Telnyx will try US and GB dialing rules, in that order, by default.

inbound_channel_limit
integer
Default: null

When set, this will limit the total number of inbound calls to phone numbers associated with this connection.

outbound_channel_limit
integer
Default: null

When set, this will limit the total number of outbound calls to phone numbers associated with this connection.

onnet_t38_passthrough_enabled
integer
Default: false

Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly if both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call depending on each leg's settings.

sip_region
string
Default: "US"

Selects which sip_region to receive inbound calls from. If null, the default region (US) will be used.

Enum: "US" "Europe" "Australia"
sip_uri_calling_preference
string
Default: "disabled"

This feature enables inbound SIP URI calls to your Credential Auth Connection. If enabled for all (unrestricted) then anyone who calls the SIP URI @telnyx.com will be connected to your Connection. You can also choose to allow only calls that are originated on any Connections under your account (internal).

Enum: "disabled" "unrestricted" "internal"
sip_subdomain
string

Specifies a subdomain that can be used to receive Inbound calls to a Connection, in the same way a phone number is used, from a SIP endpoint. Example: the subdomain "example.sip.telnyx.com" can be called from any SIP endpoint by using the SIP URI "sip:@example.sip.telnyx.com" where the user part can be any alphanumeric value. Please note TLS encrypted calls are not allowed for subdomain calls.

sip_subdomain_receive_settings
string

This option can be enabled to receive calls from: "Anyone" (any SIP endpoint in the public Internet) or "Only my connections" (any connection assigned to the same Telnyx user).

Enum: "only_my_connections" "from_anyone"
webhook_api_version
string
Default: "1"

Determines which webhook format will be used, Telnyx API v1, v2, or a legacy 2010-04-01 format.

Enum: "1" "2"
400

Bad request

401

Unauthorized

404

Resource not found

get/security/connections/{id}
Request samples
Response samples
application/json
{
  • "id": "string",
  • "connection_name": "string",
  • "tech_prefix": "",
  • "authentication_type": 1,
  • "active": true,
  • "dnis_number_format": 1,
  • "timeout_1xx": "",
  • "timeout_2xx": "",
  • "forward_only": false,
  • "ani_override_type": "always",
  • "ani_override": "",
  • "registration_status": 0,
  • "last_registered_ip": "string",
  • "registration_status_updated_at": "string",
  • "sip_compact_headers_enabled": true,
  • "transport_protocol": "UDP",
  • "third_party_control_enabled": false,
  • "privacy_zone_enabled": false,
  • "codecs": [
    • "G722",
    • "G711U",
    • "G711A",
    • "G729",
    • "OPUS",
    • "H.264"
    ],
  • "prack_enabled": false,
  • "default_routing_method": "sequential",
  • "default_primary_authorized_ip_id": 0,
  • "default_secondary_authorized_ip_id": 0,
  • "default_tertiary_authorized_ip_id": 0,
  • "anchorsite_override": "Latency",
  • "encrypted_media": "SRTP",
  • "call_failure_check_enabled": false,
  • "instant_ringback_enabled": true,
  • "t38_reinvite_source": "telnyx",
  • "ani_number_format": "+E.164",
  • "isup_headers_enabled": true,
  • "encode_contact_header_enabled": true,
  • "inbound_generate_ringback_tone": true,
  • "outbound_generate_ringback_tone": true,
  • "rtcp_report_enabled": true,
  • "rtcp_report_frequency_seconds": 10,
  • "rtcp_port": "rtcp-mux",
  • "dtmf_type": "RFC 2833",
  • "outbound_localization": null,
  • "inbound_channel_limit": null,
  • "outbound_channel_limit": null,
  • "onnet_t38_passthrough_enabled": false,
  • "sip_region": "US",
  • "sip_uri_calling_preference": "disabled",
  • "sip_subdomain": "string",
  • "sip_subdomain_receive_settings": "only_my_connections",
  • "webhook_api_version": "1"
}

Update a connection

Updates the specified connection with the values of the parameters passed. Any parameters not included in the request will be left unchanged.

Request
path Parameters
id
required
string

ID of connection to update

Request Body schema: application/json
required

Updated connection object

connection_name
required
string
active
boolean
Default: true

Defaults to true

dnis_number_format
integer
Default: 1

0 = E.164
1 = Strip-1
2 = Strip-2

timeout_1xx
string
Default: "3"

Time(sec) before aborting if connection is not made (min: 1, max: 20).

timeout_2xx
string
Default: "90"

Time(sec) before aborting if call is unanswered (min: 1, max: 600).

ani_override_type
string
Default: "always"

Specifies when we apply your ani_override setting. Only applies when ani_override is not blank.

Enum: "always" "normal" "emergency"
ani_override
string
Default: ""

Set a phone number as the ani_override value to override caller id number on outbound calls.

sip_compact_headers_enabled
boolean
Default: true

Defaults to true.

transport_protocol
string
Default: "UDP"

One of UDP, TLS, or TCP. Applies only to connections with IP authentication or FQDN authentication.

third_party_control_enabled
boolean
Default: false

Applies to calls sent TO this connection.

privacy_zone_enabled
boolean
Default: false

By default, Telnyx does not send caller-id information when the caller has chosen to hide this information. When this option is enabled, Telnyx will send the SIP header Privacy:id plus the caller-id information so that the receiver side can choose when to hide it.

codecs
Array of strings
Default: ["G722","G711U","G711A","G729","OPUS","H.264"]

Defines the list of codecs that Telnyx will send for inbound calls to a specific number on your portal account, in priority order. This only works when the Connection the number is assigned to uses Media Handling mode: default. OPUS and H.264 codecs are available only when using TCP or TLS transport for SIP.

prack_enabled
boolean
Default: false

Enable PRACK messages as defined in RFC3262.

default_routing_method
string

Default routing method to be used when a number is associated with the connection. Must be one of the routing method types or left blank, other values are not allowed.

Enum: "sequential" "round-robin"
default_primary_authorized_ip_id
integer

The default primary IP to use for the number. Only settable if the connection is of IP authentication type. Value must be the ID of an authorized IP set on the connection.

default_secondary_authorized_ip_id
integer

The default secondary IP to use for the number. Only settable if the connection is of IP authentication type. Value must be the ID of an authorized IP set on the connection.

default_tertiary_authorized_ip_id
integer

The default tertiary IP to use for the number. Only settable if the connection is of IP authentication type. Value must be the ID of an authorized IP set on the connection.

anchorsite_override
string

Latency directs Telnyx to route media through the site with the lowest round-trip time to the user's connection. Telnyx calculates this time using ICMP ping messages. This can be disabled by specifying a site to handle all media.

Enum: "Latency" "Chicago, IL" "Ashburn, VA" "San Jose, CA" "Sydney, Australia" "Amsterdam, Netherlands" "London, UK" "Toronto, Canada" "Vancouver, Canada"
encrypted_media
string

Enable use of SRTP or ZRTP for encryption. Valid values are those listed or null. Cannot be set to non-null if the transport_portocol is TLS.

Enum: "SRTP" "ZRTP"
instant_ringback_enabled
boolean
Default: true

When set, ringback will not wait for indication before sending ringback tone to calling party.

t38_reinvite_source
string
Default: "telnyx"

This setting only affects connections with Fax-type Outbound Profiles. The setting dictates whether or not Telnyx sends a t.38 reinvite.

By default, Telnyx will send the re-invite. If set to customer, the caller is expected to send the t.38 reinvite.

Enum: "telnyx" "customer" "disabled" "passthru" "caller-passthru" "callee-passthru"
ani_number_format
string
Default: "E.164-national"

0 = E.164
1 = Strip-1
2 = Strip-2

Enum: "+E.164" "E.164" "+E.164-national" "E.164-national"
isup_headers_enabled
boolean
Default: false

When set, inbound phone calls will receive ISUP parameters via SIP headers. (Only when available and only when using TCP or TLS transport.)

Enum: true false
encode_contact_header_enabled
boolean
Default: false

Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios.

Enum: true false
inbound_generate_ringback_tone
boolean
Default: false

Generate ringback tone through 183 session progress message with early media.

Enum: true false
outbound_generate_ringback_tone
boolean
Default: false

Generate ringback tone through 183 session progress message with early media.

Enum: true false
rtcp_report_enabled
boolean
Default: true

DEPRECATED - RTCP reports are always sent to customers/vendors. For backwards compatibility, the value is always true

rtcp_report_frequency_seconds
integer
Default: 5

RTCP reports are sent to customers based on the frequency set. Frequency is in seconds and it can be set to values from 5 to 3000 seconds. The default is 10 seconds.

rtcp_port
any
Default: "rtp+1"

RTCP port by default is rtp+1, it can also be set to rtcp-mux

Enum: "rtcp-mux" "rtp+1"
dtmf_type
string
Default: "RFC 2833"

Sets the type of DTMF digits sent from Telnyx to this Connection. Note that DTMF digits sent to Telnyx will be accepted in all formats.

Enum: "RFC 2833" "Inband" "SIP INFO"
outbound_localization
string
Default: null

A 2-character country code specifying the country whose national dialing rules should be used. For example, if set to US then any US number can be dialed without preprending +1 to the number. When left blank, Telnyx will try US and GB dialing rules, in that order, by default.

inbound_channel_limit
integer
Default: null

When set, this will limit the total number of inbound calls to phone numbers associated with this connection.

outbound_channel_limit
integer
Default: null

When set, this will limit the total number of outbound calls to phone numbers associated with this connection.

onnet_t38_passthrough_enabled
integer
Default: false

Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly if both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call depending on each leg's settings.

sip_region
string
Default: "US"

Selects which sip_region to receive inbound calls from. If null, the default region (US) will be used.

Enum: "US" "Europe" "Australia"
sip_uri_calling_preference
string
Default: "disabled"

This feature enables inbound SIP URI calls to your Credential Auth Connection. If enabled for all (unrestricted) then anyone who calls the SIP URI @telnyx.com will be connected to your Connection. You can also choose to allow only calls that are originated on any Connections under your account (internal).

Enum: "disabled" "unrestricted" "internal"
sip_subdomain
string

Specifies a subdomain that can be used to receive Inbound calls to a Connection, in the same way a phone number is used, from a SIP endpoint. Example: the subdomain "example.sip.telnyx.com" can be called from any SIP endpoint by using the SIP URI "sip:@example.sip.telnyx.com" where the user part can be any alphanumeric value. Please note TLS encrypted calls are not allowed for subdomain calls.

sip_subdomain_receive_settings
string

This option can be enabled to receive calls from: "Anyone" (any SIP endpoint in the public Internet) or "Only my connections" (any connection assigned to the same Telnyx user).

Enum: "only_my_connections" "from_anyone"
outbound_call_parking_enabled
boolean
Default: false

Forces all SIP calls originated on this connection to be "parked" instead of "bridged" to the destination specified on the URI. Parked calls will return ringback to the caller and will await for a Call Control command to define which action will be taken next.

webhook_api_version
string
Default: "1"

Determines which webhook format will be used, Telnyx API v1, v2, or a legacy 2010-04-01 format.

Enum: "1" "2"
Responses
200

Connection updated response

Response Schema: application/json
id
required
string
connection_name
required
string
tech_prefix
required
string
Default: ""

Numerical chars only, exactly 4 characters.

authentication_type
required
integer
Default: 1

Unspecified = 1, IP Auth = 2, Credential Auth = 3

active
required
boolean

Defaults to true

dnis_number_format
required
integer
Default: 1

0 = E.164
1 = Strip-1
2 = Strip-2

timeout_1xx
required
string
Default: ""

Time(sec) before aborting if connection is not made (min: 1, max: 20).

timeout_2xx
required
string
Default: ""

Time(sec) before aborting if call is unanswered (min: 1, max: 600).

forward_only
required
boolean
Default: false

Every Telnyx user automatically gets and only one forward-only connection. This
is useful for setting up call forwarding on Telnyx numbers.

ani_override_type
string
Default: "always"

Specifies when we apply your ani_override setting. Only applies when ani_override is not blank.

Enum: "always" "normal" "emergency"
ani_override
string
Default: ""

Set a phone number as the ani_override value to override caller id number on outbound calls.

registration_status
integer
Default: 0

0 = Not Applicable
1 = Not Registered
2 = Failed
3 = Expired
4 = Success
5 = Unregistered

last_registered_ip
string

IP from the last successful registration attempt.

registration_status_updated_at
string
sip_compact_headers_enabled
required
boolean
Default: true

Defaults to true.

transport_protocol
required
string
Default: "UDP"

One of UDP, TLS, or TCP. Applies only to connections with IP authentication or FQDN authentication.

third_party_control_enabled
required
boolean
Default: false

Applies to calls sent TO this connection.

privacy_zone_enabled
required
boolean
Default: false

By default, Telnyx does not send caller-id information when the caller has chosen to hide this information. When this option is enabled, Telnyx will send the SIP header Privacy:id plus the caller-id information so that the receiver side can choose when to hide it.

codecs
required
Array of strings
Default: ["G722","G711U","G711A","G729","OPUS","H.264"]

Defines the list of codecs that Telnyx will send for inbound calls to a specific number on your portal account, in priority order. This only works when the Connection the number is assigned to uses Media Handling mode: default. OPUS and H.264 codecs are available only when using TCP or TLS transport for SIP.

prack_enabled
boolean
Default: false

Enable PRACK messages as defined in RFC3262.

default_routing_method
string

Default routing method to be used when a number is associated with the connection. Must be one of the routing method types or left blank, other values are not allowed.

Enum: "sequential" "round-robin"
default_primary_authorized_ip_id
integer

The default primary IP to use for the number. Only settable if the connection is of IP authentication type. Value must be the ID of an authorized IP set on the connection.

default_secondary_authorized_ip_id
integer

The default secondary IP to use for the number. Only settable if the connection is of IP authentication type. Value must be the ID of an authorized IP set on the connection.

default_tertiary_authorized_ip_id
integer

The default tertiary IP to use for the number. Only settable if the connection is of IP authentication type. Value must be the ID of an authorized IP set on the connection.

anchorsite_override
string

Latency directs Telnyx to route media through the site with the lowest round-trip time to the user's connection. Telnyx calculates this time using ICMP ping messages. This can be disabled by specifying a site to handle all media.

Enum: "Latency" "Chicago, IL" "Ashburn, VA" "San Jose, CA" "Sydney, Australia" "Amsterdam, Netherlands" "London, UK" "Toronto, Canada" "Vancouver, Canada"
encrypted_media
required
string

Enable use of SRTP or ZRTP for encryption. Valid values are those listed or null. Cannot be set to non-null if the transport_portocol is TLS.

Enum: "SRTP" "ZRTP"
call_failure_check_enabled
boolean
Default: false

Disable connection IPs temporarily after call timeout or rejection

instant_ringback_enabled
boolean
Default: true

When set, ringback will not wait for indication before sending ringback tone to calling party.

t38_reinvite_source
string
Default: "telnyx"

This setting only affects connections with Fax-type Outbound Profiles. The setting dictates whether or not Telnyx sends a t.38 reinvite.

By default, Telnyx will send the re-invite. If set to customer, the caller is expected to send the t.38 reinvite.

Enum: "telnyx" "customer" "disabled" "passthru" "caller-passthru" "callee-passthru"
ani_number_format
string
Default: "E.164-national"

This setting allows you to set the format with which the caller's number (ANI) is sent for inbound phone calls.

Enum: "+E.164" "E.164" "+E.164-national" "E.164-national"
isup_headers_enabled
boolean
Default: false

When set, inbound phone calls will receive ISUP parameters via SIP headers. (Only when available and only when using TCP or TLS transport.)

Enum: true false
encode_contact_header_enabled
boolean
Default: false

Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios.

Enum: true false
inbound_generate_ringback_tone
boolean
Default: false

Generate ringback tone through 183 session progress message with early media.

Enum: true false
outbound_generate_ringback_tone
boolean
Default: false

Generate ringback tone through 183 session progress message with early media.

Enum: true false
rtcp_report_enabled
boolean
Default: true

DEPRECATED - RTCP reports are always sent to customers/vendors. For backwards compatibility, the value is always true.

rtcp_report_frequency_seconds
integer
Default: 10

RTCP reports are sent to customers based on the frequency set. Frequency is in seconds and it can be set to values from 5 to 3000 seconds.

rtcp_port
any
Default: "rtp+1"

RTCP port by default is rtp+1, it can also be set to rtcp-mux

Enum: "rtcp-mux" "rtp+1"
dtmf_type
string
Default: "RFC 2833"

Sets the type of DTMF digits sent from Telnyx to this Connection. Note that DTMF digits sent to Telnyx will be accepted in all formats.

Enum: "RFC 2833" "Inband" "SIP INFO"
outbound_localization
string
Default: null

A 2-character country code specifying the country whose national dialing rules should be used. For example, if set to US then any US number can be dialed without preprending +1 to the number. When left blank, Telnyx will try US and GB dialing rules, in that order, by default.

inbound_channel_limit
integer
Default: null

When set, this will limit the total number of inbound calls to phone numbers associated with this connection.

outbound_channel_limit
integer
Default: null

When set, this will limit the total number of outbound calls to phone numbers associated with this connection.

onnet_t38_passthrough_enabled
integer
Default: false

Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly if both are on the Telnyx network. If this is disabled, Telnyx will be able to use T38 on just one leg of the call depending on each leg's settings.

sip_region
string
Default: "US"

Selects which sip_region to receive inbound calls from. If null, the default region (US) will be used.

Enum: "US" "Europe" "Australia"
sip_uri_calling_preference
string
Default: "disabled"

This feature enables inbound SIP URI calls to your Credential Auth Connection. If enabled for all (unrestricted) then anyone who calls the SIP URI @telnyx.com will be connected to your Connection. You can also choose to allow only calls that are originated on any Connections under your account (internal).

Enum: "disabled" "unrestricted" "internal"
sip_subdomain
string

Specifies a subdomain that can be used to receive Inbound calls to a Connection, in the same way a phone number is used, from a SIP endpoint. Example: the subdomain "example.sip.telnyx.com" can be called from any SIP endpoint by using the SIP URI "sip:@example.sip.telnyx.com" where the user part can be any alphanumeric value. Please note TLS encrypted calls are not allowed for subdomain calls.

sip_subdomain_receive_settings
string

This option can be enabled to receive calls from: "Anyone" (any SIP endpoint in the public Internet) or "Only my connections" (any connection assigned to the same Telnyx user).

Enum: "only_my_connections" "from_anyone"
webhook_api_version
string
Default: "1"

Determines which webhook format will be used, Telnyx API v1, v2, or a legacy 2010-04-01 format.

Enum: "1" "2"
400

Bad request

401

Unauthorized

put/security/connections/{id}
Request samples
application/json
{
  • "connection_name": "string",
  • "active": true,
  • "dnis_number_format": 1,
  • "timeout_1xx": "3",
  • "timeout_2xx": "90",
  • "ani_override_type": "always",
  • "ani_override": "",
  • "sip_compact_headers_enabled": true,
  • "transport_protocol": "UDP",
  • "third_party_control_enabled": false,
  • "privacy_zone_enabled": false,
  • "codecs": [
    • "G722",
    • "G711U",
    • "G711A",
    • "G729",
    • "OPUS",
    • "H.264"
    ],
  • "prack_enabled": false,
  • "default_routing_method": "sequential",
  • "default_primary_authorized_ip_id": 0,
  • "default_secondary_authorized_ip_id": 0,
  • "default_tertiary_authorized_ip_id": 0,
  • "anchorsite_override": "Latency",
  • "encrypted_media": "SRTP",
  • "instant_ringback_enabled": true,
  • "t38_reinvite_source": "telnyx",
  • "ani_number_format": "+E.164",
  • "isup_headers_enabled": true,
  • "encode_contact_header_enabled": true,
  • "inbound_generate_ringback_tone": true,
  • "outbound_generate_ringback_tone": true,
  • "rtcp_report_enabled": true,
  • "rtcp_report_frequency_seconds": 5,
  • "rtcp_port": "rtcp-mux",
  • "dtmf_type": "RFC 2833",
  • "outbound_localization": null,
  • "inbound_channel_limit": null,
  • "outbound_channel_limit": null,
  • "onnet_t38_passthrough_enabled": false,
  • "sip_region": "US",
  • "sip_uri_calling_preference": "disabled",
  • "sip_subdomain": "string",
  • "sip_subdomain_receive_settings": "only_my_connections",
  • "outbound_call_parking_enabled": false,
  • "webhook_api_version": "1"
}
Response samples
application/json
{
  • "id": "string",
  • "connection_name": "string",
  • "tech_prefix": "",
  • "authentication_type": 1,
  • "active": true,
  • "dnis_number_format": 1,
  • "timeout_1xx": "",
  • "timeout_2xx": "",
  • "forward_only": false,
  • "ani_override_type": "always",
  • "ani_override": "",
  • "registration_status": 0,
  • "last_registered_ip": "string",
  • "registration_status_updated_at": "string",
  • "sip_compact_headers_enabled": true,
  • "transport_protocol": "UDP",
  • "third_party_control_enabled": false,
  • "privacy_zone_enabled": false,
  • "codecs": [
    • "G722",
    • "G711U",
    • "G711A",
    • "G729",
    • "OPUS",
    • "H.264"
    ],
  • "prack_enabled": false,
  • "default_routing_method": "sequential",
  • "default_primary_authorized_ip_id": 0,
  • "default_secondary_authorized_ip_id": 0,
  • "default_tertiary_authorized_ip_id": 0,
  • "anchorsite_override": "Latency",
  • "encrypted_media": "SRTP",
  • "call_failure_check_enabled": false,
  • "instant_ringback_enabled": true,
  • "t38_reinvite_source": "telnyx",
  • "ani_number_format": "+E.164",
  • "isup_headers_enabled": true,
  • "encode_contact_header_enabled": true,
  • "inbound_generate_ringback_tone": true,
  • "outbound_generate_ringback_tone": true,
  • "rtcp_report_enabled": true,
  • "rtcp_report_frequency_seconds": 10,
  • "rtcp_port": "rtcp-mux",
  • "dtmf_type": "RFC 2833",
  • "outbound_localization": null,
  • "inbound_channel_limit": null,
  • "outbound_channel_limit": null,
  • "onnet_t38_passthrough_enabled": false,
  • "sip_region": "US",
  • "sip_uri_calling_preference": "disabled",
  • "sip_subdomain": "string",
  • "sip_subdomain_receive_settings": "only_my_connections",
  • "webhook_api_version": "1"
}

Delete a connection

Permanently deletes a connection.

Request
path Parameters
id
required
string

ID of connection to delete

Responses
200

Connection deleted response

Response Schema: application/json
success
required
boolean
message
required
string
404

Resource not found

delete/security/connections/{id}
Request samples
Response samples
application/json
{
  • "success": true,
  • "message": "string"
}