Команда для добавления участника в конференцию.
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/<DOMAIN>/service/cc/arm/add_participant
Коды ответов:
200 — Ошибки передаются в теле ответа
Ошибки, передаваемые в теле ответа:
- cannot_perform_cmd
XSD-схема XML-запроса/ответа:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:include schemaLocation="error.xsd"/> <xs:complexType name="Participant"> <xs:attribute name="number" use="optional"/> <!-- If number is specified conversation_id will be ignored --> <xs:attribute name="conversation_id" use="optional"/> </xs:complexType> <xs:complexType name="AddToConference"> <xs:all> <xs:element name="participants" minOccurs="0"> <xs:complexType> <xs:sequence> <xs:element name="participant" minOccurs="0" maxOccurs="unbounded" type="Participant"/> </xs:sequence> <xs:attribute name="conference_id" type="xs:string" use="required"/> </xs:complexType> </xs:element> </xs:all> </xs:complexType> <!-- in --> <xs:element name="in"> <xs:complexType> <xs:all> <xs:element name="request"> <xs:complexType> <xs:sequence> <xs:element name="add_to_conference" type="AddToConference"/> </xs:sequence> </xs:complexType> </xs:element> </xs:all> </xs:complexType> </xs:element> <!-- out --> <xs:element name="out"> <xs:complexType> <xs:choice> <xs:element name="response"> <xs:complexType> <xs:sequence> <xs:element name="ok"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="error" type="errorType"/> </xs:choice> </xs:complexType> </xs:element> </xs:schema>
Пример использует технологию websocket
Пример:
Запрос:
0100000002750019add_participant [ { "_name": "in", "_content": [ { "_name": "request", "_content": [ { "_name": "add_participant", "_attributes": { "conference_id": "1607929308885" }, "_content": [ { "_name": "participant", "_attributes": { "number": "104", "is_manager": "false" } } ] } ] } ] } ]
Код ответа:
200
Ответ:
0100000002240019200 [ { "_name": "out", "_attributes": { "xmlns:xs": "http://www.w3.org/2001/XMLSchema-instance", "xs:noNamespaceSchemaLocation": "add_to_conference.xsd" }, "_content": [ { "_name": "response", "_content": [ { "_name": "ok" } ] } ] } ]
0 Комментариев