Hc_iface_group_owner_info
Команда позволяет вывести список свойств групп интерфейсов.
Могут быть следующие группы интерфейсов: сгруппированные по владельцу, по имени группы, по владельцу и имени группы, глобальная группа.
Аналог команды в CoCon:
/cluster/storage/<CLUSTER>/iface/group-info
/domain/<DOMAIN>/iface/group-info
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/iface_group_owner_info
Код HTTP-ответа:
При выполнении команды 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"> <!-- propertyTypeType--> <xs:simpleType name="propertyTypeType"> <xs:restriction base="xs:string"> <xs:enumeration value="global"/> <xs:enumeration value="owner"/> <xs:enumeration value="group"/> <xs:enumeration value="group_owner"/> </xs:restriction> </xs:simpleType> <!-- propertyType--> <xs:complexType name="propertyType"> <xs:attribute name="type" type="propertyTypeType" use="required"/> <xs:attribute name="key" type="xs:string" use="required"/> <xs:attribute name="value" type="xs:string" use="required"/> </xs:complexType> <!-- in--> <xs:element name="in"> <xs:complexType> <xs:all> <xs:element name="request"> <xs:complexType> <xs:attribute name="owner" type="xs:string" use="optional"/> <xs:attribute name="group" type="xs:string" use="optional"/> <xs:attribute name="domain" type="xs:string" use="required"/> </xs:complexType> </xs:element> </xs:all> </xs:complexType> </xs:element> <!-- out--> <xs:element name="out"> <xs:complexType> <xs:all> <xs:element name="header"> <xs:complexType> <xs:attribute name="owner" type="xs:string" use="required"/> <xs:attribute name="group" type="xs:string" use="required"/> </xs:complexType> </xs:element> <xs:element name="properties"> <xs:complexType> <xs:sequence> <xs:element name="property" type="propertyType" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> </xs:element> </xs:all> </xs:complexType> </xs:element> </xs:schema>
Примеры:
Пример запроса информации о глобальной группе:
Запрос: http://192.168.1.21:9999/commands/iface_group_owner_info
<?xml version="1.0" encoding="UTF-8"?> <in xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="hc_group_owner_info.xsd"> <request domain="biysk.local"/> </in>
Ответ:
<?xml version="1.0"?> <out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_group_owner_info.xsd"> <header group="*" owner="*"/> <properties/> </out>
Пример запроса информации о группе по владельцу:
Запрос: http://192.168.1.21:9999/commands/iface_group_owner_info
<?xml version="1.0" encoding="UTF-8"?> <in xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="hc_group_owner_info.xsd"> <request owner="sip1" domain="biysk.local"/> </in>
Ответ:
<?xml version="1.0"?> <out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_group_owner_info.xsd"> <header group="*" owner="sip1"/> <properties/> </out>
Пример запроса информации о группе по имени группы:
Запрос: http://192.168.1.21:9999/commands/iface_group_owner_info
<?xml version="1.0" encoding="UTF-8"?> <in xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="hc_group_owner_info.xsd"> <request group="loc.gr" domain="biysk.local"/> </in>
Ответ:
<?xml version="1.0"?> <out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_group_owner_info.xsd"> <header group="loc.gr" owner="*"/> <properties> <property type="group" key="gate" value="{gate_amqp,<<"acp.adapter.init.ex">>,<<"acp.ecss10.sip1.init.rk">>}"/> <property type="group" key="owner" value=""sip1""/> <property type="group" key="terminal_type" value="basic"/> </properties> </out>
Пример запроса информации о группе по имени группы и владельцу:
Запрос: http://192.168.1.21:9999/commands/iface_group_owner_info
<?xml version="1.0" encoding="UTF-8"?> <in xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="hc_group_owner_info.xsd"> <request owner="sip1" group="loc.gr" domain="biysk.local"/> </in>
Ответ:
<?xml version="1.0"?> <out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_group_owner_info.xsd"> <header group="loc.gr" owner="sip1"/> <properties> <property type="group" key="gate" value="{gate_amqp,<<"acp.adapter.init.ex">>,<<"acp.ecss10.sip1.init.rk">>}"/> <property type="group" key="owner" value=""sip1""/> <property type="group" key="terminal_type" value="basic"/> </properties> </out>
Hc_iface_group_owner_list
Команда позволяет вывести список владельцев, каждый из которых содержит список групп интерфейсов, определенных для данного владельца.
Аналог команды в CoCon:
/cluster/storage/<CLUSTER>/iface/list
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/iface_group_owner_list
Код HTTP-ответа:
При выполнении команды 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"> <!-- ownerType--> <xs:simpleType name="ownerTypeType"> <xs:restriction base="xs:string"> <xs:enumeration value="sip" /> <xs:enumeration value="megaco" /> <xs:enumeration value="virtual" /> <xs:enumeration value="cc" /> <xs:enumeration value="other" /> </xs:restriction> </xs:simpleType> <!-- groupType--> <xs:complexType name="groupType"> <xs:attribute name="name" type="xs:string" use="required"/> </xs:complexType> <!-- ownerType--> <xs:complexType name="ownerType"> <xs:sequence> <xs:element name="groups"> <xs:complexType> <xs:sequence> <xs:element name="group" type="groupType" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="name" type="xs:string" use="required"/> <xs:attribute name="type" type="ownerTypeType" use="required"/> </xs:complexType> <!-- in--> <xs:element name="in"> <xs:complexType> <xs:all> <xs:element name="request"> <xs:complexType> <xs:attribute name="domain" type="xs:string" use="required"/> </xs:complexType> </xs:element> </xs:all> </xs:complexType> </xs:element> <!-- out--> <xs:element name="out"> <xs:complexType> <xs:sequence> <xs:element name="owners"> <xs:complexType> <xs:sequence> <xs:element name="owner" type="ownerType" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>
Пример:
В данном примере запрашиваются все пары {Owner, Group}, относящиеся к домену biysk.local.
Запрос:
http://192.168.1.21:9999/commands/iface_group_owner_list
<in xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="hc_iface_group_owner_list.xsd"> <request domain="biysk.local"></request> </in>
Ответ:
<?xml version="1.0"?> <out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_group_owner_info.xsd"> <header group="*" owner="*"/> <properties/> </out>
Hc_iface_list
Команда позволяет вывести список интерфейсов, определенных для конкретного домена.
Аналог команды в CoCon:
/domain/<DOMAIN>/iface/list
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/iface_list
Код HTTP-ответа:
При выполнении команды HTTP-терминал может ответить следующими сообщениями:
- 200 – в случае успеха;
- 404 – в случае ошибки.
XSD-схема XML-файла запроса/ответа:
<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <!-- ifaceType --> <xs:complexType name="ifaceType"> <xs:attribute name="id" type="xs:string" use="required"/> <xs:attribute name="name" type="xs:string" use="required"/> <xs:attribute name="owner" type="xs:string" use="required"/> <xs:attribute name="group" type="xs:string" use="required"/> <xs:attribute name="type" type="xs:string" use="required"/> <xs:attribute name="active" type="xs:string" use="required"/> </xs:complexType> <!-- ifacesType --> <xs:complexType name="ifacesType"> <xs:sequence> <xs:element name="iface" type="ifaceType" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> <!-- in--> <xs:element name="in"> <xs:complexType> <xs:all> <xs:element name="request"> <xs:complexType> <xs:attribute name="domain" type="xs:string" use="required"/> <xs:attribute name="owner" type="xs:string" use="optional"/> <xs:attribute name="group" type="xs:string" use="optional"/> </xs:complexType> </xs:element> </xs:all> </xs:complexType> </xs:element> <!-- out--> <xs:element name="out"> <xs:complexType> <xs:all> <xs:element name="ifaces" type="ifacesType"/> </xs:all> </xs:complexType> </xs:element> </xs:schema>
Примеры:
Пример запроса всех интерфейсов в определенном домене:
Запрос: http://192.168.1.21:9999/commands/iface_list
<?xml version="1.0" encoding="UTF-8"?> <in xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="hc_iface_list.xsd"> <request domain="biysk.local"/> </in>
Ответ:
<?xml version="1.0"?> <out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_iface_list.xsd"> <ifaces> <iface id="edf226eb1f5042e8" name="240320@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271cb03f0cfe" name="240561@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271cb3cc7e4c" name="240574@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271cb660a67c" name="240582@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf226eb1bf3e814" name="240301@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271ca8757083" name="240527@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271ca4fcfe42" name="240515@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271cad1c9dba" name="240550@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271cb5b93736" name="240577@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271cac15c716" name="240544@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271cad071c95" name="240549@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271cb05619d5" name="240562@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271cabe5439c" name="240542@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271caf29c2b8" name="240552@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271ca8f06a4a" name="240532@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf226eb1ebd0505" name="240314@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271cb3b62b8c" name="240573@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271cb36f9fc0" name="240570@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2289f905d8e1b" name="240475@biysk.local" owner="sip1" group="loc.gr" type="sip" active="true"/> <iface id="edf2271ca8c00a29" name="240530@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271ca93708bf" name="240535@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="smg-4" name="smg-4" owner="sip1" group="smg.gr" type="sip" active="true"/> <iface id="edf2271cb6a4b62f" name="240585@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf226b198e312ae" name="240469@biysk.local" owner="sip1" group="loc.gr" type="sip" active="true"/> <iface id="to_aster" name="to_aster" owner="sip1" group="sbc.gr" type="sip" active="true"/> <iface id="edf2271ca91e81ac" name="240534@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271cb2c3ad45" name="240569@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271ca58f5f96" name="240521@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="ems1" name="ems1" owner="sip1" group="ssw.gr" type="sip" active="true"/> <iface id="edf226719a92a7ec" name="240244@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271ca29f4b89" name="240506@biysk.local" owner="sip1" group="loc.gr" type="sip" active="true"/> <iface id="edf2271cb5e72f51" name="240579@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271ca51630a8" name="240516@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf226eb1ed6e509" name="240315@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf22662f6a2f30b" name="240100@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271ca8a6906b" name="240529@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271ca52e8af2" name="240517@biysk.local" owner="sip1" group="loc.gr" type="sip" active="true"/> <iface id="edf226eb22390c7f" name="240326@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271cb857c7de" name="240593@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271ca2ce8b2d" name="240508@biysk.local" owner="sip1" group="loc.gr" type="sip" active="true"/> <iface id="edf2271cb2ad1571" name="240568@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271ca9ec0caf" name="240540@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271cb80a39aa" name="240590@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271caf889f63" name="240556@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271ca9071a3e" name="240533@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271cb2936e1b" name="240567@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf226eb1d718858" name="240312@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf226c25b88b393" name="240470@biysk.local" owner="sip1" group="loc.gr" type="sip" active="true"/> <iface id="edf226eb1d0dd302" name="240308@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271ca88f2c67" name="240528@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271cb62f4d4f" name="240580@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271cac458b96" name="240546@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271cb8ea4ebf" name="240596@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271cb9185027" name="240598@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271ca9657375" name="240537@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf226eb225c82a7" name="240327@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf226d9c20ce115" name="240474@biysk.local" owner="sip1" group="loc.gr" type="sip" active="true"/> <iface id="edf2271ca62a32c6" name="240525@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf228831e93783f" name="240473@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="system:ivr" name="system:ivr" owner=".system" group=".system" type="system" active="true"/> <iface id="edf2271cb06cfe8f" name="240563@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271ca8d90956" name="240531@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271caf5a979b" name="240554@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271caf71aa22" name="240555@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf226eb1e9b5cfe" name="240313@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271cb68e99bd" name="240584@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271cb39f424a" name="240572@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271cb6baaf4e" name="240586@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271ca26dddef" name="240504@biysk.local" owner="sip1" group="loc.gr" type="sip" active="true"/> <iface id="edf226817d1982f2" name="240462@biysk.local" owner="sip1" group="loc.gr" type="sip" active="true"/> <iface id="edf226eb1cf405d9" name="240307@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf226eb22756fb9" name="240328@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf22863e66eb098" name="240471@biysk.local" owner="sip1" group="loc.gr" type="sip" active="true"/> <iface id="edf2271ca2872dc6" name="240505@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271cac2e2433" name="240545@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271cb2744ee2" name="240566@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2262f604887f5" name="240002@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf226eb1d26f373" name="240309@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf226913a64e3a0" name="240464@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271ca238df19" name="240502@biysk.local" owner="sip1" group="loc.gr" type="sip" active="true"/> <iface id="edf226eb1fec6ac8" name="240324@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271ca5f7ad4e" name="240523@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271cb8d299e8" name="240595@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf226eb1c5fcef2" name="240305@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271ca611e1b9" name="240524@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271ca2e7ad90" name="240509@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271cb6fe6b2d" name="240589@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf226eb1fd51259" name="240323@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271ca32ec6a7" name="240512@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271ca577aa0b" name="240520@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf226eb1d3f029e" name="240310@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="ems2" name="ems2" owner="sip1" group="ssw.gr" type="sip" active="true"/> <iface id="edf2271cb5d046f2" name="240578@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271ca21eb197" name="240501@biysk.local" owner="sip1" group="loc.gr" type="sip" active="true"/> <iface id="edf2271cb57ea54c" name="240575@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="bsk1" name="bsk1" owner="sip1" group="ssw.gr" type="sip" active="true"/> <iface id="system:teleconference" name="system:teleconference" owner=".system" group=".system" type="system" active="true"/> <iface id="edf2271ca55f7d9e" name="240519@biysk.local" owner="sip1" group="loc.gr" type="sip" active="true"/> <iface id="edf2271cb5a0e395" name="240576@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271cb09ae820" name="240565@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271ca316e7d1" name="240511@biysk.local" owner="sip1" group="loc.gr" type="sip" active="true"/> <iface id="edf226eb1f395043" name="240319@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271cb08450be" name="240564@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf226a2e0ac523f" name="240465@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271ca2b66757" name="240507@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271caceee695" name="240548@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf226eb1c44805f" name="240304@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271ca85212ce" name="240526@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271cac5d3f75" name="240547@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf226523dd33451" name="240006@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf226eb1d57d2c2" name="240311@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf226eb1ef128b7" name="240316@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271ca9d33115" name="240539@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271cb86e59fb" name="240594@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="to_sipp" name="to_sipp" owner="sip1" group="sbc.gr" type="sip" active="true"/> <iface id="edf2271cb6e77310" name="240588@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf227e93a0c4fa3" name="240101@biysk.local" owner="sip1" group="loc.gr" type="sip" active="true"/> <iface id="edf2271cb027e155" name="240560@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271cb828277c" name="240591@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271ca3895626" name="240513@biysk.local" owner="sip1" group="loc.gr" type="sip" active="true"/> <iface id="edf2271cb649574b" name="240581@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf226eb1c2b1eb6" name="240303@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271caf42f76b" name="240553@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271ca545f7c2" name="240518@biysk.local" owner="sip1" group="loc.gr" type="sip" active="true"/> <iface id="bsk2" name="bsk2" owner="sip1" group="ssw.gr" type="sip" active="true"/> <iface id="edf226eb1f218354" name="240318@biysk.local" owner="sip1" group="loc.gr" type="sip" active="true"/> <iface id="edf2271cb00f336a" name="240559@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf226eb1fbd5755" name="240322@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf22845a78f052f" name="240467@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf227c01853372a" name="240007@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271cb9011c41" name="240597@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271cb3884dea" name="240571@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf22811ae3d2f77" name="240466@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf22622c97565d6" name="240001@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271ca9b7f2a9" name="240538@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="virtual:240331@biysk.local" name="virtual:240331@biysk.local" owner=".virtual" group="loc.gr" type="virtual" active="true"/> <iface id="edf2271caf9efef8" name="240557@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf226eb228f049d" name="240329@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271ca2ff0bd0" name="240510@biysk.local" owner="sip1" group="loc.gr" type="sip" active="true"/> <iface id="edf2271cabc1f165" name="240541@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf226eb1fa22a13" name="240321@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271ca1e76414" name="240500@biysk.local" owner="sip1" group="loc.gr" type="sip" active="true"/> <iface id="edf2271caf074b0c" name="240551@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271cabfe7255" name="240543@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271cb840155f" name="240592@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271ca25187b5" name="240503@biysk.local" owner="sip1" group="loc.gr" type="sip" active="true"/> <iface id="edf2271ca94e575f" name="240536@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="nsk_sbc" name="nsk_sbc" owner="sip1" group="sbc.gr" type="sip" active="true"/> <iface id="edf226eb1bc2ce8d" name="240300@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271caff2659c" name="240558@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf226432b6f9fc3" name="240003@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271ca4dc9a98" name="240514@biysk.local" owner="sip1" group="loc.gr" type="sip" active="true"/> <iface id="edf2271ca5a69b46" name="240522@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf226eb2004bc2d" name="240325@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271cb6d07b9e" name="240587@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf226eb1c113bb8" name="240302@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf226eb1cd2b9d5" name="240306@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271cb6778fc8" name="240583@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf226eb1f09a319" name="240317@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> <iface id="edf2271cb92ed658" name="240599@biysk.local" owner="sip1" group="loc.gr" type="sip" active="false"/> </ifaces> </out>
Пример запроса всех интерфейсов по определенной группе и домену:
Запрос: http://192.168.1.21:9999/commands/iface_list
<?xml version="1.0" encoding="UTF-8"?> <in xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="hc_iface_list.xsd"> <request domain="biysk.local" group="sbc.gr"/> </in>
Ответ:
<?xml version="1.0"?> <out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_iface_list.xsd"> <ifaces> <iface id="nsk_sbc" name="nsk_sbc" owner="sip1" group="sbc.gr" type="sip" active="true"/> <iface id="to_aster" name="to_aster" owner="sip1" group="sbc.gr" type="sip" active="true"/> <iface id="to_sipp" name="to_sipp" owner="sip1" group="sbc.gr" type="sip" active="true"/> </ifaces> </out>
Пример запроса всех интерфейсов определенного владельца в определенной группе и домене:
Запрос: http://192.168.1.21:9999/commands/iface_list
<?xml version="1.0" encoding="UTF-8"?> <in xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="hc_iface_list.xsd"> <request domain="biysk.local" owner="sip1" group="ssw.gr"/> </in>
Ответ:
<?xml version="1.0"?> <out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_iface_list.xsd"> <ifaces> <iface id="bsk1" name="bsk1" owner="sip1" group="ssw.gr" type="sip" active="true"/> <iface id="bsk2" name="bsk2" owner="sip1" group="ssw.gr" type="sip" active="true"/> <iface id="ems1" name="ems1" owner="sip1" group="ssw.gr" type="sip" active="true"/> <iface id="ems2" name="ems2" owner="sip1" group="ssw.gr" type="sip" active="true"/> </ifaces> </out>
Hc_iface_info
Команда позволяет вывести список свойств определенного интерфейса, или noIface, если интерфейс не существует.
Аналог команды в CoCon:
/cluster/storage/<CLUSTER>/iface/info
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/iface_info
Код HTTP-ответа:
При выполнении команды 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"> <!-- propertyTypeType--> <xs:simpleType name="propertyTypeType"> <xs:restriction base="xs:string"> <xs:enumeration value="global"/> <xs:enumeration value="owner"/> <xs:enumeration value="group"/> <xs:enumeration value="group_owner"/> <xs:enumeration value="iface"/> </xs:restriction> </xs:simpleType> <!-- propertyType--> <xs:complexType name="propertyType"> <xs:attribute name="type" type="propertyTypeType" use="required"/> <xs:attribute name="key" type="xs:string" use="required"/> <xs:attribute name="value" type="xs:string" use="required"/> </xs:complexType> <!-- ifaceRequestType--> <xs:complexType name="ifaceRequestType"> <xs:attribute name="id" type="xs:string" use="required"/> </xs:complexType> <!-- requestType --> <xs:complexType name="requestType"> <xs:sequence> <xs:element name="iface" type="ifaceRequestType" minOccurs="1" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="domain" type="xs:string" use="required"/> <xs:attribute name="property" type="xs:string" use="optional"/> </xs:complexType> <!-- ifaceResponseType--> <xs:complexType name="ifaceResponseType"> <xs:all> <xs:element name="properties"> <xs:complexType> <xs:sequence> <xs:element name="property" type="propertyType" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> </xs:element> </xs:all> <xs:attribute name="iface" type="xs:string" use="required"/> <xs:attribute name="name" type="xs:string" use="required"/> <xs:attribute name="owner" type="xs:string" use="required"/> <xs:attribute name="group" type="xs:string" use="required"/> <xs:attribute name="active" type="xs:boolean" use="required"/> </xs:complexType> <!-- noIfaceType--> <xs:complexType name="noIfaceType"> <xs:attribute name="iface" type="xs:string" use="required"/> </xs:complexType> <!-- in--> <xs:element name="in"> <xs:complexType> <xs:all> <xs:element name="request" type="requestType"/> </xs:all> </xs:complexType> </xs:element> <!-- out--> <xs:element name="out"> <xs:complexType> <xs:sequence> <xs:element name="iface" type="ifaceResponseType" minOccurs="0" maxOccurs="unbounded"/> <xs:element name="noIface" type="noIfaceType" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>
Пример запроса информации о существующем интерфейсе:
Запрос: http://192.168.1.21:9999/commands/iface_info
<?xml version="1.0" encoding="UTF-8"?> <in xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="hc_iface_info.xsd"> <request domain="biysk.local"> <iface id="56089554a52e2f44" /> </request> </in>
Ответ:
<?xml version="1.0"?> <out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_iface_info.xsd"> <iface iface="56089554a52e2f44" name="240475@biysk.local" owner="sip1" group="loc.gr" active="true"> <properties> <property type="iface" key="media-profile" value="{media_profile,"biysk.local","default", "Default media profile for current domain.",user, [{media_profile_codecs,'<other>', [{media_profile_codec,<<"<other>">>,<<"*">>,true,[]}], [{[offroad],true}]}, {media_profile_codecs,audio, [{media_profile_codec,<<"G722">>,<<"*">>,true,[]}, {media_profile_codec,<<"PCMA">>,<<"*">>,true,[]}, {media_profile_codec,<<"PCMU">>,<<"*">>,true,[]}, {media_profile_codec,<<"G729">>,<<"*">>,true,[]}, {media_profile_codec,<<"telephone-event">>,<<"*">>,true,[]}], [{[offroad],true}]}], []}"/> <property type="iface" key="user_agent" value=""RG-1402G/1.8.1 SN/VI0C000069 sofia-sip/1.12.10""/> <property type="iface" key="user_name" value=""240475""/> <property type="iface" key="subtype" value="user"/> <property type="iface" key="sip_domain" value=""biysk.local""/> <property type="iface" key="routing.context" value="ctx_from_local"/> <property type="iface" key="password" value=""jndtn-00""/> <property type="iface" key="my_from" value="none"/> <property type="iface" key="login" value="login_as_number"/> <property type="iface" key="declaration" value="{"admin",{1537,425760,267577}}"/> <property type="iface" key="auth_qop" value="true"/> <property type="iface" key="aliases_list" value="["240475"]"/> <property type="iface" key="alias" value=""alias-as-user""/> <property type="iface" key="adapter\version" value=""3.11.0.968""/> <property type="iface" key="account" value="{"...50-52-48-52-55-53","...106-110-100-116-110-45-48-48"}"/> <property type="iface" key="profile" value="undefined"/> <property type="iface" key="type" value="sip"/> <property type="iface" key="id" value="<<"56089554a52e2f44">>"/> <property type="iface" key="gate" value="{gate_amqp,<<"acp.adapter.init.ex">>,<<"acp.sip.sip1.ipset1.init.rk">>}"/> <property type="global" key="zone" value="<<"default">>"/> <property type="global" key="terminal_type" value="smart"/> <property type="global" key="site" value="<<"local">>"/> <property type="global" key="dtmf_source" value="'rfc+info'"/> </properties> </iface> </out>
Пример запроса информации о несуществующем интерфейсе:
Запрос: http://192.168.1.21:9999/commands/iface_list
<in xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="hc_iface_info.xsd"> <request domain="biysk.local"> <iface id="bla-bla" /> </request> </in>
Ответ:
<?xml version="1.0"?> <out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_iface_info.xsd"> <noIface iface="bla-bla"/> </out>
Hc_iface_user_set
Команда по установке свойств интерфейса.
Аналог команды в CoCon:
domain/<DOMAIN>/iface/user-set
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/iface_user_set
Код HTTP-ответа:
- 200 – в случае успеха;
- 404 – в случае ошибки.
XSD-схема XML-файла запроса/ответа:
<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" id="iface_user_set"> <xs:annotation> <xs:documentation xml:lang="en"> Set ECSS iface(s) resources properties. Copyright (c) 2015, Eltex. All rights reserved. </xs:documentation> </xs:annotation> <xs:include schemaLocation="error.xsd" /> <xs:include schemaLocation="iface_user_set_common.xsd" /> <!-- in --> <xs:element name="in"> <xs:complexType> <xs:all> <xs:element name="request" minOccurs="1" maxOccurs="1"> <xs:complexType> <xs:attribute name="domain" type="xs:token" use="required"/> <xs:attribute name="owner" type="xs:token" use="optional"/> <xs:attribute name="group" type="xs:token" use="optional"/> <xs:attribute name="ifaces" type="xs:normalizedString" use="required"/> <xs:attribute name="routing_context" type="xs:string" use="optional"/> <xs:attribute name="modificator" type="xs:string" use="optional"/> <xs:attribute name="call_record" type="xs:boolean" use="optional"/> <xs:attribute name="site" type="xs:string" use="optional"/> <xs:attribute name="zone" type="xs:string" use="optional"/> <xs:attribute name="terminal_type" type="terminalTypeType" use="optional"/> <xs:attribute name="dtmf_source" type="dtmfSourceType" use="optional"/> <xs:attribute name="support_encoding" type="supportEncodingType" use="optional"/> </xs:complexType> </xs:element> </xs:all> </xs:complexType> </xs:element> <!-- in --> <!-- out --> <xs:element name="out"> <xs:complexType> <xs:choice> <xs:element name="response"> <xs:complexType> <xs:attribute name="status" type="xs:token"/> </xs:complexType> </xs:element> <xs:element name="error" type="errorType" minOccurs="1" maxOccurs="1" /> </xs:choice> </xs:complexType> </xs:element> <!-- out --> </xs:schema>
Пример:
Запрос:
http://192.168.1.21:9999/commands/iface_user_set
<?xml version="1.0" encoding="UTF-8"?> <in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="iface_user_set.xsd"> <request domain="biysk.local" ifaces="f68b872f0c851e15" routing_context="default_context"/> </in>
Ответ:
<?xml version="1.0"?> <out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="iface_user_set.xsd"> <response status="ok"/> </out>