Hc_sip_domain_properties_clean

Команда устанавливает значение по умолчанию для свойств SIP на уровне виртуальной АТС.

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

domain/<DOMAIN>/sip/properties/clean

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

POST

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

http://host:port/commands/sip_domain_properties_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 properties of SIP cluster.
            Usage: http://server:9999/commands/sip_domain_properties_clean.
            Implementation: hc_sip_domain_properties_clean.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"/>
    <!-- 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>

CODE


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

Пример:

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

<?xml version="1.0"?>
<in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="sip_domain_properties_clean.xsd">
    <request>
        <domain_options>
            <system/>
            <domain name="biysk.local">
                <option name="mtu_size"/>
                <option name="sip_transport"/>
            </domain>
                <domain name="d.empty"/>
        </domain_options>
    </request>
</in>
CODE

Код ответа:

200

Ответ:

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="sip_domain_properties_clean.xsd">
    <result>
        <domain_options>
            <system/>
            <domain name="biysk.local">
                <success option="mtu_size"/>
                <success option="sip_transport"/>
            </domain>
        </domain_options>
    </result>
</out>
CODE

Hc_sip_domain_properties_info

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

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

domain/<DOMAIN>/sip/properties/info

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

POST

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

http://host:port/commands/sip_domain_properties_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_properties_info.
            Implementation: hc_sip_domain_properties_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"/>
    <!-- compactHeadersType -->
    <xs:simpleType name="compactHeadersType">
        <xs:restriction base="unionType">
            <xs:enumeration value="force_compact"/>
            <xs:enumeration value="force_long"/>
            <xs:enumeration value="default"/>
        </xs:restriction>
    </xs:simpleType>
    <!-- authenticationStoreType -->
    <xs:simpleType name="authenticationStoreType">
        <xs:restriction base="unionType">
            <xs:enumeration value="ldap"/>
            <xs:enumeration value="ds"/>
        </xs:restriction>
    </xs:simpleType>
    <!-- sipTransportType -->
    <xs:simpleType name="sipTransportType">
        <xs:restriction base="unionType">
            <xs:enumeration value="udp_only"/>
            <xs:enumeration value="udp_prefer"/>
            <xs:enumeration value="tcp_prefer"/>
            <xs:enumeration value="tcp_only"/>
        </xs:restriction>
    </xs:simpleType>
    <!-- sipDomainPropertiesOptionsType-->
    <xs:complexType name="sipDomainPropertiesOptionsType">
        <xs:complexContent>
            <xs:extension base="baseOptionsType">
                <xs:attribute name="remote_party_id_enable" type="booleanType" use="optional"/>
                <xs:attribute name="direct_early_update" type="booleanType" use="optional"/>
                <xs:attribute name="absence_allow_by_rfc" type="booleanType" use="optional"/>
                <xs:attribute name="disable_ruri_control" type="booleanType" use="optional"/>
                <xs:attribute name="non_telephone_number_allow" type="booleanType" use="optional"/>
                <xs:attribute name="compact_headers" type="compactHeadersType" use="optional"/>
                <xs:attribute name="silent_mode" type="booleanType" use="optional"/>
                <xs:attribute name="info_header" type="booleanType" use="optional"/>
                <xs:attribute name="via_use_to_check" type="booleanType" use="optional"/>
                <xs:attribute name="nit100" type="booleanType" use="optional"/>
                <xs:attribute name="realm" type="stringType" use="optional"/>
                <xs:attribute name="allowed_ruri_to" type="stringType" use="optional">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            Format: Ruri_1; ruri_2; ...
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="auto_answer_version" type="stringType" use="optional"/>
                <xs:attribute name="authentication_store" type="authenticationStoreType" use="optional"/>
                <xs:attribute name="sip_transport" type="sipTransportType" use="optional"/>
                <xs:attribute name="mtu_size" type="positiveIntegerType" use="optional"/>
                <xs:attribute name="dtmf_relay" type="booleanType" use="optional"/>
                <xs:attribute name="dtmf_duration" type="positiveIntegerType" use="optional"/>
                <xs:attribute name="symbol_hash_as_is" type="booleanType" use="optional"/>
                <xs:attribute name="category_to_sip" type="stringType" use="optional">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            Defaults value:
                                "category"
                                "cpc"
                                "cpc-rus"
                                "default"
                                "none"
                            In addition to the values given,
                            any other may be specified.
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="messages_localization_enable" type="booleanType" use="optional"/>
            </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>
XML
Параметр "Domain" является обязательным для данной команды.

Пример:

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

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


Ответ: 200

<?xml version="1.0"?>
<out
	xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="sip_domain_properties_info.xsd">
	<result>
		<domain_options>
			<system>
				<options xs:type="sipDomainPropertiesOptionsType"/>
			</system>
			<domain name="biysk.local">
				<options xs:type="sipDomainPropertiesOptionsType" via_use_to_check="false" symbol_hash_as_is="false" sip_transport="udp_only" silent_mode="false" remote_party_id_enable="false" realm="biysk.local" non_telephone_number_allow="false" nit100="false" mtu_size="1300" messages_localization_enable="false" info_header="true" dtmf_relay="false" dtmf_duration="100" disable_ruri_control="false" direct_early_update="false" compact_headers="default" category_to_sip="category" auto_answer_version="alert-info:Auto Answer" authentication_store="ds" absence_allow_by_rfc="false"/>
			</domain>
		</domain_options>
	</result>
