Hc_ivr_script_restriction - Управление ограничениями IVR скриптов
Hc_ivr_scripts_restriction_profile_info
Команда для просмотра профилей ограничений IVR скриптов по имени.
Замечание: команда доступна, если в лицензии открыта опция "IVR script's customization"
Аналог команды в CoCon:
/system/ivr/script/restrictions/info
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/ivr_scripts_restriction_profile_info
Код HTTP-ответа:
- 200 – в случае успеха;
- 404 – в случае ошибки.
XSD-схема XML-файла запроса/ответа:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<!-- profileType -->
<xs:complexType name="profileType">
<xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="description" type="xs:string" use="required"/>
<xs:attribute name="max_blocks_per_script" type="xs:string" use="required">
<xs:annotation>
<xs:documentation xml:lang="en">
Max IVR blocks per one IVR script. Available values:
infinity - no restrictions on Max IVR blocks;
[0, 16383] - max count if the IVR blocks.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ivr_script_limit" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">
Max IVR scripts per domain. Available values:
infinity - no restrictions on Max IVR scripts;
[0, 65536] - max count if the IVR blocks.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="available_blocks" type="xs:string" use="required">
<xs:annotation>
<xs:documentation xml:lang="en">
The list of the available IVR blocks splitted by comma.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="asr" type="xs:boolean" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">
Automatic speech recognition.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<!-- requestType -->
<xs:complexType name="requestType">
<xs:attribute name="profile" type="xs:string" use="optional"/>
</xs:complexType>
<!-- responseType -->
<xs:complexType name="responseType">
<xs:sequence>
<xs:element name="profile" type="profileType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<!-- in -->
<xs:element name="in">
<xs:complexType>
<xs:all>
<xs:element name="request" type="requestType"/>
</xs:all>
</xs:complexType>
</xs:element>
<!-- out -->
<xs:element name="out">
<xs:complexType>
<xs:all>
<xs:element name="response" type="responseType"/>
</xs:all>
</xs:complexType>
</xs:element>
</xs:schema>
Пример 1
Запрос:
http://192.168.1.21:9999/commands/ivr_scripts_restriction_profile_info
<?xml version="1.0" encoding="UTF-8"?>
<in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="ivr_scripts_restriction_profile_info.xsd">
<request profile="ivr_level1"/>
</in>
Ответ:
<?xml version="1.0"?>
<out
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="ivr_scripts_restriction_profile_info.xsd">
<response>
<profile name="ivr_level1" description="" max_blocks_per_script="infinity" ivr_script_limit="12" available_blocks="*" asr="false"/>
</response>
</out>
Пример 2
Запрос:
<?xml version="1.0" encoding="UTF-8"?>
<in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="ivr_scripts_restriction_profile_info.xsd">
<request/>
</in>
Ответ:
<?xml version="1.0"?>
<out
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="ivr_scripts_restriction_profile_info.xsd">
<response>
<profile name="ivr_level1" description="" max_blocks_per_script="infinity" ivr_script_limit="12" available_blocks="*" asr="false"/>
<profile name="скрипт4" description="Описание 4" max_blocks_per_script="8" ivr_script_limit="10" available_blocks="ivr,time,info" asr="false"/>
<profile name="test4" description="test4" max_blocks_per_script="8" ivr_script_limit="10" available_blocks="ivr,time,info,play" asr="false"/>
<profile name="super_ivr" description="" max_blocks_per_script="infinity" ivr_script_limit="100" available_blocks="*" asr="false"/>
</response>
</out>
Hc_ivr_scripts_restriction_profile_apply
Команда применения профиля ограничений IVR скриптов на созданный домен.
Замечание: команда доступна, если в лицензии открыта опция "IVR script's customization".
Аналог команды в CoCon:
/system/ivr/script/restrictions/apply
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/ivr_scripts_restriction_profile_apply
Код HTTP-ответа:
- 201 – в случае успеха;
- 404 – в случае ошибки.
XSD-схема XML-файла запроса/ответа:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:include schemaLocation="error.xsd"/>
<!-- requestType -->
<xs:complexType name="requestType">
<xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="domain" type="xs:string" use="required"/>
</xs:complexType>
<!-- in -->
<xs:element name="in">
<xs:complexType>
<xs:all>
<xs:element name="request" type="requestType"/>
</xs:all>
</xs:complexType>
</xs:element>
<!-- out -->
<xs:element name="out">
<xs:complexType>
<xs:all>
<xs:element name="error" type="errorType"/>
</xs:all>
</xs:complexType>
</xs:element>
</xs:schema>
Пример
Запрос:
http://192.168.1.21:9999/commands/ivr_scripts_restriction_profile_apply
<?xml version="1.0" encoding="UTF-8"?>
<in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="ivr_scripts_restriction_profile_apply.xsd">
<request name="super_ivr" domain="biysk.local"/>
</in>
Ответ:
201
Hc_ivr_scripts_restriction_profile_set
Команда для создания и/или изменения профилей ограничений IVR скриптов.
Замечание: команда доступна, если в лицензии открыта опция "IVR script's customization"
Аналог команды в CoCon:
/system/ivr/script/restrictions/set
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/ivr_scripts_restriction_profile_set
Код HTTP-ответа:
- 200 – в случае успеха;
- 404 – в случае ошибки.
XSD-схема XML-файла запроса/ответа:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<!-- okType -->
<xs:complexType name="okType">
<xs:attribute name="name" type="xs:string" use="required"/>
</xs:complexType>
<!-- errorType -->
<xs:complexType name="errorType">
<xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="reason" type="xs:string" use="required"/>
</xs:complexType>
<!-- profileType -->
<xs:complexType name="profileType">
<xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="description" type="xs:string" use="optional"/>
<xs:attribute name="max_blocks_per_script" type="xs:string" use="required">
<xs:annotation>
<xs:documentation xml:lang="en">
Max IVR blocks per one IVR script. Available values:
infinity - no restrictions on Max IVR blocks;
[0, 16383] - max count if the IVR blocks.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ivr_script_limit" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">
Max IVR scripts per domain. Available values:
infinity - no restrictions on Max IVR scripts;
[0, 65536] - max count if the IVR blocks.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="available_blocks" type="xs:string" use="required">
<xs:annotation>
<xs:documentation xml:lang="en">
The list of the available IVR blocks splitted by comma.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="asr" type="xs:boolean" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">
Automatic speech recognition.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<!-- requestType -->
<xs:complexType name="requestType">
<xs:sequence>
<xs:element name="profile" type="profileType" minOccurs="1" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
<!-- responseType -->
<xs:complexType name="responseType">
<xs:sequence>
<xs:element name="ok" type="okType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="error" type="errorType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<!-- in -->
<xs:element name="in">
<xs:complexType>
<xs:all>
<xs:element name="request" type="requestType"/>
</xs:all>
</xs:complexType>
</xs:element>
<!-- out -->
<xs:element name="out">
<xs:complexType>
<xs:all>
<xs:element name="response" type="responseType"/>
</xs:all>
</xs:complexType>
</xs:element>
</xs:schema>
Пример
Запрос:
http://192.168.1.21:9999/commands/ivr_scripts_restriction_profile_set
<?xml version="1.0" encoding="UTF-8"?>
<in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="ivr_scripts_restriction_profile_set.xsd">
<request>
<profile name="ivr_level1" max_blocks_per_script="infinity" available_blocks="*" ivr_script_limit="12"/>
<profile name="скрипт4" description="Описание 4" max_blocks_per_script="8" available_blocks="ivr,time,info" ivr_script_limit="10"/>
</request>
</in>
Ответ:
<?xml version="1.0"?>
<out
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="ivr_scripts_restriction_profile_set.xsd">
<response>
<ok name="ivr_level1"/>
<ok name="скрипт4"/>
</response>
</out>
Hc_ivr_scripts_restriction_profile_remove
Команда для удаления профилей ограничений IVR скриптов по имени.
Замечание: команда доступна, если в лицензии открыта опция "IVR script's customization".
Аналог команды в CoCon:
/system/ivr/script/restrictions/remove
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/ivr_scripts_restriction_profile_remove
Код HTTP-ответа:
- 200 – в случае успеха;
- 404 – в случае ошибки.
XSD-схема XML-файла запроса/ответа:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<!-- okType -->
<xs:complexType name="okType">
<xs:attribute name="name" type="xs:string" use="required"/>
</xs:complexType>
<!-- errorType -->
<xs:complexType name="errorType">
<xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="reason" type="xs:string" use="required"/>
</xs:complexType>
<!-- profileType -->
<xs:complexType name="profileType">
<xs:attribute name="name" type="xs:string" use="required"/>
</xs:complexType>
<!-- requestType -->
<xs:complexType name="requestType">
<xs:sequence>
<xs:element name="profile" type="profileType" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<!-- responseType -->
<xs:complexType name="responseType">
<xs:sequence>
<xs:element name="ok" type="okType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="error" type="errorType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<!-- in -->
<xs:element name="in">
<xs:complexType>
<xs:all>
<xs:element name="request" type="requestType"/>
</xs:all>
</xs:complexType>
</xs:element>
<!-- out -->
<xs:element name="out">
<xs:complexType>
<xs:all>
<xs:element name="response" type="responseType"/>
</xs:all>
</xs:complexType>
</xs:element>
</xs:schema>
Пример
Запрос:
http://192.168.1.21:9999/commands/ivr_scripts_restriction_profile_remove
<?xml version="1.0" encoding="UTF-8"?>
<in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="ivr_scripts_restriction_profile_remove.xsd">
<request>
<profile name="ivr_level5"/>
<profile name="скрипт4"/>
</request>
</in>
Ответ:
<?xml version="1.0"?>
<out
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="ivr_scripts_restriction_profile_remove.xsd">
<response>
<ok name="script4"/>
<ok name="скрипт4"/>
<error name="ivr_level5" reason="not_exists"/>
</response>
</out>
Hc_ivr_scripts_restriction_options_info
Команда для просмотра ограничений IVR скриптов на уровне домена
Аналог команды в CoCon:
domain/<DOMAIN>/ivr/script/restrictions/info
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/ivr_scripts_restriction_options_info
Код HTTP-ответа:
- 200 – в случае успеха;
- 404 – в случае ошибки.
XSD-схема XML-файла запроса/ответа:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
attributeFormDefault="unqualified">
<xs:annotation>
<xs:documentation xml:lang="en">
Show IVR scripts restriction options.
Usage: http://server:9999/commands/ivr_scripts_restriction_options_info.
Implementation: hc_ivr_scripts_restriction_options_info.erl.
Git: git@git.eltex.loc:httpTerminal.git.
Copyright (c) 2017, Eltex. All rights reserved.
</xs:documentation>
</xs:annotation>
<xs:include schemaLocation="error.xsd"/>
<xs:include schemaLocation="ecm_common.xsd"/>
<xs:complexType name="ivrScriptsRestrictionOptionsType">
<xs:complexContent>
<xs:extension base="baseOptionsType">
<xs:attribute name="max_blocks_per_script" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">
Max IVR blocks per one IVR script. Available values:
infinity - no restrictions on Max IVR blocks;
[0, 16383] - max count if the IVR blocks.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ivr_script_limit" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">
Max IVR scripts per domain. Available values:
infinity - no restrictions on Max IVR scripts;
[0, 65536] - max count if the IVR blocks.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="available_blocks" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">
The list of the available IVR blocks splitted by comma.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="asr" type="xs:boolean" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">
Automatic speech recognition.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<!-- resultType-->
<xs:complexType name="resultType">
<xs:all>
<xs:element name="domain_options" type="domainInfoOutType" minOccurs="1"/>
</xs:all>
</xs:complexType>
<!-- in-->
<xs:element name="in">
<xs:complexType>
<xs:sequence>
<xs:element name="request">
<xs:complexType>
<xs:all>
<xs:element name="domain_options" type="domainInfoInType" minOccurs="1"/>
</xs:all>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<!-- out -->
<xs:element name="out">
<xs:complexType>
<xs:choice>
<xs:element name="result" type="resultType"/>
<xs:element name="error" type="errorType"/>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
Пример
Запрос:
http://192.168.1.21:9999/commands/ivr_scripts_restriction_options_info
<?xml version="1.0"?>
<in xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ivr_scripts_restriction_options_info.xsd">
<request>
<domain_options domain="biysk.local"/>
</request>
</in>
Ответ:
<?xml version="1.0"?>
<out
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="ivr_scripts_restriction_options_info.xsd">
<result>
<domain_options>
<system>
<options xs:type="ivrScriptsRestrictionOptionsType"/>
</system>
<domain name="biysk.local">
<options xs:type="ivrScriptsRestrictionOptionsType" max_blocks_per_script="infinity" ivr_script_limit="100" available_blocks="*" asr="false"/>
</domain>
</domain_options>
</result>
</out>
Hc_ivr_scripts_restriction_options_set
Команда для редактирования ограничений IVR скриптов на уровне домена
Аналог команды в CoCon:
domain/<DOMAIN>/ivr/script/restrictions/set
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/ivr_scripts_restriction_options_set
Код HTTP-ответа:
- 200 – в случае успеха;
- 404 – в случае ошибки.
XSD-схема XML-файла запроса/ответа:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
attributeFormDefault="unqualified">
<xs:annotation>
<xs:documentation xml:lang="en">
Set IVR scripts restriction options.
Usage: http://server:9999/commands/ivr_scripts_restriction_options_set.
Implementation: hc_ivr_scripts_restriction_options_set.erl.
Git: git@git.eltex.loc:httpTerminal.git.
Copyright (c) 2017, Eltex. All rights reserved.
</xs:documentation>
</xs:annotation>
<xs:include schemaLocation="error.xsd"/>
<xs:include schemaLocation="ecm_common.xsd"/>
<xs:complexType name="ivrScriptsRestrictionOptionsType">
<xs:complexContent>
<xs:extension base="baseOptionsType">
<xs:attribute name="max_blocks_per_script" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">
Max IVR blocks per one IVR script. Available values:
infinity - no restrictions on Max IVR blocks;
[0, 16383] - max count if the IVR blocks.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ivr_script_limit" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">
Max IVR scripts per domain. Available values:
infinity - no restrictions on Max IVR scripts;
[0, 65536] - max count if the IVR blocks.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="available_blocks" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">
The list of the available IVR blocks splitted by comma.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="asr" type="xs:boolean" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">
Automatic speech recognition.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<!-- resultType-->
<xs:complexType name="resultType">
<xs:all>
<xs:element name="domain_options" type="domainSetOutType" minOccurs="1"/>
</xs:all>
</xs:complexType>
<!-- in-->
<xs:element name="in">
<xs:complexType>
<xs:sequence>
<xs:element name="request">
<xs:complexType>
<xs:all>
<xs:element name="domain_options" type="domainSetInType"/>
</xs:all>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<!-- out -->
<xs:element name="out">
<xs:complexType>
<xs:choice>
<xs:element name="result" type="resultType" minOccurs="1" maxOccurs="1"/>
<xs:element name="error" type="errorType" minOccurs="1" maxOccurs="1"/>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
Пример
Запрос:
http://192.168.1.21:9999/commands/ivr_scripts_restriction_options_set
<?xml version="1.0" encoding="UTF-8"?>
<in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="ivr_scripts_restriction_options_set.xsd">
<request>
<domain_options>
<system>
<options xs:type="ivrScriptsRestrictionOptionsType"/>
</system>
<domain name="biysk.local">
<options xs:type="ivrScriptsRestrictionOptionsType" max_blocks_per_script="10" ivr_script_limit="6" available_blocks="begin,play,connect,dial,queue"/>
</domain>
</domain_options>
</request>
</in>
Ответ:
<?xml version="1.0"?>
<out
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="ivr_scripts_restriction_options_set.xsd">
<result>
<domain_options>
<system/>
<domain name="biysk.local">
<success option="available_blocks"/>
<success option="ivr_script_limit"/>
<success option="max_blocks_per_script"/>
</domain>
</domain_options>
</result>
</out>