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 context is a pre-formed set of rules that can be referenced in the settings. Each context contains the following options:
start - describes the actions when entering the context;
timeout - describes the actions when a timeout occurs (the client did not make any choice during the specified period of time);
invalid – actions that occur when the client selects an option that is not configured.
In addition to the required context options, additional ones can be added (for example, what happens when you type the sequence "100"). All options perform the hangup (hang up) action by default, and this action must be overridden to set the required logic.
The so-called "entry_context" is assigned to the IVR - it gets a call after coming to the voice menu. It can also be called the main context.
The type of voice greeting can be 'background' or 'foreground'. In the case of "background", the system is ready to accept the tone set at any time, and "foreground" obliges the user to listen to the recording until the end and only then make a choice (if the possibility of such a choice is configured).
Description of data structures
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Expand | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||
|
Expand | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
|
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Expand | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
|
Examples
For a client with a unique ID 12, you need to create a voice menu (IVR) with the number "071", when entering which the following rules apply:
Play the foreground music file "advertising.wav" 1 time;
Play the background music file "hello.wav" and, if the client does not select it, automatically transfer it to the internal number 050;
When dialing "1", the call is transferred to the mobile phone +7(987)6543210;
When you dial "2", the call is transferred to the internal number 002;
Allow direct dialing of three-digit internal numbers.
1. Using the Sound Files resource (/sound/), you need to download the hello.wav and advertising.wav files:
…
…
…
System response:
Code Block |
---|
{
"id": 51,
"client_id": 12,
"title": "my welcome file",
"dealer_id": null,
"filename": "hello.wav"
} |
Code Block |
---|
{
"id": 52,
"client_id": 12,
"title": "my ad file",
"dealer_id": null,
"filename": "advertising.wav"
} |
IDs of new files: hello.wav "id": 51; advertising.wav "id": 52
2. Using the resource Internal number (/extension/), create an internal number of the type " IVR":
…
…
…
System response:
Code Block |
---|
{
"status": "active",
"domain": " ",
"create_date": "2020-03-20 17:11:10",
"name": "000*071",
"dial_rule_limit": null,
"extension_group_id": null,
"label": "test IVR",
"caller_id_name": null,
"client_id": 12,
"extra_params": null,
"message_did": null,
"dial_rule_id": null,
"ani_rfc3325": false,
"type": "ivr",
"id": 204,
"did_as_transfer_caller_id": null
} |
ID of the new internal number "id": 204
3. Create a context that will be the main one (entry_context):
…
…
…
System response:
Code Block |
---|
{
"name": "Main context",
"inter_digit_timeout": 2000,
"timeout": 5000,
"extra_params": null,
"allow_any_dial": true,
"id": 1,
"digit_len": 3,
"description": null
} |
Context ID "id": 1
4. Now you can bind this context as the main one to our IVR, at the same time we specify "sleep-time", which allows you to set a pause from the arrival of the call in the IVR before the start of any actions of the "entry_context" context":
…
…
…
System response:
Code Block |
---|
{
"lifetime_exp_action": "hangup",
"entry_context": 1,
"lifetime_exp_transfer_dst": null,
"vm_enabled": false,
"vm_greeting": null,
"lifetime": 1800,
"vm_attach_file": true,
"sleep_time": 5000,
"vm_mailto": null
} |
5. As noted earlier, each context already has a “start” option. Let's configure it to play the foreground music file "advertising.wav":
…
…
…
Expand | ||
---|---|---|
| ||
|
6. Next, play the hello.wav file in the background by analogy:
…
…
…
Expand | ||
---|---|---|
| ||
|
7. Now, in the "Main Context" context, we will add the ability to process the selection " 1":
…
…
…
Expand | ||
---|---|---|
| ||
|
8. And we will indicate what action should be performed when selecting "1" - transfer to mobile +7(987)6543210:
…
…
…
title | System response: |
---|
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":"Resource","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":"paragraph","content":[{"type":"text","text":"/client/@me/sound/"}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"{"},{"type":"hardBreak"},{"type":"text","text":"”file”: ”hello.wav“,"},{"type":"hardBreak"},{"type":"text","text":"”title”: “my greeting file“"},{"type":"hardBreak"},{"type":"text","text":"}"}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"POST"}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"/client/@me/sound/"}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"{"},{"type":"hardBreak"},{"type":"text","text":"”file”: “advertising.wav“,"},{"type":"hardBreak"},{"type":"text","text":"”title”: “my advertising file“"},{"type":"hardBreak"},{"type":"text","text":"}"}]}]}]}]},{"type":"paragraph","content":[]}]},"id":"b222e13c-9680-46d4-8bfc-0c4690a68e26","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 \\\n-H \"Authorization: Bearer ${access_token}\" \\\n-F file=@hello.wav \\\n-F \"title=мой файл приветствия\" \\\n-X POST ${url}/client/@me/sound/"}]},{"type":"codeBlock","attrs":{"language":"shell"},"content":[{"type":"text","text":"curl \\\n-H \"Authorization: Bearer ${access_token}\" \\\n-F file=@advertising.wav \\\n-F \"title=мой файл рекламы\" \\\n-X POST ${url}/client/@me/sound/"}]}]},"id":"cec048c8-e769-4ced-867b-e82e463821db","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\nimport json\n\nurl = f'{URL}/client/@me/sound/'\nheaders = {\n 'Authorization': f'Bearer {ACCESS_TOKEN}',\n 'content-type': 'application/json'\n}\nfiles = {'file': open('hello.wav', 'rb')}\ndata = {'title': 'мой файл приветствия'}\nresponse = requests.post(url, headers=headers, files=files, data=json.dumps(data))\nprint(response.text)"}]},{"type":"codeBlock","attrs":{"language":"python"},"content":[{"type":"text","text":"#!/usr/bin/python\n\nimport requests\nimport json\n\nurl = f'{URL}/client/@me/sound/'\nheaders = {\n 'Authorization': f'Bearer {ACCESS_TOKEN}',\n 'content-type': 'application/json'\n}\nfiles = {'file': open('advertising.wav', 'rb')}\ndata = {'title': 'мой файл рекламы'}\nresponse = requests.post(url, headers=headers, files=files, data=json.dumps(data))\nprint(response.text)"}]}]},"id":"b4d87dfd-9fde-4674-88c5-dc97daf4bf44","label":"In Python3","type":"tab"}] |
System response:
Code Block | ||
---|---|---|
| ||
{
"id": 51,
"client_id": 12,
"title": "my welcome file",
"dealer_id": null,
"filename": "hello.wav"
} |
Code Block | ||
---|---|---|
| ||
{
"id": 52,
"client_id": 12,
"title": "my ad file",
"dealer_id": null,
"filename": "advertising.wav"
} |
IDs of new files: hello.wav "id": 51; advertising.wav "id": 52
2. Using the resource Internal number (/extension/), create an internal number of the type " IVR":
Tabs |
---|
[{"content":{"version":1,"type":"doc","content":[{"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":"Resource","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":"paragraph","content":[{"type":"text","text":"/client/@me/extension/"}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"{"},{"type":"hardBreak"},{"type":"text","text":"\"status\": \"active\","},{"type":"hardBreak"},{"type":"text","text":"\"name\": \"071\","},{"type":"hardBreak"},{"type":"text","text":"\"label\": \"test IVR\","},{"type":"hardBreak"},{"type":"text","text":"\"type\": \"ivr\""},{"type":"hardBreak"},{"type":"text","text":"}"}]}]}]}]},{"type":"paragraph","content":[]}]},"id":"02599fd0-9db5-4706-8f77-fe788de62d34","label":"Interactive API Browser ","type":"tab"},{"content":{"version":1,"type":"doc","content":[{"type":"codeBlock","attrs":{"language":"shell"},"content":[{"type":"text","text":"curl \\\n-H \"Authorization: Bearer ${access_token}\" \\\n-H \"Content-Type: application/json\" \\\n-d '{\n \"status\": \"active\",\n \"name\": \"071\",\n \"label\": \"test IVR\",\n \"type\": \"ivr\"\n}' \\\n-X POST ${url}/client/@me/extension/"}]}]},"id":"74cfb074-4fb2-4a7a-8b3b-0e663c54ae96","label":"cURL Program ","type":"tab"},{"content":{"version":1,"type":"doc","content":[{"type":"codeBlock","attrs":{"language":"python"},"content":[{"type":"text","text":"#!/usr/bin/python\n\nimport requests\n\nurl = f'{URL}/client/@me/extension/'\nheaders = {\n 'Authorization': f'Bearer {ACCESS_TOKEN}',\n 'Content-Type': 'application/json'\n}\ndata = '''{\n \"status\": \"active\",\n \"name\": \"071\",\n \"label\": \"test IVR\",\n \"type\": \"ivr\"\n}'''\nresponse = requests.post(url, headers=headers, data=data)\nprint(response.text)"}]}]},"id":"557a5d5a-4a08-44cc-8efc-4edca4432414","label":"In Python3","type":"tab"}] |
System response:
Code Block | ||
---|---|---|
| ||
{
"status": "active",
"domain": "sip.ringme.ru",
"create_date": "2020-03-20 17:11:10",
"name": "000*071",
"dial_rule_limit": null,
"extension_group_id": null,
"label": "test IVR",
"caller_id_name": null,
"client_id": 12,
"extra_params": null,
"message_did": null,
"dial_rule_id": null,
"ani_rfc3325": false,
"type": "ivr",
"id": 204,
"did_as_transfer_caller_id": null
} |
ID of the new internal number "id": 204
3. Create a context that will be the main one (entry_context):
Tabs |
---|
[{"content":{"version":1,"type":"doc","content":[{"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":"Resource","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":"paragraph","content":[{"type":"text","text":"/extension/204/ivr/context/"}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":" {"},{"type":"hardBreak"},{"type":"text","text":"\"digit_len\": 3,"},{"type":"hardBreak"},{"type":"text","text":"\"allow_any_dial\": true,"},{"type":"hardBreak"},{"type":"text","text":"\"inter_digit_timeout\": 2000,"},{"type":"hardBreak"},{"type":"text","text":"\"name\": \"Main context\","},{"type":"hardBreak"},{"type":"text","text":"\"timeout\": 5000"},{"type":"hardBreak"},{"type":"text","text":"}"}]}]}]}]},{"type":"paragraph","content":[]}]},"id":"a42a44b2-2e44-4f6e-8d18-2eb3c4007a88","label":"Interactive API Browser","type":"tab"},{"content":{"version":1,"type":"doc","content":[{"type":"codeBlock","attrs":{"language":"shell"},"content":[{"type":"text","text":"curl \\\n-H \"Authorization: Bearer ${access_token}\" \\\n-H \"Content-Type: application/json\" \\\n-d '{\n \"digit_len\": 3,\n \"allow_any_dial\": true,\n \"inter_digit_timeout\": 2000,\n \"name\": \"Main context\",\n \"timeout\": 5000\n}' \\\n-X POST ${url}/extension/204/ivr/context/"}]}]},"id":"5b622b7d-a728-4041-94d3-0a8e00b24802","label":"cURL Program","type":"tab"},{"content":{"version":1,"type":"doc","content":[{"type":"codeBlock","attrs":{"language":"python"},"content":[{"type":"text","text":"#!/usr/bin/python\n\nimport requests\n\nurl = f'{URL}/extension/204/ivr/context/'\nheaders = {\n 'Authorization': f'Bearer {ACCESS_TOKEN}',\n 'Content-Type': 'application/json'\n}\ndata = '''{\n \"digit_len\": 3,\n \"allow_any_dial\": true,\n \"inter_digit_timeout\": 2000,\n \"name\": \"Main context\",\n \"timeout\": 5000\n}'''\nresponse = requests.post(url, headers=headers, data=data)\nprint(response.text)"}]}]},"id":"a1f4e027-932a-40f3-a003-2ed349f76b82","label":"In Python3","type":"tab"}] |
System response:
Code Block | ||
---|---|---|
| ||
{
"name": "Main context",
"inter_digit_timeout": 2000,
"timeout": 5000,
"extra_params": null,
"allow_any_dial": true,
"id": 1,
"digit_len": 3,
"description": null
} |
Context ID "id": 1
4. Now you can bind this context as the main one to our IVR, at the same time we specify "sleep-time", which allows you to set a pause from the arrival of the call in the IVR before the start of any actions of the "entry_context" context":
Tabs |
---|
[{"content":{"version":1,"type":"doc","content":[{"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":"Resource","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":"PUT"}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"/extension/204/ivr/"}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"{"},{"type":"hardBreak"},{"type":"text","text":"\"sleep_time\": 5000,"},{"type":"hardBreak"},{"type":"text","text":"\"entry_context\": 1"},{"type":"hardBreak"},{"type":"text","text":"}"}]}]}]}]},{"type":"paragraph","content":[]}]},"id":"3c3c7601-c185-460b-8011-e1641d0af169","label":"Interactive API Browser","type":"tab"},{"content":{"version":1,"type":"doc","content":[{"type":"codeBlock","attrs":{"language":"shell"},"content":[{"type":"text","text":"curl \\\n-H \"Authorization: Bearer ${access_token}\" \\\n-H \"Content-Type: application/json\" \\\n-d '{\n \"sleep_time\": 5000,\n \"entry_context\": 1\n}' \\\n-X PUT ${url}/extension/204/ivr/"}]}]},"id":"b365bb01-85d0-4f3b-a56b-642729722981","label":"cURL Program","type":"tab"},{"content":{"version":1,"type":"doc","content":[{"type":"codeBlock","attrs":{"language":"python"},"content":[{"type":"text","text":"#!/usr/bin/python\n\nimport requests\n\nurl = f'{URL}/extension/204/ivr/'\nheaders = {\n 'Authorization': f'Bearer {ACCESS_TOKEN}',\n 'Content-Type': 'application/json'\n}\ndata = '''{\n \"sleep_time\": 5000,\n \"entry_context\": 1\n}'''\nresponse = requests.put(url, headers=headers, data=data)\nprint(response.text)"}]}]},"id":"5e21f68b-6c2b-4229-9c93-ca59fb666435","label":"In Python3","type":"tab"}] |
System response:
Code Block | ||
---|---|---|
| ||
{
"lifetime_exp_action": "hangup",
"entry_context": 1,
"lifetime_exp_transfer_dst": null,
"vm_enabled": false,
"vm_greeting": null,
"lifetime": 1800,
"vm_attach_file": true,
"sleep_time": 5000,
"vm_mailto": null
} |
5. As noted earlier, each context already has a “start” option. Let's configure it to play the foreground music file "advertising.wav":
Tabs |
---|
[{"content":{"version":1,"type":"doc","content":[{"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":"Resource","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":"paragraph","content":[{"type":"text","text":"/extension/204/ivr/context/1/options/start/rules/"}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"{"},{"type":"hardBreak"},{"type":"text","text":"\"sound\": 52,"},{"type":"hardBreak"},{"type":"text","text":"\"sound_type\": \"foreground\","},{"type":"hardBreak"},{"type":"text","text":"\"action\": \"play_sound\""},{"type":"hardBreak"},{"type":"text","text":"}"}]}]}]}]},{"type":"paragraph","content":[]}]},"id":"f938a03f-261d-4c72-a55e-66a48756f517","label":"Interactive API Browser","type":"tab"},{"content":{"version":1,"type":"doc","content":[{"type":"codeBlock","attrs":{"language":"shell"},"content":[{"type":"text","text":"curl \\\n-H \"Authorization: Bearer ${access_token}\" \\\n-H \"Content-Type: application/json\" \\\n-d '{\n \"sound\": 52,\n \"sound_type\": \"foreground\",\n \"action\": \"play_sound\"\n}' \\\n-X POST ${url}/extension/204/ivr/context/1/options/start/rules/"}]}]},"id":"566b075a-9d61-4d52-8733-04bc3befdcd1","label":"cURL Program","type":"tab"},{"content":{"version":1,"type":"doc","content":[{"type":"codeBlock","attrs":{"language":"python"},"content":[{"type":"text","text":"#!/usr/bin/python\n\nimport requests\n\nurl = f'{URL}/extension/204/ivr/context/1/options/start/rules/'\nheaders = {\n 'Authorization': f'Bearer {ACCESS_TOKEN}',\n 'Content-Type': 'application/json'\n}\ndata = '''{\n \"sound\": 52,\n \"sound_type\": \"foreground\",\n \"action\": \"play_sound\"\n}'''\nresponse = requests.post(url, headers=headers, data=data)\nprint(response.text)"}]}]},"id":"7532e223-a4df-4d1e-8c0a-1d6d7380d18e","label":"In Python3","type":"tab"}] |
Expand | |||||
---|---|---|---|---|---|
| |||||
|
6. Next, play the hello.wav file in the background by analogy:
Tabs |
---|
[{"content":{"version":1,"type":"doc","content":[{"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":"Resource","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":"paragraph","content":[{"type":"text","text":"/extension/204/ivr/context/1/options/start/rules/"}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"{"},{"type":"hardBreak"},{"type":"text","text":"\"sound\": 51,"},{"type":"hardBreak"},{"type":"text","text":"\"sound_type\": \"background\","},{"type":"hardBreak"},{"type":"text","text":"\"action\": \"play_sound\""},{"type":"hardBreak"},{"type":"text","text":"}"}]}]}]}]},{"type":"paragraph","content":[]}]},"id":"88927b31-bc78-43c6-8ed2-0e186d20a0c4","label":"Interactive API Browser","type":"tab"},{"content":{"version":1,"type":"doc","content":[{"type":"codeBlock","attrs":{"language":"shell"},"content":[{"type":"text","text":"curl \\\n-H \"Authorization: Bearer ${access_token}\" \\\n-H \"Content-Type: application/json\" \\\n-d '{\n \"sound\": 51,\n \"sound_type\": \"background\",\n \"action\": \"play_sound\"\n}' \\\n-X POST ${url}/extension/204/ivr/context/1/options/start/rules/"}]}]},"id":"05bf7b04-00c6-47b7-bdae-43224eb78c4a","label":"cURL Program","type":"tab"},{"content":{"version":1,"type":"doc","content":[{"type":"codeBlock","attrs":{},"content":[{"type":"text","text":"#!/usr/bin/python\n\nimport requests\n\nurl = f'{URL}/extension/204/ivr/context/1/options/start/rules/'\nheaders = {\n 'Authorization': f'Bearer {ACCESS_TOKEN}',\n 'Content-Type': 'application/json'\n}\ndata = '''{\n \"sound\": 51,\n \"sound_type\": \"background\",\n \"action\": \"play_sound\"\n}'''\nresponse = requests.post(url, headers=headers, data=data)\nprint(response.text)"}]}]},"id":"153c1a48-ceaf-43b4-bffc-e0e578ca1629","label":"In Python3","type":"tab"}] |
Expand | |||||
---|---|---|---|---|---|
| |||||
|
7. Now, in the "Main Context" context, we will add the ability to process the selection " 1":
Tabs |
---|
[{"content":{"version":1,"type":"doc","content":[{"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":"Resource","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":"paragraph","content":[{"type":"text","text":"/extension/204/ivr/context/1/options/"}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"{"},{"type":"hardBreak"},{"type":"text","text":"\"digits\": \"1\""},{"type":"hardBreak"},{"type":"text","text":"}"}]}]}]}]},{"type":"paragraph","content":[]}]},"id":"ffa12515-fc08-4bed-a283-c252f5004d0b","label":"Interactive API Browser","type":"tab"},{"content":{"version":1,"type":"doc","content":[{"type":"codeBlock","attrs":{"language":"shell"},"content":[{"type":"text","text":"curl \\\n-H \"Authorization: Bearer ${access_token}\" \\\n-H \"Content-Type: application/json\" \\\n-d '{digits\": \"1\"}' \\\n-X POST ${url}/extension/204/ivr/context/1/options/"}]}]},"id":"e7d90646-d38e-427d-8837-247305ee797e","label":"cURL Program","type":"tab"},{"content":{"version":1,"type":"doc","content":[{"type":"codeBlock","attrs":{"language":"python"},"content":[{"type":"text","text":"#!/usr/bin/python\n\nimport requests\nimport json\n\nurl = f'{URL}/extension/204/ivr/context/1/options/'\nheaders = {\n 'Authorization': f'Bearer {ACCESS_TOKEN}',\n 'content-type': 'application/json'\n}\ndata = {\"digits\": \"1\"}\nresponse = requests.post(url, headers=headers, data=json.dumps(data))\nprint(response.text)"}]}]},"id":"a2baf9ed-37ab-49e9-8a8b-435a60377ae7","label":"In Python3","type":"tab"}] |
Expand | |||||
---|---|---|---|---|---|
| |||||
|
8. And we will indicate what action should be performed when selecting "1" - transfer to mobile +7(987)6543210:
Tabs |
---|
[{"content":{"version":1,"type":"doc","content":[{"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":"Resource","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":"paragraph","content":[{"type":"text","text":"/extension/204/ivr/context/1/options/1/rules/"}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"{"},{"type":"hardBreak"},{"type":"text","text":"\"transfer_dst\": \"+7987654321\","},{"type":"hardBreak"},{"type":"text","text":"\"action\": \"transfer\""},{"type":"hardBreak"},{"type":"text","text":"}"}]}]}]}]},{"type":"paragraph","content":[]}]},"id":"6e294d41-41cb-40c5-932f-f732e35bede3","label":"Interactive API Browser","type":"tab"},{"content":{"version":1,"type":"doc","content":[{"type":"codeBlock","attrs":{"language":"shell"},"content":[{"type":"text","text":"curl \\\n-H \"Authorization: Bearer ${access_token}\" \\\n-H \"Content-Type: application/json\" \\\n-d '{\n \"transfer_dst\": \"+7987654321\",\n \"action\": \"transfer\"\n}' \\\n-X POST ${url}/extension/204/ivr/context/1/options/1/rules/"}]}]},"id":"17c661ac-d72a-47ec-84d4-61217563034b","label":"cURL Program","type":"tab"},{"content":{"version":1,"type":"doc","content":[{"type":"codeBlock","attrs":{"language":"python"},"content":[{"type":"text","text":"#!/usr/bin/python\n\nimport requests\n\nurl = f'{URL}/extension/204/ivr/context/1/options/1/rules/'\nheaders = {\n 'Authorization': f'Bearer {ACCESS_TOKEN}',\n 'Content-Type': 'application/json'\n}\ndata = '''{\n \"transfer_dst\": \"+7987654321\",\n \"action\": \"transfer\"\n}'''\nresponse = requests.post(url, headers=headers, data=data)\nprint(response.text)"}]}]},"id":"c7e32cbb-ddc0-4a6f-b756-92bc283de1c3","label":"In Python3","type":"tab"}] |
Expand | |||||
---|---|---|---|---|---|
| |||||
|
9. By analogy, we will add a call to the internal number "002" by dialing "2":
Tabs |
---|
[{"content":{"version":1,"type":"doc","content":[{"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":"Resource","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":"paragraph","content":[{"type":"text","text":"/extension/204/ivr/context/1/options/"}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"{"},{"type":"hardBreak"},{"type":"text","text":"\"digits\": \"2\""},{"type":"hardBreak"},{"type":"text","text":"}"}]}]}]}]},{"type":"paragraph","content":[]}]},"id":"766a4c8d-fd0c-4bba-8a27-f411843f2f74","label":"Interactive API Browser","type":"tab"},{"content":{"version":1,"type":"doc","content":[{"type":"codeBlock","attrs":{"language":"shell"},"content":[{"type":"text","text":"curl \\\n-H \"Authorization: Bearer ${access_token}\" \\\n-H \"Content-Type: application/json\" \\\n-d '{digits\": \"2\"}' \\\n-X POST ${url}/extension/204/ivr/context/1/options/"}]}]},"id":"6154aae6-31a2-406d-aeab-88928233bf8d","label":"cURL Program","type":"tab"},{"content":{"version":1,"type":"doc","content":[{"type":"codeBlock","attrs":{"language":"python"},"content":[{"type":"text","text":"#!/usr/bin/python\n\nimport requests\nimport json\n\nurl = f'{URL}/extension/204/ivr/context/1/options/'\nheaders = {\n 'Authorization': f'Bearer {ACCESS_TOKEN}',\n 'content-type': 'application/json'\n}\ndata = {\"digits\": \"2\"}\nresponse = requests.post(url, headers=headers, data=json.dumps(data))\nprint(response.text)"}]}]},"id":"be1ee04e-1a9b-46fe-b804-e314021537c7","label":"In Python3","type":"tab"}] |
Expand | |||||
---|---|---|---|---|---|
| |||||
|
Tabs |
---|
[{"content":{"version":1,"type":"doc","content":[{"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":"Resource","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":"paragraph","content":[{"type":"text","text":"/extension/204/ivr/context/1/options/2/rules/"}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"{"},{"type":"hardBreak"},{"type":"text","text":"\"transfer_dst\": \"002\","},{"type":"hardBreak"},{"type":"text","text":"\"action\": \"transfer\""},{"type":"hardBreak"},{"type":"text","text":"}"}]}]}]}]},{"type":"paragraph","content":[]}]},"id":"0d19e36e-0835-499f-a979-7fbb232531fd","label":"Interactive API Browser","type":"tab"},{"content":{"version":1,"type":"doc","content":[{"type":"codeBlock","attrs":{"language":"shell"},"content":[{"type":"text","text":"curl \\\n-H \"Authorization: Bearer ${access_token}\" \\\n-H \"Content-Type: application/json\" \\\n-d '{\n \"transfer_dst\": \"002\",\n \"action\": \"transfer\"\n}' \\\n-X POST ${url}/extension/204/ivr/context/1/options/2/rules/"}]}]},"id":"d070608a-f037-4de9-9a7d-da46316c72d6","label":"cURL Program","type":"tab"},{"content":{"version":1,"type":"doc","content":[{"type":"codeBlock","attrs":{"language":"python"},"content":[{"type":"text","text":"#!/usr/bin/python\n\nimport requests\n\nurl = f'{URL}/extension/204/ivr/context/1/options/2/rules/'\nheaders = {\n 'Authorization': f'Bearer {ACCESS_TOKEN}',\n 'Content-Type': 'application/json'\n}\ndata = '''{\n \"transfer_dst\": \"002\",\n \"action\": \"transfer\"\n}'''\nresponse = requests.post(url, headers=headers, data=data)\nprint(response.text)"}]}]},"id":"1bf77555-dbc9-419e-8e41-67060b1040d5","label":"In Python3","type":"tab"}] |
Expand | |||||
---|---|---|---|---|---|
| |||||
|
10. If there is no choice, the call should be automatically transferred to the internal number "050". As already noted, there is a "timeout" option in the context, with which you can set this action:
Tabs |
---|
[{"content":{"version":1,"type":"doc","content":[{"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":"Resource","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":"paragraph","content":[{"type":"text","text":"/ivr/144/context/2/options/timeout/rules/"}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"{"},{"type":"hardBreak"},{"type":"text","text":"\"transfer_dst\": \"050\","},{"type":"hardBreak"},{"type":"text","text":"\"action\": \"transfer\""},{"type":"hardBreak"},{"type":"text","text":"}"}]}]}]}]},{"type":"paragraph","content":[]}]},"id":"5f398732-8624-4c2e-b8f2-33c9e1b1b278","label":"Interactive API Browser","type":"tab"},{"content":{"version":1,"type":"doc","content":[{"type":"codeBlock","attrs":{"language":"shell"},"content":[{"type":"text","text":"curl \\\n-H \"Authorization: Bearer ${access_token}\" \\\n-H \"Content-Type: application/json\" \\\n-d '{\n \"transfer_dst\": \"050\",\n \"action\": \"transfer\"\n}' \\\n-X POST ${url}/ivr/144/context/2/options/timeout/rules/"}]}]},"id":"f2831969-bd3a-472f-ae7c-dab4872cec9f","label":"cURL Program","type":"tab"},{"content":{"version":1,"type":"doc","content":[{"type":"codeBlock","attrs":{"language":"python"},"content":[{"type":"text","text":"#!/usr/bin/python\n\nimport requests\n\nurl = f'{URL}/ivr/144/context/2/options/timeout/rules/'\nheaders = {\n 'Authorization': f'Bearer {ACCESS_TOKEN}',\n 'Content-Type': 'application/json'\n}\ndata = '''{\n \"transfer_dst\": \"050\",\n \"action\": \"transfer\"\n}'''\nresponse = requests.post(url, headers=headers, data=data)\nprint(response.text)"}]}]},"id":"19cbffd1-e828-42c7-b89a-2aaf64bc6e9d","label":"In Python3","type":"tab"}] |
Expand | |||||
---|---|---|---|---|---|
| |||||
|
|
|
|
|
9. By analogy, we will add a call to the internal number "002" by dialing "2":
…
…
…
Expand | ||
---|---|---|
| ||
|
…
…
…
Expand | ||
---|---|---|
| ||
|
10. If there is no choice, the call should be automatically transferred to the internal number "050". As already noted, there is a "timeout" option in the context, with which you can set this action:
…
…
…
Expand | ||
---|---|---|
| ||
|
11. As a result, you can view all the available context options:
…
…
…
System response:
code11. As a result, you can view all the available context options:
Tabs |
---|
[{"content":{"version":1,"type":"doc","content":[{"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":"Resource","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":"GET"}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"/extension/204/ivr/context/1/options/"}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":" "}]}]}]}]},{"type":"paragraph","content":[]}]},"id":"bf9f5935-be1d-4fa9-9f68-c3a0bba981f4","label":"Interactive API Browser","type":"tab"},{"content":{"version":1,"type":"doc","content":[{"type":"codeBlock","attrs":{"language":"shell"},"content":[{"type":"text","text":"curl \\\n-H \"Authorization: Bearer ${access_token}\" \\\n-X GET ${url}/extension/204/ivr/context/1/options/"}]}]},"id":"005b5f67-e802-43e5-b482-b888f53846ed","label":"cURL Program","type":"tab"},{"content":{"version":1,"type":"doc","content":[{"type":"codeBlock","attrs":{"language":"python"},"content":[{"type":"text","text":"#!/usr/bin/python\n\nimport requests\n\nurl = f'{URL}/extension/204/ivr/context/1/options/'\nheaders = {\n 'Authorization': f'Bearer {ACCESS_TOKEN}'\n}\nresponse = requests.get(url, headers=headers)\nprint(response.text)"}]}]},"id":"b6536d49-1ddd-445f-b9f2-395c770bd748","label":"In Python3","type":"tab"}] |
System response:
Code Block | ||
---|---|---|
| ||
[ { "digits": "start" }, { "digits": "timeout" }, { "digits": "invalid" }, { "digits": "2" }, { "digits": "1" } ] |
Resources of the section "Voice menu (ivr)"
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
PUT /extension/{extension_id}/ivr/ Update the voice menu configuration URL Parameters
JSON parameters
Response fields
|
Expand | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||
GET /extension/{extension_id}/ivr/ Get the voice menu configuration URL Parameters
Response fields
|
Expand | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||
POST /extension/{extension_id}/ivr/context/ Add voice menu context URL Parameters
JSON parameters
Response fields
|
Expand | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||
GET /extension/{extension_id}/ivr/context/ Get a list of voice menu contexts URL Parameters
Response fields
|
Expand | ||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||
PUT /extension/{extension_id}/ivr/context/{context_id} Update the voice menu context URL Parameters
JSON parameters
Response fields
|
Expand | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
GET /extension/{extension_id}/ivr/context/{context_id} Get the voice menu context URL Parameters
Response fields
|
Expand | ||||||
---|---|---|---|---|---|---|
| ||||||
DELETE /extension/{extension_id}/ivr/context/{context_id} Delete the voice menu context URL Parameters
|
Expand | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||
POST /extension/{extension_id}/ivr/context/{context_id}/options/ Add a voice menu context option URL Parameters
JSON parameters
Response fields
|
Expand | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
GET /extension/{extension_id}/ivr/context/{context_id}/options/ Get a list of voice menu context options URL Parameters
Response fields
|
Expand | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
DELETE /extension/{extension_id}/ivr/context/{context_id}/options/{option_digits} Remove the voice menu context option URL Parameters
|
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
POST /extension/{extension_id}/ivr/context/{context_id}/options/{option_digits}/rules/ Add a voice menu context rule URL Parameters
JSON parameters
Response fields
|
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GET /extension/{extension_id}/ivr/context/{context_id}/options/{option_digits}/rules/ Get a list of voice menu context rules URL Parameters
Response fields
|
Expand | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||
PUT /extension/{extension_id}/ivr/context/{context_id}/options/{option_digits}/rules/order/ Update the order of the voice menu context options rules URL Parameters
JSON parameters
Response fields
|
Expand | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
GET /extension/{extension_id}/ivr/context/{context_id}/options/{option_digits}/rules/order/ Get the order of the voice menu context options rules URL Parameters
Response fields
|
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PUT /extension/{extension_id}/ivr/context/{context_id}/options/{option_digits}/rules/{rule_id} Update a voice menu context rule URL Parameters
JSON parameters
Response fields
|
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GET /extension/{extension_id}/ivr/context/{context_id}/options/{option_digits}/rules/{rule_id} Get a voice menu context rule URL Parameters
Response fields
|
Expand | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
DELETE /extension/{extension_id}/ivr/context/{context_id}/options/{option_digits}/rules/{rule_id} Delete a voice menu context rule URL Parameters
|