Create a connection
POST/security/connections
Creates a new connection object.
Request
- application/json
Body
required
Connection to add
Default value: true
Defaults to true
Default value: 1
0 = E.164
1 = Strip-1
2 = Strip-2
Default value: 3
Time(sec) before aborting if connection is not made (min: 1, max: 20).
Default value: 90
Time(sec) before aborting if call is unanswered (min: 1, max: 600).
Possible values: [always
, normal
, emergency
]
Default value: always
Specifies when we apply your ani_override setting. Only applies when ani_override is not blank.
Set a phone number as the ani_override value to override caller id number on outbound calls.
Default value: true
Defaults to true.
Default value: UDP
One of UDP, TLS, or TCP. Applies only to connections with IP authentication or FQDN authentication.
Applies to calls sent TO this connection.
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.
Default value: 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.
Enable PRACK messages as defined in RFC3262.
Possible values: [sequential
, round-robin
]
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.
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.
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.
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.
Possible values: [Latency
, Chicago, IL
, Ashburn, VA
, San Jose, CA
, Sydney, Australia
, Amsterdam, Netherlands
, London, UK
, Toronto, Canada
, Vancouver, Canada
]
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.
Possible values: [SRTP
, ZRTP
]
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.
Default value: true
When set, ringback will not wait for indication before sending ringback tone to calling party.
Possible values: [telnyx
, customer
, disabled
, passthru
, caller-passthru
, callee-passthru
]
Default value: 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.
Possible values: [+E.164
, E.164
, +E.164-national
, E.164-national
]
Default value: E.164-national
0 = E.164
1 = Strip-1
2 = Strip-2
Possible values: [true
, false
]
When set, inbound phone calls will receive ISUP parameters via SIP headers. (Only when available and only when using TCP or TLS transport.)
Possible values: [true
, false
]
Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scenarios.
Possible values: [true
, false
]
Generate ringback tone through 183 session progress message with early media.
Possible values: [true
, false
]
Generate ringback tone through 183 session progress message with early media.
Default value: true
DEPRECATED - RTCP reports are always sent to customers/vendors. For backwards compatibility, the value is always true
Default value: 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.
Possible values: [rtcp-mux
, rtp+1
]
Default value: rtp+1
RTCP port by default is rtp+1, it can also be set to rtcp-mux
Possible values: [RFC 2833
, Inband
, SIP INFO
]
Default value: 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.
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.
When set, this will limit the total number of inbound calls to phone numbers associated with this connection.
When set, this will limit the total number of outbound calls to phone numbers associated with this connection.
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.
Possible values: [US
, Europe
, Australia
]
Default value: US
Selects which sip_region
to receive inbound calls from. If null, the default region (US) will be used.
Possible values: [disabled
, unrestricted
, internal
]
Default value: 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
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.
Possible values: [only_my_connections
, from_anyone
]
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).
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.
Possible values: [1
, 2
]
Default value: 1
Determines which webhook format will be used, Telnyx API v1, v2, or a legacy 2010-04-01 format.
Responses
200: Connection created response
- application/json
400: Bad request
401: Unauthorized
Request samples
curl -L 'https://api.telnyx.com/security/connections' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"connection_name": "string",
"active": true,
"dnis_number_format": 1,
"timeout_1xx": "3",
"timeout_2xx": "90",
"ani_override_type": "always",
"ani_override": "string",
"sip_compact_headers_enabled": true,
"transport_protocol": "UDP",
"third_party_control_enabled": false,
"privacy_zone_enabled": false,
"codecs": [
"string"
],
"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-national",
"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,
"dtmf_type": "RFC 2833",
"outbound_localization": "string",
"inbound_channel_limit": 0,
"outbound_channel_limit": 0,
"onnet_t38_passthrough_enabled": 0,
"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
{
"id": "string",
"connection_name": "string",
"tech_prefix": "string",
"authentication_type": 1,
"active": true,
"dnis_number_format": 1,
"timeout_1xx": "string",
"timeout_2xx": "string",
"forward_only": false,
"ani_override_type": "always",
"ani_override": "string",
"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": [
"string"
],
"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-national",
"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,
"dtmf_type": "RFC 2833",
"outbound_localization": "string",
"inbound_channel_limit": 0,
"outbound_channel_limit": 0,
"onnet_t38_passthrough_enabled": 0,
"sip_region": "US",
"sip_uri_calling_preference": "disabled",
"sip_subdomain": "string",
"sip_subdomain_receive_settings": "only_my_connections",
"webhook_api_version": "1"
}