Open SidemenuAPI Reference
API Reference
Close Sidemenu

Call Control Applications

List call control applicationslistCallControlApplications

get https://api.telnyx.com/v2/call_control_applications

Return a list of call control applications.

curl -X GET \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --globoff "https://api.telnyx.com/v2/call_control_applications?page[number]=1&page[size]=20"
Parameters
In query
page[number]
integer (1)
optional

The page number to load

Default: 1
page[size]
integer (1 - 250)
optional

The size of the page

Default: 20
filter[application_name][contains]
string
optional

If present, applications with application_name containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters.

Default: "null"
filter[outbound_voice_profile_id]
string (int64)
optional

Identifies the associated outbound voice profile.

Example: "1293384261075731499"
sort
string
optional

Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the - prefix.

That is:

  • connection_name: sorts the result by the connection_name field in ascending order.
  • -connection_name: sorts the result by the connection_name field in descending order.

If not given, results are sorted by created_at in descending order.

Default: "created_at"
Example: "connection_name"
Options: [ "created_at", "connection_name", "active" ]
Responses
200

Successful response with a list of call control applications.

400

Bad request

401

Unauthorized

404

Resource not found

Success Response
{
  "data": [
    {
      "active": false,
      "anchorsite_override": "\"Latency\"",
      "application_name": "call-router",
      "created_at": "2018-02-02T22:25:27.521Z",
      "dtmf_type": "Inband",
      "first_command_timeout": true,
      "first_command_timeout_secs": 10,
      "id": "1293384261075731499",
      "inbound": {
        "channel_limit": 10,
        "sip_subdomain": "example",
        "sip_subdomain_receive_settings": "only_my_connections"
      },
      "outbound": {
        "channel_limit": 10,
        "outbound_voice_profile_id": "1293384261075731499"
      },
      "record_type": "call_control_application",
      "updated_at": "2018-02-02T22:25:27.521Z",
      "webhook_api_version": "1",
      "webhook_event_failover_url": "https://failover.example.com",
      "webhook_event_url": "https://example.com",
      "webhook_timeout_secs": 25
    }
  ],
  "meta": {
    "page_number": 2,
    "page_size": 25,
    "total_pages": 3,
    "total_results": 55
  }
}

Create a call control applicationcreateCallControlApplication

post https://api.telnyx.com/v2/call_control_applications

Create a call control application.

curl -X POST \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --data '{"application_name":"call-router","webhook_event_url":"https://example.com"}' \
  https://api.telnyx.com/v2/call_control_applications
Parameters
In body (application/json)
application_name
string
required

A user-assigned name to help manage the application.

Example: "call-router"
webhook_event_url
string (url)
required

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

Example: "https://example.com"
active
boolean
optional

Specifies whether the connection can be used.

Default: true
anchorsite_override
string
optional

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.

Default: "\"Latency\""
Example: "\"Amsterdam, Netherlands\""
Options: [ "\"Latency\"", "\"Chicago, IL\"", "\"Ashburn, VA\"", "\"San Jose, CA\"" ]
dtmf_type
string
optional

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.

Default: "RFC 2833"
Example: "Inband"
Options: [ "RFC 2833", "Inband", "SIP INFO" ]
first_command_timeout
boolean
optional

Specifies whether calls to phone numbers associated with this connection should hangup after timing out.

Default: false
Example: true
first_command_timeout_secs
integer
optional

Specifies how many seconds to wait before timing out a dial command.

Default: 30
Example: 10
inbound
object
optional
outbound
object
optional
webhook_api_version
string
optional

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

Default: "1"
Example: "1"
Options: [ "1", "2" ]
webhook_event_failover_url
string (url)
optional

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

Default: ""
Example: "https://failover.example.com"
webhook_timeout_secs
integer (0 - 30)
optional

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

Default: null
Example: 25
Responses
201

Successful response with details about a call control application.

422

Bad Request

Success Response
{
  "data": {
    "active": false,
    "anchorsite_override": "\"Latency\"",
    "application_name": "call-router",
    "created_at": "2018-02-02T22:25:27.521Z",
    "dtmf_type": "Inband",
    "first_command_timeout": true,
    "first_command_timeout_secs": 10,
    "id": "1293384261075731499",
    "inbound": {
      "channel_limit": 10,
      "sip_subdomain": "example",
      "sip_subdomain_receive_settings": "only_my_connections"
    },
    "outbound": {
      "channel_limit": 10,
      "outbound_voice_profile_id": "1293384261075731499"
    },
    "record_type": "call_control_application",
    "updated_at": "2018-02-02T22:25:27.521Z",
    "webhook_api_version": "1",
    "webhook_event_failover_url": "https://failover.example.com",
    "webhook_event_url": "https://example.com",
    "webhook_timeout_secs": 25
  }
}

Retrieve a call control applicationretrieveCallControlApplication

get https://api.telnyx.com/v2/call_control_applications/{id}

Retrieves the details of an existing call control application.

curl -X GET \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --globoff "https://api.telnyx.com/v2/call_control_applications/1293384261075731499"
Parameters
In path
id
string (int64)
required

Identifies the resource.

Example: "1293384261075731499"
Responses
200

