Hc_sip_general_info
Команда позволяет просмотреть общие свойства кластера SIP.
Аналог команды в CoCon:
cluster/adapter/<PA_SIP>/sip/properties/info
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/sip_general_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 general properties of SIP cluster. Usage: http://server:9999/commands/sip_general_info. Implementation: hc_sip_general_info.erl. Git: git@git.eltex.loc:httpTerminal.git. Copyright (c) 2014, Eltex. All rights reserved. </xs:documentation> </xs:annotation> <xs:include schemaLocation="error.xsd"/> <xs:include schemaLocation="ecm_common.xsd"/> <!-- sipGeneralOptionsType--> <xs:complexType name="sipGeneralOptionsType"> <xs:complexContent> <xs:extension base="baseOptionsType"> <xs:attribute name="dns_resolve_check_interval" type="integerType" use="optional"/> <xs:attribute name="dns_resolve_default_ttl" type="integerType" use="optional"/> <xs:attribute name="release_ind_ack" type="booleanType" use="optional"/> <xs:attribute name="release_ind_ack_timeout" type="integerType" use="optional"/> <xs:attribute name="setup_ind_ack_timeout" type="integerType" use="optional"/> <xs:attribute name="setup_init_ttl" type="integerType" use="optional"/> <xs:attribute name="stat_info_to_log_interval" type="integerType" use="optional"/> </xs:extension> </xs:complexContent> </xs:complexType> <!-- resultType--> <xs:complexType name="resultType"> <xs:all> <xs:element name="cluster_options" type="clusterInfoOutType" 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="cluster_options" type="clusterInfoInType" 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/sip_general_info
<?xml version="1.0" encoding="UTF-8"?> <in xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="sip_general_info.xsd"> <request> <cluster_options cluster="sip1" /> </request> </in>
Код ответа:
200
Ответ:
<?xml version="1.0"?> <out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="sip_general_info.xsd"> <result> <cluster_options> <cluster name="sip1"> <options xs:type="sipGeneralOptionsType" dns_resolve_check_interval="600" dns_resolve_default_ttl="3600" release_ind_ack="false" release_ind_ack_timeout="2000" setup_ind_ack_timeout="5000" stat_info_to_log_interval="0"/> </cluster> </cluster_options> </result> </out>
Hc_sip_general_set
Команда позволяет редактировать общие свойства кластера SIP.
Аналог команды в CoCon:
cluster/adapter/<PA_SIP>/sip/properties/set
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/sip_general_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 general properties of SIP cluster. Usage: http://server:9999/commands/sip_general_set. Implementation: hc_sip_general_set.erl. Git: git@git.eltex.loc:httpTerminal.git. Copyright (c) 2014, Eltex. All rights reserved. </xs:documentation> </xs:annotation> <xs:include schemaLocation="error.xsd"/> <xs:include schemaLocation="ecm_common.xsd"/> <!-- sipGeneralOptionsType--> <xs:complexType name="sipGeneralOptionsType"> <xs:complexContent> <xs:extension base="baseOptionsType"> <xs:attribute name="dns_resolve_check_interval" type="integerType" use="optional"/> <xs:attribute name="dns_resolve_default_ttl" type="integerType" use="optional"/> <xs:attribute name="release_ind_ack" type="booleanType" use="optional"/> <xs:attribute name="release_ind_ack_timeout" type="integerType" use="optional"/> <xs:attribute name="setup_ind_ack_timeout" type="integerType" use="optional"/> <xs:attribute name="setup_init_ttl" type="integerType" use="optional"/> <xs:attribute name="stat_info_to_log_interval" type="integerType" use="optional"/> </xs:extension> </xs:complexContent> </xs:complexType> <!-- resultType--> <xs:complexType name="resultType"> <xs:all> <xs:element name="cluster_options" type="clusterSetOutType" 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="cluster_options" type="clusterSetInType"/> </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/sip_general_set
<?xml version="1.0" encoding="UTF-8"?> <in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="sip_general_set.xsd"> <request> <cluster_options> <cluster name="sip1"> <options xs:type="sipGeneralOptionsType" dns_resolve_check_interval="500" dns_resolve_default_ttl="1800" release_ind_ack="true" release_ind_ack_timeout="1000" setup_ind_ack_timeout="3000" stat_info_to_log_interval="1" /> </cluster> </cluster_options> </request> </in>
Код ответа:
200
Ответ:
<?xml version="1.0"?> <out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="sip_general_set.xsd"> <result> <cluster_options> <cluster name="sip1"> <success option="stat_info_to_log_interval"/> <success option="setup_ind_ack_timeout"/> <success option="release_ind_ack_timeout"/> <success option="release_ind_ack"/> <success option="dns_resolve_default_ttl"/> <success option="dns_resolve_check_interval"/> </cluster> </cluster_options> </result> </out>
Hc_sip_general_clean
Команда позволяет вернуть значение по умолчанию для общих свойств кластера SIP.
Аналог команды в CoCon:
cluster/adapter/<PA_SIP>/sip/properties/clean
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/sip_general_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 general properties of SIP cluster. Usage: http://server:9999/commands/sip_general_clean. Implementation: hc_sip_general_clean.erl. Git: git@git.eltex.loc:httpTerminal.git. Copyright (c) 2014, Eltex. All rights reserved. </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="cluster_options" type="clusterCleanOutType" 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="cluster_options" type="clusterCleanInType"/> </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.23.34:9999/commands/sip_general_clean
<?xml version="1.0" encoding="UTF-8"?> <in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="sip_general_clean.xsd"> <request> <cluster_options> <cluster name="sip1"> <option name="dns_resolve_check_interval" /> <option name="dns_resolve_default_ttl" /> <option name="setup_init_ttl" /> </cluster> </cluster_options> </request> </in>
Код ответа:
200
Ответ:
<?xml version="1.0"?> <out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="sip_general_clean.xsd"> <result> <cluster_options> <cluster name="sip1"> <success option="setup_init_ttl"/> <success option="dns_resolve_default_ttl"/> <success option="dns_resolve_check_interval"/> </cluster> </cluster_options> </result> </out>