</out>
CODE

Hc_sip_domain_properties_set

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

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

domain/<DOMAIN>/sip/properties/set

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

POST

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

http://host:port/commands/sip_domain_properties_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-properties properties of SIP cluster.
            Usage: http://server:9999/commands/sip_domain_properties_set.
            Implementation: hc_sip_domain_properties_set.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"/>
    <!-- compactHeadersType -->
    <xs:simpleType name="compactHeadersType">
        <xs:restriction base="unionType">
            <xs:enumeration value="force_compact"/>
            <xs:enumeration value="force_long"/>
            <xs:enumeration value="default"/>
        </xs:restriction>
    </xs:simpleType>
    <!-- authenticationStoreType -->
    <xs:simpleType name="authenticationStoreType">
        <xs:restriction base="unionType">
            <xs:enumeration value="ldap"/>
            <xs:enumeration value="ds"/>
        </xs:restriction>
    </xs:simpleType>
    <!-- sipTransportType -->
    <xs:simpleType name="sipTransportType">
        <xs:restriction base="unionType">
            <xs:enumeration value="udp_only"/>
            <xs:enumeration value="udp_prefer"/>
            <xs:enumeration value="tcp_prefer"/>
            <xs:enumeration value="tcp_only"/>
        </xs:restriction>
    </xs:simpleType>
    <!-- sipDomainPropertiesOptionsType-->
    <xs:complexType name="sipDomainPropertiesOptionsType">
        <xs:complexContent>
            <xs:extension base="baseOptionsType">
                <xs:attribute name="remote_party_id_enable" type="booleanType" use="optional"/>
                <xs:attribute name="direct_early_update" type="booleanType" use="optional"/>
                <xs:attribute name="absence_allow_by_rfc" type="booleanType" use="optional"/>
                <xs:attribute name="disable_ruri_control" type="booleanType" use="optional"/>
                <xs:attribute name="non_telephone_number_allow" type="booleanType" use="optional"/>
                <xs:attribute name="compact_headers" type="compactHeadersType" use="optional"/>
                <xs:attribute name="silent_mode" type="booleanType" use="optional"/>
                <xs:attribute name="info_header" type="booleanType" use="optional"/>
                <xs:attribute name="via_use_to_check" type="booleanType" use="optional"/>
                <xs:attribute name="nit100" type="booleanType" use="optional"/>
                <xs:attribute name="realm" type="stringType" use="optional"/>
                <xs:attribute name="allowed_ruri_to" type="stringType" use="optional">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            Format: Ruri_1; ruri_2; ...
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="auto_answer_version" type="stringType" use="optional"/>
                <xs:attribute name="authentication_store" type="authenticationStoreType" use="optional"/>
                <xs:attribute name="sip_transport" type="sipTransportType" use="optional"/>
                <xs:attribute name="mtu_size" type="positiveIntegerType" use="optional"/>
                <xs:attribute name="dtmf_relay" type="booleanType" use="optional"/>
                <xs:attribute name="dtmf_duration" type="positiveIntegerType" use="optional"/>
                <xs:attribute name="symbol_hash_as_is" type="booleanType" use="optional"/>
                <xs:attribute name="category_to_sip" type="stringType" use="optional">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            Defaults value:
                                "category"
                                "cpc"
                                "cpc-rus"
                                "default"
                                "none"
                            In addition to the values given,
                            any other may be specified.
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="messages_localization_enable" type="booleanType" use="optional"/>
            </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>
CODE
Параметр "Domain" является обязательным для данной команды.

Пример:

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

<?xml version="1.0"?>
<in
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance">
    <request>
        <domain_options>
            <system>
                <options xs:type="sipDomainPropertiesOptionsType"/>
            </system>
            <domain name="ct.office">
                <options xs:type="sipDomainPropertiesOptionsType" compact_headers="force_long"  mtu_size="1400"/>
            </domain>
            <domain name="biysk.local">
                <options xs:type="sipDomainPropertiesOptionsType" sip_transport="udp_only"  mtu_size="1300" realm="biysk.local"/>
            </domain>
        </domain_options>
    </request>
</in>
CODE


Ответ: 200

<?xml version="1.0"?>
<out
	xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="sip_domain_properties_set.xsd">
	<result>
		<domain_options>
			<system/>
			<domain name="ct.office">
				<success option="compact_headers"/>
				<success option="mtu_size"/>
			</domain>
			<domain name="biysk.local">
				<success option="mtu_size"/>
				<success option="realm"/>
				<success option="sip_transport"/>
			</domain>
		</domain_options>
	</result>
</out>
CODE