رفتن به مطلب اصلی
Version: v6.4.0 مرکز‌تماس

CDR Search

از این سرویس برای بازیابی اطلاعات بخش جستجوی سریع استفاده می‌شود و تفاوت آن با Quick Search در امکان جستجو براسای پارمتر cuid می‌باشد.

پارامتر‌ها#

توضیحاتداده های تعریف شدهداده های نمونهپارامترهای ضروری[**]/منطقی[*]پارامترها
---conditions->from
---conditions->to
--conditions->cuid
بازیابی گزارشات از تاریخ-2020-06-15 15:16**date_range->from
بازیابی گزارشات تا تاریخ-2022-06-22 15:16**date_renge->to
--0pagination->start
--20pagination->count
---pagination->sorting
یافتن موارد مشابهtrue/falsetrue**alike

نمونه خروجی درخواست#

{    "success": 1,    "message": "",    "data": {        "pagination": {            "start": 0,            "count": 20,            "sorting": {                "starttime": -1            },            "total": 1        },        "target": "cdr",        "useGroupBy": false,        "data": [            {                "_id": "60d179d3895b44fe5bbc66e2",                "type": "outgoing",                "cuid": "1624340875.75933",                "clid": "\"\" <09365018573>",                "src": "562",                "dst": "09365018573",                "dcontext": "main_routing",                "channel": "SIP/center-00009cb6",                "dstchannel": "",                "lastapp": "Hangup",                "lastdata": "",                "start": "1400-04-01 10:19:04",                "answer": "2021-06-22 10:19:04",                "duration": 1,                "billsec": 54,                "disposition": "ANSWERED",                "amaflags": "DOCUMENTATION",                "accountcode": "",                "uniqueid": "1624340875.75934",                "userfield": "",                "sequence": "54231",                "comment": "",                "v": 2,                "outgoing_point": "center",                "route": [                    {                        "type": "OutgoingRoute",                        "name": "out31041",                        "duration": 0.011272,                        "date": {                            "$date": {                                "$numberLong": "1624340875778"                            }                        }                    },                    {                        "type": "Switcher",                        "name": "Switcher",                        "duration": 0.005508,                        "date": {                            "$date": {                                "$numberLong": "1624340875787"                            }                        }                    },                    {                        "type": "Answer",                        "name": "Answer",                        "duration": 0.006667,                        "date": {                            "$date": {                                "$numberLong": "1624340875797"                            }                        }                    },                    {                        "type": "MixMonitor",                        "name": "Mix Monitor",                        "duration": 0.005578,                        "date": {                            "$date": {                                "$numberLong": "1624340875808"                            }                        }                    },                    {                        "type": "Trunk",                        "name": "Center",                        "duration": 68.601818,                        "date": {                            "$date": {                                "$numberLong": "1624340944416"                            }                        }                    },                    {                        "type": "Trunk",                        "name": "Center",                        "duration": 0.004539,                        "date": {                            "$date": {                                "$numberLong": "1624340944442"                            }                        }                    }                ],                "wait": 14,                "starttime": "1400-04-01 10:19:06",                "endtime": {                    "$date": {                        "$numberLong": "1624340947977"                    }                },                "record": "20210622_1624340875.75933.mp3",                "ANSWERED": 1,                "outgoing": 1,                "billsec_hhmmss": "00:00:54",                "wait_hhmmss": "00:00:14",                "duration_hhmmss": "00:00:01"            }        ]    }}

نمونه فراخوانی#

<?php
$curl = curl_init();
curl_setopt_array($curl, array(  CURLOPT_URL => 'http://192.168.51.20//api/v3/reports/cdr',  CURLOPT_RETURNTRANSFER => true,  CURLOPT_ENCODING => '',  CURLOPT_MAXREDIRS => 10,  CURLOPT_TIMEOUT => 0,  CURLOPT_FOLLOWLOCATION => true,  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,  CURLOPT_CUSTOMREQUEST => 'GET',  CURLOPT_POSTFIELDS =>'{    "conditions":{"from": "562", "to": "09365018573", "cuid":"1624340875.75933"},    "date_range":{"from":"2020-06-15 15:16","to":"2022-06-22 15:16"},    "pagination":{"start":0,"count":20,"sorting":{}},    "alike":"true"}',  CURLOPT_HTTPHEADER => array(    'X-APIKEY: 9UV0BWKRL83PYIH9Gv1fI85d41lO4S932EeX3wHC47sHjMJOMG',    'Authorization: Basic c2FkcjpTYWRyQDEyMw==',    'Content-Type: application/json'  ),));
$response = curl_exec($curl);
curl_close($curl);echo $response;