Hc_sorm_options_clean
Команда сброса доменных настроек СОРМ.
Аналог команды в CoCon:
domain/<DOMAIN>/sorm/clean
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/sorm_options_clean
Код 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"> Clean sorm options. Usage: http://server:9999/commands/sorm_options_clean. </xs:documentation> </xs:annotation> <xs:include schemaLocation="error.xsd"/> <xs:include schemaLocation="ecm_common.xsd"/> <!-- resultType--> <xs:complexType name="resultType"> <xs:all> <xs:element name="domain_options" type="domainCleanOutType" 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="domainCleanInType"/> </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/sorm_options_clean
<?xml version="1.0"?> <in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="sorm_options_clean.xsd"> <request> <domain_options> <system /> <domain name="test.ats"> <option name="adaptation"/> <option name="b_digits_mode"/> <option name="enabled"/> <option name="full_dial_number"/> <option name="password"/> <option name="platform_id"/> <option name="private_phone_prefix"/> <option name="radius_servers"/> <option name="send_optional_cf_notification"/> <option name="strict_intercity_numbers"/> <option name="strict_private_numbers"/> </domain> </domain_options> </request> </in>
Ответ: 200
<?xml version="1.0"?> <out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="sorm_options_clean.xsd"> <result> <domain_options> <system/> <domain name="biysk.local"> <success option="adaptation"/> <success option="b_digits_mode"/> <success option="enabled"/> <success option="full_dial_number"/> <success option="password"/> <success option="platform_id"/> <success option="private_phone_prefix"/> <success option="radius_servers"/> <success option="send_optional_cf_notification"/> <success option="strict_intercity_numbers"/> <success option="strict_private_numbers"/> </domain> </domain_options> </result> </out>
Hc_sorm_options_info
Команда просмотра информации о доменных настройках СОРМ.
Аналог команды в CoCon:
domain/<DOMAIN>/sorm/info
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/sorm_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 sorm options. Usage: http://server:9999/commands/sorm_options_info. </xs:documentation> </xs:annotation> <xs:include schemaLocation="error.xsd"/> <xs:include schemaLocation="ecm_common.xsd"/> <!-- prikazType --> <xs:simpleType name="prikazType"> <xs:restriction base="unionType"> <xs:enumeration value="70"/> <xs:enumeration value="268"/> </xs:restriction> </xs:simpleType> <!-- sormOptionsType --> <xs:complexType name="sormOptionsType"> <xs:complexContent> <xs:extension base="baseOptionsType"> <xs:attribute name="adaptation" type="atomType"/> <xs:attribute name="b_digits_mode" type="atomType"/> <xs:attribute name="enabled" type="booleanType"/> <xs:attribute name="full_dial_number" type="booleanType"/> <xs:attribute name="password" type="stringType"> <xs:annotation> <xs:documentation xml:lang="en"> In case of strong security restrictions password may be shown as ******** </xs:documentation> </xs:annotation> </xs:attribute> <xs:attribute name="platform_id" type="stringType"/> <xs:attribute name="private_phone_prefix" type="stringType"/> <xs:attribute name="radius_servers" type="stringType"> <xs:annotation> <xs:documentation xml:lang="en"> Radius server option: Format: IP:Secret;IP2:Secret2 </xs:documentation> </xs:annotation> </xs:attribute> <xs:attribute name="send_optional_cf_notification" type="booleanType"/> <xs:attribute name="strict_intercity_numbers" type="booleanType"/> <xs:attribute name="strict_private_numbers" type="booleanType"/> <xs:attribute name="prikaz" type="prikazType"/> <xs:attribute name="city_prefix_70" type="stringType"/> </xs:extension> </xs:complexContent> </xs:complexType> <!-- in --> <xs:element name="in"> <xs:complexType> <xs:all> <xs:element name="request"> <xs:complexType> <xs:all> <xs:element name="domain_options" type="domainInfoInType"/> </xs:all> </xs:complexType> </xs:element> </xs:all> </xs:complexType> </xs:element> <!-- in --> <!-- out --> <xs:element name="out"> <xs:complexType> <xs:choice> <xs:element name="result"> <xs:complexType> <xs:all> <xs:element name="domain_options" type="domainInfoOutType"/> </xs:all> </xs:complexType> </xs:element> <xs:element name="error" type="errorType" /> </xs:choice> </xs:complexType> </xs:element> <!-- out --> </xs:schema>
Пример:
Запрос:
http://192.168.1.21:9999/commands/sorm_options_info
<?xml version="1.0" encoding="UTF-8"?> <in xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="sorm_options_info.xsd"> <request> <domain_options domain="ct.office"/> </request> </in>
Ответ: 200
<?xml version="1.0"?> <out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="sorm_options_info.xsd"> <result> <domain_options> <system> <options xs:type="sormOptionsType"/> </system> <domain name="ct.office"> <options xs:type="sormOptionsType" strict_intercity_numbers="false" send_optional_cf_notification="true" radius_servers="192.168.1.12:secret;10.16.33.5:secret2" private_phone_prefix="0" password="pasS1234" enabled="true" b_digits_mode="routing" adaptation="default_adaptation"/> </domain> </domain_options> </result> </out>
Hc_sorm_options_set
Команда изменения доменных настроек СОРМ.
Аналог команды в CoCon:
domain/<DOMAIN>/sorm/set
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/sorm_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"> Show sorm options. Usage: http://server:9999/commands/sorm_options_info. </xs:documentation> </xs:annotation> <xs:include schemaLocation="error.xsd"/> <xs:include schemaLocation="ecm_common.xsd"/> <!-- prikazType --> <xs:simpleType name="prikazType"> <xs:restriction base="unionType"> <xs:enumeration value="70"/> <xs:enumeration value="268"/> </xs:restriction> </xs:simpleType> <!-- sormOptionsType --> <xs:complexType name="sormOptionsType"> <xs:complexContent> <xs:extension base="baseOptionsType"> <xs:attribute name="adaptation" type="atomType"/> <xs:attribute name="b_digits_mode" type="atomType"/> <xs:attribute name="enabled" type="booleanType"/> <xs:attribute name="full_dial_number" type="booleanType"/> <xs:attribute name="password" type="stringType"/> <xs:attribute name="platform_id" type="stringType"/> <xs:attribute name="private_phone_prefix" type="stringType"/> <xs:attribute name="radius_servers" type="stringType"> <xs:annotation> <xs:documentation xml:lang="en"> Radius server option: Format: IP:Secret;IP2:Secret2 </xs:documentation> </xs:annotation> </xs:attribute> <xs:attribute name="send_optional_cf_notification" type="booleanType"/> <xs:attribute name="strict_intercity_numbers" type="booleanType"/> <xs:attribute name="strict_private_numbers" type="booleanType"/> <xs:attribute name="prikaz" type="prikazType"/> <xs:attribute name="city_prefix_70" type="stringType"/> </xs:extension> </xs:complexContent> </xs:complexType> <!-- in --> <xs:element name="in"> <xs:complexType> <xs:all> <xs:element name="request"> <xs:complexType> <xs:all> <xs:element name="domain_options" type="domainSetInType"/> </xs:all> </xs:complexType> </xs:element> </xs:all> </xs:complexType> </xs:element> <!-- in --> <!-- out --> <xs:element name="out"> <xs:complexType> <xs:choice> <xs:element name="result"> <xs:complexType> <xs:all> <xs:element name="domain_options" type="domainSetOutType"/> </xs:all> </xs:complexType> </xs:element> <xs:element name="error" type="errorType" /> </xs:choice> </xs:complexType> </xs:element> <!-- out --> </xs:schema>
Пример:
Запрос:
http://192.168.1.21:9999/commands/sorm_options_set
<?xml version="1.0" encoding="UTF-8"?> <in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="sorm_options_set.xsd"> <request> <domain_options> <system> <options xs:type="sormOptionsType"/> </system> <domain name="ct.office"> <options xs:type="sormOptionsType" strict_intercity_numbers="false" send_optional_cf_notification="true" radius_servers="192.168.1.12:secret;10.16.33.5:secret2" private_phone_prefix="0" password="pasS1234" enabled="true" b_digits_mode="routing" adaptation="default_adaptation"/> </domain> </domain_options> </request> </in>
Ответ: 200
<?xml version="1.0"?> <out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="sorm_options_set.xsd"> <result> <domain_options> <system/> <domain name="ct.office"> <success option="adaptation"/> <success option="b_digits_mode"/> <success option="enabled"/> <success option="password"/> <success option="private_phone_prefix"/> <success option="radius_servers"/> <success option="send_optional_cf_notification"/> <success option="strict_intercity_numbers"/> </domain> </domain_options> </result> </out>
Добавить комментарий