Команда для получения списка комнат телеконференций.
Аналог команды в CoCon:
domain/<DOMAIN>/teleconference/list
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/teleconference_room_list
Код HTTP-ответа:
XSD-схема XML-запроса/ответа:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- roomType-->
<xs:complexType name="roomType">
<xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="description" type="xs:string"/>
</xs:complexType>
<!-- resultType-->
<xs:complexType name="resultType">
<xs:sequence>
<xs:element name="room" type="roomType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<!-- in-->
<xs:element name="in">
<xs:complexType>
<xs:sequence>
<xs:element name="request">
<xs:complexType>
<xs:attribute name="domain" type="xs:string" use="required"/>
</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:choice>
</xs:complexType>
</xs:element>
</xs:schema>
|
Пример:
Запрос:
http://192.168.1.21:9999/commands/teleconference_room_list
<in xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="teleconference_room_list.xsd"> <request domain="biysk.local"/> </in> |
Ответ:200
<?xml version="1.0"?>
<out
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="teleconference_room_list.xsd">
<result>
<room name="123" description="for_energo"/>
</result>
</out>
|
Команда позволяет создать новую комнату телеконференции.
Аналог команды в CoCon:
domain/<DOMAIN>/teleconference/declare
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/teleconference_room_declare
Код HTTP-ответа:
XSD-схема XML-запроса/ответа:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:include schemaLocation="error.xsd"/>
<!-- roomType-->
<xs:complexType name="roomType">
<xs:attribute name="name" type="xs:string" use="required"/>
</xs:complexType>
<!-- resultType-->
<xs:complexType name="resultType">
<xs:sequence>
<xs:element name="room" type="roomType"/>
</xs:sequence>
</xs:complexType>
<!-- in-->
<xs:element name="in">
<xs:complexType>
<xs:sequence>
<xs:element name="request">
<xs:complexType>
<xs:attribute name="domain" type="xs:string" use="required"/>
<xs:attribute name="room" type="xs:integer" use="required"/>
<xs:attribute name="description" type="xs:string"/>
</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"/>
<!--Or error-->
<xs:element name="error" type="errorType"/>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
|
Пример 1:
Запрос: http://192.168.1.21:9999/commands/teleconference_room_declare
<?xml version="1.0" encoding="UTF-8"?>
<in
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="teleconference_room_declare.xsd">
<request domain="biysk.local" room="101" description="test test"/>
</in |
Ответ: 200
<?xml version="1.0"?>
<out
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="teleconference_room_declare.xsd">
<result>
<room name="101"/>
</result>
</out> |
Пример 2:
Запрос: http://192.168.1.21:9999/commands/teleconference_room_declare
<?xml version="1.0" encoding="UTF-8"?>
<in xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="teleconference_room_declare.xsd">
<request domain="test.ats" room="101" description="test test"/>
</in> |
Ответ: 404
<?xml version="1.0" encoding="UTF-8"?>
<out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="teleconference_room_declare.xsd">
<error cmd="hc_teleconference_room_declare" reason="badargs" body="{error,already_exists,"101"}"/>
</out>
|
Команда позволяет удалить комнату телеконференции
Аналог команды в CoCon:
domain/<DOMAIN>/teleconference/remove
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/teleconference_room_remove
Код HTTP-ответа:
XSD-схема XML-запроса/ответа:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:include schemaLocation="error.xsd"/>
<!-- roomType-->
<xs:complexType name="roomType">
<xs:attribute name="name" type="xs:string" use="required"/>
</xs:complexType>
<!-- resultType-->
<xs:complexType name="resultType">
<xs:sequence>
<xs:element name="room" type="roomType"/>
</xs:sequence>
</xs:complexType>
<!-- in-->
<xs:element name="in">
<xs:complexType>
<xs:sequence>
<xs:element name="request">
<xs:complexType>
<xs:attribute name="domain" type="xs:string" use="required"/>
<xs:attribute name="room" type="xs:integer" use="required"/>
</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"/>
<!--Or error-->
<xs:element name="error" type="errorType"/>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
|
Пример 1:
Запрос: http://192.168.1.21:9999/commands/teleconference_room_remove
<?xml version="1.0" encoding="UTF-8"?>
<in
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="teleconference_room_remove.xsd">
<request domain="biysk.local" room="101" />
</in> |
Ответ: 200
<?xml version="1.0"?> <out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="teleconference_room_remove.xsd"> <result> <room name="101"/> </result> </out> |
Пример 2:
Запрос: http://192.168.1.21:9999/commands/teleconference_room_remove
<?xml version="1.0" encoding="UTF-8"?>
<in xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="teleconference_room_remove.xsd">
<request domain="test.ats" room="101" description="test test"/>
</in> |
Код ответа:
404
Ответ:
<?xml version="1.0" encoding="UTF-8"?>
<out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="teleconference_room_remove.xsd">
<error cmd="hc_teleconference_room_remove" reason="badargs" body="{error,bad_room,"101"}"/>
</out>
|
Команда позволяет изменить параметры комнаты телеконференции, так же есть возможность изменить состав участников комнаты
Аналог команды в CoCon:
domain/<DOMAIN>/teleconference/property-set
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/teleconference_room_set
Код HTTP-ответа:
XSD-схема XML-запроса/ответа:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:include schemaLocation="error.xsd"/>
<!-- valueType-->
<xs:complexType name="valueType">
<xs:attribute name="key" type="xs:string"/>
<xs:attribute name="value" type="xs:string"/>
</xs:complexType>
<!-- memberType-->
<xs:complexType name="memberType">
<xs:sequence minOccurs="0">
<xs:element name="property" type="valueType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="number" type="xs:string" use="required"/>
</xs:complexType>
<!-- memberPropertyType-->
<xs:complexType name="memberPropertyType">
<xs:sequence minOccurs="0">
<xs:element name="member" type="memberType" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<!-- groupType-->
<xs:complexType name="groupType">
<xs:attribute name="name" type="xs:string" use="required"/>
</xs:complexType>
<!-- groupPropertyType-->
<xs:complexType name="groupPropertyType">
<xs:sequence minOccurs="0">
<xs:element name="group" type="groupType" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<!-- roomType-->
<xs:complexType name="roomType">
<xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="description" type="xs:string"/>
</xs:complexType>
<!-- roomPropertyType-->
<xs:complexType name="roomPropertyType">
<xs:attribute name="answer_to_initiator_when_success_outgoing_call" type="xs:boolean"/>
<xs:attribute name="auto_collect" type="xs:boolean"/>
<xs:attribute name="caller_id_source" type="xs:string"/>
<xs:attribute name="destroy_by_no_initiator" type="xs:boolean"/>
<xs:attribute name="destroy_when_only_one_member_left" type="xs:boolean"/>
<xs:attribute name="display_name" type="xs:string"/>
<xs:attribute name="display_name_prefix" type="xs:string"/>
<xs:attribute name="farewell" type="xs:string"/>
<xs:attribute name="greeting_of_incoming_call" type="xs:string"/>
<xs:attribute name="greeting_of_outgoing_call" type="xs:string"/>
<xs:attribute name="greeting_of_outgoing_call_by_auto_collect" type="xs:string"/>
<xs:attribute name="max_members" type="xs:integer"/>
<xs:attribute name="no_answer_timeout" type="xs:integer"/>
<xs:attribute name="notification_of_join_subscriber" type="xs:string"/>
<xs:attribute name="notification_of_leave_subscriber" type="xs:string"/>
<xs:attribute name="private" type="xs:boolean"/>
</xs:complexType>
<!-- resultType-->
<xs:complexType name="resultType">
<xs:sequence>
<xs:element name="room" type="roomType"/>
</xs:sequence>
</xs:complexType>
<!-- in-->
<xs:element name="in">
<xs:complexType>
<xs:sequence>
<xs:element name="request">
<xs:complexType>
<xs:all>
<xs:element name="properties" type="roomPropertyType"/>
<xs:element name="groups" type="groupPropertyType" minOccurs="0"/>
<xs:element name="members" type="memberPropertyType" minOccurs="0"/>
</xs:all>
<xs:attribute name="domain" type="xs:string" use="required"/>
<xs:attribute name="room" type="xs:string" use="required"/>
</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"/>
<!--Or error-->
<xs:element name="error" type="errorType"/>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
|
Пример 1:
Запрос: http://192.168.1.21:9999/commands/teleconference_room_set
<?xml version="1.0"?>
<in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="teleconference_room_info.xsd">
<request domain="biysk.local" room="101">
<properties auto_collect="false" caller_id_source="conference" destroy_by_no_initiator="true" display_name_prefix="123" farewell="system://sounds/ai_conference_destroyed.wav" greeting_of_incoming_call="system://sounds/ai_conference_prompt.wav" greeting_of_outgoing_call="system://sounds/ai_conference_prompt.wav" greeting_of_outgoing_call_by_auto_collect="system://sounds/ai_conference_prompt.wav" max_members="16" no_answer_timeout="5" private="false"/>
<groups/>
<members/>
</request>
</in> |
Ответ:200
<?xml version="1.0" encoding="UTF-8"?>
<out
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="teleconference_room_set.xsd">
<error cmd="hc_teleconference_room_set" reason="badargs" body="{bad_property,"caller_id_source"}"/>
</out> |
Команда позволяет показать параметры комнаты телеконференции
Аналог команды в CoCon:
domain/<DOMAIN>/teleconference/info
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/teleconference_room_info
Код HTTP-ответа:
XSD-схема XML-запроса/ответа:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:include schemaLocation="error.xsd"/>
<!-- valueType-->
<xs:complexType name="valueType">
<xs:attribute name="key" type="xs:string"/>
<xs:attribute name="value" type="xs:string"/>
</xs:complexType>
<!-- memberType-->
<xs:complexType name="memberType">
<xs:sequence minOccurs="0">
<xs:element name="property" type="valueType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="number" type="xs:string" use="required"/>
</xs:complexType>
<!-- memberPropertyType-->
<xs:complexType name="memberPropertyType">
<xs:sequence minOccurs="0">
<xs:element name="member" type="memberType" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<!-- groupType-->
<xs:complexType name="groupType">
<xs:attribute name="name" type="xs:string" use="required"/>
</xs:complexType>
<!-- groupResultType-->
<xs:complexType name="groupResultType">
<xs:sequence>
<xs:element name="group" type="groupType" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<!-- roomType-->
<xs:complexType name="roomType">
<xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="description" type="xs:string"/>
</xs:complexType>
<!-- roomPropertyType-->
<xs:complexType name="roomPropertyType">
<xs:attribute name="answer_to_initiator_when_success_outgoing_call" type="xs:boolean"/>
<xs:attribute name="auto_collect" type="xs:boolean"/>
<xs:attribute name="caller_id_source" type="xs:string"/>
<xs:attribute name="destroy_by_no_initiator" type="xs:boolean"/>
<xs:attribute name="destroy_when_only_one_member_left" type="xs:boolean"/>
<xs:attribute name="display_name" type="xs:string"/>
<xs:attribute name="display_name_prefix" type="xs:string"/>
<xs:attribute name="farewell" type="xs:string"/>
<xs:attribute name="greeting_of_incoming_call" type="xs:string"/>
<xs:attribute name="greeting_of_outgoing_call" type="xs:string"/>
<xs:attribute name="greeting_of_outgoing_call_by_auto_collect" type="xs:string"/>
<xs:attribute name="max_members" type="xs:integer"/>
<xs:attribute name="no_answer_timeout" type="xs:integer"/>
<xs:attribute name="notification_of_join_subscriber" type="xs:string"/>
<xs:attribute name="notification_of_leave_subscriber" type="xs:string"/>
<xs:attribute name="private" type="xs:boolean"/>
</xs:complexType>
<!-- resultType-->
<xs:complexType name="resultType">
<xs:all>
<xs:element name="room" type="roomType"/>
<xs:element name="properties" type="roomPropertyType"/>
<xs:element name="groups" type="groupResultType" minOccurs="0"/>
<xs:element name="members" type="memberPropertyType" minOccurs="0"/>
</xs:all>
</xs:complexType>
<!-- in-->
<xs:element name="in">
<xs:complexType>
<xs:sequence>
<xs:element name="request">
<xs:complexType>
<xs:attribute name="domain" type="xs:string" use="required"/>
<xs:attribute name="room" type="xs:string" use="required"/>
</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"/>
<!--Or error-->
<xs:element name="error" type="errorType"/>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
|
Пример 1:
Запрос: http://192.168.1.21:9999/commands/teleconference_room_info
<in
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="teleconference_room_info.xsd">
<request domain="biysk.local" room="101"/>
</in> |
Код ответа:
200
Ответ:
<?xml version="1.0"?> <out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="teleconference_room_info.xsd"> <result> <room name="101" description="test test"/> <properties private="false" notification_of_leave_subscriber="tone://?f1=390&f2=0&on_msec=200&off_msec=100&duration=300" notification_of_join_subscriber="tone://?f1=490&f2=0&on_msec=200&off_msec=100&duration=300" no_answer_timeout="undefined" max_members="16" greeting_of_outgoing_call_by_auto_collect="system://sounds/ai_conference_prompt.wav" greeting_of_outgoing_call="system://sounds/ai_conference_prompt.wav" greeting_of_incoming_call="system://sounds/ai_conference_prompt.wav" farewell="system://sounds/ai_conference_destroyed.wav" display_name_prefix="Teleconference " destroy_when_only_one_member_left="false" destroy_by_no_initiator="true" auto_collect="false" answer_to_initiator_when_success_outgoing_call="false"/> </result> </out> |
Пример 2:
Запрос: http://192.168.1.21:9999/commands/teleconference_room_info
<in
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="teleconference_room_info.xsd">
<request domain="biysk.local" room="121"/>
</in> |
Ответ: 434
<?xml version="1.0" encoding="UTF-8"?>
<out
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="teleconference_room_info.xsd">
<error cmd="teleconference_room_info" reason="nocommand" body="Command not found by path /domain/t1.local/teleconference/info"/>
</out> |