Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

You can test API methods on the interactive API browser page and without writing code
Some of the resources described on the page may not be available by default due to the type of application (see Creating and authorizing applications).

The resource allows you to use the API to link multiple extensions. The main extension number will be reflected in statistics and events, and only when the main extension is called, the associated extensions will be called. If the associated extension number is called, only it will be called. When making an outgoing call from the associated extension, the outgoing call from the main extension will be emulated.

Table of Contents

Manage bundle via Phone Terminal (/phone/) .

Synchronization parameters of extensions in “bundle“

Anchor
bundle_sync_params
bundle_sync_params

Info

Synchronizing parameters of extensions in “bundle“

phone resource fields:
"record_transfer", "ringback_sound", "geo_list", "record_enabled", "hold_music", "announce_sound_upon_outgoing_call", "announce_sound_upon_incoming_call", "conference_pin", "conference_announce_caller_name", "conference_end_on_exit", "record_format", "record_stereo", ”incoming_limit”

extension resource fields:
"status", "dial_rule_id", "dial_rule_limit"

  1. When creating a "bundle", the parameters of the associated extension are overwritten according to the main

  2. When updating the parameters on any of the extensions in the “bundle”, the parameters of the other extensions in the “bundle” are also updated

  3. Nothing happens when extension in “bundle“ is removed

"Bundle" resources

Expand
titlePOST /client/{client_id}/extensions_bundle/{extension_id}

POST /client/{client_id}/extensions_bundle/{extension_id}

The POST resource allows you to set a list of related extensions for the main one specified in the extension_id. The extension_id specified in the path must be the ID of the internal number of the ‘phone' type.

URL Parameters

Name

Type

extension_id

string

Json parameters

Name

Type

Description

extension_id

array

Set a list of extension IDs to associate them with the main extension that was specified in the request path as extension_id.

The specified extensions must be of the phone type, must not be other main extensions, and must not be associated with any other extension.

Response fields

Name

Type

Description

bundle_list

array

List of related extension numbers

bundle_id

int

id of the main extension

Expand
titleGET /client/{client_id}/extensions_bundle/{extension_id}

GET /client/{client_id}/extensions_bundle/{extension_id}

The GET resource allows you to get a list of related extensions. The extension_id specified in the path must be the ID of the internal number of the ‘phone' type.

URL Parameters

Name

Type

extension_id

string

Response fields

Name

Type

Description

bundle_list

array

List of related extension numbers

bundle_id

int

id of the main extension

Expand
titleDELETE /client/{client_id}/extensions_bundle/{extension_id}

DELETE /client/{client_id}/extensions_bundle/{extension_id}

The DELETE resource allows you to untie the extensions from the main one. The extension_id specified in the path must be the ID of the internal number of the ‘phone' type.

URL Parameters

Name

Type

extension_id

string

Response fields

Name

Type

Description

bundle_list

array

List of related extension numbers

bundle_id

int

id of the main extension

Usage example

For example, client_id=801, where the main extension number is extension_id=31456 and the list of associated extensions contains the id: 32486, 32767

