Hc_domain_call_statistics

Команда для получения значения общей статистики вызовов домена.

Аналог команды в CoCon:

domain/<DOMAIN>/licence/usage

Метод HTTP-запроса:

POST

Шаблон HTTP-запроса:

http://host:port/commands/domain_call_statistics

Код HTTP-ответа:

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

XSD-схема XML-запроса/ответа:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:include schemaLocation="error.xsd"/>
    <!-- idType -->
    <xs:simpleType name="idType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="cp">
                <xs:annotation>
                    <xs:documentation xml:lang="en">
                        Simple calls
                    </xs:documentation>
                </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="tc">
                <xs:annotation>
                    <xs:documentation xml:lang="en">
                        Teleconference calls
                    </xs:documentation>
                </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="cc-active-agents">
                <xs:annotation>
                    <xs:documentation xml:lang="en">
                        Logged in call center operators
                    </xs:documentation>
                </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="cc-active-supervisors">
                <xs:annotation>
                    <xs:documentation xml:lang="en">
                        Logged in call center supervisors
                    </xs:documentation>
                </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="tsmn-concurrent-calls">
                <xs:annotation>
                    <xs:documentation xml:lang="en">
                        Call on TSMN service
                    </xs:documentation>
                </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="tsmn-concurrent-calls-redundancy">
                <xs:annotation>
                    <xs:documentation xml:lang="en">
                        Call on TSMN service
                    </xs:documentation>
                </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="add-on-conferences">
                <xs:annotation>
                    <xs:documentation xml:lang="en">
                        Add-On conferences
                    </xs:documentation>
                </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="tc-active-conferences">
                <xs:annotation>
                    <xs:documentation xml:lang="en">
                        Teleconferences
                    </xs:documentation>
                </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="meet-me-conferences">
                <xs:annotation>
                    <xs:documentation xml:lang="en">
                        Add-On conferences
                    </xs:documentation>
                </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="chat-room-conferences">
                <xs:annotation>
                    <xs:documentation xml:lang="en">
                        Chat rooms
                    </xs:documentation>
                </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="dialer-channels">
                <xs:annotation>
                    <xs:documentation xml:lang="en">
                        Calls from dialer subsystem
                    </xs:documentation>
                </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="recorder-voice-channels">
                <xs:annotation>
                    <xs:documentation xml:lang="en">
                        Total count of simultaneous records voice calls
                    </xs:documentation>
                </xs:annotation>
            </xs:enumeration>
        </xs:restriction>
    </xs:simpleType>
    <!-- statisticType -->
    <xs:complexType name="statisticType">
        <xs:attribute name="id" type="idType" use="required"/>
        <xs:attribute name="activeCalls" type="xs:token" use="optional"/>
        <xs:attribute name="topActiveCalls" type="xs:token" use="optional"/>
        <xs:attribute name="callLimit" type="xs:token" use="optional"/>
        <xs:attribute name="totalCalls" type="xs:token" use="optional"/>
        <xs:attribute name="rejectedCalls" type="xs:token" use="optional"/>
        <xs:attribute name="cps" type="xs:token" use="optional"/>
    </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:choice>
                <!--Positive case-->
                <xs:element name="response">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="statistic" type="statisticType" minOccurs="0" maxOccurs="unbounded"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
                <!--Or error-->
                <xs:element name="error" type="errorType"/>
            </xs:choice>
        </xs:complexType>
    </xs:element>
</xs:schema>

XML

Пример:

Запрос:
http://192.168.1.21:9999/commands/domain_call_statistics

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

Код ответа:

200

Ответ:

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_domain_call_statistics.xsd">
    <response>
        <statistic id="add-on-conferences" rejectedCalls="0" totalCalls="0" cps="0" activeCalls="0" topActiveCalls="0"/>
        <statistic id="cc-active-agents" rejectedCalls="0" totalCalls="0" cps="0" activeCalls="0" topActiveCalls="0"/>
        <statistic id="cc-active-supervisors" rejectedCalls="0" totalCalls="0" cps="0" activeCalls="0" topActiveCalls="0"/>
        <statistic id="chat-room-conferences" rejectedCalls="0" totalCalls="0" cps="0" activeCalls="0" topActiveCalls="0"/>
        <statistic id="cp" rejectedCalls="0" totalCalls="30" callLimit="100" cps="0" activeCalls="0" topActiveCalls="2"/>
        <statistic id="dialer-channels" rejectedCalls="0" totalCalls="0" cps="0" activeCalls="0" topActiveCalls="0"/>
        <statistic id="meet-me-conferences" rejectedCalls="0" totalCalls="0" cps="0" activeCalls="0" topActiveCalls="0"/>
        <statistic id="recorder-voice-channels" rejectedCalls="0" totalCalls="30" callLimit="200" cps="0" activeCalls="0" topActiveCalls="1"/>
        <statistic id="tc" rejectedCalls="0" totalCalls="0" cps="0" activeCalls="0" topActiveCalls="0"/>
        <statistic id="tc-active-conferences" rejectedCalls="0" totalCalls="0" cps="0" activeCalls="0" topActiveCalls="0"/>
        <statistic id="tsmn-concurrent-calls" rejectedCalls="0" totalCalls="0" cps="0" activeCalls="0" topActiveCalls="0"/>
        <statistic id="tsmn-concurrent-calls-redundancy" rejectedCalls="0" totalCalls="0" cps="0" activeCalls="0" topActiveCalls="0"/>
    </response>
</out>
XML