From 1186b301b9f99fce4bf47d9ab488fd0a018aa042 Mon Sep 17 00:00:00 2001 From: okhin Date: Mon, 23 Jan 2017 11:21:09 +0100 Subject: [PATCH] SOrting dates in the correct order --- app/Main.php | 12 +----------- templates/feedbackform.html | 1 + 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/app/Main.php b/app/Main.php index 05a9f77..05427bf 100644 --- a/app/Main.php +++ b/app/Main.php @@ -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 diff --git a/templates/feedbackform.html b/templates/feedbackform.html index 3a1eab0..006d5fb 100644 --- a/templates/feedbackform.html +++ b/templates/feedbackform.html @@ -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]); -- GitLab