Tabs[{"content":{"version":1,"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"In the "},{"type":"text","text":"authentication ","marks":[{"type":"strong"}]},{"type":"text","text":"section enter the "},{"type":"text","text":"Application_ID","marks":[{"type":"strong"}]},{"type":"text","text":" and "},{"type":"text","text":"Application_Secret","marks":[{"type":"strong"}]},{"type":"text","text":" values obtained during the application registration in the "},{"type":"text","text":"client_id ","marks":[{"type":"strong"}]},{"type":"text","text":"and "},{"type":"text","text":"client_secret","marks":[{"type":"strong"}]},{"type":"text","text":" fields, then click on the \""},{"type":"text","text":"Try it out!","marks":[{"type":"strong"}]},{"type":"text","text":"\" button. If the application data is correct, an access token ("},{"type":"text","text":"access_token","marks":[{"type":"strong"}]},{"type":"text","text":") will be returned in response. The received access token should be entered into the \""},{"type":"text","text":"Access Token Field","marks":[{"type":"strong"}]},{"type":"text","text":"\" at the top of the page and saved by clicking the \""},{"type":"text","text":"Set Token","marks":[{"type":"strong"}]},{"type":"text","text":"\" button."}]},{"type":"table","attrs":{"isNumberColumnEnabled":false,"layout":"default"},"content":[{"type":"tableRow","content":[{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"Method","marks":[{"type":"strong"}]}]}]},{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"Resourse","marks":[{"type":"strong"}]}]}]},{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"Data","marks":[{"type":"strong"}]}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"POST"}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"heading","attrs":{"level":3},"content":[{"type":"text","text":"/client/801/extensions_bundle/31456","marks":[{"type":"strong"}]}]},{"type":"paragraph","content":[{"type":"text","text":" "}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"{","marks":[{"type":"code"}]},{"type":"hardBreak"},{"type":"text","text":"\"bundle_list\": [32486, 32767]","marks":[{"type":"code"}]},{"type":"hardBreak"},{"type":"text","text":"}","marks":[{"type":"code"}]}]}]}]}]},{"type":"paragraph","content":[]}]},"id":"c868add5-5fe4-4987-ba3a-ce2d6be8aef4","label":"Interactive API Browser","type":"tab"},{"content":{"version":1,"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"To send requests using the cURL program, set the values of the "},{"type":"text","text":"url ","marks":[{"type":"strong"}]},{"type":"text","text":"and "},{"type":"text","text":"access_token","marks":[{"type":"strong"}]},{"type":"text","text":" variables:"}]},{"type":"paragraph","content":[{"type":"text","text":"export url=\"https://<hostname>/api/ver1.0\"","marks":[{"type":"code"}]},{"type":"text","text":" "},{"type":"hardBreak"},{"type":"text","text":"(where the hostname — is the hostname of the API-server provider of IP-telephony),"}]},{"type":"paragraph","content":[{"type":"text","text":"export access_token=\"8SNsrS0jV35vfmKqKeKtRrHfpbg4UX\"","marks":[{"type":"code"}]},{"type":"text","text":" "},{"type":"hardBreak"},{"type":"text","text":"(the received access token)."}]},{"type":"paragraph","content":[{"type":"text","text":"Send a request:"}]},{"type":"codeBlock","attrs":{"language":"shell"},"content":[{"type":"text","text":"curl -H \"Authorization: Bearer ${access_token}\" -H \"Content-Type: application/json\" -d '{\"bundle_list\": [32486, 32767]}' -X POST ${url}/client/801/extensions_bundle/31456"}]}]},"id":"8a61d502-f201-46c5-b6ba-1f49a8b83ae4","label":"cURL Program","type":"tab"},{"content":{"version":1,"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"To send requests in Python, set the values of the variables URL and ACCESS_TOKEN:"}]},{"type":"paragraph","content":[{"type":"text","text":"URL = \"https://<hostname>/api/ver1.0\"","marks":[{"type":"code"}]},{"type":"hardBreak"},{"type":"text","text":"(where the hostname — is the hostname of the API-server provider of IP-telephony),"}]},{"type":"paragraph","content":[{"type":"text","text":"ACCESS_TOKEN = \"8SNsrS0jV35vfmKqKeKtRrHfpbg4UX\"","marks":[{"type":"code"}]},{"type":"hardBreak"},{"type":"text","text":"(the received access token)."}]},{"type":"codeBlock","attrs":{"language":"python"},"content":[{"type":"text","text":"#!/usr/bin/python\n\nimport requests\n\nurl = f'/client/801/extensions_bundle/31456'\nheaders = {\n 'Authorization': f'Bearer {ACCESS_TOKEN}',\n 'Content-Type': 'application/json'\n}\ndata = '''{\"bundle_list\": [32486, 32767]}'''\nresponse = requests.post(url, headers=headers, data=data)\nprint(response.text)"}]}]},"id":"fad4c18b-7ac1-4f6d-a5f9-fa48971a21d1","label":"In Python3","type":"tab"}]