Skip to main content

Create an Ip connection

POST 
/ip_connections

Creates an IP connection.

Request

Body

required

Parameters that can be defined during IP connection creation

    active boolean

    Defaults to true

    anchorsite_override Anchorsite Override (string)

    Possible values: [Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany]

    Default value: Latency

    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.

    connection_name string
    transport_protocol string

    Possible values: [UDP, TCP, TLS]

    Default value: UDP

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

    default_on_hold_comfort_noise_enabled boolean

    Default value: true

    When enabled, Telnyx will generate comfort noise when you place the call on hold. If disabled, you will need to generate comfort noise or on hold music to avoid RTP timeout.

    dtmf_type DTMF Type (string)

    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.

    encode_contact_header_enabled boolean

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

    encrypted_media EncryptedMedia (string)nullable

    Possible values: [SRTP]

    Enable use of SRTP for encryption. Cannot be set if the transport_portocol is TLS.

    onnet_t38_passthrough_enabled boolean

    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.

    ios_push_credential_id Ios Push Credential Id (string)nullable

    The uuid of the push credential for Ios

    android_push_credential_id Android Push Credential Id (string)nullable

    The uuid of the push credential for Android

    webhook_event_url url

    The URL where webhooks related to this connection will be sent. Must include a scheme, such as 'https'.

    webhook_event_failover_url urlnullable

    The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'.

    webhook_api_version string

    Possible values: [1, 2]

    Default value: 1

    Determines which webhook format will be used, Telnyx API v1 or v2.

    webhook_timeout_secs integernullable

    Possible values: <= 30

    Specifies how many seconds to wait before timing out a webhook.

    rtcp_settings

    object

    port

    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

    capture_enabled boolean

    BETA - Enable the capture and storage of RTCP messages to create QoS reports on the Telnyx Mission Control Portal.

    report_frequency_secs integer

    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.

    inbound

    object

    ani_number_format string

    Possible values: [+E.164, E.164, +E.164-national, E.164-national]

    Default value: E.164-national

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

    dnis_number_format string

    Possible values: [+e164, e164, national, sip_username]

    Default value: e164

    codecs string[]

    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.

    default_routing_method string

    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.

    channel_limit integer

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

    generate_ringback_tone boolean

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

    isup_headers_enabled boolean

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

    prack_enabled boolean

    Enable PRACK messages as defined in RFC3262.

    privacy_zone_enabled boolean

    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.

    sip_compact_headers_enabled boolean

    Default value: true

    Defaults to true.

    sip_region string

    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.

    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

    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).

    timeout_1xx_secs integer

    Possible values: >= 1 and <= 120

    Default value: 3

    Time(sec) before aborting if connection is not made.

    timeout_2xx_secs integer

    Default value: 90

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

    shaken_stir_enabled boolean

    When enabled the SIP Connection will receive the Identity header with Shaken/Stir data in the SIP INVITE message of inbound calls, even when using UDP transport.

    outbound

    object

    call_parking_enabled booleannullable

    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.

    ani_override string

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

    ani_override_type string

    Possible values: [always, normal, emergency]

    Default value: always

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

    channel_limit integer

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

    instant_ringback_enabled boolean

    Default value: true

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

    generate_ringback_tone boolean

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

    localization string

    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.

    t38_reinvite_source string

    Possible values: [telnyx, customer, disabled, passthru, caller-passthru, callee-passthru]

    Default value: customer

    This setting only affects connections with Fax-type Outbound Voice 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.

    tech_prefix string

    Numerical chars only, exactly 4 characters.

    ip_authentication_method string

    Possible values: [tech-prefixp-charge-info, token]

    Default value: tech-prefixp-charge-info

    ip_authentication_token string
    outbound_voice_profile_id int64

    Identifies the associated outbound voice profile.

Responses

201: Successful response with details about an IP connection.

401: Unauthorized

403: The user doesn't have the required permissions to perform the requested action.

422: The request was well-formed but was unable to be followed due to semantic errors.

Request samples


