webphone is not working on real time report page
Posted: Sat Mar 18, 2017 6:26 am
Looks like websocket url is not passed as an option to webphone iframe on real time report page. To fix this I've used following path:
@mflorell is it possible to include it to vici code base?
- Code: Select all
Index: www/vicidial/realtime_report.php
===================================================================
--- www/vicidial/realtime_report.php (revision 2705)
+++ www/vicidial/realtime_report.php (working copy)
@@ -941,6 +941,13 @@
$codecs_list = preg_replace("/ /",'',$codecs_list);
$codecs_list = preg_replace("/-/",'',$codecs_list);
$codecs_list = preg_replace("/&/",'',$codecs_list);
+ $stmt="SELECT asterisk_version,web_socket_url from servers where server_ip='$webphone_server_ip';";
+ if ($DB) {echo "|$stmt|\n";}
+ $rslt=mysql_to_mysqli($stmt, $link);
+ if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01028',$VD_login,$server_ip,$session_name,$one_mysql_log);}
+ $row=mysqli_fetch_row($rslt);
+ $asterisk_version=$row[0];
+ $web_socket_url=$row[1];
if ($use_external_server_ip=='Y')
{
@@ -994,7 +1001,8 @@
if ($webphone_dialpad == 'TOGGLE_OFF') {$webphone_options .= "--DIALPAD_OFF_TOGGLE";}
if ($webphone_auto_answer == 'Y') {$webphone_options .= "--AUTOANSWER_Y";}
if ($webphone_auto_answer == 'N') {$webphone_options .= "--AUTOANSWER_N";}
-
+ if (strlen($web_socket_url) > 5) {$webphone_options .= "--WEBSOCKETURL$web_socket_url";}
+echo "<!-- debug: $web_socket_url -->";
$session_name='RTS01234561234567890';
### base64 encode variables
@mflorell is it possible to include it to vici code base?