Hc_dialer_report_number_info
Команда позволяет получить отчет по определенному номеру в автообзвоне.
Аналог команды в CoCon:
domain/<DOMAIN>/ss/dialer/report/number-info
Шаблон URL запроса
http://server:9999/commands/dialer_report_number_info
Коды ответа
200 - успех;
404 - ошибка.
XML-схема
<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xs:include schemaLocation="error.xsd" /> <xs:include schemaLocation="dialer_common.xsd"/> <!-- Types --> <xs:simpleType name="dateTimeType"> <xs:restriction base="xs:string"> <xs:pattern value="\d{2}\.\d{2}\.\d{4}\s+\d{2}:\d{2}:\d{2}"/> <!-- DD.MM.YYYY HH:MM:SS --> </xs:restriction> </xs:simpleType> <!-- callType--> <xs:complexType name="callType"> <xs:attribute name="number" type="xs:string"/> <xs:attribute name="campaign_name" type="xs:string"/> <xs:attribute name="start_time" type="xs:string"/> <xs:attribute name="answer_time" type="xs:string"/> <xs:attribute name="release_time" type="xs:string"/> <xs:attribute name="retry_number" type="xs:string"/> <xs:attribute name="status" type="xs:string"/> <xs:attribute name="result" type="xs:string"/> <xs:attribute name="ivr_variables" type="xs:string"/> </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="number" type="xs:string" use="required"/> <xs:attribute name="tag" type="xs:base64Binary"/> <xs:attribute name="limit" type="xs:integer"/> <xs:attribute name="offset" type="xs:integer"/> <xs:attribute name="show_ivr_variables" type="xs:boolean"/> <xs:attribute name="from_date" type="dateTimeType"/> <xs:attribute name="to_date" type="dateTimeType"/> <xs:attribute name="ivr_variables" type="xs:string"/> </xs:complexType> </xs:element> </xs:all> </xs:complexType> </xs:element> <!-- out--> <xs:complexType name="resultType"> <xs:sequence minOccurs="0"> <xs:element name="call" type="callType" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="tag" type="xs:base64Binary"/> </xs:complexType> <xs:element name="out"> <xs:complexType> <xs:choice> <xs:element name="result" type="resultType"/> <xs:element name="error" type="errorType"/> </xs:choice> </xs:complexType> </xs:element> </xs:schema>
Пример:
Запрос:
<in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="dialer_report_number_info.xsd"> <request domain="biysk.local" number="240464" /> </in>
Ответ:
<?xml version="1.0"?> <out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_dialer_report_number_info.xsd"> <result> <call campaign_name="market1_2020_02_13_08_25_05" number="240464" start_time="13.02.2020 01:25:37" answer_time="13.02.2020 01:25:40" release_time="13.02.2020 01:25:45" retry_number="1" status="normal" result=""/> <call campaign_name="market1_2020_02_13_08_25_05" number="240464" start_time="13.02.2020 01:51:53" answer_time="13.02.2020 01:51:56" release_time="13.02.2020 01:51:57" retry_number="1" status="normal" result=""/> </result> </out>
В случае, если данные были отданы не все, в узле result добавится атрибут tag, который надо передать в последующем запросе для получения остальных данных.
Добавить комментарий