curl -L 'https://api.telnyx.com/v2/ip_connections' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"active": true,
"anchorsite_override": "Latency",
"connection_name": "string",
"transport_protocol": "UDP",
"default_on_hold_comfort_noise_enabled": true,
"dtmf_type": "RFC 2833",
"encode_contact_header_enabled": true,
"encrypted_media": "SRTP",
"onnet_t38_passthrough_enabled": false,
"ios_push_credential_id": "ec0c8e5d-439e-4620-a0c1-9d9c8d02a836",
"android_push_credential_id": "06b09dfd-7154-4980-8b75-cebf7a9d4f8e",
"webhook_event_url": "https://example.com",
"webhook_event_failover_url": "https://failover.example.com",
"webhook_api_version": "1",
"webhook_timeout_secs": 25,
"rtcp_settings": {
"port": "rtcp-mux",
"capture_enabled": true,
"report_frequency_secs": 10
},
"inbound:": {
"ani_number_format": "+E.164",
"dns_number_format": "+e164",
"codecs": "G722",
"default_primary_ip_id": "192.168.0.0",
"default_tertiary_ip_id": "192.168.0.0",
"default_secondary_ip_id": "192.168.0.0",
"default_routing_method": "sequential",
"channel_limit": 10,
"generate_ringback_tone": true,
"isup_headers_enabled": true,
"prack_enabled": true,
"privacy_zone_enabled": true,
"sip_compact_headers_enabled": true,
"sip_region": "US",
"sip_subdomain": "test",
"sip_subdomain_receive_settings": "only_my_connections",
"timeout_1xx_secs": 10,
"timeout_2xx_secs": 20,
"shaken_stir_enabled": true
},
"outbound": {
"call_parking_enabled": true,
"ani_override": "string",
"ani_override_type": "always",
"channel_limit": 10,
"instant_ringback_enabled": true,
"generate_ringback_tone": true,
"localization": "string",
"t38_reinvite_source": "customer",
"tech_prefix": "string",
"ip_authentication_method": "token",
"ip_authentication_token": "string",
"outbound_voice_profile_id": "1293384261075731499"
}
}'

Response samples


{
"data": {
"id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"record_type": "ip_connection",
"active": true,
"anchorsite_override": "Latency",
"connection_name": "string",
"transport_protocol": "UDP",
"default_on_hold_comfort_noise_enabled": true,
"dtmf_type": "RFC 2833",
"encode_contact_header_enabled": true,
"encrypted_media": "SRTP",
"onnet_t38_passthrough_enabled": true,
"ios_push_credential_id": "ec0c8e5d-439e-4620-a0c1-9d9c8d02a836",
"android_push_credential_id": "06b09dfd-7154-4980-8b75-cebf7a9d4f8e",
"webhook_event_url": "https://example.com",
"webhook_event_failover_url": "https://failover.example.com",
"webhook_api_version": "1",
"webhook_timeout_secs": 25,
"rtcp_settings": {
"port": "rtcp-mux",
"capture_enabled": true,
"report_frequency_secs": 10
},
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z",
"inbound": {
"ani_number_format": "+E.164",
"dnis_number_format": "+e164",
"codecs": [
"G722"
],
"default_primary_ip_id": "192.0.2.1",
"default_secondary_ip_id": "198.51.100.1",
"default_tertiary_ip_id": "203.0.113.1",
"default_routing_method": "sequential",
"channel_limit": 10,
"generate_ringback_tone": true,
"isup_headers_enabled": true,
"prack_enabled": true,
"privacy_zone_enabled": true,
"sip_compact_headers_enabled": true,
"sip_region": "US",
"sip_subdomain": "string",
"sip_subdomain_receive_settings": "only_my_connections",
"timeout_1xx_secs": 10,
"timeout_2xx_secs": 10,
"shaken_stir_enabled": true
},
"outbound": {
"call_parking_enabled": true,
"ani_override": "string",
"ani_override_type": "always",
"channel_limit": 10,
"instant_ringback_enabled": true,
"generate_ringback_tone": true,
"localization": "string",
"t38_reinvite_source": "customer",
"tech_prefix": "string",
"ip_authentication_method": "token",
"ip_authentication_token": "string",
"outbound_voice_profile_id": "1293384261075731499"
}
}
}