+41 58 018 00 00

contact our sales to get a custom offer!

FAQ

Get Calls History

Voice Functions - Get Calls History

Get Calls History

Contents

VoIP Function: getCDR

With this command, you are able to view history of calls that has been made from a tenant

Input params

  • version::String - API version (e.g. '1.0')
  • timestamp::String - Sequence of characters, denoting the date and time (e.g '1336553826')
  • username::String - User e-mail address (e.g 'mail1@example.com')
  • authcode::String - md5 hash consisting of the concatenation of timestamp and user_key (e.g md5(1336553826BX3KwWU2SuqvoEWnjYmOibf'))
  • section::String - API module name. Use 'voice' value
  • action::String - API module function. Use 'getCDR' value
  • tenant::String - The tenant number that you wich to get calls history (e.g 'VOICE-29001-1')
  • datefrom::String - Start date in 'yyyy-mm-dd hh:mm:ss' format. When datefrom and dateto value is empty function returns information about all sms
  • dateto::String - End date in 'yyyy-mm-dd hh:mm:ss' format. When datefrom and dateto value is empty function returns information about all sms

 

Example URL with POST values

https://api.boxis.net/
POST: version=1.0&returntype=json×tamp=1337853467&username=your@mail.com&authcode=1234567890§ion=voice&action=getCDR&tenant=VOICE-12001-1&datefrom=2012-05-09 10:00:00&dateto=2012-05-09 11:00:00

Output params

Example in JSON (Success)

{"result": "1",
  "resulttxt": "success",
  "params": {
    "cdr": {
      "call_1": {
        "uniqueid": "sip022.voice.boxis.net-1517944376.108168",
        "start": "2018-02-06 20:12:56",
        "answer": "2018-02-06 20:12:56",
        "end": "2018-02-06 20:16:53",
        "clid": "\"DirectCEO:\" ",
        "src": "0041616925879",
        "dst": "0225101800",
        "dcontext": "fromoutside",
        "channel": "SIP\/NS_Inbound_Route_CH_Direct_105-00002c27",
        "dstchannel": "SIP\/sip046.voice.boxis.net-00002c28",
        "lastapp": "Dial",
        "lastdata": "SIP\/QUEUE-14@sip046.voice.boxis.net,,U(destChannelActions^yes^wav^^^^)",
        "duration": "237",
        "billsec": "236",
        "disposition": "ANSWERED",
        "amaflags": "3",
        "accountcode": "BOXIS",
        "userfield": "[inbound]",
        "realsrc": "",
        "firstdst": "0225101820",
        "lastdst": "",
        "srcCallID": "2815e0000df5-5a79fe38-73bd5d15-2a761e0-402a18e@127.0.0.1",
        "prevuniqueid": "",
        "peeraccount": "BOXIS",
        "sequence": "15922",
        "originateid": "",
        "linkedid": "sip022.voice.boxis.net-1517944376.108168",
        "wherelanded": "0227359748",
        "pincode": "",
        "prevsequence": null,
        "cc_peername": "",
        "cc_date": "2018-02-06",
        "cc_type": "OUTNOCHARGE",
        "cc_type_id": null,
        "cc_country": "",
        "cc_network": "",
        "cc_international": "",
        "cc_cost": "0.00000"
      },
      "call_2": {
        "uniqueid": "sip046.voice.boxis.net-1517944459.182738",
        "start": "2018-02-06 20:14:20",
        "answer": "0000-00-00 00:00:00",
        "end": "2018-02-06 20:14:50",
        "clid": "\"DirectCEO:\" ",
        "src": "0041616925879",
        "dst": "AG-000-NFR-453",
        "dcontext": "fromotherpbx",
        "channel": "Local\/AG-000-NFR-453@fromotherpbx-00000feb;2",
        "dstchannel": "SIP\/sip015.voice.boxis.net-000040d3",
        "lastapp": "Dial",
        "lastdata": "SIP\/1175@sip022.voice.boxis.net&SIP\/317@sip015.voice.boxis.net,90,U(destChannel",
        "duration": "29",
        "billsec": "0",
        "disposition": "NO ANSWER",
        "amaflags": "3",
        "accountcode": "BOXIS",
        "userfield": "[inbound]",
        "realsrc": "Queue General",
        "firstdst": "0225101800",
        "lastdst": "606",
        "srcCallID": "",
        "prevuniqueid": "",
        "peeraccount": "BOXIS",
        "sequence": "31558",
        "originateid": "",
        "linkedid": "sip046.voice.boxis.net-1517944379.182232",
        "wherelanded": "N\/A",
        "pincode": "",
        "prevsequence": null,
        "cc_peername": "",
        "cc_date": "2018-02-06",
        "cc_type": "OUTNOCHARGE",
        "cc_type_id": null,
        "cc_country": "",
        "cc_network": "",
        "cc_international": "",
        "cc_cost": "0.00000"
      }
    }
  },  "timestamp": 1518091850}

Example in JSON (Error)

{"result":"0",
 "resulttxt":"Error: {error description}",
 "timestamp":1335777400}

 

Example using our PHP Class

/* API LOGIN DETAILS */
$email    = 'your@mail.com';    // your username
$apikey   = '1234567890';        // your apikey

/* API COMMAND DETAILS */
$apitype  = 'voip';
$command  = 'getCallsHistory';
$params   = array(
    'returntype' => 'xml',
    'line' => '4122XXXXXX1',
    'datefrom' => '2012-05-09 10:00:00',
    'dateto' => '2012-05-09 11:00:00'
);

/* PROCESS THE ACTION */
$boxisAPI = new BoxisAPIConnection($email, $apikey);
$return = $boxisAPI->call($apitype, $command, $params, $timestamp);

/* TIMESTAMP SYNCHRONIZATION (JSON EXAMPLE)
if($return['timestamperror']) {
    $timestamp = $return['timestamp'];
    $return = $boxisAPI->call($apitype, $command, $params, 'json', $timestamp);
}
*/

/* TIMESTAMP SYNCHRONIZATION (XML EXAMPLE)*/
/*
if($return->timestamperror) {
    $timestamp = $return->timestamp;
    $return = $boxisAPI->call($apitype, $command, $params, 'xml', $timestamp);
}
/*

Get Support From Real People

When you are stuck in something don’t waste your time just let us know we are here to help you

Contact Us

If you have question which is beyond this knowledgebase Kindly contact us