Дерево страниц
Перейти к концу метаданных
Переход к началу метаданных

Команда просмотра истории вызовов текущего оператора.

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

POST

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

http://host:port/<DOMAIN>/service/cc/arm/operator_call_history

Коды ответов:

200

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

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

    <xs:include schemaLocation="error.xsd"/>
    <xs:include schemaLocation="conversation.xsd"/>
    <xs:include schemaLocation="call_history_common.xsd"/>

    <xs:complexType name="CallHistory">
        <xs:all>
            <xs:element name="url_list" type="UrlList" minOccurs="0" maxOccurs="1"/>
            <xs:element name="ss_list" type="SSList" minOccurs="0" maxOccurs="1"/>
            <xs:element name="success_faxes" type="UrlList" minOccurs="0" maxOccurs="1"/>
            <xs:element name="failed_faxes" type="UrlList" minOccurs="0" maxOccurs="1"/>
        </xs:all>
        <xs:attribute name="call_ref" type="xs:string" use="required"/>
        <xs:attribute name="start_time" type="xs:string" use="required"/>
        <xs:attribute name="answer_time" type="xs:string" use="optional"/>
        <xs:attribute name="release_time" type="xs:string" use="required"/>
        <xs:attribute name="duration" type="xs:nonNegativeInteger" use="required"/> <!-- длительность в секундах -->
        <xs:attribute name="total_duration" type="xs:nonNegativeInteger" use="required"/> <!-- длительность в секундах -->
        <xs:attribute name="waiting_duration" type="xs:nonNegativeInteger" use="required"/> <!-- длительность в секундах -->
        <xs:attribute name="talk_duration" type="xs:nonNegativeInteger" use="required"/> <!-- длительность в секундах -->
        <xs:attribute name="queue_id" type="xs:string" use="optional"/> <!-- в текущей версии если вызов не проходил через очередь
                                                                             то queue_id = "", но в новой версии мы от этого избавимся -->
        <xs:attribute name="direction" type="Direction" use="required"/>
        <xs:attribute name="display_name" type="xs:string" use="required"/> <!-- отображаемое имя оператора, для данного вызова в истории -->
        <xs:attribute name="digits" type="xs:string" use="required"/> <!-- номер оператора, для данного вызова в истории  -->
        <xs:attribute name="call_record" type="xs:string" use="optional"/> <!-- запись разговора со стороны оператора  -->
        <xs:attribute name="remote_display_name" type="xs:string" use="required"/>
        <xs:attribute name="remote_digits" type="xs:string" use="optional"/>
        <xs:attribute name="remote_agent_id" type="xs:string" use="optional"/>
    </xs:complexType>

    <!-- responseType -->
    <xs:complexType name="CallHistoryList">
        <xs:sequence>
            <xs:element name="call_history" type="CallHistory" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attribute name="tag" type="xs:string" use="optional"/> <!-- тэг, который может быть использован в дальнейшем для постраничного вывода -->
    </xs:complexType>

    <xs:complexType name="Filters">
        <xs:attribute name="offset" type="xs:integer" use="required"/>
        <xs:attribute name="limit" type="xs:integer" use="required"/>
        <xs:attribute name="from_date" type="xs:string" use="optional"/>
        <xs:attribute name="to_date" type="xs:string" use="optional"/>
        <xs:attribute name="number" type="xs:string" use="optional"/>
        <xs:attribute name="from_number" type="xs:string" use="optional"/>
        <xs:attribute name="to_number" type="xs:string" use="optional"/>
        <xs:attribute name="cc_agent_group" type="xs:string" use="optional"/>
        <xs:attribute name="cc_agent_a_group" type="xs:string" use="optional"/>
        <xs:attribute name="cc_agent_b_group" type="xs:string" use="optional"/>
        <xs:attribute name="cc_agent_id" type="xs:string" use="optional"/>
        <xs:attribute name="cc_agent_a_id" type="xs:string" use="optional"/>
        <xs:attribute name="cc_agent_b_id" type="xs:string" use="optional"/>
        <xs:attribute name="display_name" type="xs:string" use="optional"/>
        <xs:attribute name="display_name_a" type="xs:string" use="optional"/>
        <xs:attribute name="display_name_b" type="xs:string" use="optional"/>
        <xs:attribute name="skip_incomplete" type="xs:boolean" use="optional"/>
        <xs:attribute name="direction" type="Direction" use="optional"/> <!-- Направление вызова. Входящий/исходящий -->
        <xs:attribute name="tag" type="xs:string" use="optional"/> <!-- Тэг возвращенный при предыдущем запросе. Используется для постраничного вывода -->
    </xs:complexType>

    <!-- in -->
    <xs:element name="in">
        <xs:complexType>
            <xs:all>
                <xs:element name="request">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="filters" type="Filters"/>
                        </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="history" type="CallHistoryList"/>
                        </xs:sequence>
                        <xs:attribute name="timestamp" type="xs:string"/> <!--Response timestamp -->
                    </xs:complexType>
                </xs:element>
                <xs:element name="error" type="errorType"/>
            </xs:choice>
        </xs:complexType>
    </xs:element>