Successful response with details about a call control application.

401

Unauthorized

404

Resource not found

422

Bad request

Success Response
{
  "data": {
    "active": false,
    "anchorsite_override": "\"Latency\"",
    "application_name": "call-router",
    "created_at": "2018-02-02T22:25:27.521Z",
    "dtmf_type": "Inband",
    "first_command_timeout": true,
    "first_command_timeout_secs": 10,
    "id": "1293384261075731499",
    "inbound": {
      "channel_limit": 10,
      "sip_subdomain": "example",
      "sip_subdomain_receive_settings": "only_my_connections"
    },
    "outbound": {
      "channel_limit": 10,
      "outbound_voice_profile_id": "1293384261075731499"
    },
    "record_type": "call_control_application",
    "updated_at": "2018-02-02T22:25:27.521Z",
    "webhook_api_version": "1",
    "webhook_event_failover_url": "https://failover.example.com",
    "webhook_event_url": "https://example.com",
    "webhook_timeout_secs": 25
  }
}

Update a call control applicationupdateCallControlApplication

patch https://api.telnyx.com/v2/call_control_applications/{id}

Updates settings of an existing call control application.

curl -X PATCH \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --data '{"application_name":"call-router","webhook_event_url":"https://example.com"}' \
  https://api.telnyx.com/v2/call_control_applications/1293384261075731499
Parameters
In path
id
string (int64)
required

Identifies the resource.

Example: "1293384261075731499"
In body (application/json)
application_name
string
required

A user-assigned name to help manage the application.

Example: "call-router"
webhook_event_url
string (url)
required

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

Example: "https://example.com"
active
boolean
optional

Specifies whether the connection can be used.

Default: true
anchorsite_override
string
optional

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.

Default: "\"Latency\""
Example: "\"Amsterdam, Netherlands\""
Options: [ "\"Latency\"", "\"Chicago, IL\"", "\"Ashburn, VA\"", "\"San Jose, CA\"" ]
dtmf_type
string
optional

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.

Default: "RFC 2833"
Example: "Inband"
Options: [ "RFC 2833", "Inband", "SIP INFO" ]
first_command_timeout
boolean
optional

Specifies whether calls to phone numbers associated with this connection should hangup after timing out.

Default: false
Example: true
first_command_timeout_secs
integer
optional

Specifies how many seconds to wait before timing out a dial command.

Default: 30
Example: 10
inbound
object
optional
outbound
object
optional
webhook_api_version
string
optional

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

Default: "1"
Example: "1"
Options: [ "1", "2" ]
webhook_event_failover_url
string (url)
optional

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

Default: ""
Example: "https://failover.example.com"
webhook_timeout_secs
integer (0 - 30)
optional

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

Default: null
Example: 25
Responses
200

Successful response with details about a call control application.

401

Unauthorized

404

Resource not found

422

Bad request

Success Response
{
  "data": {
    "active": false,
    "anchorsite_override": "\"Latency\"",
    "application_name": "call-router",
    "created_at": "2018-02-02T22:25:27.521Z",
    "dtmf_type": "Inband",
    "first_command_timeout": true,
    "first_command_timeout_secs": 10,
    "id": "1293384261075731499",
    "inbound": {
      "channel_limit": 10,
      "sip_subdomain": "example",
      "sip_subdomain_receive_settings": "only_my_connections"
    },
    "outbound": {
      "channel_limit": 10,
      "outbound_voice_profile_id": "1293384261075731499"
    },
    "record_type": "call_control_application",
    "updated_at": "2018-02-02T22:25:27.521Z",
    "webhook_api_version": "1",
    "webhook_event_failover_url": "https://failover.example.com",
    "webhook_event_url": "https://example.com",
    "webhook_timeout_secs": 25
  }
}

Delete a call control applicationdeleteCallControlApplication

delete https://api.telnyx.com/v2/call_control_applications/{id}

Deletes a call control application.

curl -X DELETE \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  "https://api.telnyx.com/v2/call_control_applications/1293384261075731499"
Parameters
In path
id
string (int64)
required

Identifies the resource.

Example: "1293384261075731499"
Responses
200

Successful response with details about a call control application.

401

Unauthorized

404

Resource not found

422

Bad request

Success Response
{
  "data": {
    "active": false,
    "anchorsite_override": "\"Latency\"",
    "application_name": "call-router",
    "created_at": "2018-02-02T22:25:27.521Z",
    "dtmf_type": "Inband",
    "first_command_timeout": true,
    "first_command_timeout_secs": 10,
    "id": "1293384261075731499",
    "inbound": {
      "channel_limit": 10,
      "sip_subdomain": "example",
      "sip_subdomain_receive_settings": "only_my_connections"
    },
    "outbound": {
      "channel_limit": 10,
      "outbound_voice_profile_id": "1293384261075731499"
    },
    "record_type": "call_control_application",
    "updated_at": "2018-02-02T22:25:27.521Z",
    "webhook_api_version": "1",
    "webhook_event_failover_url": "https://failover.example.com",
    "webhook_event_url": "https://example.com",
    "webhook_timeout_secs": 25
  }
}
Previous: Overview

Was this section helpful?