Команда предназначена для просмотра списка user agent - ов

Метод http запроса

POST

Шаблон http запроса

http://host:port/commands/user_agent_list

Код http ответа

200 – в случае успеха;
200 – в случае ошибки.

Xsd схема xml файла запроса/ответа:

<xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:annotation>
		<xs:documentation xml:lang="en">
Show list of a user agents Usage: http://server:9999/commands/user_agent_list. Implementation: hc_user_agent_list.erl. Git: git@git.eltex.loc:httpTerminal.git. Copyright (c) 2019, Eltex. All rights reserved.
</xs:documentation>
	</xs:annotation>
	<xs:include schemaLocation="error.xsd"/>
	<xs:include schemaLocation="ecm_common.xsd"/>
	<!-- Types -->
	<xs:complexType name="resultType">
		<xs:sequence>
			<xs:element name="domain" minOccurs="1" maxOccurs="unbounded">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="user_agent" minOccurs="0" maxOccurs="unbounded">
							<xs:complexType>
								<xs:attribute name="name" type="xs:string" use="required"/>
								<xs:attribute name="alias" type="xs:string" use="optional"/>
								<xs:attribute name="iface" type="xs:string" use="optional"/>
								<xs:attribute name="status" type="xs:string" use="required"/>
							</xs:complexType>
						</xs:element>
					</xs:sequence>
					<xs:attribute name="name" type="xs:string" use="required"/>
					<xs:attribute name="active_count" type="positiveIntegerType" use="required"/>
					<xs:attribute name="uniq_count" type="positiveIntegerType" use="required"/>
					<xs:attribute name="total_count" type="positiveIntegerType" use="required"/>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<!-- in-->
	<xs:element name="in">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="request">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="domain" minOccurs="1" maxOccurs="unbounded">
								<xs:complexType>
									<xs:attribute name="name" type="xs:string" use="required"/>
								</xs:complexType>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<!-- out -->
	<xs:element name="out">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="result" type="resultType"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
</xs:schema>
CODE

Пример:

Запрос: http://192.168.1.21:9999/user_agent_list

<?xml version="1.0" encoding="UTF-8"?>
<in xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="hc_user_agent_list.xsd">
  <request>
    <domain name="biysk.local"/>
  </request>
</in>

CODE

Ответ: 200

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_user_agent_list.xsd">
    <result>
        <domain name="biysk.local" active_count="9" uniq_count="14" total_count="213">
            <user_agent name="Asterisk PBX 13.1.0~dfsg-1.1ubuntu4.1" alias="240500" iface="240500@biysk.local" status="false"/>
            <user_agent name="Asterisk PBX 13.1.0~dfsg-1.1ubuntu4.1" alias="240501" iface="240501@biysk.local" status="false"/>
            
            <user_agent name="Brcm-Callctrl/v1.10.3 M5T SIP Stack/4.1.2.2" alias="240462" iface="240462@biysk.local" status="false"/>
            <user_agent name="Brcm-Callctrl/v1.10.3 M5T SIP Stack/4.1.2.2" alias="240469" iface="240469@biysk.local" status="false"/>
            <user_agent name="RG-1402G/1.8.1 SN/VI0C000069 sofia-sip/1.12.10" alias="240471" iface="240471@biysk.local" status="false"/>
            <user_agent name="RG-1402G/1.8.1 SN/VI0C000069 sofia-sip/1.12.10" alias="240475" iface="240475@biysk.local" status="false"/>
            <user_agent name="RG-1404GF-W/1.11.0 SN/VI25002012 sofia-sip/1.12.10" alias="240470" iface="240470@biysk.local" status="false"/>
            <user_agent name="RG-1404GF-W/1.11.0 SN/VI25002012 sofia-sip/1.12.10" alias="240474" iface="240474@biysk.local" status="false"/>
            <user_agent name="TAU-2M.IP/2.0.0.229 SN/VI39005419 sofia-sip/1.12.10" alias="240464" iface="240464@biysk.local" status="false"/>
            <user_agent name="TAU-2M.IP/2.0.0.229 SN/VI39005419 sofia-sip/1.12.10" alias="240465" iface="240465@biysk.local" status="false"/>
            <user_agent name="Twinkle/1.9.0" alias="240007" iface="240007@biysk.local" status="false"/>
            <user_agent name="VP-12/1.2.1.454 SN/VI51000844 sofia-sip/1.12.10" alias="240466" iface="240466@biysk.local" status="false"/>
            <user_agent name="VP-12/1.2.1.454 SN/VI51000844 sofia-sip/1.12.10" alias="240473" iface="240473@biysk.local" status="false"/>
            <user_agent name="VP-12P/1.4.0.93 SN/VI4B000942 sofia-sip/1.12.10" alias="240467" iface="240467@biysk.local" status="false"/>
            <user_agent name="Yealink SIP-T28P 2.73.14.3" alias="240244" iface="240244@biysk.local" status="false"/>
            <user_agent name="Yealink SIP-T28P 2.73.14.3" alias="240101" iface="240101@biysk.local" status="false"/>
            <user_agent name="Yealink W52P 25.80.14.1" alias="240316" iface="240316@biysk.local" status="false"/>
        </domain>
    </result>
</out>
CODE