Команда просмотра свойств Megaco в указанном домене.
Аналог команды в CoCon:
domain/<DOMAIN>/megaco/config/info
Шаблон URL-запроса:
http://server:9999/commands/megaco_info
Коды ответа:
XML-схема:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" id="megaco_info">
<xs:annotation>
<xs:documentation xml:lang="en">
Get properties of MEGACO for the specified domain.
Usage: http://server:9999/commands/megaco_info
Copyright (c) 2014, Eltex. All rights reserved.
</xs:documentation>
</xs:annotation>
<xs:include schemaLocation="error.xsd" />
<xs:include schemaLocation="ecm_common.xsd" />
<!-- Types -->
<!-- Encodings -->
<xs:simpleType name="encodingType">
<xs:restriction base="unionType">
<xs:enumeration value="text" />
<xs:enumeration value="pretty_text" />
<xs:enumeration value="compact_text" />
<xs:enumeration value="binary" />
</xs:restriction>
</xs:simpleType>
<!-- Encodings -->
<!-- FaxDetect -->
<xs:simpleType name="FaxDetect">
<xs:restriction base="unionType">
<xs:enumeration value="callee" />
<xs:enumeration value="caller" />
<xs:enumeration value="both" />
<xs:enumeration value="none" />
</xs:restriction>
</xs:simpleType>
<!-- FaxDetect -->
<!-- a string like: nodename1@host,192.168.23.1;nodename2@host,192.168.23.2 -->
<xs:simpleType name="NodeInterfaces">
<xs:restriction base="xs:string"/>
</xs:simpleType>
<!-- Options for MEGACO node -->
<xs:complexType name="megacoNodeOptionsType">
<xs:complexContent>
<xs:extension base="baseOptionsType">
<xs:attribute name="transport" type="inetProtocolType" use="optional" />
<xs:attribute name="listen_port" type="inetPortType" use="optional" />
<xs:attribute name="bind_to" type="NodeInterfaces" use="optional" />
<xs:attribute name="encoding" type="encodingType" use="optional" />
<xs:attribute name="pkg_adid_dt" type="xs:integer" use="optional" />
<xs:attribute name="fax_detect" type="FaxDetect" use="optional" />
<xs:attribute name="send_release_ack" type="xs:boolean" use="optional" />
<xs:attribute name="use_rtcp" type="xs:boolean" use="optional" />
<xs:attribute name="enabled" type="xs:boolean" use="optional" />
</xs:extension>
</xs:complexContent>
</xs:complexType>
<!-- Options for MEGACO node -->
<!-- Types -->
<!-- Root -->
<!-- in -->
<xs:element name="in">
<xs:complexType>
<xs:all minOccurs="1" maxOccurs="1">
<xs:element name="request" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:all minOccurs="1" maxOccurs="1">
<xs:element name="domain_options" type="domainInfoInType" minOccurs="1"
maxOccurs="1" />
</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" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:all minOccurs="1" maxOccurs="1">
<xs:element name="domain_options" type="domainInfoOutType" minOccurs="1"
maxOccurs="1" />
</xs:all>
</xs:complexType>
</xs:element>
<xs:element name="error" type="errorType" minOccurs="1" maxOccurs="1" />
</xs:choice>
</xs:complexType>
</xs:element>
<!-- out -->
<!-- Root -->
</xs:schema> |
Пример:
<?xml version="1.0" encoding="UTF-8"?> <in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="megaco_info.xsd"> <request> <domain_options domain="domain2" /> </request> </in> |
Ответ:
<?xml version="1.0" encoding="UTF-8"?> <out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="megaco_info.xsd"> <result> <domain_options> <system> <options xs:type="megacoNodeOptionsType"/> </system> <domain name="domain2"> <options xs:type="megacoNodeOptionsType" use_rtcp="true" transport="tcp" send_release_ack="true" pkg_adid_dt="100" listen_port="3456" fax_detect="both" encoding="text" enabled="true" bind_to="node1@host1,192.168.23.1;node2@host2,192.168.23.2"/> </domain> </domain_options> </result> </out> |
Изменение свойств Megaco в указанном домене
Аналог команды в CoCon:
domain/<DOMAIN>/megaco/config/set
Шаблон URL-запроса:
http://server:9999/commands/megaco_set
Коды ответа:
XML-схема:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" id="megaco_set">
<xs:annotation>
<xs:documentation xml:lang="en">
Set properties of MEGACO for the specified domain.
Usage: http://server:9999/commands/megaco_set
Copyright (c) 2014, Eltex. All rights reserved.
</xs:documentation>
</xs:annotation>
<xs:include schemaLocation="error.xsd" />
<xs:include schemaLocation="ecm_common.xsd" />
<!-- Types -->
<!-- Encodings -->
<xs:simpleType name="encodingType">
<xs:restriction base="unionType">
<xs:enumeration value="text" />
<xs:enumeration value="pretty_text" />
<xs:enumeration value="compact_text" />
<xs:enumeration value="binary" />
</xs:restriction>
</xs:simpleType>
<!-- Encodings -->
<!-- FaxDetect -->
<xs:simpleType name="FaxDetect">
<xs:restriction base="unionType">
<xs:enumeration value="callee" />
<xs:enumeration value="caller" />
<xs:enumeration value="both" />
<xs:enumeration value="none" />
</xs:restriction>
</xs:simpleType>
<!-- FaxDetect -->
<!-- a string like: nodename1@host,192.168.23.1;nodename2@host,192.168.23.2 -->
<xs:simpleType name="NodeInterfaces">
<xs:restriction base="xs:string"/>
</xs:simpleType>
<!-- Options for MEGACO node -->
<xs:complexType name="megacoNodeOptionsType">
<xs:complexContent>
<xs:extension base="baseOptionsType">
<xs:attribute name="transport" type="inetProtocolType" use="optional" />
<xs:attribute name="listen_port" type="inetPortType" use="optional" />
<xs:attribute name="bind_to" type="NodeInterfaces" use="optional" />
<xs:attribute name="encoding" type="encodingType" use="optional" />
<xs:attribute name="pkg_adid_dt" type="xs:integer" use="optional" />
<xs:attribute name="fax_detect" type="FaxDetect" use="optional" />
<xs:attribute name="send_release_ack" type="xs:boolean" use="optional" />
<xs:attribute name="use_rtcp" type="xs:boolean" use="optional" />
<xs:attribute name="enabled" type="xs:boolean" use="optional" />
</xs:extension>
</xs:complexContent>
</xs:complexType>
<!-- Options for MEGACO node -->
<!-- Types -->
<!-- Root -->
<!-- in -->
<xs:element name="in">
<xs:complexType>
<xs:all minOccurs="1" maxOccurs="1">
<xs:element name="request" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:all minOccurs="1" maxOccurs="1">
<xs:element name="domain_options" type="domainSetInType" minOccurs="1"
maxOccurs="1" />
</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" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:all minOccurs="1" maxOccurs="1">
<xs:element name="domain_options" type="domainSetOutType" minOccurs="1"
maxOccurs="1"/>
</xs:all>
</xs:complexType>
</xs:element>
<xs:element name="error" type="errorType" minOccurs="1" maxOccurs="1" />
</xs:choice>
</xs:complexType>
</xs:element>
<!-- out -->
<!-- Root -->
</xs:schema> |
Пример:
Запрос:
<?xml version="1.0"?> <in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="megaco_set.xsd"> <request> <domain_options> <system> <options/> </system> <domain name="domain2"> <options xs:type="megacoNodeOptionsType" use_rtcp="true" transport="tcp" send_release_ack="true" pkg_adid_dt="100" listen_port="3456" fax_detect="both" encoding="text" enabled="true" bind_to="node1@host1,192.168.23.1;node2@host2,192.168.23.2"/> </domain> </domain_options> </request> </in> |
Ответ:
<?xml version="1.0"?> <out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="megaco_set.xsd"> <result> <domain_options> <system/> <domain name="domain2"> <success option="bind_to"/> <success option="enabled"/> <success option="encoding"/> <success option="fax_detect"/> <success option="listen_port"/> <success option="pkg_adid_dt"/> <success option="send_release_ack"/> <success option="transport"/> <success option="use_rtcp"/> </domain> </domain_options> </result> </out> |
Команда сброса свойств Megaco в указанном домене.
Аналог команды в CoCon:
domain/<DOMAIN>/megaco/config/clean
Шаблон URL-ответа:
http://server:9999/commands/megaco_clean
Коды ответа:
XML-схема:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" id="megaco_clean">
<xs:annotation>
<xs:documentation xml:lang="en">
Clean property of MEGACO for the specified domain.
Usage: http://server:9999/commands/megaco_clean
Copyright (c) 2014, Eltex. All rights reserved.
</xs:documentation>
</xs:annotation>
<xs:include schemaLocation="error.xsd" />
<xs:include schemaLocation="ecm_common.xsd" />
<!-- in -->
<xs:element name="in">
<xs:complexType>
<xs:all minOccurs="1" maxOccurs="1">
<xs:element name="request" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:all minOccurs="1" maxOccurs="1">
<xs:element name="domain_options" type="domainCleanInType" minOccurs="1"
maxOccurs="1" />
</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" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:all minOccurs="1" maxOccurs="1">
<xs:element name="domain_options" type="domainCleanOutType" minOccurs="1"
maxOccurs="1"/>
</xs:all>
</xs:complexType>
</xs:element>
<xs:element name="error" type="errorType" minOccurs="1" maxOccurs="1" />
</xs:choice>
</xs:complexType>
</xs:element>
<!-- out -->
</xs:schema> |
Пример:
Запрос:
<?xml version="1.0"?> <in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="megaco_clean.xsd"> <request> <domain_options> <system/> <domain name="domain2"> <option name="bind_to"/> <option name="enabled"/> <option name="encoding"/> <option name="fax_detect"/> <option name="listen_port"/> <option name="pkg_adid_dt"/> <option name="send_release_ack"/> <option name="transport"/> <option name="use_rtcp"/> </domain> </domain_options> </request> </in> |
Ответ:
<?xml version="1.0"?> <out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="megaco_clean.xsd"> <result> <domain_options> <system/> <domain name="domain2"> <success option="bind_to"/> <success option="enabled"/> <success option="encoding"/> <success option="fax_detect"/> <success option="listen_port"/> <success option="pkg_adid_dt"/> <success option="send_release_ack"/> <success option="transport"/> <success option="use_rtcp"/> </domain> </domain_options> </result> </out> |