</xs:schema>

Пример использует технологию websocket

Пример:
Запрос:

0100000001590012operator_call_history
[
  {
    "_name": "in",
    "_content": [
      {
        "_name": "request",
        "_content": [
          {
            "_name": "filters",
            "_attributes": {
              "limit": "50"
            }
          }
        ]
      }
    ]
  }
]                  

Код ответа:

200

Ответ:

0100000058100012200
[
  {
    "_name": "out",
    "_attributes": {
      "xmlns:xs": "http://www.w3.org/2001/XMLSchema-instance",
      "xs:noNamespaceSchemaLocation": "operator_call_history.xsd"
    },
    "_content": [
      {
        "_name": "response",
        "_attributes": {
          "timestamp": "2020/12/10 14:25:53"
        },
        "_content": [
          {
            "_name": "history",
            "_attributes": {
              "tag": "g2gEZAADdGFnZAAHaGlzdG9yeWgCZAAIZGF0ZXRpbWVoAmgDYgAAB+RhDGEKaANhDmEHYThsAAAABmgCZAALY2NfYWdlbnRfaWRtAAAAAzEwMmgCZAAPc2tpcF9pbmNvbXBsZXRlZAAEdHJ1ZWgCZAAQc2tpcF9zdXBlcnZpc2luZ2QABHRydWVoAmQACmNhbGxzX3R5cGVkAAdoaXN0b3J5aAJkAAR2aWV3aAJkAAhvcGVyYXRvcm0AAAADMTAyaAJkAAZhY3RpdmVkAAVmYWxzZWo="
            },
            "_content": [
              {
                "_name": "call_history",
                "_attributes": {
                  "total_duration": "4",
                  "waiting_duration": "4",
                  "talk_duration": "0",
                  "release_reason": "released_by_system",
                  "digits": "102",
                  "remote_digits": "101",
                  "call_ref": "613295627",
                  "duration": "0",
                  "release_time": "2020/12/10 14:20:54",
                  "answer_time": "",
                  "start_time": "2020/12/10 14:20:50",
                  "direction": "in",
                  "call_record": "",
                  "remote_display_name": "................ 1",
                  "display_name": "",
                  "remote_agent_id": ""
                },
                "_content": [
                  {
                    "_name": "url_list"
                  }
                ]
              },
              {
                "_name": "call_history",
                "_attributes": {
                  "total_duration": "13",
                  "waiting_duration": "7",
                  "talk_duration": "6",
                  "release_reason": "released_by_system",
                  "digits": "102",
                  "remote_digits": "101",
                  "call_ref": "537644738",
                  "duration": "5",
                  "release_time": "2020/12/10 14:20:45",
                  "answer_time": "2020/12/10 14:20:39",
                  "start_time": "2020/12/10 14:20:32",
                  "direction": "in",
                  "call_record": "",
                  "remote_display_name": "................ 1",
                  "display_name": "",
                  "remote_agent_id": ""
                },
                "_content": [
                  {
                    "_name": "url_list"
                  }
                ]
              },
              {
                "_name": "call_history",
                "_attributes": {
                  "total_duration": "7",
                  "waiting_duration": "4",
                  "talk_duration": "3",
                  "release_reason": "released_by_b",
                  "digits": "102",
                  "remote_digits": "101",
                  "call_ref": "3834028254196687921",
                  "duration": "3",
                  "release_time": "2020/12/10 14:20:26",
                  "answer_time": "2020/12/10 14:20:23",
                  "start_time": "2020/12/10 14:20:19",
                  "direction": "out",
                  "call_record": "",
                  "remote_display_name": "................ 1",
                  "display_name": "",
                  "remote_agent_id": ""
                },
                "_content": [
                  {
                    "_name": "url_list"
                  }
                ]
              },
              {
                "_name": "call_history",
                "_attributes": {
                  "total_duration": "3",
                  "waiting_duration": "3",
                  "talk_duration": "0",
                  "release_reason": "released_by_system",
                  "digits": "102",
                  "remote_digits": "101",
                  "call_ref": "4115547623",
                  "duration": "0",
                  "release_time": "2020/12/10 14:17:44",
                  "answer_time": "",
                  "start_time": "2020/12/10 14:17:41",
                  "direction": "in",
                  "call_record": "",
                  "remote_display_name": "................ 1",
                  "display_name": "",
                  "remote_agent_id": ""
                },
                "_content": [
                  {
                    "_name": "url_list"
                  }
                ]
              },
              {
                "_name": "call_history",
                "_attributes": {
                  "total_duration": "10",
                  "waiting_duration": "5",
                  "talk_duration": "5",
                  "release_reason": "released_by_b",
                  "digits": "102",
                  "remote_digits": "101",
                  "call_ref": "4060321042",
                  "duration": "5",
                  "release_time": "2020/12/10 14:17:38",
                  "answer_time": "2020/12/10 14:17:33",
                  "start_time": "2020/12/10 14:17:28",
                  "direction": "in",
                  "call_record": "",
                  "remote_display_name": "................ 1",
                  "display_name": "",
                  "remote_agent_id": ""
                },
                "_content": [
                  {
                    "_name": "url_list"
                  }
                ]
              },
              {
                "_name": "call_history",
                "_attributes": {
                  "total_duration": "9",
                  "waiting_duration": "5",
                  "talk_duration": "4",
                  "release_reason": "released_by_a",
                  "digits": "102",
                  "remote_digits": "101",
                  "call_ref": "7162187274952783718",
                  "duration": "4",
                  "release_time": "2020/12/10 14:17:22",
                  "answer_time": "2020/12/10 14:17:18",
                  "start_time": "2020/12/10 14:17:13",
                  "direction": "out",
                  "call_record": "",
                  "remote_display_name": "................ 1",
                  "display_name": "",
                  "remote_agent_id": ""
                },
                "_content": [
                  {
                    "_name": "url_list"
                  }
                ]
              },
              {
                "_name": "call_history",
                "_attributes": {
                  "total_duration": "3",
                  "waiting_duration": "3",
                  "talk_duration": "0",
                  "release_reason": "released_by_system",
                  "digits": "102",
                  "remote_digits": "101",
                  "call_ref": "3255665922",
                  "duration": "0",
                  "release_time": "2020/12/10 14:14:19",
                  "answer_time": "",
                  "start_time": "2020/12/10 14:14:16",
                  "direction": "in",
                  "call_record": "",
                  "remote_display_name": "................ 1",
                  "display_name": "",
                  "remote_agent_id": ""
                },
                "_content": [
                  {
                    "_name": "url_list"
                  }
                ]
              },
              {
                "_name": "call_history",
                "_attributes": {
                  "total_duration": "11",
                  "waiting_duration": "8",
                  "talk_duration": "3",
                  "release_reason": "released_by_b",
                  "digits": "102",
                  "remote_digits": "101",
                  "call_ref": "3171756862",
                  "duration": "2",
                  "release_time": "2020/12/10 14:14:07",
                  "answer_time": "2020/12/10 14:14:04",
                  "start_time": "2020/12/10 14:13:56",
                  "direction": "in",
                  "call_record": "",
                  "remote_display_name": "................ 1",
                  "display_name": "",
                  "remote_agent_id": ""
                },
                "_content": [
                  {
                    "_name": "url_list"
                  }
                ]
              },
              {
                "_name": "call_history",
                "_attributes": {
                  "total_duration": "12",
                  "waiting_duration": "5",
                  "talk_duration": "7",
                  "release_reason": "released_by_a",
                  "digits": "102",
                  "remote_digits": "101",
                  "call_ref": "7291666691949541221",
                  "duration": "6",
                  "release_time": "2020/12/10 14:13:43",
                  "answer_time": "2020/12/10 14:13:36",
                  "start_time": "2020/12/10 14:13:31",
                  "direction": "out",
                  "call_record": "",
                  "remote_display_name": "................ 1",
                  "display_name": "",
                  "remote_agent_id": ""
                },
                "_content": [
                  {
                    "_name": "url_list"
                  }
                ]
              },
              {
                "_name": "call_history",
                "_attributes": {
                  "total_duration": "8",
                  "waiting_duration": "4",
                  "talk_duration": "4",
                  "release_reason": "released_by_a",
                  "digits": "102",
                  "remote_digits": "101",
                  "call_ref": "3991933534187108144",
                  "duration": "3",
                  "release_time": "2020/12/10 14:08:45",
                  "answer_time": "2020/12/10 14:08:41",
                  "start_time": "2020/12/10 14:08:37",
                  "direction": "out",
                  "call_record": "",
                  "remote_display_name": "................ 1",
                  "display_name": "",
                  "remote_agent_id": ""
                },
                "_content": [
                  {
                    "_name": "url_list"
                  }
                ]
              },
              {
                "_name": "call_history",
                "_attributes": {
                  "total_duration": "19",
                  "waiting_duration": "3",
                  "talk_duration": "16",
                  "release_reason": "released_by_system",
                  "digits": "102",
                  "remote_digits": "101",
                  "call_ref": "1661436472",
                  "duration": "15",
                  "release_time": "2020/12/10 14:08:15",
                  "answer_time": "2020/12/10 14:07:59",
                  "start_time": "2020/12/10 14:07:56",
                  "direction": "in",
                  "call_record": "",
                  "remote_display_name": "................ 1",
                  "display_name": "",
                  "remote_agent_id": ""
                },
                "_content": [
                  {
                    "_name": "url_list"
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  }
]
  • Нет меток
Написать комментарий...