CALL RECORDING
Displaying Call Recording
[[API:Function]] – goGetCallRecordingList
-
This application is used to get list of call recording belongs to user.
Mandatory parameters from “postfields” variables:
- goUser- Username. String
- goPass- Password. String
- goAction- Action performed by the [[API:Functions]]. String
Returns:
- result – “success” means that query was successful. String
- result – “error” means that query was not successful. , containing the error occurred. String
- lead_id – lead id. Integer
- user– user of call recording. String
- status – status of call recording. String
- list_id – list id of call recording. Integer
- phone_number – phone number of call recording. Integer
- full_name – full name of call recording. String
- last_local_call_time – last local call time. Time
Sample Code:
<pre>
<?php
$url = "https://YOUR_URL/goAPI/goCallRecordings/goAPI.php"; #URL to GoAutoDial API. (required)
$postfields["goUser"] = ""; #Username goes here. (required)
$postfields["goPass"] = ""; #Password goes here. (required)
$postfields["goAction"] = ""; #action performed by the [[API:Functions]]. (required)
$postfields["responsetype"] = "json"; #json. (required)
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
$data = curl_exec($ch);
curl_close($ch);
$output = json_decode($data);
if ($output->result=="success") {
# Result was OK!
for($i=0;$i<count($output->lead_id);$i++){
echo $output->lead_id[$i]."</br>";
echo $output->list_id[$i]."</br>";
echo $output->phone_number[$i]."</br>";
echo $output->full_name[$i]."</br>";
echo $output->last_local_call_time[$i]."</br>";
echo $output->status[$i]."</br>";
echo $output->users[$i]."</br>";
echo $output->cnt[$i]."</br>";
}
} else {
# An error occured
echo "The following error occured: ".$results["message"];
}
?>
</pre>
- Displaying Call Recording Information
[[API:Function]] – goGetViewRecordings
-
Allows to retrieve some attributes of a given call recording. Call Recording should belong to the user that authenticated the request.
Mandatory parameters from “postfields” variables:
-
goUser- Username. String
-
goPass- Password. String
-
goAction- Action performed by the [[API:Functions]]. String
-
lead_id – lead id. Integer
Returns:
result – “success” means that query was successful. String
result – “error” means that query was not successful. , containing the error occurred. String
lead_id – lead id. Integer
recording_id– recording id. Integer
start_time – start time of call recording. Time
length_in_sec – Length in second. Time
user – user of call recording. String
location – location. String
vicidial_id – vicidial id of call recording. String
Sample Code:
<?php
$url = "https://YOUR_URL/goAPI/goCallRecordings/goAPI.php"; #URL to GoAutoDial API. (required)
$postfields["goUser"] = ""; #Username goes here. (required)
$postfields["goPass"] = ""; #Password goes here. (required)
$postfields["goAction"] = ""; #action performed by the [[API:Functions]]. (required)
$postfields["responsetype"] = "json"; #json. (required)
$postfields["leadid"] = ""; #Desired lead id. (required)
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
$data = curl_exec($ch);
curl_close($ch);
$output = json_decode($data);
if ($output->result=="success") {
# Result was OK!
for($i=0;$i<count($output->recording_id);$i++){
echo $i."</br>";
echo $output->recording_id[$i]."</br>";
echo $output->start_time[$i]."</br>";
echo $output->length_in_sec[$i]."</br>";
echo $output->full_name[$i]."</br>";
echo $output->location[$i]."</br>";
}
} else {
# An error occured
echo $output->result;
}
?>
-