Протестировать методы API можно на странице интерактивного обозревателя API и без написания кода
Некоторые ресурсы, описанные на странице, по умолчанию могут быть не доступны из-за типа приложения (см. Создание и авторизация приложений)
Контекст представляет собой заранее сформированный набор правил, на которые можно сослаться в настройках. Каждый контекст содержит следующие опции:
start – описывает действия при вхождении в контекст;
timeout – описывает действия при наступлении тайм-аута (клиент не сделал никакого выбора в течении заданного промежутка времени);
invalid – действия, наступающие при выборе клиентом опции, которая не сконфигурирована.
В дополнение к обязательным опциям контекста могут быть добавлены дополнительные (например, что происходит при наборе последовательности "100"). Все опции по умолчанию выполняют действие hangup (повесить трубку), и это действие должно быть переопределено для задания необходимой логики.
За IVR закреплен так называемый "entry_context" – в него попадает вызов после прихода в голосовое меню. Его еще можно назвать главным контекстом.
Тип звучания голосового приветствия может быть 'background' или 'foreground'. В случае "background" система готова принимать тональный набор в любой момент, а 'foreground' обязывает пользователя прослушать запись до конца и лишь после этого делать выбор (если возможность такого выбора сконфигурирована).
Описание структур данных
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Expand | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||
|
Expand | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
|
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Expand | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
|
Примеры
Для клиента с уникальным идентификатором 12 нужно создать голосовое меню (IVR) с номером "071", при попадании в которое действуют следующие правила:
Проиграть foreground музыкальный файл "advertising.wav" 1 раз;
Проиграть background музыкальный файл "hello.wav" и в случае отсутствия выбора клиента автоматически переводить на внутренний номер 050;
При наборе "1" происходит перевод вызова на мобильный +7(987)6543210;
При наборе "2" происходит перевод вызова на внутренний номер 002;
Позволять прямой набор трехзначных внутренних номеров.
1. Используя ресурс Звуковые файлы (/sound/), необходимо загрузить файлы hello.wav и advertising.wav:
Tabs |
---|
[{"content":{"version":1,"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"В разделе "},{"type":"text","text":"authentication","marks":[{"type":"strong"}]},{"type":"text","text":" в поля "},{"type":"text","text":"client_id","marks":[{"type":"strong"}]},{"type":"text","text":" и "},{"type":"text","text":"client_secret","marks":[{"type":"strong"}]},{"type":"text","text":" требуется ввести полученные при регистрации приложения значения "},{"type":"text","text":"Application_ID","marks":[{"type":"strong"}]},{"type":"text","text":" и "},{"type":"text","text":"Application_Secret","marks":[{"type":"strong"}]},{"type":"text","text":", затем нажать на кнопку \""},{"type":"text","text":"Try it out!","marks":[{"type":"strong"}]},{"type":"text","text":"\". Если данные приложения верны, в ответ вернётся токен доступа ("},{"type":"text","text":"access_token","marks":[{"type":"strong"}]},{"type":"text","text":"). Полученный токен доступа следует ввести в поле \""},{"type":"text","text":"Access Token Field","marks":[{"type":"strong"}]},{"type":"text","text":"\" вверху страницы и сохранить его нажатием кнопки \""},{"type":"text","text":"Set Token","marks":[{"type":"strong"}]},{"type":"text","text":"\"."}]},{"type":"table","attrs":{"isNumberColumnEnabled":false,"layout":"default"},"content":[{"type":"tableRow","content":[{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"метод","marks":[{"type":"strong"}]}]}]},{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"ресурс","marks":[{"type":"strong"}]}]}]},{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"данные","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”: “мой файл приветствия“"},{"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”: “мой файл рекламы“"},{"type":"hardBreak"},{"type":"text","text":"}"}]}]}]}]},{"type":"paragraph","content":[]}]},"id":"f42b5457-6dc8-41c4-9ba9-b0514c21d2f7","label":"Интерактивный обозреватель API ","type":"tab"},{"content":{"version":1,"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"Для отправки запросов с помощью программы cURL установим значения переменных "},{"type":"text","text":"url ","marks":[{"type":"strong"}]},{"type":"text","text":"и "},{"type":"text","text":"access_token","marks":[{"type":"strong"}]},{"type":"text","text":":"}]},{"type":"paragraph","content":[{"type":"text","text":"export url=\"https://<hostname>/api/ver1.0\"","marks":[{"type":"code"}]},{"type":"text","text":" "},{"type":"hardBreak"},{"type":"text","text":"(где hostname — hostname API-сервера провайдера IP-телефонии),"}]},{"type":"paragraph","content":[{"type":"text","text":"export access_token=\"8SNsrS0jV35vfmKqKeKtRrHfpbg4UX\"","marks":[{"type":"code"}]},{"type":"text","text":" "},{"type":"hardBreak"},{"type":"text","text":"(полученный токен доступа)."}]},{"type":"paragraph","content":[{"type":"text","text":"Отправим запросы:"}]},{"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":"c869fd43-37f9-4cbb-a330-d6d0fe373494","label":"Программа cURL ","type":"tab"},{"content":{"version":1,"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"Для отправки запросов на языке Python установим значения переменных URL и ACCESS_TOKEN:"}]},{"type":"paragraph","content":[{"type":"text","text":"URL = \"https://<hostname>/api/ver1.0\"","marks":[{"type":"code"}]},{"type":"hardBreak"},{"type":"text","text":"(где hostname — hostname API-сервера провайдера IP-телефонии),"}]},{"type":"paragraph","content":[{"type":"text","text":"ACCESS_TOKEN = \"8SNsrS0jV35vfmKqKeKtRrHfpbg4UX\"","marks":[{"type":"code"}]},{"type":"hardBreak"},{"type":"text","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}',\r\n 'content-type': 'application/json'\n}\nfiles = {'file': open('hello.wav', 'rb')}\r\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}',\r\n 'content-type': 'application/json'\n}\nfiles = {'file': open('advertising.wav', 'rb')}\r\ndata = {'title': 'мой файл рекламы'}\nresponse = requests.post(url, headers=headers, files=files, data=json.dumps(data))\nprint(response.text)"}]}]},"id":"9d7d29e3-b36e-42f6-b9ca-226e291013a4","label":"На языке Python3 ","type":"tab"}] |
Ответ системы:
Code Block | ||
---|---|---|
| ||
{ "id": 51, "client_id": 12, "title": "мой файл приветствия", "dealer_id": null, "filename": "hello.wav" } |
Code Block | ||
---|---|---|
| ||
{ "id": 52, "client_id": 12, "title": "мой файл рекламы", "dealer_id": null, "filename": "advertising.wav" } |
Идентификаторы новых файлов: hello.wav "id": 51; advertising.wav "id": 52
2. Используя ресурс Внутренний номер (/extension/), создать внутренний номер типа "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":"метод","marks":[{"type":"strong"}]}]}]},{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"ресурс","marks":[{"type":"strong"}]}]}]},{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"данные","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":"/"},{"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\": \"тестовый IVR\","},{"type":"hardBreak"},{"type":"text","text":"\"type\": \"ivr\""},{"type":"hardBreak"},{"type":"text","text":"}"}]}]}]}]},{"type":"paragraph","content":[]}]},"id":"2e675a83-bd74-4180-8274-a44e7f5faf5e","label":"Интерактивный обозреватель API ","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\": \"тестовый IVR\",\n \"type\": \"ivr\"\n}' \\\n-X POST ${url}/client/@me/extension/"}]}]},"id":"ad5d6a43-c54b-430f-a9fb-c4ce319d6b76","label":"Программа cURL ","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/'\r\nheaders = {\r\n 'Authorization': f'Bearer {ACCESS_TOKEN}',\r\n 'Content-Type': 'application/json'\r\n}\r\ndata = '''{\r\n \"status\": \"active\",\n \"name\": \"071\",\n \"label\": \"тестовый IVR\",\n \"type\": \"ivr\"\n}'''\r\nresponse = requests.post(url, headers=headers, data=data)\nprint(response.text)"}]}]},"id":"e6ff5fab-11f9-4c94-945c-b61f9c13b69c","label":"На языке Python3 ","type":"tab"}] |
Ответ системы:
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": "тестовый 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": 204
3. Создаем контекст, который будет являться главным (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":"метод","marks":[{"type":"strong"}]}]}]},{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"ресурс","marks":[{"type":"strong"}]}]}]},{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"данные","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\": \"Основной контекст\","},{"type":"hardBreak"},{"type":"text","text":"\"timeout\": 5000"},{"type":"hardBreak"},{"type":"text","text":"}"}]}]}]}]},{"type":"paragraph","content":[]}]},"id":"e433425a-80c0-4654-9c26-ae8438200283","label":"Интерактивный обозреватель API ","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\": \"Основной контекст\",\n \"timeout\": 5000\n}' \\\n-X POST ${url}/extension/204/ivr/context/"}]}]},"id":"76da8a13-12b5-4502-9a84-17e2419648f4","label":"Программа cURL ","type":"tab"},{"content":{"version":1,"type":"doc","content":[{"type":"codeBlock","attrs":{"language":"python"},"content":[{"type":"text","text":"#!/usr/bin/python\r\n\r\nimport requests\r\n\r\nurl = f'{URL}/extension/204/ivr/context/'\nheaders = {\r\n 'Authorization': f'Bearer {ACCESS_TOKEN}',\r\n 'Content-Type': 'application/json'\r\n}\r\ndata = '''{\r\n \"digit_len\": 3,\n \"allow_any_dial\": true,\n \"inter_digit_timeout\": 2000,\n \"name\": \"Основной контекст\",\n \"timeout\": 5000\n}'''\r\nresponse = requests.post(url, headers=headers, data=data)\nprint(response.text)"}]}]},"id":"0ad01272-b463-4325-8f20-50f3d878abd3","label":"На языке Python3 ","type":"tab"}] |
Ответ системы:
Code Block | ||
---|---|---|
| ||
{ "name": "Основной контекст", "inter_digit_timeout": 2000, "timeout": 5000, "extra_params": null, "allow_any_dial": true, "id": 1, "digit_len": 3, "description": null } |
Идентификатор контекста "id": 1
4. Теперь можно привязать этот контекст как главный к нашему IVR, заодно указываем "sleep-time", позволяющее задать паузу от прихода вызова в IVR до начала каких-либо действий контекста "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":"метод","marks":[{"type":"strong"}]}]}]},{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"ресурс","marks":[{"type":"strong"}]}]}]},{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"данные","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":"e433425a-80c0-4654-9c26-ae8438200283","label":"Интерактивный обозреватель API ","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":"76da8a13-12b5-4502-9a84-17e2419648f4","label":"Программа cURL ","type":"tab"},{"content":{"version":1,"type":"doc","content":[{"type":"codeBlock","attrs":{"language":"python"},"content":[{"type":"text","text":"#!/usr/bin/python\r\n\r\nimport requests\r\n\r\nurl = f'{URL}/extension/204/ivr/'\nheaders = {\r\n 'Authorization': f'Bearer {ACCESS_TOKEN}',\r\n 'Content-Type': 'application/json'\r\n}\r\ndata = '''{\n \"sleep_time\": 5000,\n \"entry_context\": 1\n}'''\nresponse = requests.put(url, headers=headers, data=data)\nprint(response.text)"}]}]},"id":"0ad01272-b463-4325-8f20-50f3d878abd3","label":"На языке Python3 ","type":"tab"}] |
Ответ системы:
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. Как отмечалось ранее, каждый контекст уже имеет опцию “start”. Сконфигурируем его для проигрывания foreground музыкального файла "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":"метод","marks":[{"type":"strong"}]}]}]},{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"ресурс","marks":[{"type":"strong"}]}]}]},{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"данные","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":"/"},{"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":"e433425a-80c0-4654-9c26-ae8438200283","label":"Интерактивный обозреватель API ","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":"76da8a13-12b5-4502-9a84-17e2419648f4","label":"Программа cURL ","type":"tab"},{"content":{"version":1,"type":"doc","content":[{"type":"codeBlock","attrs":{"language":"python"},"content":[{"type":"text","text":"#!/usr/bin/python\r\n\r\nimport requests\r\n\r\nurl = f'{URL}/extension/204/ivr/context/1/options/start/rules/'\r\nheaders = {\r\n 'Authorization': f'Bearer {ACCESS_TOKEN}',\r\n 'Content-Type': 'application/json'\r\n}\r\ndata = '''{\r\n \"sound\": 52,\n \"sound_type\": \"foreground\",\n \"action\": \"play_sound\"\n}'''\nresponse = requests.post(url, headers=headers, data=data)\r\nprint(response.text)"}]}]},"id":"0ad01272-b463-4325-8f20-50f3d878abd3","label":"На языке Python3 ","type":"tab"}] |
Expand | |||||
---|---|---|---|---|---|
| |||||
|
6. Далее по аналогии укажем воспроизвести файл hello.wav в background:
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":"метод","marks":[{"type":"strong"}]}]}]},{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"ресурс","marks":[{"type":"strong"}]}]}]},{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"данные","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":"/"},{"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":"e433425a-80c0-4654-9c26-ae8438200283","label":"Интерактивный обозреватель API ","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":"76da8a13-12b5-4502-9a84-17e2419648f4","label":"Программа cURL ","type":"tab"},{"content":{"version":1,"type":"doc","content":[{"type":"codeBlock","attrs":{"language":"python"},"content":[{"type":"text","text":"#!/usr/bin/python\r\n\r\nimport requests\r\n\r\nurl = f'{URL}/extension/204/ivr/context/1/options/start/rules/'\r\nheaders = {\r\n 'Authorization': f'Bearer {ACCESS_TOKEN}',\r\n 'Content-Type': 'application/json'\r\n}\r\ndata = '''{\r\n \"sound\": 51,\r\n \"sound_type\": \"background\",\r\n \"action\": \"play_sound\"\r\n}'''\r\nresponse = requests.post(url, headers=headers, data=data)\nprint(response.text)"}]}]},"id":"0ad01272-b463-4325-8f20-50f3d878abd3","label":"На языке Python3 ","type":"tab"}] |
Expand | |||||
---|---|---|---|---|---|
| |||||
|
7. Теперь в контексте "Основной контекст" добавим возможность обработки выбора "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":"метод","marks":[{"type":"strong"}]}]}]},{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"ресурс","marks":[{"type":"strong"}]}]}]},{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"данные","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":"/"},{"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":"e433425a-80c0-4654-9c26-ae8438200283","label":"Интерактивный обозреватель API ","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":"76da8a13-12b5-4502-9a84-17e2419648f4","label":"Программа cURL ","type":"tab"},{"content":{"version":1,"type":"doc","content":[{"type":"codeBlock","attrs":{"language":"python"},"content":[{"type":"text","text":"#!/usr/bin/python\r\n\r\nimport requests\r\nimport json\n\r\nurl = f'{URL}/extension/204/ivr/context/1/options/'\r\nheaders = {\r\n 'Authorization': f'Bearer {ACCESS_TOKEN}',\r\n 'content-type': 'application/json'\r\n}\r\ndata = {\"digits\": \"1\"}\r\nresponse = requests.post(url, headers=headers, data=json.dumps(data))\r\nprint(response.text)"}]}]},"id":"0ad01272-b463-4325-8f20-50f3d878abd3","label":"На языке Python3 ","type":"tab"}] |
Ответ системы:
Code Block | ||
---|---|---|
| ||
{ "digits": "1" } |
8. И укажем, какое действие необходимо производить при выборе "1" — перевод на мобильный +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":"метод","marks":[{"type":"strong"}]}]}]},{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"ресурс","marks":[{"type":"strong"}]}]}]},{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"данные","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":"/"},{"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":"e433425a-80c0-4654-9c26-ae8438200283","label":"Интерактивный обозреватель API ","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":"76da8a13-12b5-4502-9a84-17e2419648f4","label":"Программа cURL ","type":"tab"},{"content":{"version":1,"type":"doc","content":[{"type":"codeBlock","attrs":{"language":"python"},"content":[{"type":"text","text":"#!/usr/bin/python\r\n\r\nimport requests\r\n\r\nurl = f'{URL}/extension/204/ivr/context/1/options/1/rules/'\r\nheaders = {\r\n 'Authorization': f'Bearer {ACCESS_TOKEN}',\r\n 'Content-Type': 'application/json'\r\n}\r\ndata = '''{\r\n \"transfer_dst\": \"+7987654321\",\n \"action\": \"transfer\"\n}'''\r\nresponse = requests.post(url, headers=headers, data=data)\nprint(response.text)"}]}]},"id":"0ad01272-b463-4325-8f20-50f3d878abd3","label":"На языке Python3 ","type":"tab"}] |
Expand | |||||
---|---|---|---|---|---|
| |||||
|
9. По аналогии добавим вызов внутреннего номера "002" по набору "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":"метод","marks":[{"type":"strong"}]}]}]},{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"ресурс","marks":[{"type":"strong"}]}]}]},{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"данные","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":"/"},{"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":"e433425a-80c0-4654-9c26-ae8438200283","label":"Интерактивный обозреватель API ","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":"76da8a13-12b5-4502-9a84-17e2419648f4","label":"Программа cURL ","type":"tab"},{"content":{"version":1,"type":"doc","content":[{"type":"codeBlock","attrs":{"language":"python"},"content":[{"type":"text","text":"#!/usr/bin/python\r\n\r\nimport requests\r\nimport json\r\n\r\nurl = f'{URL}/extension/204/ivr/context/1/options/'\r\nheaders = {\r\n 'Authorization': f'Bearer {ACCESS_TOKEN}',\r\n 'content-type': 'application/json'\r\n}\r\ndata = {\"digits\": \"2\"}\r\nresponse = requests.post(url, headers=headers, data=json.dumps(data))\r\nprint(response.text)"}]}]},"id":"0ad01272-b463-4325-8f20-50f3d878abd3","label":"На языке Python3 ","type":"tab"}] |
Ответ системы:
Code Block | ||
---|---|---|
| ||
{ "digits": "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":"метод","marks":[{"type":"strong"}]}]}]},{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"ресурс","marks":[{"type":"strong"}]}]}]},{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"данные","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":"/"},{"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":"e433425a-80c0-4654-9c26-ae8438200283","label":"Интерактивный обозреватель API ","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":"76da8a13-12b5-4502-9a84-17e2419648f4","label":"Программа cURL ","type":"tab"},{"content":{"version":1,"type":"doc","content":[{"type":"codeBlock","attrs":{"language":"python"},"content":[{"type":"text","text":"#!/usr/bin/python\r\n\r\nimport requests\r\n\r\nurl = f'{URL}/extension/204/ivr/context/1/options/2/rules/'\r\nheaders = {\r\n 'Authorization': f'Bearer {ACCESS_TOKEN}',\r\n 'Content-Type': 'application/json'\r\n}\r\ndata = '''{\r\n \"transfer_dst\": \"002\",\r\n \"action\": \"transfer\"\r\n}'''\r\nresponse = requests.post(url, headers=headers, data=data)\r\nprint(response.text)"}]}]},"id":"0ad01272-b463-4325-8f20-50f3d878abd3","label":"На языке Python3 ","type":"tab"}] |
Expand | |||||
---|---|---|---|---|---|
| |||||
|
10. В случае отсутствия выбора вызов должен автоматически переводиться на внутренний номер “050”. Как уже отмечалось, в контексте есть опция "timeout", с помощью которой можно задать это действие:
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":"метод","marks":[{"type":"strong"}]}]}]},{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"ресурс","marks":[{"type":"strong"}]}]}]},{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"данные","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":"e433425a-80c0-4654-9c26-ae8438200283","label":"Интерактивный обозреватель API ","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":"76da8a13-12b5-4502-9a84-17e2419648f4","label":"Программа cURL ","type":"tab"},{"content":{"version":1,"type":"doc","content":[{"type":"codeBlock","attrs":{"language":"python"},"content":[{"type":"text","text":"#!/usr/bin/python\r\n\r\nimport requests\r\n\r\nurl = f'{URL}/ivr/144/context/2/options/timeout/rules/'\r\nheaders = {\r\n 'Authorization': f'Bearer {ACCESS_TOKEN}',\r\n 'Content-Type': 'application/json'\r\n}\r\ndata = '''{\r\n \"transfer_dst\": \"050\",\r\n \"action\": \"transfer\"\r\n}'''\nresponse = requests.post(url, headers=headers, data=data)\nprint(response.text)"}]}]},"id":"0ad01272-b463-4325-8f20-50f3d878abd3","label":"На языке Python3 ","type":"tab"}] |
Expand | |||||
---|---|---|---|---|---|
| |||||
|
11. В результате можно посмотреть все доступные опции контекста:
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":"метод","marks":[{"type":"strong"}]}]}]},{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"ресурс","marks":[{"type":"strong"}]}]}]},{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"данные","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":"paragraph","content":[]}]},"id":"e433425a-80c0-4654-9c26-ae8438200283","label":"Интерактивный обозреватель API ","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":"76da8a13-12b5-4502-9a84-17e2419648f4","label":"Программа cURL ","type":"tab"},{"content":{"version":1,"type":"doc","content":[{"type":"codeBlock","attrs":{"language":"python"},"content":[{"type":"text","text":"#!/usr/bin/python\r\n\r\nimport requests\r\n\r\nurl = f'{URL}/extension/204/ivr/context/1/options/'\r\nheaders = {\r\n 'Authorization': f'Bearer {ACCESS_TOKEN}'\r\n}\r\nresponse = requests.get(url, headers=headers)\r\nprint(response.text)"}]}]},"id":"0ad01272-b463-4325-8f20-50f3d878abd3","label":"На языке Python3 ","type":"tab"}] |
Ответ системы:
Code Block | ||
---|---|---|
| ||
[ { "digits": "start" }, { "digits": "timeout" }, { "digits": "invalid" }, { "digits": "2" }, { "digits": "1" } ] |
Ресурсы раздела "Голосовое меню (ivr)"
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
PUT /extension/{extension_id}/ivr/ Обновить конфигурацию голосового меню Параметры URL
Параметры JSON
Поля ответа
|
Expand | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||
GET /extension/{extension_id}/ivr/ Получить конфигурацию голосового меню Параметры URL
Поля ответа
|
Expand | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||
POST /extension/{extension_id}/ivr/context/ Добавить контекст голосового меню Параметры URL
Параметры JSON
Поля ответа
|
Expand | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||
GET /extension/{extension_id}/ivr/context/ Получить список контекстов голосового меню Параметры URL
Поля ответа
|
Expand | ||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||
PUT /extension/{extension_id}/ivr/context/{context_id} Обновить контекст голосового меню Параметры URL
Параметры JSON
Поля ответа
|
Expand | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
GET /extension/{extension_id}/ivr/context/{context_id} Получить контекст голосового меню Параметры URL
Поля ответа
|
Expand | ||||||
---|---|---|---|---|---|---|
| ||||||
DELETE /extension/{extension_id}/ivr/context/{context_id} Удалить контекст голосового меню Параметры URL
|
Expand | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||
POST /extension/{extension_id}/ivr/context/{context_id}/options/ Добавить опцию контекста голосового меню Параметры URL
Параметры JSON
Поля ответа
|
Expand | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
GET /extension/{extension_id}/ivr/context/{context_id}/options/ Получить список опций контекста голосового меню Параметры URL
Поля ответа
|
Expand | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
DELETE /extension/{extension_id}/ivr/context/{context_id}/options/{option_digits} Удалить опцию контекста голосового меню Параметры URL
|
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
POST /extension/{extension_id}/ivr/context/{context_id}/options/{option_digits}/rules/ Добавить правило контекста голосового меню Параметры URL
Параметры JSON
Поля ответа
|
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GET /extension/{extension_id}/ivr/context/{context_id}/options/{option_digits}/rules/ Получить список правил контекста голосового меню Параметры URL
Поля ответа
|
Expand | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||
PUT /extension/{extension_id}/ivr/context/{context_id}/options/{option_digits}/rules/order/ Обновить порядок правил опций контекста голосового меню Параметры URL
Параметры JSON
Поля ответа
|
Expand | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
GET /extension/{extension_id}/ivr/context/{context_id}/options/{option_digits}/rules/order/ Получить порядок правил опций контекста голосового меню Параметры URL
Поля ответа
|
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PUT /extension/{extension_id}/ivr/context/{context_id}/options/{option_digits}/rules/{rule_id} Обновить правило контекста голосового меню Параметры URL
Параметры JSON
Поля ответа
|
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GET /extension/{extension_id}/ivr/context/{context_id}/options/{option_digits}/rules/{rule_id} Получить правило контекста голосового меню Параметры URL
Поля ответа
|
Expand | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
DELETE /extension/{extension_id}/ivr/context/{context_id}/options/{option_digits}/rules/{rule_id} Удалить правило контекста голосового меню Параметры URL
|