2006-04-21_snapshot
git-svn-id: svn://192.168.202.10@5 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
+60
-45
@@ -29,59 +29,74 @@
|
||||
###
|
||||
|
||||
# changes
|
||||
# 50323-1147 First build of script
|
||||
# 50401-1132 small formatting changes
|
||||
# 50502-1402 added field_name as modifiable variable
|
||||
# 50503-1213 added session_name checking for extra security
|
||||
# 50503-1311 added conferences list
|
||||
# 50610-1155 Added NULL check on MySQL results to reduced errors
|
||||
# 50711-1209 removed HTTP authentication in favor of user/pass vars
|
||||
# 50323-1147 - First build of script
|
||||
# 50401-1132 - small formatting changes
|
||||
# 50502-1402 - added field_name as modifiable variable
|
||||
# 50503-1213 - added session_name checking for extra security
|
||||
# 50503-1311 - added conferences list
|
||||
# 50610-1155 - Added NULL check on MySQL results to reduced errors
|
||||
# 50711-1209 - removed HTTP authentication in favor of user/pass vars
|
||||
# 60421-1155 - check GET/POST vars lines with isset to not trigger PHP NOTICES
|
||||
#
|
||||
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
### If you have globals turned off uncomment these lines
|
||||
$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];}
|
||||
$pass=$_GET["pass"]; if (!$pass) {$pass=$_POST["pass"];}
|
||||
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
|
||||
$session_name=$_GET["session_name"]; if (!$session_name) {$session_name=$_POST["session_name"];}
|
||||
$ADD=$_GET["ADD"]; if (!$ADD) {$ADD=$_POST["ADD"];}
|
||||
$order=$_GET["order"]; if (!$order) {$order=$_POST["order"];}
|
||||
$format=$_GET["format"]; if (!$format) {$format=$_POST["format"];}
|
||||
$bgcolor=$_GET["bgcolor"]; if (!$bgcolor) {$bgcolor=$_POST["bgcolor"];}
|
||||
$txtcolor=$_GET["txtcolor"]; if (!$txtcolor) {$txtcolor=$_POST["txtcolor"];}
|
||||
$txtsize=$_GET["txtsize"]; if (!$txtsize) {$txtsize=$_POST["txtsize"];}
|
||||
$selectsize=$_GET["selectsize"]; if (!$selectsize) {$selectsize=$_POST["selectsize"];}
|
||||
$selectfontsize=$_GET["selectfontsize"]; if (!$selectfontsize) {$selectfontsize=$_POST["selectfontsize"];}
|
||||
$selectedext=$_GET["selectedext"]; if (!$selectedext) {$selectedext=$_POST["selectedext"];}
|
||||
$selectedtrunk=$_GET["selectedtrunk"]; if (!$selectedtrunk) {$selectedtrunk=$_POST["selectedtrunk"];}
|
||||
$selectedlocal=$_GET["selectedlocal"]; if (!$selectedlocal) {$selectedlocal=$_POST["selectedlocal"];}
|
||||
$textareaheight=$_GET["textareaheight"]; if (!$textareaheight) {$textareaheight=$_POST["textareaheight"];}
|
||||
$textareawidth=$_GET["textareawidth"]; if (!$textareawidth) {$textareawidth=$_POST["textareawidth"];}
|
||||
$field_name=$_GET["field_name"]; if (!$field_name) {$field_name=$_POST["field_name"];}
|
||||
if (isset($_GET["user"])) {$user=$_GET["user"];}
|
||||
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
|
||||
if (isset($_GET["pass"])) {$pass=$_GET["pass"];}
|
||||
elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];}
|
||||
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
|
||||
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
|
||||
if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];}
|
||||
elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];}
|
||||
if (isset($_GET["format"])) {$format=$_GET["format"];}
|
||||
elseif (isset($_POST["format"])) {$format=$_POST["format"];}
|
||||
if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];}
|
||||
elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];}
|
||||
if (isset($_GET["order"])) {$order=$_GET["order"];}
|
||||
elseif (isset($_POST["order"])) {$order=$_POST["order"];}
|
||||
if (isset($_GET["bgcolor"])) {$bgcolor=$_GET["bgcolor"];}
|
||||
elseif (isset($_POST["bgcolor"])) {$bgcolor=$_POST["bgcolor"];}
|
||||
if (isset($_GET["txtcolor"])) {$txtcolor=$_GET["txtcolor"];}
|
||||
elseif (isset($_POST["txtcolor"])) {$txtcolor=$_POST["txtcolor"];}
|
||||
if (isset($_GET["txtsize"])) {$txtsize=$_GET["txtsize"];}
|
||||
elseif (isset($_POST["txtsize"])) {$txtsize=$_POST["txtsize"];}
|
||||
if (isset($_GET["selectsize"])) {$selectsize=$_GET["selectsize"];}
|
||||
elseif (isset($_POST["selectsize"])) {$selectsize=$_POST["selectsize"];}
|
||||
if (isset($_GET["selectfontsize"])) {$selectfontsize=$_GET["selectfontsize"];}
|
||||
elseif (isset($_POST["selectfontsize"])) {$selectfontsize=$_POST["selectfontsize"];}
|
||||
if (isset($_GET["selectedext"])) {$selectedext=$_GET["selectedext"];}
|
||||
elseif (isset($_POST["selectedext"])) {$selectedext=$_POST["selectedext"];}
|
||||
if (isset($_GET["selectedtrunk"])) {$selectedtrunk=$_GET["selectedtrunk"];}
|
||||
elseif (isset($_POST["selectedtrunk"])) {$selectedtrunk=$_POST["selectedtrunk"];}
|
||||
if (isset($_GET["selectedlocal"])) {$selectedlocal=$_GET["selectedlocal"];}
|
||||
elseif (isset($_POST["selectedlocal"])) {$selectedlocal=$_POST["selectedlocal"];}
|
||||
if (isset($_GET["textareaheight"])) {$textareaheight=$_GET["textareaheight"];}
|
||||
elseif (isset($_POST["textareaheight"])) {$textareaheight=$_POST["textareaheight"];}
|
||||
if (isset($_GET["textareawidth"])) {$textareawidth=$_GET["textareawidth"];}
|
||||
elseif (isset($_POST["textareawidth"])) {$textareawidth=$_POST["textareawidth"];}
|
||||
if (isset($_GET["field_name"])) {$field_name=$_GET["field_name"];}
|
||||
elseif (isset($_POST["field_name"])) {$field_name=$_POST["field_name"];}
|
||||
|
||||
# default optional vars if not set
|
||||
if (!$ADD) {$ADD="1";}
|
||||
if (!$order) {$order='desc';}
|
||||
if (!$format) {$format='table';}
|
||||
if (!$bgcolor) {$bgcolor='white';}
|
||||
if (!$txtcolor) {$txtcolor='black';}
|
||||
if (!$txtsize) {$txtsize='2';}
|
||||
if (!$selectsize) {$selectsize='4';}
|
||||
if (!$selectfontsize) {$selectfontsize='10';}
|
||||
if (!$textareaheight) {$textareaheight='10';}
|
||||
if (!$textareawidth) {$textareawidth='20';}
|
||||
if (!isset($ADD)) {$ADD="1";}
|
||||
if (!isset($order)) {$order='desc';}
|
||||
if (!isset($format)) {$format="text";}
|
||||
if (!isset($bgcolor)) {$bgcolor='white';}
|
||||
if (!isset($txtcolor)) {$txtcolor='black';}
|
||||
if (!isset($txtsize)) {$txtsize='2';}
|
||||
if (!isset($selectsize)) {$selectsize='4';}
|
||||
if (!isset($selectfontsize)) {$selectfontsize='10';}
|
||||
if (!isset($textareaheight)) {$textareaheight='10';}
|
||||
if (!isset($textareawidth)) {$textareawidth='20';}
|
||||
|
||||
|
||||
$version = '0.0.6';
|
||||
$build = '50711-1209';
|
||||
$version = '0.0.7';
|
||||
$build = '60421-1155';
|
||||
$StarTtime = date("U");
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
if (!isset($query_date)) {$query_date = $NOW_DATE;}
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
@@ -89,7 +104,7 @@ if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth))
|
||||
if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0))
|
||||
{
|
||||
echo "Invalid Username/Password: |$user|$pass|\n";
|
||||
exit;
|
||||
@@ -97,7 +112,7 @@ if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
else
|
||||
{
|
||||
|
||||
if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) )
|
||||
if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) )
|
||||
{
|
||||
echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n";
|
||||
exit;
|
||||
@@ -109,7 +124,7 @@ if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$SNauth=$row[0];
|
||||
if(!$SNauth)
|
||||
if($SNauth==0)
|
||||
{
|
||||
echo "Invalid session_name: |$session_name|$server_ip|\n";
|
||||
exit;
|
||||
|
||||
+78
-64
@@ -1,80 +1,94 @@
|
||||
<?
|
||||
### astguiclient.php - the web-based version of the astGUIclient client application
|
||||
###
|
||||
### Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
|
||||
###
|
||||
### make sure you have added a user to the vicidial_users MySQL table with at least
|
||||
### user_level 1 or greater to access this page. Also you need to have the login
|
||||
### and pass of a phone listed in the asterisk.phones table. The page grabs the
|
||||
### server info and other details from this login and pass
|
||||
###
|
||||
### Other scripts that this application depends on:
|
||||
### - active_list_refresh.php: displays active/live channels and phones
|
||||
### - manager_send.php: sends Actions to be executed on Asterisk servers
|
||||
### - live_exten_check.php: checks to see if user's phone is on a live call
|
||||
### - call_log_display.php: retrieves log of inbound and outbound calls
|
||||
### - voicemail_check.php: retrieves counts of new and old messages
|
||||
### - inbound_popup.php: opens upon live_inbound call coming in
|
||||
### - conf_exten_check.php: checks to see if and calls are in a specific conf
|
||||
### - park_calls_display.php: retrieves list of parked calls
|
||||
### - vdc_db_query.php: Changes values in the DB for non-calling records
|
||||
###
|
||||
### CHANGES
|
||||
### 50215-1356 - Proof-of-concept test of XMLHttpRequest for astGUIclient web
|
||||
### 50323-1411 - First build version display-only
|
||||
### 50331-1040 - Second-build, added phone login and hangup/hijack display
|
||||
### 50401-1006 - Trunk/Local Hangup functions enabled
|
||||
### 50404-1056 - Trunk/Local Hijack functions enabled
|
||||
### 50404-1459 - Simple live calls display and grabs updated time from server
|
||||
### 50405-1221 - Reorganized the display and layers, added some images
|
||||
### 50406-1005 - Added In/Out call log display to MAIN panel
|
||||
### 50407-1254 - Start/Stop Recording on live calls enabled
|
||||
### 50422-1101 - Activated Check Voicemail button and new/old messages count
|
||||
### 50428-1449 - Added dial from log and basic live_inbound call popup
|
||||
### 50429-1455 - Modified inbound popup code for IE and to add more functions
|
||||
### 50502-1442 - Added basic method to transfer live calls somewhere else
|
||||
### 50503-1205 - Added web_client_sessions entry for more security of subscripts
|
||||
### 50503-1537 - Added basic conferences display
|
||||
### 50509-1132 - Added conference connected list and hangup/xfer for them
|
||||
### 50511-1129 - Added registration of conference rooms and added manual dial
|
||||
### 50523-1342 - Added Conference recording and send DTMF
|
||||
### 50523-1622 - Added Local Dial window frame for calling local extensions
|
||||
### 50524-1456 - Added ability to park call and display number of parked calls
|
||||
### 50524-1600 - Added ability to display and pickup/hangup/xfer parked calls
|
||||
### 50525-1224 - Added ability to place outbound call from within conferene
|
||||
### 50531-1225 - Added ability to do dual transfers to meetme rooms from Main
|
||||
### 50711-1229 - removed HTTP authentication in favor of user/pass vars
|
||||
### 50711-1610 - Added Zap monitoring to Trunk/Local Action screens
|
||||
### 50804-1604 - Minor bug fix in inbound_popup functions
|
||||
### 50818-1715 - Added pretty login section
|
||||
### 50913-1137 - Added custom outbound_cid from phones table
|
||||
### 51110-1430 - Fixed non-standard http port issue
|
||||
### 60103-1421 - Added code for favorite extensions chooser
|
||||
### 60104-1347 - Added basic layout for favorites editing frame
|
||||
### 60105-1124 - Finished Favorites frame and added DB submission
|
||||
### 60112-1622 - Several formatting changes
|
||||
###
|
||||
# astguiclient.php - the web-based version of the astGUIclient client application
|
||||
#
|
||||
# Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
|
||||
#
|
||||
# make sure you have added a user to the vicidial_users MySQL table with at least
|
||||
# user_level 1 or greater to access this page. Also you need to have the login
|
||||
# and pass of a phone listed in the asterisk.phones table. The page grabs the
|
||||
# server info and other details from this login and pass
|
||||
#
|
||||
# Other scripts that this application depends on:
|
||||
# - active_list_refresh.php: displays active/live channels and phones
|
||||
# - manager_send.php: sends Actions to be executed on Asterisk servers
|
||||
# - live_exten_check.php: checks to see if user's phone is on a live call
|
||||
# - call_log_display.php: retrieves log of inbound and outbound calls
|
||||
# - voicemail_check.php: retrieves counts of new and old messages
|
||||
# - inbound_popup.php: opens upon live_inbound call coming in
|
||||
# - conf_exten_check.php: checks to see if and calls are in a specific conf
|
||||
# - park_calls_display.php: retrieves list of parked calls
|
||||
# - vdc_db_query.php: Changes values in the DB for non-calling records
|
||||
#
|
||||
# CHANGES
|
||||
# 50215-1356 - Proof-of-concept test of XMLHttpRequest for astGUIclient web
|
||||
# 50323-1411 - First build version display-only
|
||||
# 50331-1040 - Second-build, added phone login and hangup/hijack display
|
||||
# 50401-1006 - Trunk/Local Hangup functions enabled
|
||||
# 50404-1056 - Trunk/Local Hijack functions enabled
|
||||
# 50404-1459 - Simple live calls display and grabs updated time from server
|
||||
# 50405-1221 - Reorganized the display and layers, added some images
|
||||
# 50406-1005 - Added In/Out call log display to MAIN panel
|
||||
# 50407-1254 - Start/Stop Recording on live calls enabled
|
||||
# 50422-1101 - Activated Check Voicemail button and new/old messages count
|
||||
# 50428-1449 - Added dial from log and basic live_inbound call popup
|
||||
# 50429-1455 - Modified inbound popup code for IE and to add more functions
|
||||
# 50502-1442 - Added basic method to transfer live calls somewhere else
|
||||
# 50503-1205 - Added web_client_sessions entry for more security of subscripts
|
||||
# 50503-1537 - Added basic conferences display
|
||||
# 50509-1132 - Added conference connected list and hangup/xfer for them
|
||||
# 50511-1129 - Added registration of conference rooms and added manual dial
|
||||
# 50523-1342 - Added Conference recording and send DTMF
|
||||
# 50523-1622 - Added Local Dial window frame for calling local extensions
|
||||
# 50524-1456 - Added ability to park call and display number of parked calls
|
||||
# 50524-1600 - Added ability to display and pickup/hangup/xfer parked calls
|
||||
# 50525-1224 - Added ability to place outbound call from within conferene
|
||||
# 50531-1225 - Added ability to do dual transfers to meetme rooms from Main
|
||||
# 50711-1229 - removed HTTP authentication in favor of user/pass vars
|
||||
# 50711-1610 - Added Zap monitoring to Trunk/Local Action screens
|
||||
# 50804-1604 - Minor bug fix in inbound_popup functions
|
||||
# 50818-1715 - Added pretty login section
|
||||
# 50913-1137 - Added custom outbound_cid from phones table
|
||||
# 51110-1430 - Fixed non-standard http port issue
|
||||
# 60103-1421 - Added code for favorite extensions chooser
|
||||
# 60104-1347 - Added basic layout for favorites editing frame
|
||||
# 60105-1124 - Finished Favorites frame and added DB submission
|
||||
# 60112-1622 - Several formatting changes
|
||||
# 60421-1357 - check GET/POST vars lines with isset to not trigger PHP NOTICES
|
||||
#
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
### If you have globals turned off uncomment these lines
|
||||
$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];}
|
||||
$pass=$_GET["pass"]; if (!$pass) {$pass=$_POST["pass"];}
|
||||
$phone_login=$_GET["phone_login"]; if (!$phone_login) {$phone_login=$_POST["phone_login"];}
|
||||
if (!$phone_login) {$phone_login=$_GET["pl"];}
|
||||
$phone_pass=$_GET["phone_pass"]; if (!$phone_pass) {$phone_pass=$_POST["phone_pass"];}
|
||||
if (!$phone_pass) {$phone_pass=$_GET["pp"];}
|
||||
$relogin=$_GET["relogin"]; if (!$relogin) {$relogin=$_POST["relogin"];}
|
||||
if (isset($_GET["user"])) {$user=$_GET["user"];}
|
||||
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
|
||||
if (isset($_GET["pass"])) {$pass=$_GET["pass"];}
|
||||
elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];}
|
||||
if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];}
|
||||
elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];}
|
||||
if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];}
|
||||
elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];}
|
||||
if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];}
|
||||
elseif (isset($_POST["relogin"])) {$relogin=$_POST["relogin"];}
|
||||
if (!isset($phone_login))
|
||||
{
|
||||
if (isset($_GET["pl"])) {$phone_login=$_GET["pl"];}
|
||||
elseif (isset($_POST["pl"])) {$phone_login=$_POST["pl"];}
|
||||
}
|
||||
if (!isset($phone_pass))
|
||||
{
|
||||
if (isset($_GET["pp"])) {$phone_pass=$_GET["pp"];}
|
||||
elseif (isset($_POST["pp"])) {$phone_pass=$_POST["pp"];}
|
||||
}
|
||||
|
||||
$forever_stop=0;
|
||||
$user_abb = "$user$user$user$user";
|
||||
while ( (strlen($user_abb) > 4) and ($forever_stop < 200) )
|
||||
{$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;}
|
||||
|
||||
$version = '1.1.9';
|
||||
$build = '60112-1622';
|
||||
$version = '1.1.11';
|
||||
$build = '60421-1357';
|
||||
|
||||
if ($force_logout)
|
||||
{
|
||||
|
||||
+30
-25
@@ -20,41 +20,46 @@
|
||||
###
|
||||
|
||||
# changes
|
||||
# 50406-1013 First build of script
|
||||
# 50407-1452 Added definable limits
|
||||
# 50503-1236 added session_name checking for extra security
|
||||
# 50610-1158 Added NULL check on MySQL results to reduced errors
|
||||
# 50711-1202 removed HTTP authentication in favor of user/pass vars
|
||||
# 60323-1550 added option for showing different number dialed in log
|
||||
# 50406-1013 - First build of script
|
||||
# 50407-1452 - Added definable limits
|
||||
# 50503-1236 - added session_name checking for extra security
|
||||
# 50610-1158 - Added NULL check on MySQL results to reduced errors
|
||||
# 50711-1202 - removed HTTP authentication in favor of user/pass vars
|
||||
# 60323-1550 - added option for showing different number dialed in log
|
||||
# 60421-1401 - check GET/POST vars lines with isset to not trigger PHP NOTICES
|
||||
#
|
||||
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
### If you have globals turned off uncomment these lines
|
||||
$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];}
|
||||
$pass=$_GET["pass"]; if (!$pass) {$pass=$_POST["pass"];}
|
||||
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
|
||||
$session_name=$_GET["session_name"]; if (!$session_name) {$session_name=$_POST["session_name"];}
|
||||
$format=$_GET["format"]; if (!$format) {$format=$_POST["format"];}
|
||||
$exten=$_GET["exten"]; if (!$exten) {$exten=$_POST["exten"];}
|
||||
$protocol=$_GET["protocol"]; if (!$protocol) {$protocol=$_POST["protocol"];}
|
||||
if (isset($_GET["user"])) {$user=$_GET["user"];}
|
||||
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
|
||||
if (isset($_GET["pass"])) {$pass=$_GET["pass"];}
|
||||
elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];}
|
||||
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
|
||||
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
|
||||
if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];}
|
||||
elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];}
|
||||
if (isset($_GET["format"])) {$format=$_GET["format"];}
|
||||
elseif (isset($_POST["format"])) {$format=$_POST["format"];}
|
||||
if (isset($_GET["exten"])) {$exten=$_GET["exten"];}
|
||||
elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];}
|
||||
if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];}
|
||||
elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];}
|
||||
|
||||
# default optional vars if not set
|
||||
if (!$format) {$format="text";}
|
||||
if (!$in_limit) {$in_limit="100";}
|
||||
if (!$out_limit) {$out_limit="100";}
|
||||
if (!isset($format)) {$format="text";}
|
||||
if (!isset($in_limit)) {$in_limit="100";}
|
||||
if (!isset($out_limit)) {$out_limit="100";}
|
||||
$number_dialed = 'number_dialed';
|
||||
#$number_dialed = 'extension';
|
||||
|
||||
$version = '0.0.6';
|
||||
$build = '60323-1550';
|
||||
$version = '0.0.7';
|
||||
$build = '60421-1401';
|
||||
$StarTtime = date("U");
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
if (!isset($query_date)) {$query_date = $NOW_DATE;}
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
@@ -62,7 +67,7 @@ if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth))
|
||||
if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0))
|
||||
{
|
||||
echo "Invalid Username/Password: |$user|$pass|\n";
|
||||
exit;
|
||||
@@ -70,7 +75,7 @@ if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
else
|
||||
{
|
||||
|
||||
if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) )
|
||||
if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) )
|
||||
{
|
||||
echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n";
|
||||
exit;
|
||||
@@ -82,7 +87,7 @@ if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$SNauth=$row[0];
|
||||
if(!$SNauth)
|
||||
if($SNauth==0)
|
||||
{
|
||||
echo "Invalid session_name: |$session_name|$server_ip|\n";
|
||||
exit;
|
||||
|
||||
+61
-50
@@ -1,65 +1,76 @@
|
||||
<?
|
||||
### conf_exten_check.php
|
||||
###
|
||||
### Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
|
||||
###
|
||||
### This script is designed purely to send whether the meetme conference has live channels connected and which they are
|
||||
### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
|
||||
###
|
||||
### required variables:
|
||||
### - $server_ip
|
||||
### - $session_name
|
||||
### - $user
|
||||
### - $pass
|
||||
### optional variables:
|
||||
### - $format - ('text','debug')
|
||||
### - $ACTION - ('refresh','register')
|
||||
### - $client - ('agc','vdc')
|
||||
### - $conf_exten - ('8600011',...)
|
||||
### - $exten - ('123test',...)
|
||||
### - $auto_dial_level - ('0','1','1.2',...)
|
||||
###
|
||||
# conf_exten_check.php
|
||||
#
|
||||
# Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
|
||||
#
|
||||
# This script is designed purely to send whether the meetme conference has live channels connected and which they are
|
||||
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
|
||||
#
|
||||
# required variables:
|
||||
# - $server_ip
|
||||
# - $session_name
|
||||
# - $user
|
||||
# - $pass
|
||||
# optional variables:
|
||||
# - $format - ('text','debug')
|
||||
# - $ACTION - ('refresh','register')
|
||||
# - $client - ('agc','vdc')
|
||||
# - $conf_exten - ('8600011',...)
|
||||
# - $exten - ('123test',...)
|
||||
# - $auto_dial_level - ('0','1','1.2',...)
|
||||
# - $campagentstdisp - ('YES',...)
|
||||
#
|
||||
|
||||
# changes
|
||||
# 50509-1054 First build of script
|
||||
# 50511-1112 Added ability to register a conference room
|
||||
# 50610-1159 Added NULL check on MySQL results to reduced errors
|
||||
# 50706-1429 script changed to not use HTTP login vars, user/pass instead
|
||||
# 50706-1525 Added date-time display for vicidial client display
|
||||
# 50816-1500 Added random update to vicidial_live_agents table for vdc users
|
||||
# 51121-1353 Altered echo statements for several small PHP speed optimizations
|
||||
# 60410-1424 Added ability to grab calls-being-placed and agent status
|
||||
# 50509-1054 - First build of script
|
||||
# 50511-1112 - Added ability to register a conference room
|
||||
# 50610-1159 - Added NULL check on MySQL results to reduced errors
|
||||
# 50706-1429 - script changed to not use HTTP login vars, user/pass instead
|
||||
# 50706-1525 - Added date-time display for vicidial client display
|
||||
# 50816-1500 - Added random update to vicidial_live_agents table for vdc users
|
||||
# 51121-1353 - Altered echo statements for several small PHP speed optimizations
|
||||
# 60410-1424 - Added ability to grab calls-being-placed and agent status
|
||||
# 60421-1405 - check GET/POST vars lines with isset to not trigger PHP NOTICES
|
||||
#
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
### If you have globals turned off uncomment these lines
|
||||
$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];}
|
||||
$pass=$_GET["pass"]; if (!$pass) {$pass=$_POST["pass"];}
|
||||
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
|
||||
$session_name=$_GET["session_name"]; if (!$session_name) {$session_name=$_POST["session_name"];}
|
||||
$format=$_GET["format"]; if (!$format) {$format=$_POST["format"];}
|
||||
$ACTION=$_GET["ACTION"]; if (!$ACTION) {$ACTION=$_POST["ACTION"];}
|
||||
$client=$_GET["client"]; if (!$client) {$client=$_POST["client"];}
|
||||
$conf_exten=$_GET["conf_exten"]; if (!$conf_exten) {$conf_exten=$_POST["conf_exten"];}
|
||||
$exten=$_GET["exten"]; if (!$exten) {$exten=$_POST["exten"];}
|
||||
$auto_dial_level=$_GET["auto_dial_level"]; if (!$auto_dial_level) {$auto_dial_level=$_POST["auto_dial_level"];}
|
||||
$campagentstdisp=$_GET["campagentstdisp"]; if (!$campagentstdisp) {$campagentstdisp=$_POST["campagentstdisp"];}
|
||||
if (isset($_GET["user"])) {$user=$_GET["user"];}
|
||||
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
|
||||
if (isset($_GET["pass"])) {$pass=$_GET["pass"];}
|
||||
elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];}
|
||||
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
|
||||
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
|
||||
if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];}
|
||||
elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];}
|
||||
if (isset($_GET["format"])) {$format=$_GET["format"];}
|
||||
elseif (isset($_POST["format"])) {$format=$_POST["format"];}
|
||||
if (isset($_GET["ACTION"])) {$ACTION=$_GET["ACTION"];}
|
||||
elseif (isset($_POST["ACTION"])) {$ACTION=$_POST["ACTION"];}
|
||||
if (isset($_GET["client"])) {$client=$_GET["client"];}
|
||||
elseif (isset($_POST["client"])) {$client=$_POST["client"];}
|
||||
if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];}
|
||||
elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];}
|
||||
if (isset($_GET["exten"])) {$exten=$_GET["exten"];}
|
||||
elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];}
|
||||
if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];}
|
||||
elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];}
|
||||
if (isset($_GET["campagentstdisp"])) {$campagentstdisp=$_GET["campagentstdisp"];}
|
||||
elseif (isset($_POST["campagentstdisp"])) {$campagentstdisp=$_POST["campagentstdisp"];}
|
||||
|
||||
# default optional vars if not set
|
||||
if (!$format) {$format="text";}
|
||||
if (!$ACTION) {$ACTION="refresh";}
|
||||
if (!$client) {$client="agc";}
|
||||
if (!isset($format)) {$format="text";}
|
||||
if (!isset($ACTION)) {$ACTION="refresh";}
|
||||
if (!isset($client)) {$client="agc";}
|
||||
|
||||
$version = '0.0.7';
|
||||
$build = '51121-1353';
|
||||
$version = '0.0.8';
|
||||
$build = '60421-1405';
|
||||
$StarTtime = date("U");
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$FILE_TIME = date("Ymd_His");
|
||||
if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
if (!isset($query_date)) {$query_date = $NOW_DATE;}
|
||||
$random = (rand(1000000, 9999999) + 10000000);
|
||||
|
||||
|
||||
@@ -69,7 +80,7 @@ $random = (rand(1000000, 9999999) + 10000000);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth))
|
||||
if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0))
|
||||
{
|
||||
echo "Invalid Username/Password: |$user|$pass|\n";
|
||||
exit;
|
||||
@@ -77,7 +88,7 @@ $random = (rand(1000000, 9999999) + 10000000);
|
||||
else
|
||||
{
|
||||
|
||||
if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) )
|
||||
if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) )
|
||||
{
|
||||
echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n";
|
||||
exit;
|
||||
@@ -89,7 +100,7 @@ $random = (rand(1000000, 9999999) + 10000000);
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$SNauth=$row[0];
|
||||
if(!$SNauth)
|
||||
if($SNauth==0)
|
||||
{
|
||||
echo "Invalid session_name: |$session_name|$server_ip|\n";
|
||||
exit;
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
<?
|
||||
###
|
||||
### Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
|
||||
###
|
||||
#
|
||||
# Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
|
||||
#
|
||||
$link=mysql_connect("localhost", "cron", "1234");
|
||||
mysql_select_db("asterisk");
|
||||
|
||||
|
||||
+39
-28
@@ -24,42 +24,53 @@
|
||||
###
|
||||
|
||||
# changes
|
||||
# 50428-1500 First build of script display only
|
||||
# 50429-1241 some formatting, hangup and Vmail redirect, 30s timeout on actions, and CID web lookup links
|
||||
# 50503-1244 added session_name checking for extra security
|
||||
# 50711-1203 removed HTTP authentication in favor of user/pass vars
|
||||
# 50428-1500 - First build of script display only
|
||||
# 50429-1241 - some formatting, hangup and Vmail redirect, 30s timeout on actions, and CID web lookup links
|
||||
# 50503-1244 - added session_name checking for extra security
|
||||
# 50711-1203 - removed HTTP authentication in favor of user/pass vars
|
||||
# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES
|
||||
#
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
### If you have globals turned off uncomment these lines
|
||||
$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];}
|
||||
$pass=$_GET["pass"]; if (!$pass) {$pass=$_POST["pass"];}
|
||||
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
|
||||
$session_name=$_GET["session_name"]; if (!$session_name) {$session_name=$_POST["session_name"];}
|
||||
$uniqueid=$_GET["uniqueid"]; if (!$uniqueid) {$uniqueid=$_POST["uniqueid"];}
|
||||
$format=$_GET["format"]; if (!$format) {$format=$_POST["format"];}
|
||||
$exten=$_GET["exten"]; if (!$exten) {$exten=$_POST["exten"];}
|
||||
$vmail_box=$_GET["vmail_box"]; if (!$vmail_box) {$vmail_box=$_POST["vmail_box"];}
|
||||
$ext_context=$_GET["ext_context"]; if (!$ext_context) {$ext_context=$_POST["ext_context"];}
|
||||
$ext_priority=$_GET["ext_priority"]; if (!$ext_priority) {$ext_priority=$_POST["ext_priority"];}
|
||||
$voicemail_dump_exten=$_GET["voicemail_dump_exten"]; if (!$voicemail_dump_exten)
|
||||
{$voicemail_dump_exten=$_POST["voicemail_dump_exten"];}
|
||||
$local_web_callerID_URL_enc=$_GET["local_web_callerID_URL_enc"]; if (!$local_web_callerID_URL_enc)
|
||||
{$local_web_callerID_URL_enc=$_POST["local_web_callerID_URL_enc"];}
|
||||
$local_web_callerID_URL = rawurldecode($local_web_callerID_URL_enc);
|
||||
if (isset($_GET["user"])) {$user=$_GET["user"];}
|
||||
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
|
||||
if (isset($_GET["pass"])) {$pass=$_GET["pass"];}
|
||||
elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];}
|
||||
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
|
||||
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
|
||||
if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];}
|
||||
elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];}
|
||||
if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];}
|
||||
elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];}
|
||||
if (isset($_GET["format"])) {$format=$_GET["format"];}
|
||||
elseif (isset($_POST["format"])) {$format=$_POST["format"];}
|
||||
if (isset($_GET["exten"])) {$exten=$_GET["exten"];}
|
||||
elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];}
|
||||
if (isset($_GET["vmail_box"])) {$vmail_box=$_GET["vmail_box"];}
|
||||
elseif (isset($_POST["vmail_box"])) {$vmail_box=$_POST["vmail_box"];}
|
||||
if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];}
|
||||
elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];}
|
||||
if (isset($_GET["ext_priority"])) {$ext_priority=$_GET["ext_priority"];}
|
||||
elseif (isset($_POST["ext_priority"])) {$ext_priority=$_POST["ext_priority"];}
|
||||
if (isset($_GET["voicemail_dump_exten"])) {$voicemail_dump_exten=$_GET["voicemail_dump_exten"];}
|
||||
elseif (isset($_POST["voicemail_dump_exten"])) {$voicemail_dump_exten=$_POST["voicemail_dump_exten"];}
|
||||
if (isset($_GET["local_web_callerID_URL_enc"])) {$local_web_callerID_URL_enc=$_GET["local_web_callerID_URL_enc"];}
|
||||
elseif (isset($_POST["local_web_callerID_URL_enc"])) {$local_web_callerID_URL_enc=$_POST["local_web_callerID_URL_enc"];}
|
||||
if (isset($_GET["local_web_callerID_URL_enc"])) {$local_web_callerID_URL = rawurldecode($local_web_callerID_URL_enc);}
|
||||
else {$local_web_callerID_URL = '';}
|
||||
|
||||
|
||||
# default optional vars if not set
|
||||
if (!$format) {$format="text";}
|
||||
if (!isset($format)) {$format="text";}
|
||||
|
||||
$version = '0.0.4';
|
||||
$build = '50711-1203';
|
||||
$version = '0.0.5';
|
||||
$build = '60421-1043';
|
||||
$StarTtime = date("U");
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
if (!isset($query_date)) {$query_date = $NOW_DATE;}
|
||||
$DO = '-1';
|
||||
if ( (eregi("^Zap",$channel)) and (!eregi("-",$channel)) ) {$channel = "$channel$DO";}
|
||||
|
||||
@@ -69,7 +80,7 @@ if ( (eregi("^Zap",$channel)) and (!eregi("-",$channel)) ) {$channel = "$channel
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth))
|
||||
if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0))
|
||||
{
|
||||
echo "Invalid Username/Password: |$user|$pass|\n";
|
||||
exit;
|
||||
@@ -77,7 +88,7 @@ if ( (eregi("^Zap",$channel)) and (!eregi("-",$channel)) ) {$channel = "$channel
|
||||
else
|
||||
{
|
||||
|
||||
if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) )
|
||||
if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) )
|
||||
{
|
||||
echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n";
|
||||
exit;
|
||||
@@ -89,7 +100,7 @@ if ( (eregi("^Zap",$channel)) and (!eregi("-",$channel)) ) {$channel = "$channel
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$SNauth=$row[0];
|
||||
if(!$SNauth)
|
||||
if($SNauth==0)
|
||||
{
|
||||
echo "Invalid session_name: |$session_name|$server_ip|\n";
|
||||
exit;
|
||||
|
||||
+34
-26
@@ -18,40 +18,48 @@
|
||||
###
|
||||
|
||||
# changes
|
||||
# 50404-1249 First build of script
|
||||
# 50406-1402 added connected trunk lookup
|
||||
# 50428-1452 added live_inbound check for exten on 2nd line of output
|
||||
# 50503-1233 added session_name checking for extra security
|
||||
# 50524-1429 added parked calls count
|
||||
# 50610-1204 Added NULL check on MySQL results to reduced errors
|
||||
# 50711-1204 removed HTTP authentication in favor of user/pass vars
|
||||
# 60103-1541 added favorite extens status display
|
||||
# 50404-1249 - First build of script
|
||||
# 50406-1402 - added connected trunk lookup
|
||||
# 50428-1452 - added live_inbound check for exten on 2nd line of output
|
||||
# 50503-1233 - added session_name checking for extra security
|
||||
# 50524-1429 - added parked calls count
|
||||
# 50610-1204 - Added NULL check on MySQL results to reduced errors
|
||||
# 50711-1204 - removed HTTP authentication in favor of user/pass vars
|
||||
# 60103-1541 - added favorite extens status display
|
||||
# 60421-1359 - check GET/POST vars lines with isset to not trigger PHP NOTICES
|
||||
#
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
### If you have globals turned off uncomment these lines
|
||||
$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];}
|
||||
$pass=$_GET["pass"]; if (!$pass) {$pass=$_POST["pass"];}
|
||||
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
|
||||
$session_name=$_GET["session_name"]; if (!$session_name) {$session_name=$_POST["session_name"];}
|
||||
$format=$_GET["format"]; if (!$format) {$format=$_POST["format"];}
|
||||
$exten=$_GET["exten"]; if (!$exten) {$exten=$_POST["exten"];}
|
||||
$protocol=$_GET["protocol"]; if (!$protocol) {$protocol=$_POST["protocol"];}
|
||||
$favorites_count=$_GET["favorites_count"]; if (!$favorites_count) {$favorites_count=$_POST["favorites_count"];}
|
||||
$favorites_list=$_GET["favorites_list"]; if (!$favorites_list) {$favorites_list=$_POST["favorites_list"];}
|
||||
if (isset($_GET["user"])) {$user=$_GET["user"];}
|
||||
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
|
||||
if (isset($_GET["pass"])) {$pass=$_GET["pass"];}
|
||||
elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];}
|
||||
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
|
||||
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
|
||||
if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];}
|
||||
elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];}
|
||||
if (isset($_GET["format"])) {$format=$_GET["format"];}
|
||||
elseif (isset($_POST["format"])) {$format=$_POST["format"];}
|
||||
if (isset($_GET["exten"])) {$exten=$_GET["exten"];}
|
||||
elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];}
|
||||
if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];}
|
||||
elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];}
|
||||
if (isset($_GET["favorites_count"])) {$favorites_count=$_GET["favorites_count"];}
|
||||
elseif (isset($_POST["favorites_count"])) {$favorites_count=$_POST["favorites_count"];}
|
||||
if (isset($_GET["favorites_list"])) {$favorites_list=$_GET["favorites_list"];}
|
||||
elseif (isset($_POST["favorites_list"])) {$favorites_list=$_POST["favorites_list"];}
|
||||
|
||||
# default optional vars if not set
|
||||
if (!$format) {$format="text";}
|
||||
if (!isset($format)) {$format="text";}
|
||||
|
||||
$version = '1.1.9';
|
||||
$build = '60103-1541';
|
||||
$version = '1.1.11';
|
||||
$build = '60421-1359';
|
||||
$StarTtime = date("U");
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
if (!isset($query_date)) {$query_date = $NOW_DATE;}
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
@@ -59,7 +67,7 @@ if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth))
|
||||
if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0))
|
||||
{
|
||||
echo "Invalid Username/Password: |$user|$pass|\n";
|
||||
exit;
|
||||
@@ -67,7 +75,7 @@ if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
else
|
||||
{
|
||||
|
||||
if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) )
|
||||
if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) )
|
||||
{
|
||||
echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n";
|
||||
exit;
|
||||
@@ -79,7 +87,7 @@ if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$SNauth=$row[0];
|
||||
if(!$SNauth)
|
||||
if($SNauth==0)
|
||||
{
|
||||
echo "Invalid session_name: |$session_name|$server_ip|\n";
|
||||
exit;
|
||||
|
||||
+114
-93
@@ -1,107 +1,128 @@
|
||||
<?
|
||||
### manager_send.php
|
||||
###
|
||||
### Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
|
||||
###
|
||||
### This script is designed purely to insert records into the vicidial_manager table to signal Actions to an asterisk server
|
||||
### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
|
||||
###
|
||||
### required variables:
|
||||
### - $server_ip
|
||||
### - $session_name
|
||||
### - $user
|
||||
### - $pass
|
||||
### optional variables:
|
||||
### - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectVD','HangupConfDial')
|
||||
### - $queryCID - ('CN012345678901234567',...)
|
||||
### - $format - ('text','debug')
|
||||
### - $channel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...)
|
||||
### - $exten - ('1234','913125551212',...)
|
||||
### - $ext_context - ('default','demo',...)
|
||||
### - $ext_priority - ('1','2',...)
|
||||
### - $filename - ('20050406-125623_44444',...)
|
||||
### - $extenName - ('phone100',...)
|
||||
### - $parkedby - ('phone100',...)
|
||||
### - $extrachannel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...)
|
||||
### - $auto_dial_level - ('0','1','1.1',...)
|
||||
### - $campaign - ('CLOSER','TESTCAMP',...)
|
||||
### - $uniqueid - ('1120232758.2406800',...)
|
||||
### - $lead_id - ('1234',...)
|
||||
### - $seconds - ('32',...)
|
||||
### - $outbound_cid - ('3125551212','0000000000',...)
|
||||
### - $agent_log_id - ('123456',...)
|
||||
### - $call_server_ip - ('10.10.10.15',...)
|
||||
### - $CalLCID - ('VD01234567890123456',...)
|
||||
###
|
||||
# manager_send.php
|
||||
#
|
||||
# Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
|
||||
#
|
||||
# This script is designed purely to insert records into the vicidial_manager table to signal Actions to an asterisk server
|
||||
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
|
||||
#
|
||||
# required variables:
|
||||
# - $server_ip
|
||||
# - $session_name
|
||||
# - $user
|
||||
# - $pass
|
||||
# optional variables:
|
||||
# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectVD','HangupConfDial')
|
||||
# - $queryCID - ('CN012345678901234567',...)
|
||||
# - $format - ('text','debug')
|
||||
# - $channel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...)
|
||||
# - $exten - ('1234','913125551212',...)
|
||||
# - $ext_context - ('default','demo',...)
|
||||
# - $ext_priority - ('1','2',...)
|
||||
# - $filename - ('20050406-125623_44444',...)
|
||||
# - $extenName - ('phone100',...)
|
||||
# - $parkedby - ('phone100',...)
|
||||
# - $extrachannel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...)
|
||||
# - $auto_dial_level - ('0','1','1.1',...)
|
||||
# - $campaign - ('CLOSER','TESTCAMP',...)
|
||||
# - $uniqueid - ('1120232758.2406800',...)
|
||||
# - $lead_id - ('1234',...)
|
||||
# - $seconds - ('32',...)
|
||||
# - $outbound_cid - ('3125551212','0000000000',...)
|
||||
# - $agent_log_id - ('123456',...)
|
||||
# - $call_server_ip - ('10.10.10.15',...)
|
||||
# - $CalLCID - ('VD01234567890123456',...)
|
||||
#
|
||||
|
||||
# changes
|
||||
# 50401-1002 First build of script, Hangup function only
|
||||
# 50404-1045 Redirect basic function enabled
|
||||
# 50406-1522 Monitor basic function enabled
|
||||
# 50407-1647 Monitor and StopMonitor full functions enabled
|
||||
# 50422-1120 basic Originate function enabled
|
||||
# 50428-1451 basic SysCIDOriginate function enabled for checking voicemail
|
||||
# 50502-1539 basic RedirectName and RedirectNameVmail added
|
||||
# 50503-1227 added session_name checking for extra security
|
||||
# 50523-1341 added Conference call start/stop recording
|
||||
# 50523-1421 added OriginateName and OriginateNameVmail for local calls
|
||||
# 50524-1602 added RedirectToPark and RedirectFromPark
|
||||
# 50531-1203 added RedirecXtra for dual channel redirection
|
||||
# 50630-1100 script changed to not use HTTP login vars, user/pass instead
|
||||
# 50804-1148 Added RedirectVD for VICIDIAL blind redirection with logging
|
||||
# 50815-1204 Added NEXTAVAILABLE to RedirectXtra function
|
||||
# 50903-2343 Added HangupConfDial function to hangup in-dial channels in conf
|
||||
# 50913-1057 Added outbound_cid set if present to originate call
|
||||
# 51020-1556 Added agent_log_id framework for detailed agent activity logging
|
||||
# 51118-1204 Fixed Blind transfer bug from VICIDIAL when in manual dial mode
|
||||
# 51129-1014 Added ability to accept calls from other VICIDIAL servers
|
||||
# 51129-1253 Fixed Hangups of other agents channels in VICIDIAL AD
|
||||
# 60310-2022 Fixed NEXTAVAILABLE bug in leave-3way-call redirect function
|
||||
# 50401-1002 - First build of script, Hangup function only
|
||||
# 50404-1045 - Redirect basic function enabled
|
||||
# 50406-1522 - Monitor basic function enabled
|
||||
# 50407-1647 - Monitor and StopMonitor full functions enabled
|
||||
# 50422-1120 - basic Originate function enabled
|
||||
# 50428-1451 - basic SysCIDOriginate function enabled for checking voicemail
|
||||
# 50502-1539 - basic RedirectName and RedirectNameVmail added
|
||||
# 50503-1227 - added session_name checking for extra security
|
||||
# 50523-1341 - added Conference call start/stop recording
|
||||
# 50523-1421 - added OriginateName and OriginateNameVmail for local calls
|
||||
# 50524-1602 - added RedirectToPark and RedirectFromPark
|
||||
# 50531-1203 - added RedirecXtra for dual channel redirection
|
||||
# 50630-1100 - script changed to not use HTTP login vars, user/pass instead
|
||||
# 50804-1148 - Added RedirectVD for VICIDIAL blind redirection with logging
|
||||
# 50815-1204 - Added NEXTAVAILABLE to RedirectXtra function
|
||||
# 50903-2343 - Added HangupConfDial function to hangup in-dial channels in conf
|
||||
# 50913-1057 - Added outbound_cid set if present to originate call
|
||||
# 51020-1556 - Added agent_log_id framework for detailed agent activity logging
|
||||
# 51118-1204 - Fixed Blind transfer bug from VICIDIAL when in manual dial mode
|
||||
# 51129-1014 - Added ability to accept calls from other VICIDIAL servers
|
||||
# 51129-1253 - Fixed Hangups of other agents channels in VICIDIAL AD
|
||||
# 60310-2022 - Fixed NEXTAVAILABLE bug in leave-3way-call redirect function
|
||||
# 60421-1413 - check GET/POST vars lines with isset to not trigger PHP NOTICES
|
||||
#
|
||||
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
### These are variable assignments for PHP globals off
|
||||
$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];}
|
||||
$pass=$_GET["pass"]; if (!$pass) {$pass=$_POST["pass"];}
|
||||
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
|
||||
$session_name=$_GET["session_name"]; if (!$session_name) {$session_name=$_POST["session_name"];}
|
||||
$ACTION=$_GET["ACTION"]; if (!$ACTION) {$ACTION=$_POST["ACTION"];}
|
||||
$queryCID=$_GET["queryCID"]; if (!$queryCID) {$queryCID=$_POST["queryCID"];}
|
||||
$format=$_GET["format"]; if (!$format) {$format=$_POST["format"];}
|
||||
$channel=$_GET["channel"]; if (!$channel) {$channel=$_POST["channel"];}
|
||||
$exten=$_GET["exten"]; if (!$exten) {$exten=$_POST["exten"];}
|
||||
$ext_context=$_GET["ext_context"]; if (!$ext_context) {$ext_context=$_POST["ext_context"];}
|
||||
$ext_priority=$_GET["ext_priority"]; if (!$ext_priority) {$ext_priority=$_POST["ext_priority"];}
|
||||
$filename=$_GET["filename"]; if (!$filename) {$filename=$_POST["filename"];}
|
||||
$extenName=$_GET["extenName"]; if (!$extenName) {$extenName=$_POST["extenName"];}
|
||||
$parkedby=$_GET["parkedby"]; if (!$parkedby) {$parkedby=$_POST["parkedby"];}
|
||||
$extrachannel=$_GET["extrachannel"]; if (!$extrachannel) {$extrachannel=$_POST["extrachannel"];}
|
||||
$auto_dial_level=$_GET["auto_dial_level"]; if (!$auto_dial_level) {$auto_dial_level=$_POST["auto_dial_level"];}
|
||||
$campaign=$_GET["campaign"]; if (!$campaign) {$campaign=$_POST["campaign"];}
|
||||
$uniqueid=$_GET["uniqueid"]; if (!$uniqueid) {$uniqueid=$_POST["uniqueid"];}
|
||||
$lead_id=$_GET["lead_id"]; if (!$lead_id) {$lead_id=$_POST["lead_id"];}
|
||||
$secondS=$_GET["secondS"]; if (!$secondS) {$secondS=$_POST["secondS"];}
|
||||
$outbound_cid=$_GET["outbound_cid"]; if (!$outbound_cid) {$outbound_cid=$_POST["outbound_cid"];}
|
||||
$agent_log_id=$_GET["agent_log_id"]; if (!$agent_log_id) {$agent_log_id=$_POST["agent_log_id"];}
|
||||
$call_server_ip=$_GET["call_server_ip"]; if (!$call_server_ip) {$call_server_ip=$_POST["call_server_ip"];}
|
||||
$CalLCID=$_GET["CalLCID"]; if (!$CalLCID) {$CalLCID=$_POST["CalLCID"];}
|
||||
if (isset($_GET["user"])) {$user=$_GET["user"];}
|
||||
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
|
||||
if (isset($_GET["pass"])) {$pass=$_GET["pass"];}
|
||||
elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];}
|
||||
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
|
||||
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
|
||||
if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];}
|
||||
elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];}
|
||||
if (isset($_GET["ACTION"])) {$ACTION=$_GET["ACTION"];}
|
||||
elseif (isset($_POST["ACTION"])) {$ACTION=$_POST["ACTION"];}
|
||||
if (isset($_GET["queryCID"])) {$queryCID=$_GET["queryCID"];}
|
||||
elseif (isset($_POST["queryCID"])) {$queryCID=$_POST["queryCID"];}
|
||||
if (isset($_GET["format"])) {$format=$_GET["format"];}
|
||||
elseif (isset($_POST["format"])) {$format=$_POST["format"];}
|
||||
if (isset($_GET["channel"])) {$channel=$_GET["channel"];}
|
||||
elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];}
|
||||
if (isset($_GET["exten"])) {$exten=$_GET["exten"];}
|
||||
elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];}
|
||||
if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];}
|
||||
elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];}
|
||||
if (isset($_GET["ext_priority"])) {$ext_priority=$_GET["ext_priority"];}
|
||||
elseif (isset($_POST["ext_priority"])) {$ext_priority=$_POST["ext_priority"];}
|
||||
if (isset($_GET["filename"])) {$filename=$_GET["filename"];}
|
||||
elseif (isset($_POST["filename"])) {$filename=$_POST["filename"];}
|
||||
if (isset($_GET["extenName"])) {$extenName=$_GET["extenName"];}
|
||||
elseif (isset($_POST["extenName"])) {$extenName=$_POST["extenName"];}
|
||||
if (isset($_GET["parkedby"])) {$parkedby=$_GET["parkedby"];}
|
||||
elseif (isset($_POST["parkedby"])) {$parkedby=$_POST["parkedby"];}
|
||||
if (isset($_GET["extrachannel"])) {$extrachannel=$_GET["extrachannel"];}
|
||||
elseif (isset($_POST["extrachannel"])) {$extrachannel=$_POST["extrachannel"];}
|
||||
if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];}
|
||||
elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];}
|
||||
if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];}
|
||||
elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];}
|
||||
if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];}
|
||||
elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];}
|
||||
if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];}
|
||||
elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];}
|
||||
if (isset($_GET["secondS"])) {$secondS=$_GET["secondS"];}
|
||||
elseif (isset($_POST["secondS"])) {$secondS=$_POST["secondS"];}
|
||||
if (isset($_GET["outbound_cid"])) {$outbound_cid=$_GET["outbound_cid"];}
|
||||
elseif (isset($_POST["outbound_cid"])) {$outbound_cid=$_POST["outbound_cid"];}
|
||||
if (isset($_GET["agent_log_id"])) {$agent_log_id=$_GET["agent_log_id"];}
|
||||
elseif (isset($_POST["agent_log_id"])) {$agent_log_id=$_POST["agent_log_id"];}
|
||||
if (isset($_GET["call_server_ip"])) {$call_server_ip=$_GET["call_server_ip"];}
|
||||
elseif (isset($_POST["call_server_ip"])) {$call_server_ip=$_POST["call_server_ip"];}
|
||||
if (isset($_GET["CalLCID"])) {$CalLCID=$_GET["CalLCID"];}
|
||||
elseif (isset($_POST["CalLCID"])) {$CalLCID=$_POST["CalLCID"];}
|
||||
|
||||
# default optional vars if not set
|
||||
if (!$ACTION) {$ACTION="Originate";}
|
||||
if (!$format) {$format="alert";}
|
||||
if (!$ext_priority) {$ext_priority="1";}
|
||||
if (!isset($ACTION)) {$ACTION="Originate";}
|
||||
if (!isset($format)) {$format="alert";}
|
||||
if (!isset($ext_priority)) {$ext_priority="1";}
|
||||
|
||||
|
||||
$version = '0.0.22';
|
||||
$build = '60310-2022';
|
||||
$version = '0.0.23';
|
||||
$build = '60421-1413';
|
||||
$StarTtime = date("U");
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
if (!isset($query_date)) {$query_date = $NOW_DATE;}
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
@@ -109,7 +130,7 @@ if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth))
|
||||
if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0))
|
||||
{
|
||||
echo "Invalid Username/Password: |$user|$pass|\n";
|
||||
exit;
|
||||
@@ -117,7 +138,7 @@ if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
else
|
||||
{
|
||||
|
||||
if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) )
|
||||
if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) )
|
||||
{
|
||||
echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n";
|
||||
exit;
|
||||
@@ -129,7 +150,7 @@ if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$SNauth=$row[0];
|
||||
if(!$SNauth)
|
||||
if($SNauth==0)
|
||||
{
|
||||
echo "Invalid session_name: |$session_name|$server_ip|\n";
|
||||
exit;
|
||||
|
||||
+25
-21
@@ -18,34 +18,39 @@
|
||||
###
|
||||
|
||||
# changes
|
||||
# 50524-1515 First build of script
|
||||
# 50711-1208 removed HTTP authentication in favor of user/pass vars
|
||||
# 50524-1515 - First build of script
|
||||
# 50711-1208 - removed HTTP authentication in favor of user/pass vars
|
||||
# 60421-1111 - check GET/POST vars lines with isset to not trigger PHP NOTICES
|
||||
#
|
||||
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
### If you have globals turned off uncomment these lines
|
||||
$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];}
|
||||
$pass=$_GET["pass"]; if (!$pass) {$pass=$_POST["pass"];}
|
||||
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
|
||||
$session_name=$_GET["session_name"]; if (!$session_name) {$session_name=$_POST["session_name"];}
|
||||
$format=$_GET["format"]; if (!$format) {$format=$_POST["format"];}
|
||||
$exten=$_GET["exten"]; if (!$exten) {$exten=$_POST["exten"];}
|
||||
$protocol=$_GET["protocol"]; if (!$protocol) {$protocol=$_POST["protocol"];}
|
||||
if (isset($_GET["user"])) {$user=$_GET["user"];}
|
||||
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
|
||||
if (isset($_GET["pass"])) {$pass=$_GET["pass"];}
|
||||
elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];}
|
||||
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
|
||||
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
|
||||
if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];}
|
||||
elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];}
|
||||
if (isset($_GET["format"])) {$format=$_GET["format"];}
|
||||
elseif (isset($_POST["format"])) {$format=$_POST["format"];}
|
||||
if (isset($_GET["exten"])) {$exten=$_GET["exten"];}
|
||||
elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];}
|
||||
if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];}
|
||||
elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];}
|
||||
|
||||
# default optional vars if not set
|
||||
if (!$format) {$format="text";}
|
||||
if (!$park_limit) {$park_limit="1000";}
|
||||
if (!isset($format)) {$format="text";}
|
||||
if (!isset($park_limit)) {$park_limit="1000";}
|
||||
|
||||
$version = '0.0.2';
|
||||
$build = '50711-1208';
|
||||
$version = '0.0.3';
|
||||
$build = '60421-1111';
|
||||
$StarTtime = date("U");
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
if (!isset($query_date)) {$query_date = $NOW_DATE;}
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
@@ -53,7 +58,7 @@ if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth))
|
||||
if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0) )
|
||||
{
|
||||
echo "Invalid Username/Password: |$user|$pass|\n";
|
||||
exit;
|
||||
@@ -61,8 +66,7 @@ if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
else
|
||||
{
|
||||
|
||||
if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) )
|
||||
{
|
||||
if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) {
|
||||
echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n";
|
||||
exit;
|
||||
}
|
||||
@@ -73,7 +77,7 @@ if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$SNauth=$row[0];
|
||||
if(!$SNauth)
|
||||
if($SNauth==0)
|
||||
{
|
||||
echo "Invalid session_name: |$session_name|$server_ip|\n";
|
||||
exit;
|
||||
|
||||
+227
-167
@@ -1,184 +1,244 @@
|
||||
<?
|
||||
### vdc_db_query.php
|
||||
###
|
||||
### Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
|
||||
###
|
||||
### This script is designed purely to send whether the meetme conference has live channels connected and which they are
|
||||
### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
|
||||
###
|
||||
### required variables:
|
||||
### - $server_ip
|
||||
### - $session_name
|
||||
### - $user
|
||||
### - $pass
|
||||
### optional variables:
|
||||
### - $format - ('text','debug')
|
||||
### - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT')
|
||||
### - $stage - ('start','finish')
|
||||
### - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -')
|
||||
### - $conf_exten - ('8600011',...)
|
||||
### - $exten - ('123test',...)
|
||||
### - $ext_context - ('default','demo',...)
|
||||
### - $ext_priority - ('1','2',...)
|
||||
### - $campaign - ('testcamp',...)
|
||||
### - $dial_timeout - ('60','26',...)
|
||||
### - $dial_prefix - ('9','8',...)
|
||||
### - $campaign_cid - ('3125551212','0000000000',...)
|
||||
### - $MDnextCID - ('M06301413000000002',...)
|
||||
### - $uniqueid - ('1120232758.2406800',...)
|
||||
### - $lead_id - ('36524',...)
|
||||
### - $list_id - ('101','123456',...)
|
||||
### - $length_in_sec - ('12',...)
|
||||
### - $phone_code - ('1',...)
|
||||
### - $phone_number - ('3125551212',...)
|
||||
### - $channel - ('Zap/12-1',...)
|
||||
### - $start_epoch - ('1120236911',...)
|
||||
### - $vendor_lead_code - ('1234test',...)
|
||||
### - $title - ('Mr.',...)
|
||||
### - $first_name - ('Bob',...)
|
||||
### - $middle_initial - ('L',...)
|
||||
### - $last_name - ('Wilson',...)
|
||||
### - $address1 - ('1324 Main St.',...)
|
||||
### - $address2 - ('Apt. 12',...)
|
||||
### - $address3 - ('co Robert Wilson',...)
|
||||
### - $city - ('Chicago',...)
|
||||
### - $state - ('IL',...)
|
||||
### - $province - ('NA',...)
|
||||
### - $postal_code - ('60054',...)
|
||||
### - $country_code - ('USA',...)
|
||||
### - $gender - ('M',...)
|
||||
### - $date_of_birth - ('1970-01-01',...)
|
||||
### - $alt_phone - ('3125551213',...)
|
||||
### - $email - ('bob@bob.com',...)
|
||||
### - $security_phrase - ('Hello',...)
|
||||
### - $comments - ('Good Customer',...)
|
||||
### - $auto_dial_level - ('0','1','1.2',...)
|
||||
### - $VDstop_rec_after_each_call - ('0','1')
|
||||
### - $conf_silent_prefix - ('7','8','',...)
|
||||
### - $extension - ('123','user123','25-1',...)
|
||||
### - $protocol - ('Zap','SIP','IAX2',...)
|
||||
### - $user_abb - ('1234','6666',...)
|
||||
### - $preview - ('YES','NO',...)
|
||||
### - $called_count - ('0','1','2',...)
|
||||
### - $agent_log_id - ('123456',...)
|
||||
### - $agent_log - ('NO',...)
|
||||
### - $favorites_list - (",'cc160','cc100'",...)
|
||||
###
|
||||
|
||||
# changes
|
||||
# 50629-1044 First build of script
|
||||
# 50630-1422 Added manual dial action and MD channel lookup
|
||||
# 50701-1451 Added dial log for start and end of vicidial calls
|
||||
# 50705-1239 Added call disposition update
|
||||
# 50804-1627 Fixed updateDispo to update vicidial_log entry
|
||||
# 50816-1605 Added VDADpause/ready for auto dialing
|
||||
# 50816-1811 Added basic autodial call pickup functions
|
||||
# 50817-1005 Altered logging functions to accomodate auto_dialing
|
||||
# 50818-1305 Added stop-all-recordings-after-each-vicidial-call option
|
||||
# 50818-1411 Added hangup of agent phone after Logout
|
||||
# 50901-1315 Fixed CLOSER IN-GROUP Web Form bug
|
||||
# 50902-1507 Fixed CLOSER log length_in_sec bug
|
||||
# 50902-1730 Added functions for manual preview dialing and revert
|
||||
# 50913-1214 Added agent random update to leadupdate
|
||||
# 51020-1421 Added agent_log_id framework for detailed agent activity logging
|
||||
# 51021-1717 Allows for multi-line comments (changes \n to !N in database)
|
||||
# 51111-1046 Added vicidial_agent_log lead_id earlier for manual dial
|
||||
# 51121-1445 Altered echo statements for several small PHP speed optimizations
|
||||
# 51122-1328 Fixed UserLogout issue not removing conference reservation
|
||||
# 51129-1012 Added ability to accept calls from other VICIDIAL servers
|
||||
# 51129-1729 Changed manual dial to use the '/n' flag for calls
|
||||
# 51221-1154 Added SCRIPT id lookup and sending to vicidial.php for display
|
||||
# 60105-1059 Added Updating of astguiclient favorites in the DB
|
||||
# 60208-1617 Added dtmf buttons output per call
|
||||
# 60213-1521 Added closer_campaigns update to vicidial_users
|
||||
# 60215-1036 Added Callback date-time entry into vicidial_callbacks table
|
||||
# 60413-1541 Added USERONLY Callback listings output - CalLBacKLisT
|
||||
# Added USERONLY Callback count output - CalLBacKCounT
|
||||
# 60414-1140 Added Callback lead lookup for manual dialing
|
||||
# 60419-1517 After CALLBK is sent to agent, update callback record to INACTIVE
|
||||
# vdc_db_query.php
|
||||
#
|
||||
# Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
|
||||
#
|
||||
# This script is designed purely to send whether the meetme conference has live channels connected and which they are
|
||||
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
|
||||
#
|
||||
# required variables:
|
||||
# - $server_ip
|
||||
# - $session_name
|
||||
# - $user
|
||||
# - $pass
|
||||
# optional variables:
|
||||
# - $format - ('text','debug')
|
||||
# - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT')
|
||||
# - $stage - ('start','finish')
|
||||
# - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -')
|
||||
# - $conf_exten - ('8600011',...)
|
||||
# - $exten - ('123test',...)
|
||||
# - $ext_context - ('default','demo',...)
|
||||
# - $ext_priority - ('1','2',...)
|
||||
# - $campaign - ('testcamp',...)
|
||||
# - $dial_timeout - ('60','26',...)
|
||||
# - $dial_prefix - ('9','8',...)
|
||||
# - $campaign_cid - ('3125551212','0000000000',...)
|
||||
# - $MDnextCID - ('M06301413000000002',...)
|
||||
# - $uniqueid - ('1120232758.2406800',...)
|
||||
# - $lead_id - ('36524',...)
|
||||
# - $list_id - ('101','123456',...)
|
||||
# - $length_in_sec - ('12',...)
|
||||
# - $phone_code - ('1',...)
|
||||
# - $phone_number - ('3125551212',...)
|
||||
# - $channel - ('Zap/12-1',...)
|
||||
# - $start_epoch - ('1120236911',...)
|
||||
# - $vendor_lead_code - ('1234test',...)
|
||||
# - $title - ('Mr.',...)
|
||||
# - $first_name - ('Bob',...)
|
||||
# - $middle_initial - ('L',...)
|
||||
# - $last_name - ('Wilson',...)
|
||||
# - $address1 - ('1324 Main St.',...)
|
||||
# - $address2 - ('Apt. 12',...)
|
||||
# - $address3 - ('co Robert Wilson',...)
|
||||
# - $city - ('Chicago',...)
|
||||
# - $state - ('IL',...)
|
||||
# - $province - ('NA',...)
|
||||
# - $postal_code - ('60054',...)
|
||||
# - $country_code - ('USA',...)
|
||||
# - $gender - ('M',...)
|
||||
# - $date_of_birth - ('1970-01-01',...)
|
||||
# - $alt_phone - ('3125551213',...)
|
||||
# - $email - ('bob@bob.com',...)
|
||||
# - $security_phrase - ('Hello',...)
|
||||
# - $comments - ('Good Customer',...)
|
||||
# - $auto_dial_level - ('0','1','1.2',...)
|
||||
# - $VDstop_rec_after_each_call - ('0','1')
|
||||
# - $conf_silent_prefix - ('7','8','',...)
|
||||
# - $extension - ('123','user123','25-1',...)
|
||||
# - $protocol - ('Zap','SIP','IAX2',...)
|
||||
# - $user_abb - ('1234','6666',...)
|
||||
# - $preview - ('YES','NO',...)
|
||||
# - $called_count - ('0','1','2',...)
|
||||
# - $agent_log_id - ('123456',...)
|
||||
# - $agent_log - ('NO',...)
|
||||
# - $favorites_list - (",'cc160','cc100'",...)
|
||||
# - $CallBackDatETimE - ('2006-04-21 14:30:00',...)
|
||||
# - $recipient - ('ANYONE,'USERONLY')
|
||||
# - $callback_id - ('12345','12346',...)
|
||||
#
|
||||
|
||||
$version = '0.0.29';
|
||||
$build = '60419-1517';
|
||||
# changes
|
||||
# 50629-1044 - First build of script
|
||||
# 50630-1422 - Added manual dial action and MD channel lookup
|
||||
# 50701-1451 - Added dial log for start and end of vicidial calls
|
||||
# 50705-1239 - Added call disposition update
|
||||
# 50804-1627 - Fixed updateDispo to update vicidial_log entry
|
||||
# 50816-1605 - Added VDADpause/ready for auto dialing
|
||||
# 50816-1811 - Added basic autodial call pickup functions
|
||||
# 50817-1005 - Altered logging functions to accomodate auto_dialing
|
||||
# 50818-1305 - Added stop-all-recordings-after-each-vicidial-call option
|
||||
# 50818-1411 - Added hangup of agent phone after Logout
|
||||
# 50901-1315 - Fixed CLOSER IN-GROUP Web Form bug
|
||||
# 50902-1507 - Fixed CLOSER log length_in_sec bug
|
||||
# 50902-1730 - Added functions for manual preview dialing and revert
|
||||
# 50913-1214 - Added agent random update to leadupdate
|
||||
# 51020-1421 - Added agent_log_id framework for detailed agent activity logging
|
||||
# 51021-1717 - Allows for multi-line comments (changes \n to !N in database)
|
||||
# 51111-1046 - Added vicidial_agent_log lead_id earlier for manual dial
|
||||
# 51121-1445 - Altered echo statements for several small PHP speed optimizations
|
||||
# 51122-1328 - Fixed UserLogout issue not removing conference reservation
|
||||
# 51129-1012 - Added ability to accept calls from other VICIDIAL servers
|
||||
# 51129-1729 - Changed manual dial to use the '/n' flag for calls
|
||||
# 51221-1154 - Added SCRIPT id lookup and sending to vicidial.php for display
|
||||
# 60105-1059 - Added Updating of astguiclient favorites in the DB
|
||||
# 60208-1617 - Added dtmf buttons output per call
|
||||
# 60213-1521 - Added closer_campaigns update to vicidial_users
|
||||
# 60215-1036 - Added Callback date-time entry into vicidial_callbacks table
|
||||
# 60413-1541 - Added USERONLY Callback listings output - CalLBacKLisT
|
||||
# - Added USERONLY Callback count output - CalLBacKCounT
|
||||
# 60414-1140 - Added Callback lead lookup for manual dialing
|
||||
# 60419-1517 - After CALLBK is sent to agent, update callback record to INACTIVE
|
||||
# 60421-1419 - check GET/POST vars lines with isset to not trigger PHP NOTICES
|
||||
#
|
||||
|
||||
$version = '0.0.30';
|
||||
$build = '60421-1419';
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
### If you have globals turned off uncomment these lines
|
||||
$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];}
|
||||
$pass=$_GET["pass"]; if (!$pass) {$pass=$_POST["pass"];}
|
||||
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
|
||||
$session_name=$_GET["session_name"]; if (!$session_name) {$session_name=$_POST["session_name"];}
|
||||
$format=$_GET["format"]; if (!$format) {$format=$_POST["format"];}
|
||||
$ACTION=$_GET["ACTION"]; if (!$ACTION) {$ACTION=$_POST["ACTION"];}
|
||||
$stage=$_GET["stage"]; if (!$stage) {$stage=$_POST["stage"];}
|
||||
$closer_choice=$_GET["closer_choice"]; if (!$closer_choice) {$closer_choice=$_POST["closer_choice"];}
|
||||
$conf_exten=$_GET["conf_exten"]; if (!$conf_exten) {$conf_exten=$_POST["conf_exten"];}
|
||||
$exten=$_GET["exten"]; if (!$exten) {$exten=$_POST["exten"];}
|
||||
$ext_context=$_GET["ext_context"]; if (!$ext_context) {$ext_context=$_POST["ext_context"];}
|
||||
$ext_priority=$_GET["ext_priority"]; if (!$ext_priority) {$ext_priority=$_POST["ext_priority"];}
|
||||
$campaign=$_GET["campaign"]; if (!$campaign) {$campaign=$_POST["campaign"];}
|
||||
$dial_timeout=$_GET["dial_timeout"]; if (!$dial_timeout) {$dial_timeout=$_POST["dial_timeout"];}
|
||||
$dial_prefix=$_GET["dial_prefix"]; if (!$dial_prefix) {$dial_prefix=$_POST["dial_prefix"];}
|
||||
$campaign_cid=$_GET["campaign_cid"]; if (!$campaign_cid) {$campaign_cid=$_POST["campaign_cid"];}
|
||||
$MDnextCID=$_GET["MDnextCID"]; if (!$MDnextCID) {$MDnextCID=$_POST["MDnextCID"];}
|
||||
$uniqueid=$_GET["uniqueid"]; if (!$uniqueid) {$uniqueid=$_POST["uniqueid"];}
|
||||
$lead_id=$_GET["lead_id"]; if (!$lead_id) {$lead_id=$_POST["lead_id"];}
|
||||
$list_id=$_GET["list_id"]; if (!$list_id) {$list_id=$_POST["list_id"];}
|
||||
$length_in_sec=$_GET["length_in_sec"]; if (!$length_in_sec) {$length_in_sec=$_POST["length_in_sec"];}
|
||||
$phone_code=$_GET["phone_code"]; if (!$phone_code) {$phone_code=$_POST["phone_code"];}
|
||||
$phone_number=$_GET["phone_number"]; if (!$phone_number) {$phone_number=$_POST["phone_number"];}
|
||||
$channel=$_GET["channel"]; if (!$channel) {$channel=$_POST["channel"];}
|
||||
$start_epoch=$_GET["start_epoch"]; if (!$start_epoch) {$start_epoch=$_POST["start_epoch"];}
|
||||
$dispo_choice=$_GET["dispo_choice"]; if (!$dispo_choice) {$dispo_choice=$_POST["dispo_choice"];}
|
||||
$vendor_lead_code=$_GET["vendor_lead_code"]; if (!$vendor_lead_code) {$vendor_lead_code=$_POST["vendor_lead_code"];}
|
||||
$title=$_GET["title"]; if (!$title) {$title=$_POST["title"];}
|
||||
$first_name=$_GET["first_name"]; if (!$first_name) {$first_name=$_POST["first_name"];}
|
||||
$middle_initial=$_GET["middle_initial"]; if (!$middle_initial) {$middle_initial=$_POST["middle_initial"];}
|
||||
$last_name=$_GET["last_name"]; if (!$last_name) {$last_name=$_POST["last_name"];}
|
||||
$address1=$_GET["address1"]; if (!$address1) {$address1=$_POST["address1"];}
|
||||
$address2=$_GET["address2"]; if (!$address2) {$address2=$_POST["address2"];}
|
||||
$address3=$_GET["address3"]; if (!$address3) {$address3=$_POST["address3"];}
|
||||
$city=$_GET["city"]; if (!$city) {$city=$_POST["city"];}
|
||||
$state=$_GET["state"]; if (!$state) {$state=$_POST["state"];}
|
||||
$province=$_GET["province"]; if (!$province) {$province=$_POST["province"];}
|
||||
$postal_code=$_GET["postal_code"]; if (!$postal_code) {$postal_code=$_POST["postal_code"];}
|
||||
$country_code=$_GET["country_code"]; if (!$country_code) {$country_code=$_POST["country_code"];}
|
||||
$gender=$_GET["gender"]; if (!$gender) {$gender=$_POST["gender"];}
|
||||
$date_of_birth=$_GET["date_of_birth"]; if (!$date_of_birth) {$date_of_birth=$_POST["date_of_birth"];}
|
||||
$alt_phone=$_GET["alt_phone"]; if (!$alt_phone) {$alt_phone=$_POST["alt_phone"];}
|
||||
$email=$_GET["email"]; if (!$email) {$email=$_POST["email"];}
|
||||
$security_phrase=$_GET["security_phrase"]; if (!$security_phrase) {$security_phrase=$_POST["security_phrase"];}
|
||||
$comments=$_GET["comments"]; if (!$comments) {$comments=$_POST["comments"];}
|
||||
$auto_dial_level=$_GET["auto_dial_level"]; if (!$auto_dial_level) {$auto_dial_level=$_POST["auto_dial_level"];}
|
||||
$VDstop_rec_after_each_call=$_GET["VDstop_rec_after_each_call"]; if (!$VDstop_rec_after_each_call) {$VDstop_rec_after_each_call=$_POST["VDstop_rec_after_each_call"];}
|
||||
$conf_silent_prefix=$_GET["conf_silent_prefix"]; if (!$conf_silent_prefix) {$conf_silent_prefix=$_POST["conf_silent_prefix"];}
|
||||
$extension=$_GET["extension"]; if (!$extension) {$extension=$_POST["extension"];}
|
||||
$protocol=$_GET["protocol"]; if (!$protocol) {$protocol=$_POST["protocol"];}
|
||||
$user_abb=$_GET["user_abb"]; if (!$user_abb) {$user_abb=$_POST["user_abb"];}
|
||||
$preview=$_GET["preview"]; if (!$preview) {$preview=$_POST["preview"];}
|
||||
$called_count=$_GET["called_count"]; if (!$called_count) {$called_count=$_POST["called_count"];}
|
||||
$agent_log_id=$_GET["agent_log_id"]; if (!$agent_log_id) {$agent_log_id=$_POST["agent_log_id"];}
|
||||
$agent_log=$_GET["agent_log"]; if (!$agent_log) {$agent_log=$_POST["agent_log"];}
|
||||
$favorites_list=$_GET["favorites_list"]; if (!$favorites_list) {$favorites_list=$_POST["favorites_list"];}
|
||||
$CallBackDatETimE=$_GET["CallBackDatETimE"]; if (!$CallBackDatETimE) {$CallBackDatETimE=$_POST["CallBackDatETimE"];}
|
||||
$recipient=$_GET["recipient"]; if (!$recipient) {$recipient=$_POST["recipient"];}
|
||||
$callback_id=$_GET["callback_id"]; if (!$callback_id) {$callback_id=$_POST["callback_id"];}
|
||||
if (isset($_GET["user"])) {$user=$_GET["user"];}
|
||||
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
|
||||
if (isset($_GET["pass"])) {$pass=$_GET["pass"];}
|
||||
elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];}
|
||||
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
|
||||
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
|
||||
if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];}
|
||||
elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];}
|
||||
if (isset($_GET["format"])) {$format=$_GET["format"];}
|
||||
elseif (isset($_POST["format"])) {$format=$_POST["format"];}
|
||||
if (isset($_GET["ACTION"])) {$ACTION=$_GET["ACTION"];}
|
||||
elseif (isset($_POST["ACTION"])) {$ACTION=$_POST["ACTION"];}
|
||||
if (isset($_GET["stage"])) {$stage=$_GET["stage"];}
|
||||
elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];}
|
||||
if (isset($_GET["closer_choice"])) {$closer_choice=$_GET["closer_choice"];}
|
||||
elseif (isset($_POST["closer_choice"])) {$closer_choice=$_POST["closer_choice"];}
|
||||
if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];}
|
||||
elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];}
|
||||
if (isset($_GET["exten"])) {$exten=$_GET["exten"];}
|
||||
elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];}
|
||||
if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];}
|
||||
elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];}
|
||||
if (isset($_GET["ext_priority"])) {$ext_priority=$_GET["ext_priority"];}
|
||||
elseif (isset($_POST["ext_priority"])) {$ext_priority=$_POST["ext_priority"];}
|
||||
if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];}
|
||||
elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];}
|
||||
if (isset($_GET["dial_timeout"])) {$dial_timeout=$_GET["dial_timeout"];}
|
||||
elseif (isset($_POST["dial_timeout"])) {$dial_timeout=$_POST["dial_timeout"];}
|
||||
if (isset($_GET["dial_prefix"])) {$dial_prefix=$_GET["dial_prefix"];}
|
||||
elseif (isset($_POST["dial_prefix"])) {$dial_prefix=$_POST["dial_prefix"];}
|
||||
if (isset($_GET["campaign_cid"])) {$campaign_cid=$_GET["campaign_cid"];}
|
||||
elseif (isset($_POST["campaign_cid"])) {$campaign_cid=$_POST["campaign_cid"];}
|
||||
if (isset($_GET["MDnextCID"])) {$MDnextCID=$_GET["MDnextCID"];}
|
||||
elseif (isset($_POST["MDnextCID"])) {$MDnextCID=$_POST["MDnextCID"];}
|
||||
if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];}
|
||||
elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];}
|
||||
if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];}
|
||||
elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];}
|
||||
if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];}
|
||||
elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];}
|
||||
if (isset($_GET["length_in_sec"])) {$length_in_sec=$_GET["length_in_sec"];}
|
||||
elseif (isset($_POST["length_in_sec"])) {$length_in_sec=$_POST["length_in_sec"];}
|
||||
if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];}
|
||||
elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];}
|
||||
if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];}
|
||||
elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];}
|
||||
if (isset($_GET["channel"])) {$channel=$_GET["channel"];}
|
||||
elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];}
|
||||
if (isset($_GET["start_epoch"])) {$start_epoch=$_GET["start_epoch"];}
|
||||
elseif (isset($_POST["start_epoch"])) {$start_epoch=$_POST["start_epoch"];}
|
||||
if (isset($_GET["dispo_choice"])) {$dispo_choice=$_GET["dispo_choice"];}
|
||||
elseif (isset($_POST["dispo_choice"])) {$dispo_choice=$_POST["dispo_choice"];}
|
||||
if (isset($_GET["vendor_lead_code"])) {$vendor_lead_code=$_GET["vendor_lead_code"];}
|
||||
elseif (isset($_POST["vendor_lead_code"])) {$vendor_lead_code=$_POST["vendor_lead_code"];}
|
||||
if (isset($_GET["title"])) {$title=$_GET["title"];}
|
||||
elseif (isset($_POST["title"])) {$title=$_POST["title"];}
|
||||
if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];}
|
||||
elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];}
|
||||
if (isset($_GET["middle_initial"])) {$middle_initial=$_GET["middle_initial"];}
|
||||
elseif (isset($_POST["middle_initial"])) {$middle_initial=$_POST["middle_initial"];}
|
||||
if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];}
|
||||
elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];}
|
||||
if (isset($_GET["address1"])) {$address1=$_GET["address1"];}
|
||||
elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];}
|
||||
if (isset($_GET["address2"])) {$address2=$_GET["address2"];}
|
||||
elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];}
|
||||
if (isset($_GET["address3"])) {$address3=$_GET["address3"];}
|
||||
elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];}
|
||||
if (isset($_GET["city"])) {$city=$_GET["city"];}
|
||||
elseif (isset($_POST["city"])) {$city=$_POST["city"];}
|
||||
if (isset($_GET["state"])) {$state=$_GET["state"];}
|
||||
elseif (isset($_POST["state"])) {$state=$_POST["state"];}
|
||||
if (isset($_GET["province"])) {$province=$_GET["province"];}
|
||||
elseif (isset($_POST["province"])) {$province=$_POST["province"];}
|
||||
if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];}
|
||||
elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];}
|
||||
if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];}
|
||||
elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];}
|
||||
if (isset($_GET["gender"])) {$gender=$_GET["gender"];}
|
||||
elseif (isset($_POST["gender"])) {$gender=$_POST["gender"];}
|
||||
if (isset($_GET["date_of_birth"])) {$date_of_birth=$_GET["date_of_birth"];}
|
||||
elseif (isset($_POST["date_of_birth"])) {$date_of_birth=$_POST["date_of_birth"];}
|
||||
if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];}
|
||||
elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];}
|
||||
if (isset($_GET["email"])) {$email=$_GET["email"];}
|
||||
elseif (isset($_POST["email"])) {$email=$_POST["email"];}
|
||||
if (isset($_GET["security_phrase"])) {$security_phrase=$_GET["security_phrase"];}
|
||||
elseif (isset($_POST["security_phrase"])) {$security_phrase=$_POST["security_phrase"];}
|
||||
if (isset($_GET["comments"])) {$comments=$_GET["comments"];}
|
||||
elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];}
|
||||
if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];}
|
||||
elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];}
|
||||
if (isset($_GET["VDstop_rec_after_each_call"])) {$VDstop_rec_after_each_call=$_GET["VDstop_rec_after_each_call"];}
|
||||
elseif (isset($_POST["VDstop_rec_after_each_call"])) {$VDstop_rec_after_each_call=$_POST["VDstop_rec_after_each_call"];}
|
||||
if (isset($_GET["conf_silent_prefix"])) {$conf_silent_prefix=$_GET["conf_silent_prefix"];}
|
||||
elseif (isset($_POST["conf_silent_prefix"])) {$conf_silent_prefix=$_POST["conf_silent_prefix"];}
|
||||
if (isset($_GET["extension"])) {$extension=$_GET["extension"];}
|
||||
elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];}
|
||||
if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];}
|
||||
elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];}
|
||||
if (isset($_GET["user_abb"])) {$user_abb=$_GET["user_abb"];}
|
||||
elseif (isset($_POST["user_abb"])) {$user_abb=$_POST["user_abb"];}
|
||||
if (isset($_GET["preview"])) {$preview=$_GET["preview"];}
|
||||
elseif (isset($_POST["preview"])) {$preview=$_POST["preview"];}
|
||||
if (isset($_GET["called_count"])) {$called_count=$_GET["called_count"];}
|
||||
elseif (isset($_POST["called_count"])) {$called_count=$_POST["called_count"];}
|
||||
if (isset($_GET["agent_log_id"])) {$agent_log_id=$_GET["agent_log_id"];}
|
||||
elseif (isset($_POST["agent_log_id"])) {$agent_log_id=$_POST["agent_log_id"];}
|
||||
if (isset($_GET["agent_log"])) {$agent_log=$_GET["agent_log"];}
|
||||
elseif (isset($_POST["agent_log"])) {$agent_log=$_POST["agent_log"];}
|
||||
if (isset($_GET["favorites_list"])) {$favorites_list=$_GET["favorites_list"];}
|
||||
elseif (isset($_POST["favorites_list"])) {$favorites_list=$_POST["favorites_list"];}
|
||||
if (isset($_GET["CallBackDatETimE"])) {$CallBackDatETimE=$_GET["CallBackDatETimE"];}
|
||||
elseif (isset($_POST["CallBackDatETimE"])) {$CallBackDatETimE=$_POST["CallBackDatETimE"];}
|
||||
if (isset($_GET["recipient"])) {$recipient=$_GET["recipient"];}
|
||||
elseif (isset($_POST["recipient"])) {$recipient=$_POST["recipient"];}
|
||||
if (isset($_GET["callback_id"])) {$callback_id=$_GET["callback_id"];}
|
||||
elseif (isset($_POST["callback_id"])) {$callback_id=$_POST["callback_id"];}
|
||||
|
||||
|
||||
# default optional vars if not set
|
||||
if (!$format) {$format="text";}
|
||||
if ($format == 'debug') {$DB=1;}
|
||||
if (!$ACTION) {$ACTION="refresh";}
|
||||
if (!isset($format)) {$format="text";}
|
||||
if ($format == 'debug') {$DB=1;}
|
||||
if (!isset($ACTION)) {$ACTION="refresh";}
|
||||
|
||||
$StarTtime = date("U");
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$CIDdate = date("mdHis");
|
||||
$ENTRYdate = date("YmdHis");
|
||||
if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
if (!isset($query_date)) {$query_date = $NOW_DATE;}
|
||||
$MT[0]='';
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;";
|
||||
@@ -187,7 +247,7 @@ $rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth))
|
||||
if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0))
|
||||
{
|
||||
echo "Invalid Username/Password: |$user|$pass|\n";
|
||||
exit;
|
||||
@@ -195,7 +255,7 @@ exit;
|
||||
else
|
||||
{
|
||||
|
||||
if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) )
|
||||
if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) )
|
||||
{
|
||||
echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n";
|
||||
exit;
|
||||
@@ -207,7 +267,7 @@ else
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$SNauth=$row[0];
|
||||
if(!$SNauth)
|
||||
if($SNauth==0)
|
||||
{
|
||||
echo "Invalid session_name: |$session_name|$server_ip|\n";
|
||||
exit;
|
||||
|
||||
+152
-115
@@ -1,124 +1,144 @@
|
||||
<?
|
||||
### vicidial.php - the web-based version of the astVICIDIAL client application
|
||||
###
|
||||
### Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
|
||||
###
|
||||
### make sure you have added a user to the vicidial_users MySQL table with at least
|
||||
### user_level 1 or greater to access this page. Also, you need to have the login
|
||||
### and pass of a phone listed in the asterisk.phones table. The page grabs the
|
||||
### server info and other details from this login and pass.
|
||||
###
|
||||
### This script works best with Firefox or Mozilla, but will run for a couple
|
||||
### hours on Internet Explorer before the memory leaks cause a crash.
|
||||
###
|
||||
### Other scripts that this application depends on:
|
||||
### - vdc_db_query.php: Updates information in the database
|
||||
### - manager_send.php: Sends manager actions to the DB for execution
|
||||
###
|
||||
### CHANGES
|
||||
### 50607-1426 - First Build of VICIDIAL web client basic login process finished
|
||||
### 50628-1620 - Added some basic formatting and worked on process flow
|
||||
### 50628-1715 - Startup variables mapped to javascript variables
|
||||
### 50629-1303 - Added Login Closer in-groups selection box and vla update
|
||||
### 50629-1530 - Rough layout for customer info form section and button links
|
||||
### 50630-1453 - Rough Manual Dial/Hangup with customer info displayed
|
||||
### 50701-1450 - Added vicidial_log entries on dial and hangup
|
||||
### 50701-1634 - Added Logout function
|
||||
### 50705-1259 - Added call disposition functionality
|
||||
### 50705-1432 - Added lead info DB update function
|
||||
### 50705-1658 - Added web form functionality
|
||||
### 50706-1043 - Added call park and pickup functions
|
||||
### 50706-1234 - Added Start/Stop Recording functionality
|
||||
### 50706-1614 - Added conference channels display option
|
||||
### 50711-1333 - Removed call check redundancy and fixed a span bug
|
||||
### 50727-1424 - Added customer channel and participant present sensing/alerts
|
||||
### 50804-1057 - Added SendDTMF function and reconfigured the transfer span
|
||||
### 50804-1224 - Added Local and Internal Closer transfer functions
|
||||
### 50804-1628 - Added Blind transfer, activated LIVE CALL image and fixed bugs
|
||||
### 50804-1808 - Added button images for left buttons
|
||||
### 50815-1151 - Added 3Way calling functions to Transfer-conf frame
|
||||
### 50815-1602 - Added images and buttons for xfer functions
|
||||
### 50816-1813 - Added basic autodial outbound call pickup functions
|
||||
### 50817-1113 - Fixes to auto_dialing call receipt
|
||||
### 50817-1234 - Added inbound call receipt capability
|
||||
### 50817-1541 - Added customer time display
|
||||
### 50817-1541 - Added customer time display
|
||||
### 50818-1327 - Added stop-all-recordings-after-each-vicidial-call option
|
||||
### 50818-1703 - Added pretty login section
|
||||
### 50825-1200 - Modified form field lengths, added double-click dispositions
|
||||
### 50831-1603 - Fixed customer time bug and fronter display bug for CLOSER
|
||||
### 50901-1314 - Fixed CLOSER IN-GROUP Web Form bug
|
||||
### 50903-0904 - Added preview-lead code for manual dialing
|
||||
### 50904-0016 - Added ability to hangup manual dials before pickup
|
||||
### 50906-1319 - Added override for filters on xfer calls, fixed login display bug
|
||||
### 50909-1243 - Added hotkeys functionality for quick dispoing in auto-dial mode
|
||||
### 50912-0958 - Modified hotkeys function, agent must have user_level >= 5 to use
|
||||
### 50913-1212 - Added campaign_cid to 3rd party calls
|
||||
### 50923-1546 - Modified to work with language translation
|
||||
### 50926-1656 - Added campaign pull-down at login of active campaigns
|
||||
### 50928-1633 - Added manual dial alternate number dial option
|
||||
### 50930-1538 - Added session_id empty login failure and fixed 2 minor bugs
|
||||
### 51004-1656 - Fixed recording filename bug and new Spanish translation
|
||||
### 51020-1103 - Added campaign-specific recording control abilities
|
||||
### 51020-1352 - Added Basic vicidial_agent_log framework
|
||||
### 51021-1050 - Fixed custtime display and disable Enter/Return keypresses
|
||||
### 51021-1718 - Allows for multi-line comments (changes \n to !N in database)
|
||||
### 51110-1432 - Fixed non-standard http port issue
|
||||
### 51111-1047 - Added vicidial_agent_log lead_id earlier for manual dial
|
||||
### 51118-1305 - Activate multi-line comments from $multi_line_comments var
|
||||
### 51118-1313 - Move Transfer DIV to a floating span to preserve 800x600 view
|
||||
### 51121-1506 - Small PHP optimizations in many scripts and disabled globalize
|
||||
### 51129-1010 - Added ability to accept calls from other VICIDIAL servers
|
||||
### 51129-1254 - Fixed Hangups of other agents channels when customer hangs up
|
||||
### 51208-1732 - Created user-first login that looks for default phone info
|
||||
### 51219-1526 - Added variable framework for campaign and in-group scripts
|
||||
### 51221-1200 - Added SCRIPT tab, layout and functionality
|
||||
### 51221-1714 - Added auto-switch-to-SCRIPT-tab and auto-webform-popup
|
||||
### 51222-1605 - Added VMail message blind transfer button to xfer-conf frame
|
||||
### 51229-1028 - Added checks on web_form_address to allow for var in the DB value
|
||||
### 60117-1312 - Added Transfer-conf frame toggle on button press
|
||||
### 60208-1152 - Added DTMF-xfernumber preset links to xfer-conf frame
|
||||
### 60213-1129 - Added vicidial_users.hotkeys_active for any user hotkeys
|
||||
### 60213-1210 - Added ability to sort routing of calls by user_level
|
||||
### 60214-0932 - Initial Callback calendar display framework
|
||||
### 60214-1407 - Added ability to minimize the dispo screen to see info below
|
||||
### 60215-1104 - Added ANYONE scheduled callbacks functionality
|
||||
### 60410-1116 - Added persistant pause after dispo option and change dispo text
|
||||
### - Added web form submit that opens new window with dispo on submit
|
||||
### - Added PREVIOUS CALLBACK in customer info to flag callbacks
|
||||
### - Added link to try to hangup the call again in the dispo screen
|
||||
### - Added link noone-in-session screen to call agent phone again
|
||||
### - Added link customer-hungup screen to go straight to dispo screen
|
||||
### 60410-1532 - Added agent status and campaign calls dialing display option
|
||||
### 60411-1547 - Add ability to set callback as USERONLY and some basic formatting
|
||||
### 60413-1752 - Add basic USERONLY callback frame and listings
|
||||
### 60414-1039 - Changed manual dial preview and alt dial checkboxes to spans
|
||||
### - Added beta-level USERONLY callback functionality
|
||||
### - Added beta-level manual dialing with lead insertion functionality
|
||||
### 60415-1534 - Fixed manual dial lead preview and fixed manuald dial override bug
|
||||
### 60417-1108 - Added capability to do alt-number-dialing in auto-dial mode
|
||||
### - Changed several permissions to database-defined
|
||||
### 60419-1529 - Prevent manual dial or callbacks when alt-dial lead not finished
|
||||
###
|
||||
# vicidial.php - the web-based version of the astVICIDIAL client application
|
||||
#
|
||||
# Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
|
||||
#
|
||||
# make sure you have added a user to the vicidial_users MySQL table with at least
|
||||
# user_level 1 or greater to access this page. Also, you need to have the login
|
||||
# and pass of a phone listed in the asterisk.phones table. The page grabs the
|
||||
# server info and other details from this login and pass.
|
||||
#
|
||||
# This script works best with Firefox or Mozilla, but will run for a couple
|
||||
# hours on Internet Explorer before the memory leaks cause a crash.
|
||||
#
|
||||
# Other scripts that this application depends on:
|
||||
# - vdc_db_query.php: Updates information in the database
|
||||
# - manager_send.php: Sends manager actions to the DB for execution
|
||||
#
|
||||
# CHANGES
|
||||
# 50607-1426 - First Build of VICIDIAL web client basic login process finished
|
||||
# 50628-1620 - Added some basic formatting and worked on process flow
|
||||
# 50628-1715 - Startup variables mapped to javascript variables
|
||||
# 50629-1303 - Added Login Closer in-groups selection box and vla update
|
||||
# 50629-1530 - Rough layout for customer info form section and button links
|
||||
# 50630-1453 - Rough Manual Dial/Hangup with customer info displayed
|
||||
# 50701-1450 - Added vicidial_log entries on dial and hangup
|
||||
# 50701-1634 - Added Logout function
|
||||
# 50705-1259 - Added call disposition functionality
|
||||
# 50705-1432 - Added lead info DB update function
|
||||
# 50705-1658 - Added web form functionality
|
||||
# 50706-1043 - Added call park and pickup functions
|
||||
# 50706-1234 - Added Start/Stop Recording functionality
|
||||
# 50706-1614 - Added conference channels display option
|
||||
# 50711-1333 - Removed call check redundancy and fixed a span bug
|
||||
# 50727-1424 - Added customer channel and participant present sensing/alerts
|
||||
# 50804-1057 - Added SendDTMF function and reconfigured the transfer span
|
||||
# 50804-1224 - Added Local and Internal Closer transfer functions
|
||||
# 50804-1628 - Added Blind transfer, activated LIVE CALL image and fixed bugs
|
||||
# 50804-1808 - Added button images for left buttons
|
||||
# 50815-1151 - Added 3Way calling functions to Transfer-conf frame
|
||||
# 50815-1602 - Added images and buttons for xfer functions
|
||||
# 50816-1813 - Added basic autodial outbound call pickup functions
|
||||
# 50817-1113 - Fixes to auto_dialing call receipt
|
||||
# 50817-1234 - Added inbound call receipt capability
|
||||
# 50817-1541 - Added customer time display
|
||||
# 50817-1541 - Added customer time display
|
||||
# 50818-1327 - Added stop-all-recordings-after-each-vicidial-call option
|
||||
# 50818-1703 - Added pretty login section
|
||||
# 50825-1200 - Modified form field lengths, added double-click dispositions
|
||||
# 50831-1603 - Fixed customer time bug and fronter display bug for CLOSER
|
||||
# 50901-1314 - Fixed CLOSER IN-GROUP Web Form bug
|
||||
# 50903-0904 - Added preview-lead code for manual dialing
|
||||
# 50904-0016 - Added ability to hangup manual dials before pickup
|
||||
# 50906-1319 - Added override for filters on xfer calls, fixed login display bug
|
||||
# 50909-1243 - Added hotkeys functionality for quick dispoing in auto-dial mode
|
||||
# 50912-0958 - Modified hotkeys function, agent must have user_level >= 5 to use
|
||||
# 50913-1212 - Added campaign_cid to 3rd party calls
|
||||
# 50923-1546 - Modified to work with language translation
|
||||
# 50926-1656 - Added campaign pull-down at login of active campaigns
|
||||
# 50928-1633 - Added manual dial alternate number dial option
|
||||
# 50930-1538 - Added session_id empty login failure and fixed 2 minor bugs
|
||||
# 51004-1656 - Fixed recording filename bug and new Spanish translation
|
||||
# 51020-1103 - Added campaign-specific recording control abilities
|
||||
# 51020-1352 - Added Basic vicidial_agent_log framework
|
||||
# 51021-1050 - Fixed custtime display and disable Enter/Return keypresses
|
||||
# 51021-1718 - Allows for multi-line comments (changes \n to !N in database)
|
||||
# 51110-1432 - Fixed non-standard http port issue
|
||||
# 51111-1047 - Added vicidial_agent_log lead_id earlier for manual dial
|
||||
# 51118-1305 - Activate multi-line comments from $multi_line_comments var
|
||||
# 51118-1313 - Move Transfer DIV to a floating span to preserve 800x600 view
|
||||
# 51121-1506 - Small PHP optimizations in many scripts and disabled globalize
|
||||
# 51129-1010 - Added ability to accept calls from other VICIDIAL servers
|
||||
# 51129-1254 - Fixed Hangups of other agents channels when customer hangs up
|
||||
# 51208-1732 - Created user-first login that looks for default phone info
|
||||
# 51219-1526 - Added variable framework for campaign and in-group scripts
|
||||
# 51221-1200 - Added SCRIPT tab, layout and functionality
|
||||
# 51221-1714 - Added auto-switch-to-SCRIPT-tab and auto-webform-popup
|
||||
# 51222-1605 - Added VMail message blind transfer button to xfer-conf frame
|
||||
# 51229-1028 - Added checks on web_form_address to allow for var in the DB value
|
||||
# 60117-1312 - Added Transfer-conf frame toggle on button press
|
||||
# 60208-1152 - Added DTMF-xfernumber preset links to xfer-conf frame
|
||||
# 60213-1129 - Added vicidial_users.hotkeys_active for any user hotkeys
|
||||
# 60213-1210 - Added ability to sort routing of calls by user_level
|
||||
# 60214-0932 - Initial Callback calendar display framework
|
||||
# 60214-1407 - Added ability to minimize the dispo screen to see info below
|
||||
# 60215-1104 - Added ANYONE scheduled callbacks functionality
|
||||
# 60410-1116 - Added persistant pause after dispo option and change dispo text
|
||||
# - Added web form submit that opens new window with dispo on submit
|
||||
# - Added PREVIOUS CALLBACK in customer info to flag callbacks
|
||||
# - Added link to try to hangup the call again in the dispo screen
|
||||
# - Added link noone-in-session screen to call agent phone again
|
||||
# - Added link customer-hungup screen to go straight to dispo screen
|
||||
# 60410-1532 - Added agent status and campaign calls dialing display option
|
||||
# 60411-1547 - Add ability to set callback as USERONLY and some basic formatting
|
||||
# 60413-1752 - Add basic USERONLY callback frame and listings
|
||||
# 60414-1039 - Changed manual dial preview and alt dial checkboxes to spans
|
||||
# - Added beta-level USERONLY callback functionality
|
||||
# - Added beta-level manual dialing with lead insertion functionality
|
||||
# 60415-1534 - Fixed manual dial lead preview and fixed manuald dial override bug
|
||||
# 60417-1108 - Added capability to do alt-number-dialing in auto-dial mode
|
||||
# - Changed several permissions to database-defined
|
||||
# 60419-1529 - Prevent manual dial or callbacks when alt-dial lead not finished
|
||||
# 60420-1647 - Fixed DiaLDiaLAltPhonE error, Call Agent Again DialControl error
|
||||
# 60421-1229 - check GET/POST vars lines with isset to not trigger PHP NOTICES
|
||||
#
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
$DB=$_GET['DB']; if (!$DB) {$DB=$_POST["DB"];}
|
||||
$phone_login=$_GET['phone_login']; if (!$phone_login) {$phone_login=$_POST["phone_login"];}
|
||||
if (!$phone_login) {$phone_login=$_GET["pl"];}
|
||||
$phone_pass=$_GET['phone_pass']; if (!$phone_pass) {$phone_pass=$_POST["phone_pass"];}
|
||||
if (!$phone_pass) {$phone_pass=$_GET["pp"];}
|
||||
$VD_login=$_GET['VD_login']; if (!$VD_login) {$VD_login=$_POST["VD_login"];}
|
||||
$VD_pass=$_GET['VD_pass']; if (!$VD_pass) {$VD_pass=$_POST["VD_pass"];}
|
||||
$VD_campaign=$_GET['VD_campaign']; if (!$VD_campaign) {$VD_campaign=$_POST["VD_campaign"];}
|
||||
$VD_campaign = strtoupper($VD_campaign);
|
||||
$VD_campaign = eregi_replace(" ",'',$VD_campaign);
|
||||
$relogin=$_GET['relogin']; if (!$relogin) {$relogin=$_POST["relogin"];}
|
||||
if (isset($_GET["DB"])) {$DB=$_GET["DB"];}
|
||||
elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];}
|
||||
if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];}
|
||||
elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];}
|
||||
if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];}
|
||||
elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];}
|
||||
if (isset($_GET["VD_login"])) {$VD_login=$_GET["VD_login"];}
|
||||
elseif (isset($_POST["VD_login"])) {$VD_login=$_POST["VD_login"];}
|
||||
if (isset($_GET["VD_pass"])) {$VD_pass=$_GET["VD_pass"];}
|
||||
elseif (isset($_POST["VD_pass"])) {$VD_pass=$_POST["VD_pass"];}
|
||||
if (isset($_GET["VD_campaign"])) {$VD_campaign=$_GET["VD_campaign"];}
|
||||
elseif (isset($_POST["VD_campaign"])) {$VD_campaign=$_POST["VD_campaign"];}
|
||||
if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];}
|
||||
elseif (isset($_POST["relogin"])) {$relogin=$_POST["relogin"];}
|
||||
if (!isset($phone_login))
|
||||
{
|
||||
if (isset($_GET["pl"])) {$phone_login=$_GET["pl"];}
|
||||
elseif (isset($_POST["pl"])) {$phone_login=$_POST["pl"];}
|
||||
}
|
||||
if (!isset($phone_pass))
|
||||
{
|
||||
if (isset($_GET["pp"])) {$phone_pass=$_GET["pp"];}
|
||||
elseif (isset($_POST["pp"])) {$phone_pass=$_POST["pp"];}
|
||||
}
|
||||
if (isset($VD_campaign))
|
||||
{
|
||||
$VD_campaign = strtoupper($VD_campaign);
|
||||
$VD_campaign = eregi_replace(" ",'',$VD_campaign);
|
||||
}
|
||||
|
||||
$forever_stop=0;
|
||||
|
||||
$version = '1.1.74';
|
||||
$build = '60419-1529';
|
||||
$version = '1.1.76';
|
||||
$build = '60421-1229';
|
||||
|
||||
if ($force_logout)
|
||||
{
|
||||
@@ -3920,7 +3940,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
}
|
||||
delete xmlhttp;
|
||||
}
|
||||
AutoDial_ReSume_PauSe("VDADpause","NO");
|
||||
if (auto_dial_level > 0)
|
||||
{
|
||||
AutoDial_ReSume_PauSe("VDADpause","NO");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4679,6 +4702,16 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
if (document.getElementById(divvar))
|
||||
{
|
||||
document.getElementById(divvar).innerHTML = '';
|
||||
if (divvar == 'DiaLLeaDPrevieW')
|
||||
{
|
||||
var buildDivHTML = "<font class=\"preview_text\"> <input type=checkbox name=LeadPreview size=1 value=\"0\"> LEAD PREVIEW<BR></font>";
|
||||
document.getElementById("DiaLLeaDPrevieWHide").innerHTML = buildDivHTML;
|
||||
}
|
||||
if (divvar == 'DiaLDiaLAltPhonE')
|
||||
{
|
||||
var buildDivHTML = "<font class=\"preview_text\"> <input type=checkbox name=DiaLAltPhonE size=1 value=\"0\"> ALT PHONE DIAL<BR></font>";
|
||||
document.getElementById("DiaLDiaLAltPhonEHide").innerHTML = buildDivHTML;
|
||||
}
|
||||
}
|
||||
}
|
||||
function buildDiv(divvar)
|
||||
@@ -4688,6 +4721,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
var buildDivHTML = "";
|
||||
if (divvar == 'DiaLLeaDPrevieW')
|
||||
{
|
||||
document.getElementById("DiaLLeaDPrevieWHide").innerHTML = '';
|
||||
var buildDivHTML = "<font class=\"preview_text\"> <input type=checkbox name=LeadPreview size=1 value=\"0\"> LEAD PREVIEW<BR></font>";
|
||||
document.getElementById(divvar).innerHTML = buildDivHTML;
|
||||
if (reselect_preview_dial==1)
|
||||
@@ -4695,6 +4729,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
}
|
||||
if (divvar == 'DiaLDiaLAltPhonE')
|
||||
{
|
||||
document.getElementById("DiaLDiaLAltPhonEHide").innerHTML = '';
|
||||
var buildDivHTML = "<font class=\"preview_text\"> <input type=checkbox name=DiaLAltPhonE size=1 value=\"0\"> ALT PHONE DIAL<BR></font>";
|
||||
document.getElementById(divvar).innerHTML = buildDivHTML;
|
||||
if (reselect_alt_dial==1)
|
||||
@@ -5104,6 +5139,8 @@ Your Status: <span id="AgentStatusStatus"></span> <BR>Calls Dialing: <span id="A
|
||||
|
||||
<span style="position:absolute;left:0px;top:0px;z-index:33;" id="NothingBox">
|
||||
<BUTTON Type=button name="inert_button"><img src="./images/blank.gif"></BUTTON>
|
||||
<span id="DiaLLeaDPrevieWHide">Channel</span>
|
||||
<span id="DiaLDiaLAltPhonEHide">Channel</span>
|
||||
</span>
|
||||
|
||||
<span style="position:absolute;left:80px;top:12px;z-index:42;" id="MainXfeRBox">
|
||||
|
||||
+23
-19
@@ -17,33 +17,37 @@
|
||||
###
|
||||
|
||||
# changes
|
||||
# 50422-1147 First build of script
|
||||
# 50503-1241 added session_name checking for extra security
|
||||
# 50711-1201 removed HTTP authentication in favor of user/pass vars
|
||||
# 50422-1147 - First build of script
|
||||
# 50503-1241 - added session_name checking for extra security
|
||||
# 50711-1201 - removed HTTP authentication in favor of user/pass vars
|
||||
# 60421-1147 - check GET/POST vars lines with isset to not trigger PHP NOTICES
|
||||
#
|
||||
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
### If you have globals turned off uncomment these lines
|
||||
$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];}
|
||||
$pass=$_GET["pass"]; if (!$pass) {$pass=$_POST["pass"];}
|
||||
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
|
||||
$session_name=$_GET["session_name"]; if (!$session_name) {$session_name=$_POST["session_name"];}
|
||||
$format=$_GET["format"]; if (!$format) {$format=$_POST["format"];}
|
||||
$vmail_box=$_GET["vmail_box"]; if (!$vmail_box) {$vmail_box=$_POST["vmail_box"];}
|
||||
if (isset($_GET["user"])) {$user=$_GET["user"];}
|
||||
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
|
||||
if (isset($_GET["pass"])) {$pass=$_GET["pass"];}
|
||||
elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];}
|
||||
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
|
||||
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
|
||||
if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];}
|
||||
elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];}
|
||||
if (isset($_GET["format"])) {$format=$_GET["format"];}
|
||||
elseif (isset($_POST["format"])) {$format=$_POST["format"];}
|
||||
if (isset($_GET["vmail_box"])) {$vmail_box=$_GET["vmail_box"];}
|
||||
elseif (isset($_POST["vmail_box"])) {$vmail_box=$_POST["vmail_box"];}
|
||||
|
||||
# default optional vars if not set
|
||||
if (!$format) {$format="text";}
|
||||
if (!isset($format)) {$format="text";}
|
||||
|
||||
$version = '0.0.3';
|
||||
$build = '50711-1201';
|
||||
$version = '0.0.4';
|
||||
$build = '60421-1147';
|
||||
$StarTtime = date("U");
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
if (!isset($query_date)) {$query_date = $NOW_DATE;}
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
@@ -51,7 +55,7 @@ if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth))
|
||||
if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0))
|
||||
{
|
||||
echo "Invalid Username/Password: |$user|$pass|\n";
|
||||
exit;
|
||||
@@ -59,7 +63,7 @@ if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
else
|
||||
{
|
||||
|
||||
if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) )
|
||||
if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) )
|
||||
{
|
||||
echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n";
|
||||
exit;
|
||||
@@ -71,7 +75,7 @@ if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$SNauth=$row[0];
|
||||
if(!$SNauth)
|
||||
if($SNauth==0)
|
||||
{
|
||||
echo "Invalid session_name: |$session_name|$server_ip|\n";
|
||||
exit;
|
||||
|
||||
Reference in New Issue
Block a user