Commit 1186b301 authored by okhin's avatar okhin 🚴

SOrting dates in the correct order

parent 96d4f491
Pipeline #777 passed with stage
in 1 second
......@@ -60,16 +60,6 @@ class Main extends Controller {
}
}
/*
* Feedback SIP function
* Get a feedback from the SIP system - status of a call for instance
* GET: get the call back
*/
function feedbacksip($f3, $args) {
//GET
}
/*
* call Page
* Form to call
......@@ -96,7 +86,7 @@ class Main extends Controller {
'callee' => $contact['phone'],
'token' => $token);
// We want to generate a UNIQUE-ID (doesn't need to be cryptogaphically unique though
$call_id = uniqid();
$call_id = str_replace('.', '-', uniqid('', true));
$f3->set('CALL_ID', $call_id);
// Create the call
......
......@@ -83,6 +83,7 @@
function update_call(response) {
var call_history = response['data']['history'];
console.log(call_history);
var call_state = call_history.sort(function(a, b) {
var date1 = new Date(a[1]);
var date2 = new Date(b[1]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment