Hc_core_ring_options_clean
Команда позволяет сбросить настройки ring-сигналов на определенном домене.
Аналог команды в CoCon:
domain/<DOMAIN_NAME>/distinctive-ring/ring/clean
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/core_ring_options_clean
Код HTTP-ответа:
- 201 – в случае успеха;
- 404 – в случае ошибки.
XSD-схема XML-запроса/ответа:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:include schemaLocation="error.xsd"/>
<!-- in -->
<xs:element name="in">
<xs:complexType>
<xs:sequence>
<xs:element name="request" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="ring" minOccurs="1" maxOccurs="16">
<xs:complexType>
<xs:attribute name="name" type="ringType" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="domain" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:simpleType name="ringType">
<xs:restriction base="xs:string">
<xs:enumeration value="ring01"/>
<xs:enumeration value="ring02"/>
<xs:enumeration value="ring03"/>
<xs:enumeration value="ring04"/>
<xs:enumeration value="ring05"/>
<xs:enumeration value="ring06"/>
<xs:enumeration value="ring07"/>
<xs:enumeration value="ring08"/>
<xs:enumeration value="ring09"/>
<xs:enumeration value="ring10"/>
<xs:enumeration value="ring11"/>
<xs:enumeration value="ring12"/>
<xs:enumeration value="ring13"/>
<xs:enumeration value="ring14"/>
<xs:enumeration value="ring15"/>
<xs:enumeration value="ring16"/>
</xs:restriction>
</xs:simpleType>
<!-- out -->
<xs:element name="out">
<xs:complexType>
<xs:sequence>
<xs:element name="error" type="errorType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Пример 1:
http://192.168.1.21:9999/commands/core_ring_options_clean
<in>
<request domain="biysk.local">
<ring name="ring01"/>
<ring name="ring02"/>
<ring name="ring03"/>
<ring name="ring10"/>
<ring name="ring13"/>
<ring name="ring16"/>
</request>
</in>
Ответ:
201
Hc_core_ring_options_set
Команда изменяет настройки ring-сигналов на определенном домене.
Аналог команды в CoCon:
domain/<DOMAIN_NAME>/distinctive-ring/ring/set
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/core_ring_options_set
Код HTTP-ответа:
- 200 – в случае успеха;
- 404 – в случае ошибки.
XSD-схема XML-запроса/ответа:
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:include schemaLocation="error.xsd"/>
<!-- in -->
<xs:element name="in">
<xs:complexType>
<xs:sequence>
<xs:element name="request" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="ring" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="name" type="ringType" use="required"/>
<xs:attribute name="path" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="domain" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:simpleType name="ringType">
<xs:restriction base="xs:string">
<xs:enumeration value="ring01"/>
<xs:enumeration value="ring02"/>
<xs:enumeration value="ring03"/>
<xs:enumeration value="ring04"/>
<xs:enumeration value="ring05"/>
<xs:enumeration value="ring06"/>
<xs:enumeration value="ring07"/>
<xs:enumeration value="ring08"/>
<xs:enumeration value="ring09"/>
<xs:enumeration value="ring10"/>
<xs:enumeration value="ring11"/>
<xs:enumeration value="ring12"/>
<xs:enumeration value="ring13"/>
<xs:enumeration value="ring14"/>
<xs:enumeration value="ring15"/>
<xs:enumeration value="ring16"/>
</xs:restriction>
</xs:simpleType>
<!-- out -->
<xs:element name="out">
<xs:complexType>
<xs:sequence>
<xs:element name="error" type="errorType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Пример:
http://192.168.1.21:9999/commands/core_ring_options_set
<in>
<request domain="biysk.local">
<ring name="ring06" path="domain/ring/cartman_detectivesandy.wav"/>
<ring name="ring07" path="domain/ring/ring07.wav"/>
<ring name="ring08" path="domain/ring/ustrica6.wav"/>
</request>
</in>
Ответ:
200
Hc_core_ring_options_info
Команда позволяет просмотреть настройки ring-сигналов на определенном домене.
Аналог команды в CoCon:
domain/<DOMAIN_NAME>/distinctive-ring/ring/info
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/core_ring_options_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">
<xs:include schemaLocation="error.xsd"/>
<!-- in -->
<xs:element name="in">
<xs:complexType>
<xs:sequence>
<xs:element name="request" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="ring" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="name" type="ringType" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="domain" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:simpleType name="ringType">
<xs:restriction base="xs:string">
<xs:enumeration value="ring01"/>
<xs:enumeration value="ring02"/>
<xs:enumeration value="ring03"/>
<xs:enumeration value="ring04"/>
<xs:enumeration value="ring05"/>
<xs:enumeration value="ring06"/>
<xs:enumeration value="ring07"/>
<xs:enumeration value="ring08"/>
<xs:enumeration value="ring09"/>
<xs:enumeration value="ring10"/>
<xs:enumeration value="ring11"/>
<xs:enumeration value="ring12"/>
<xs:enumeration value="ring13"/>
<xs:enumeration value="ring14"/>
<xs:enumeration value="ring15"/>
<xs:enumeration value="ring16"/>
</xs:restriction>
</xs:simpleType>
<!-- out -->
<xs:element name="out">
<xs:complexType>
<xs:sequence>
<xs:element name="ring" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="name" type="ringType" use="required"/>
<xs:attribute name="path" type="xs:string" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="error" type="errorType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Пример 1:
http://192.168.1.21:9999/commands/core_ring_options_info
<in>
<request domain="biysk.local">
<ring name="ring01"/>
<ring name="ring02"/>
<ring name="ring03"/>
</request>
</in>
Ответ:
200
<?xml version="1.0"?>
<out
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_core_ring_options_info.xsd">
<ring name="ring01" path=""/>
<ring name="ring02" path=""/>
<ring name="ring03" path=""/>
</out>
Пример 2:
http://192.168.1.21:9999/commands/core_ring_options_info
<in>
<request domain="biysk.local"/>
</in>
Ответ:
200
<?xml version="1.0"?>
<out
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_core_ring_options_info.xsd">
<ring name="ring01" path=""/>
<ring name="ring02" path=""/>
<ring name="ring03" path=""/>
<ring name="ring04" path=""/>
<ring name="ring05" path=""/>
<ring name="ring06" path=""/>
<ring name="ring07" path=""/>
<ring name="ring08" path=""/>
<ring name="ring09" path=""/>
<ring name="ring10" path=""/>
<ring name="ring11" path=""/>
<ring name="ring12" path=""/>
<ring name="ring13" path=""/>
<ring name="ring14" path=""/>
<ring name="ring15" path=""/>
<ring name="ring16" path=""/>
</out>