Дерево страниц
Перейти к концу метаданных
Переход к началу метаданных

Hс_sip_domain_network_info

Команда позволяет просмотреть сетевые настройки протокола SIP на уровне домена.

Аналог команды в CoCon:

domain/<DOMAIN>/sip/network/info

Метод HTTP-запроса:

POST

Шаблон HTTP-запроса:

http://host:port/commands/sip_domain_network_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 sip-domain properties of SIP cluster.
            Usage: http://server:9999/commands/sip_domain_network_info.
            Implementation: hc_sip_domain_network_info.erl.
            Git: git@git.eltex.loc:httpTerminal.git.
            Copyright (c) 2015, Eltex. All rights reserved.
        </xs:documentation>
    </xs:annotation>
    <xs:include schemaLocation="error.xsd"/>
    <xs:include schemaLocation="ecm_common.xsd"/>
    <!-- sipDomainPropertiesOptionsType-->
    <xs:complexType name="sipDomainNetworkOptionsType">
        <xs:complexContent>
            <xs:extension base="baseOptionsType">
                <xs:attribute name="ip_sets" type="stringType" use="optional">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            Usage: ip_set1,ip_set_2,...,ip_set_N
                            The list of IP set's separated by comma.
                        </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>

Внимание: Параметр Domain является обязательным для данной команды.

Пример

Запрос:
http://192.168.1.21:9999/commands/sip_domain_network_info

<in xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="sip_domain_network_info.xsd">
    <request>
        <domain_options domain="biysk.local"/>
    </request>
</in>

Код ответа:

200

Ответ:

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="sip_domain_network_info.xsd">
    <result>
        <domain_options>
            <system>
                <options xs:type="sipDomainNetworkOptionsType"/>
            </system>
            <domain name="biysk.local">
                <options xs:type="sipDomainNetworkOptionsType" ip_sets="ipset1"/>
            </domain>
        </domain_options>
    </result>
</out>

Hc_sip_domain_network_clean

Команда позволяет восстановить сетевые настройки SIP адаптера на уровне домена (доступно только администратору софтсвича)

Аналог команды в CoCon:

domain/<DOMAIN>/sip/network/clean

Метод http запроса:

POST

Шаблон http запроса:

http://host:port/commands/sip_domain_network_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 sip-domain network properties.
            Usage: http://server:9999/commands/sip_domain_network_clean.
            Implementation: hc_sip_domain_network_clean.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"/>
    <!-- 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" 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_domain_network_clean

<?xml version="1.0"?>
<in
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="sip_domain_network_clean.xsd">
    <request>
        <domain_options>
            <system/>
            <domain name="ct.office">
                <option name="ip_set"/>
            </domain>
        </domain_options>
    </request>
</in>

Код ответа:

200

Ответ:

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="sip_domain_network_clean.xsd">
    <result>
        <domain_options>
            <system/>
            <domain name="ct.office">
                <success option="ip_set"/>
            </domain>
        </domain_options>
    </result>
</out>

Hc_sip_domain_network_set

Команда предназначена для изменения сетевых настроек SIP адаптера на уровне домена (доступно только администратору софтсвича)

Аналог команды в CoCon:

domain/<DOMAIN>/sip/network/set

Метод http запроса:

POST

Шаблон http запроса:

http://host:port/commands/sip_domain_network_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 SIP domain's network settings.
            Usage: http://server:9999/commands/sip_domain_network_set.
            Implementation: hc_sip_domain_network_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"/>
    <!-- sipDomainNetworkOptionsType-->
    <xs:complexType name="sipDomainNetworkOptionsType">
        <xs:complexContent>
            <xs:extension base="baseOptionsType">
                <xs:attribute name="ip_set" type="stringType" use="optional">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            Format: IpSet_1,IpSet_2; ...
                        </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/sip_domain_network_set

<?xml version="1.0" encoding="UTF-8"?>
<in
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="sip_domain_network_set.xsd">
    <request>
        <domain_options>
            <system>
                <options xs:type="sipDomainNetworkOptionsType" />
            </system>
            <domain name="biysk.local">
                <options xs:type="sipDomainNetworkOptionsType" ip_set="ipset1" />
            </domain>
        </domain_options>
    </request>
</in>

Код ответа:

200

Ответ:

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="sip_domain_network_set.xsd">
    <result>
        <domain_options>
            <system/>
            <domain name="biysk.local">
                <success option="ip_set"/>
            </domain>
        </domain_options>
    </result>
</out>
  • Нет меток