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) 2018, 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="alternative_server" type="stringType" use="optional"/>
                <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="expires_alternative_server" 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="stat_info_to_log_interval" type="integerType" use="optional"/>
                <xs:attribute name="tcp_connection_idle_timeout" type="integerType" use="optional"/>
                <xs:attribute name="tcp_connect_timeout" 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>

CODE

Пример:

Запрос:
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>
CODE


Ответ: 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>
CODE

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">
            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) 2018, 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="alternative_server" type="stringType" use="optional"/>
                <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="expires_alternative_server" 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="stat_info_to_log_interval" type="integerType" use="optional"/>
                <xs:attribute name="tcp_connection_idle_timeout" type="integerType" use="optional"/>
                <xs:attribute name="tcp_connect_timeout" 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>

CODE

Пример:

Запрос:
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>
CODE


Ответ: 200

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="sip_timers_info.xsd">
    <result>
        <domain_options>
            <system>
                <options xs:type="sipTimersOptionsType"/>
            </system>
            <domain name="biysk.local">
                <options xs:type="sipTimersOptionsType" subscribe_over="5" subscribe_limit="0" sip_TC="181000" sip_T4="5000" sip_T2="4000" sip_T1="500" rfc4028_use_se="1800" rfc4028_min_se="300" reg_expire_min="90" reg_expire_max="3600" invite_transaction_timeout="32000" forbidden="100" find_me="10000"/>
            </domain>
        </domain_options>
    </result>
</out>
CODE

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>

CODE

Пример:

Запрос:
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>
CODE

Ответ: 200

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="sip_timers_clean.xsd">
    <result>
        <domain_options>
            <system/>
            <domain name="biysk.local">
                <success option="find_me"/>
                <success option="forbidden"/>
                <success option="rfc4028_min_se"/>
                <success option="sip_T1"/>
                <success option="sip_T2"/>
                <success option="sip_T4"/>
                <success option="subscribe_over"/>
                <error option="session_limit" reason="{error,not_found}"/>
            </domain>
        </domain_options>
    </result>
</out>
CODE