From 8afa1e3c9f773951252967061c6ada84065e7787 Mon Sep 17 00:00:00 2001 From: mattf Date: Fri, 27 Apr 2012 21:53:19 +0000 Subject: [PATCH] Fixed 3-way logging issue git-svn-id: svn://192.168.202.10@1812 3d104415-ff17-0410-8863-d5cf3c621b8a --- .../agc_2.4/LANG_www/agc_br/vdc_db_query.php | 53 ++-- .../agc_2.4/LANG_www/agc_br/vicidial.php | 7 +- .../agc_2.4/LANG_www/agc_de/vdc_db_query.php | 53 ++-- .../agc_2.4/LANG_www/agc_de/vicidial.php | 7 +- .../agc_2.4/LANG_www/agc_dk/vdc_db_query.php | 53 ++-- .../agc_2.4/LANG_www/agc_dk/vicidial.php | 7 +- .../agc_2.4/LANG_www/agc_el/vdc_db_query.php | 53 ++-- .../agc_2.4/LANG_www/agc_el/vicidial.php | 7 +- .../agc_2.4/LANG_www/agc_es/vdc_db_query.php | 53 ++-- .../agc_2.4/LANG_www/agc_es/vicidial.php | 7 +- .../agc_2.4/LANG_www/agc_fr/vdc_db_query.php | 53 ++-- .../agc_2.4/LANG_www/agc_fr/vicidial.php | 7 +- .../agc_2.4/LANG_www/agc_it/vdc_db_query.php | 53 ++-- .../agc_2.4/LANG_www/agc_it/vicidial.php | 7 +- .../agc_2.4/LANG_www/agc_nl/vdc_db_query.php | 53 ++-- .../agc_2.4/LANG_www/agc_nl/vicidial.php | 7 +- .../agc_2.4/LANG_www/agc_pl/vdc_db_query.php | 53 ++-- .../agc_2.4/LANG_www/agc_pl/vicidial.php | 7 +- .../agc_2.4/LANG_www/agc_pt/vdc_db_query.php | 53 ++-- .../agc_2.4/LANG_www/agc_pt/vicidial.php | 7 +- .../agc_2.4/LANG_www/agc_ru/vdc_db_query.php | 53 ++-- .../agc_2.4/LANG_www/agc_ru/vicidial.php | 7 +- .../agc_2.4/LANG_www/agc_se/vdc_db_query.php | 53 ++-- .../agc_2.4/LANG_www/agc_se/vicidial.php | 7 +- .../agc_2.4/LANG_www/agc_sk/vdc_db_query.php | 53 ++-- .../agc_2.4/LANG_www/agc_sk/vicidial.php | 7 +- .../agc_2.4/LANG_www/agc_tw/vdc_db_query.php | 53 ++-- .../agc_2.4/LANG_www/agc_tw/vicidial.php | 7 +- .../branches/agc_2.4/www/agc/vdc_db_query.php | 53 ++-- agc_2-X/branches/agc_2.4/www/agc/vicidial.php | 7 +- agc_2-X/trunk/extras/create-phone-alias.pl | 276 ++++++++++++++++++ agc_2-X/trunk/extras/upgrade_2.6.sql | 9 + agc_2-X/trunk/www/agc/vdc_db_query.php | 53 ++-- agc_2-X/trunk/www/agc/vicidial.php | 7 +- 34 files changed, 797 insertions(+), 448 deletions(-) create mode 100644 agc_2-X/trunk/extras/create-phone-alias.pl diff --git a/agc_2-X/branches/agc_2.4/LANG_www/agc_br/vdc_db_query.php b/agc_2-X/branches/agc_2.4/LANG_www/agc_br/vdc_db_query.php index 6290b5e8..73815dfc 100644 --- a/agc_2-X/branches/agc_2.4/LANG_www/agc_br/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.4/LANG_www/agc_br/vdc_db_query.php @@ -304,10 +304,11 @@ # 120104-2031 - Fixed missing fullname variable before dispo and start URLs # 120213-1700 - Added vendor_lead_code to all vicidial_hopper inserts # 120221-2125 - Manual dials update lastcalldate, and other small changes +# 120427-1725 - Fixed 3-way logging issue # -$version = '2.4-204'; -$build = '120221-2125'; +$version = '2.4-205'; +$build = '120427-1725'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=438; $one_mysql_log=0; @@ -3326,31 +3327,33 @@ if ($ACTION == 'manDiaLlookCaLL') if ($call_good > 0) { - $wait_sec=0; - $dead_epochSQL = ''; - $stmt = "SELECT wait_epoch,wait_sec,dead_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);} - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) + if ($stage != "YES") { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - $now_dead_epoch = $row[2]; - if ( ($now_dead_epoch > 1000) and ($now_dead_epoch < $StarTtime) ) - {$dead_epochSQL = ",dead_epoch='$StarTtime'";} + $wait_sec=0; + $dead_epochSQL = ''; + $stmt = "SELECT wait_epoch,wait_sec,dead_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ($VDpr_ct > 0) + { + $row=mysql_fetch_row($rslt); + $wait_sec = (($StarTtime - $row[0]) + $row[1]); + $now_dead_epoch = $row[2]; + if ( ($now_dead_epoch > 1000) and ($now_dead_epoch < $StarTtime) ) + {$dead_epochSQL = ",dead_epoch='$StarTtime'";} + } + $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' $dead_epochSQL where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);} + + $stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);} } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' $dead_epochSQL where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);} - - $stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);} - $stmt="UPDATE call_log set uniqueid='$uniqueid',channel='$channel' where caller_code='$MDnextCID';"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); diff --git a/agc_2-X/branches/agc_2.4/LANG_www/agc_br/vicidial.php b/agc_2-X/branches/agc_2.4/LANG_www/agc_br/vicidial.php index 3f9d7d9d..cfe8980f 100644 --- a/agc_2-X/branches/agc_2.4/LANG_www/agc_br/vicidial.php +++ b/agc_2-X/branches/agc_2.4/LANG_www/agc_br/vicidial.php @@ -377,10 +377,11 @@ # 120223-2119 - Removed logging of good login passwords if webroot writable is enabled # 120308-1617 - Added compatibility for DAHDI phones using asterisk version for server > 1.4.21.2 # 120403-1204 - Fixed issue with MANUAL dial method hotkeys, added 1 second delay +# 120427-1726 - Fixed 3-way logging issue # -$version = '2.4-344c'; -$build = '120403-1204'; +$version = '2.4-345c'; +$build = '120427-1726'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=75; $one_mysql_log=0; @@ -6020,7 +6021,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection) } if (xmlhttp) { - manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value + "&DiaL_SecondS=" + MD_ring_secondS; + manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value + "&DiaL_SecondS=" + MD_ring_secondS + "&stage=" + taskCheckOR; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLlook_query); diff --git a/agc_2-X/branches/agc_2.4/LANG_www/agc_de/vdc_db_query.php b/agc_2-X/branches/agc_2.4/LANG_www/agc_de/vdc_db_query.php index d8cbc2a3..45858013 100644 --- a/agc_2-X/branches/agc_2.4/LANG_www/agc_de/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.4/LANG_www/agc_de/vdc_db_query.php @@ -304,10 +304,11 @@ # 120104-2031 - Fixed missing fullname variable before dispo and start URLs # 120213-1700 - Added vendor_lead_code to all vicidial_hopper inserts # 120221-2125 - Manual dials update lastcalldate, and other small changes +# 120427-1725 - Fixed 3-way logging issue # -$version = '2.4-204'; -$build = '120221-2125'; +$version = '2.4-205'; +$build = '120427-1725'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=438; $one_mysql_log=0; @@ -3326,31 +3327,33 @@ if ($ACTION == 'manDiaLlookCaLL') if ($call_good > 0) { - $wait_sec=0; - $dead_epochSQL = ''; - $stmt = "SELECT wait_epoch,wait_sec,dead_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);} - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) + if ($stage != "YES") { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - $now_dead_epoch = $row[2]; - if ( ($now_dead_epoch > 1000) and ($now_dead_epoch < $StarTtime) ) - {$dead_epochSQL = ",dead_epoch='$StarTtime'";} + $wait_sec=0; + $dead_epochSQL = ''; + $stmt = "SELECT wait_epoch,wait_sec,dead_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ($VDpr_ct > 0) + { + $row=mysql_fetch_row($rslt); + $wait_sec = (($StarTtime - $row[0]) + $row[1]); + $now_dead_epoch = $row[2]; + if ( ($now_dead_epoch > 1000) and ($now_dead_epoch < $StarTtime) ) + {$dead_epochSQL = ",dead_epoch='$StarTtime'";} + } + $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' $dead_epochSQL where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);} + + $stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);} } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' $dead_epochSQL where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);} - - $stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);} - $stmt="UPDATE call_log set uniqueid='$uniqueid',channel='$channel' where caller_code='$MDnextCID';"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); diff --git a/agc_2-X/branches/agc_2.4/LANG_www/agc_de/vicidial.php b/agc_2-X/branches/agc_2.4/LANG_www/agc_de/vicidial.php index 3455e5d1..5dca5516 100644 --- a/agc_2-X/branches/agc_2.4/LANG_www/agc_de/vicidial.php +++ b/agc_2-X/branches/agc_2.4/LANG_www/agc_de/vicidial.php @@ -377,10 +377,11 @@ # 120223-2119 - Removed logging of good login passwords if webroot writable is enabled # 120308-1617 - Added compatibility for DAHDI phones using asterisk version for server > 1.4.21.2 # 120403-1204 - Fixed issue with MANUAL dial method hotkeys, added 1 second delay +# 120427-1726 - Fixed 3-way logging issue # -$version = '2.4-344c'; -$build = '120403-1204'; +$version = '2.4-345c'; +$build = '120427-1726'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=75; $one_mysql_log=0; @@ -6020,7 +6021,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection) } if (xmlhttp) { - manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value + "&DiaL_SecondS=" + MD_ring_secondS; + manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value + "&DiaL_SecondS=" + MD_ring_secondS + "&stage=" + taskCheckOR; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLlook_query); diff --git a/agc_2-X/branches/agc_2.4/LANG_www/agc_dk/vdc_db_query.php b/agc_2-X/branches/agc_2.4/LANG_www/agc_dk/vdc_db_query.php index 5c886f76..1eec2d0a 100644 --- a/agc_2-X/branches/agc_2.4/LANG_www/agc_dk/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.4/LANG_www/agc_dk/vdc_db_query.php @@ -304,10 +304,11 @@ # 120104-2031 - Fixed missing fullname variable before dispo and start URLs # 120213-1700 - Added vendor_lead_code to all vicidial_hopper inserts # 120221-2125 - Manual dials update lastcalldate, and other small changes +# 120427-1725 - Fixed 3-way logging issue # -$version = '2.4-204'; -$build = '120221-2125'; +$version = '2.4-205'; +$build = '120427-1725'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=438; $one_mysql_log=0; @@ -3326,31 +3327,33 @@ if ($ACTION == 'manDiaLlookCaLL') if ($call_good > 0) { - $wait_sec=0; - $dead_epochSQL = ''; - $stmt = "SELECT wait_epoch,wait_sec,dead_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);} - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) + if ($stage != "YES") { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - $now_dead_epoch = $row[2]; - if ( ($now_dead_epoch > 1000) and ($now_dead_epoch < $StarTtime) ) - {$dead_epochSQL = ",dead_epoch='$StarTtime'";} + $wait_sec=0; + $dead_epochSQL = ''; + $stmt = "SELECT wait_epoch,wait_sec,dead_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ($VDpr_ct > 0) + { + $row=mysql_fetch_row($rslt); + $wait_sec = (($StarTtime - $row[0]) + $row[1]); + $now_dead_epoch = $row[2]; + if ( ($now_dead_epoch > 1000) and ($now_dead_epoch < $StarTtime) ) + {$dead_epochSQL = ",dead_epoch='$StarTtime'";} + } + $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' $dead_epochSQL where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);} + + $stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);} } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' $dead_epochSQL where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);} - - $stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);} - $stmt="UPDATE call_log set uniqueid='$uniqueid',channel='$channel' where caller_code='$MDnextCID';"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); diff --git a/agc_2-X/branches/agc_2.4/LANG_www/agc_dk/vicidial.php b/agc_2-X/branches/agc_2.4/LANG_www/agc_dk/vicidial.php index afca8caf..10a4d455 100644 --- a/agc_2-X/branches/agc_2.4/LANG_www/agc_dk/vicidial.php +++ b/agc_2-X/branches/agc_2.4/LANG_www/agc_dk/vicidial.php @@ -377,10 +377,11 @@ # 120223-2119 - Removed logging of good login passwords if webroot writable is enabled # 120308-1617 - Added compatibility for DAHDI phones using asterisk version for server > 1.4.21.2 # 120403-1204 - Fixed issue with MANUAL dial method hotkeys, added 1 second delay +# 120427-1726 - Fixed 3-way logging issue # -$version = '2.4-344c'; -$build = '120403-1204'; +$version = '2.4-345c'; +$build = '120427-1726'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=75; $one_mysql_log=0; @@ -6020,7 +6021,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection) } if (xmlhttp) { - manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value + "&DiaL_SecondS=" + MD_ring_secondS; + manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value + "&DiaL_SecondS=" + MD_ring_secondS + "&stage=" + taskCheckOR; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLlook_query); diff --git a/agc_2-X/branches/agc_2.4/LANG_www/agc_el/vdc_db_query.php b/agc_2-X/branches/agc_2.4/LANG_www/agc_el/vdc_db_query.php index ffd65486..bc99e6aa 100644 --- a/agc_2-X/branches/agc_2.4/LANG_www/agc_el/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.4/LANG_www/agc_el/vdc_db_query.php @@ -304,10 +304,11 @@ # 120104-2031 - Fixed missing fullname variable before dispo and start URLs # 120213-1700 - Added vendor_lead_code to all vicidial_hopper inserts # 120221-2125 - Manual dials update lastcalldate, and other small changes +# 120427-1725 - Fixed 3-way logging issue # -$version = '2.4-204'; -$build = '120221-2125'; +$version = '2.4-205'; +$build = '120427-1725'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=438; $one_mysql_log=0; @@ -3326,31 +3327,33 @@ if ($ACTION == 'manDiaLlookCaLL') if ($call_good > 0) { - $wait_sec=0; - $dead_epochSQL = ''; - $stmt = "SELECT wait_epoch,wait_sec,dead_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);} - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) + if ($stage != "YES") { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - $now_dead_epoch = $row[2]; - if ( ($now_dead_epoch > 1000) and ($now_dead_epoch < $StarTtime) ) - {$dead_epochSQL = ",dead_epoch='$StarTtime'";} + $wait_sec=0; + $dead_epochSQL = ''; + $stmt = "SELECT wait_epoch,wait_sec,dead_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ($VDpr_ct > 0) + { + $row=mysql_fetch_row($rslt); + $wait_sec = (($StarTtime - $row[0]) + $row[1]); + $now_dead_epoch = $row[2]; + if ( ($now_dead_epoch > 1000) and ($now_dead_epoch < $StarTtime) ) + {$dead_epochSQL = ",dead_epoch='$StarTtime'";} + } + $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' $dead_epochSQL where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);} + + $stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);} } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' $dead_epochSQL where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);} - - $stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);} - $stmt="UPDATE call_log set uniqueid='$uniqueid',channel='$channel' where caller_code='$MDnextCID';"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); diff --git a/agc_2-X/branches/agc_2.4/LANG_www/agc_el/vicidial.php b/agc_2-X/branches/agc_2.4/LANG_www/agc_el/vicidial.php index cd995a0c..f6ee5831 100644 --- a/agc_2-X/branches/agc_2.4/LANG_www/agc_el/vicidial.php +++ b/agc_2-X/branches/agc_2.4/LANG_www/agc_el/vicidial.php @@ -377,10 +377,11 @@ # 120223-2119 - Removed logging of good login passwords if webroot writable is enabled # 120308-1617 - Added compatibility for DAHDI phones using asterisk version for server > 1.4.21.2 # 120403-1204 - Fixed issue with MANUAL dial method hotkeys, added 1 second delay +# 120427-1726 - Fixed 3-way logging issue # -$version = '2.4-344c'; -$build = '120403-1204'; +$version = '2.4-345c'; +$build = '120427-1726'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=75; $one_mysql_log=0; @@ -6020,7 +6021,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection) } if (xmlhttp) { - manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value + "&DiaL_SecondS=" + MD_ring_secondS; + manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value + "&DiaL_SecondS=" + MD_ring_secondS + "&stage=" + taskCheckOR; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLlook_query); diff --git a/agc_2-X/branches/agc_2.4/LANG_www/agc_es/vdc_db_query.php b/agc_2-X/branches/agc_2.4/LANG_www/agc_es/vdc_db_query.php index 90cf9d5b..caea61f7 100644 --- a/agc_2-X/branches/agc_2.4/LANG_www/agc_es/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.4/LANG_www/agc_es/vdc_db_query.php @@ -304,10 +304,11 @@ # 120104-2031 - Fixed missing fullname variable before dispo and start URLs # 120213-1700 - Added vendor_lead_code to all vicidial_hopper inserts # 120221-2125 - Manual dials update lastcalldate, and other small changes +# 120427-1725 - Fixed 3-way logging issue # -$version = '2.4-204'; -$build = '120221-2125'; +$version = '2.4-205'; +$build = '120427-1725'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=438; $one_mysql_log=0; @@ -3326,31 +3327,33 @@ if ($ACTION == 'manDiaLlookCaLL') if ($call_good > 0) { - $wait_sec=0; - $dead_epochSQL = ''; - $stmt = "SELECT wait_epoch,wait_sec,dead_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);} - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) + if ($stage != "YES") { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - $now_dead_epoch = $row[2]; - if ( ($now_dead_epoch > 1000) and ($now_dead_epoch < $StarTtime) ) - {$dead_epochSQL = ",dead_epoch='$StarTtime'";} + $wait_sec=0; + $dead_epochSQL = ''; + $stmt = "SELECT wait_epoch,wait_sec,dead_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ($VDpr_ct > 0) + { + $row=mysql_fetch_row($rslt); + $wait_sec = (($StarTtime - $row[0]) + $row[1]); + $now_dead_epoch = $row[2]; + if ( ($now_dead_epoch > 1000) and ($now_dead_epoch < $StarTtime) ) + {$dead_epochSQL = ",dead_epoch='$StarTtime'";} + } + $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' $dead_epochSQL where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);} + + $stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);} } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' $dead_epochSQL where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);} - - $stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);} - $stmt="UPDATE call_log set uniqueid='$uniqueid',channel='$channel' where caller_code='$MDnextCID';"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); diff --git a/agc_2-X/branches/agc_2.4/LANG_www/agc_es/vicidial.php b/agc_2-X/branches/agc_2.4/LANG_www/agc_es/vicidial.php index d3213a48..31fa56d8 100644 --- a/agc_2-X/branches/agc_2.4/LANG_www/agc_es/vicidial.php +++ b/agc_2-X/branches/agc_2.4/LANG_www/agc_es/vicidial.php @@ -377,10 +377,11 @@ # 120223-2119 - Removed logging of good login passwords if webroot writable is enabled # 120308-1617 - Added compatibility for DAHDI phones using asterisk version for server > 1.4.21.2 # 120403-1204 - Fixed issue with MANUAL dial method hotkeys, added 1 second delay +# 120427-1726 - Fixed 3-way logging issue # -$version = '2.4-344c'; -$build = '120403-1204'; +$version = '2.4-345c'; +$build = '120427-1726'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=75; $one_mysql_log=0; @@ -6020,7 +6021,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection) } if (xmlhttp) { - manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value + "&DiaL_SecondS=" + MD_ring_secondS; + manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value + "&DiaL_SecondS=" + MD_ring_secondS + "&stage=" + taskCheckOR; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLlook_query); diff --git a/agc_2-X/branches/agc_2.4/LANG_www/agc_fr/vdc_db_query.php b/agc_2-X/branches/agc_2.4/LANG_www/agc_fr/vdc_db_query.php index def3a337..b7871b49 100644 --- a/agc_2-X/branches/agc_2.4/LANG_www/agc_fr/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.4/LANG_www/agc_fr/vdc_db_query.php @@ -304,10 +304,11 @@ # 120104-2031 - Fixed missing fullname variable before dispo and start URLs # 120213-1700 - Added vendor_lead_code to all vicidial_hopper inserts # 120221-2125 - Manual dials update lastcalldate, and other small changes +# 120427-1725 - Fixed 3-way logging issue # -$version = '2.4-204'; -$build = '120221-2125'; +$version = '2.4-205'; +$build = '120427-1725'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=438; $one_mysql_log=0; @@ -3326,31 +3327,33 @@ if ($ACTION == 'manDiaLlookCaLL') if ($call_good > 0) { - $wait_sec=0; - $dead_epochSQL = ''; - $stmt = "SELECT wait_epoch,wait_sec,dead_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);} - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) + if ($stage != "YES") { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - $now_dead_epoch = $row[2]; - if ( ($now_dead_epoch > 1000) and ($now_dead_epoch < $StarTtime) ) - {$dead_epochSQL = ",dead_epoch='$StarTtime'";} + $wait_sec=0; + $dead_epochSQL = ''; + $stmt = "SELECT wait_epoch,wait_sec,dead_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ($VDpr_ct > 0) + { + $row=mysql_fetch_row($rslt); + $wait_sec = (($StarTtime - $row[0]) + $row[1]); + $now_dead_epoch = $row[2]; + if ( ($now_dead_epoch > 1000) and ($now_dead_epoch < $StarTtime) ) + {$dead_epochSQL = ",dead_epoch='$StarTtime'";} + } + $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' $dead_epochSQL where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);} + + $stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);} } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' $dead_epochSQL where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);} - - $stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);} - $stmt="UPDATE call_log set uniqueid='$uniqueid',channel='$channel' where caller_code='$MDnextCID';"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); diff --git a/agc_2-X/branches/agc_2.4/LANG_www/agc_fr/vicidial.php b/agc_2-X/branches/agc_2.4/LANG_www/agc_fr/vicidial.php index 19847d72..20fe9c20 100644 --- a/agc_2-X/branches/agc_2.4/LANG_www/agc_fr/vicidial.php +++ b/agc_2-X/branches/agc_2.4/LANG_www/agc_fr/vicidial.php @@ -377,10 +377,11 @@ # 120223-2119 - Removed logging of good login passwords if webroot writable is enabled # 120308-1617 - Added compatibility for DAHDI phones using asterisk version for server > 1.4.21.2 # 120403-1204 - Fixed issue with MANUAL dial method hotkeys, added 1 second delay +# 120427-1726 - Fixed 3-way logging issue # -$version = '2.4-344c'; -$build = '120403-1204'; +$version = '2.4-345c'; +$build = '120427-1726'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=75; $one_mysql_log=0; @@ -6020,7 +6021,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection) } if (xmlhttp) { - manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value + "&DiaL_SecondS=" + MD_ring_secondS; + manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value + "&DiaL_SecondS=" + MD_ring_secondS + "&stage=" + taskCheckOR; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLlook_query); diff --git a/agc_2-X/branches/agc_2.4/LANG_www/agc_it/vdc_db_query.php b/agc_2-X/branches/agc_2.4/LANG_www/agc_it/vdc_db_query.php index 54510095..32d14108 100644 --- a/agc_2-X/branches/agc_2.4/LANG_www/agc_it/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.4/LANG_www/agc_it/vdc_db_query.php @@ -304,10 +304,11 @@ # 120104-2031 - Fixed missing fullname variable before dispo and start URLs # 120213-1700 - Added vendor_lead_code to all vicidial_hopper inserts # 120221-2125 - Manual dials update lastcalldate, and other small changes +# 120427-1725 - Fixed 3-way logging issue # -$version = '2.4-204'; -$build = '120221-2125'; +$version = '2.4-205'; +$build = '120427-1725'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=438; $one_mysql_log=0; @@ -3326,31 +3327,33 @@ if ($ACTION == 'manDiaLlookCaLL') if ($call_good > 0) { - $wait_sec=0; - $dead_epochSQL = ''; - $stmt = "SELECT wait_epoch,wait_sec,dead_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);} - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) + if ($stage != "YES") { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - $now_dead_epoch = $row[2]; - if ( ($now_dead_epoch > 1000) and ($now_dead_epoch < $StarTtime) ) - {$dead_epochSQL = ",dead_epoch='$StarTtime'";} + $wait_sec=0; + $dead_epochSQL = ''; + $stmt = "SELECT wait_epoch,wait_sec,dead_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ($VDpr_ct > 0) + { + $row=mysql_fetch_row($rslt); + $wait_sec = (($StarTtime - $row[0]) + $row[1]); + $now_dead_epoch = $row[2]; + if ( ($now_dead_epoch > 1000) and ($now_dead_epoch < $StarTtime) ) + {$dead_epochSQL = ",dead_epoch='$StarTtime'";} + } + $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' $dead_epochSQL where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);} + + $stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);} } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' $dead_epochSQL where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);} - - $stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);} - $stmt="UPDATE call_log set uniqueid='$uniqueid',channel='$channel' where caller_code='$MDnextCID';"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); diff --git a/agc_2-X/branches/agc_2.4/LANG_www/agc_it/vicidial.php b/agc_2-X/branches/agc_2.4/LANG_www/agc_it/vicidial.php index 7ad6aa4a..fa02c412 100644 --- a/agc_2-X/branches/agc_2.4/LANG_www/agc_it/vicidial.php +++ b/agc_2-X/branches/agc_2.4/LANG_www/agc_it/vicidial.php @@ -377,10 +377,11 @@ # 120223-2119 - Removed logging of good login passwords if webroot writable is enabled # 120308-1617 - Added compatibility for DAHDI phones using asterisk version for server > 1.4.21.2 # 120403-1204 - Fixed issue with MANUAL dial method hotkeys, added 1 second delay +# 120427-1726 - Fixed 3-way logging issue # -$version = '2.4-344c'; -$build = '120403-1204'; +$version = '2.4-345c'; +$build = '120427-1726'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=75; $one_mysql_log=0; @@ -6020,7 +6021,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection) } if (xmlhttp) { - manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value + "&DiaL_SecondS=" + MD_ring_secondS; + manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value + "&DiaL_SecondS=" + MD_ring_secondS + "&stage=" + taskCheckOR; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLlook_query); diff --git a/agc_2-X/branches/agc_2.4/LANG_www/agc_nl/vdc_db_query.php b/agc_2-X/branches/agc_2.4/LANG_www/agc_nl/vdc_db_query.php index 1f85987a..bd1f2715 100644 --- a/agc_2-X/branches/agc_2.4/LANG_www/agc_nl/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.4/LANG_www/agc_nl/vdc_db_query.php @@ -304,10 +304,11 @@ # 120104-2031 - Fixed missing fullname variable before dispo and start URLs # 120213-1700 - Added vendor_lead_code to all vicidial_hopper inserts # 120221-2125 - Manual dials update lastcalldate, and other small changes +# 120427-1725 - Fixed 3-way logging issue # -$version = '2.4-204'; -$build = '120221-2125'; +$version = '2.4-205'; +$build = '120427-1725'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=438; $one_mysql_log=0; @@ -3326,31 +3327,33 @@ if ($ACTION == 'manDiaLlookCaLL') if ($call_good > 0) { - $wait_sec=0; - $dead_epochSQL = ''; - $stmt = "SELECT wait_epoch,wait_sec,dead_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);} - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) + if ($stage != "YES") { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - $now_dead_epoch = $row[2]; - if ( ($now_dead_epoch > 1000) and ($now_dead_epoch < $StarTtime) ) - {$dead_epochSQL = ",dead_epoch='$StarTtime'";} + $wait_sec=0; + $dead_epochSQL = ''; + $stmt = "SELECT wait_epoch,wait_sec,dead_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ($VDpr_ct > 0) + { + $row=mysql_fetch_row($rslt); + $wait_sec = (($StarTtime - $row[0]) + $row[1]); + $now_dead_epoch = $row[2]; + if ( ($now_dead_epoch > 1000) and ($now_dead_epoch < $StarTtime) ) + {$dead_epochSQL = ",dead_epoch='$StarTtime'";} + } + $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' $dead_epochSQL where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);} + + $stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);} } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' $dead_epochSQL where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);} - - $stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);} - $stmt="UPDATE call_log set uniqueid='$uniqueid',channel='$channel' where caller_code='$MDnextCID';"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); diff --git a/agc_2-X/branches/agc_2.4/LANG_www/agc_nl/vicidial.php b/agc_2-X/branches/agc_2.4/LANG_www/agc_nl/vicidial.php index 6aaac5c8..b3f712ec 100644 --- a/agc_2-X/branches/agc_2.4/LANG_www/agc_nl/vicidial.php +++ b/agc_2-X/branches/agc_2.4/LANG_www/agc_nl/vicidial.php @@ -377,10 +377,11 @@ # 120223-2119 - Removed logging of good login passwords if webroot writable is enabled # 120308-1617 - Added compatibility for DAHDI phones using asterisk version for server > 1.4.21.2 # 120403-1204 - Fixed issue with MANUAL dial method hotkeys, added 1 second delay +# 120427-1726 - Fixed 3-way logging issue # -$version = '2.4-344c'; -$build = '120403-1204'; +$version = '2.4-345c'; +$build = '120427-1726'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=75; $one_mysql_log=0; @@ -6020,7 +6021,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection) } if (xmlhttp) { - manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value + "&DiaL_SecondS=" + MD_ring_secondS; + manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value + "&DiaL_SecondS=" + MD_ring_secondS + "&stage=" + taskCheckOR; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLlook_query); diff --git a/agc_2-X/branches/agc_2.4/LANG_www/agc_pl/vdc_db_query.php b/agc_2-X/branches/agc_2.4/LANG_www/agc_pl/vdc_db_query.php index 76863548..1dbbdf6f 100644 --- a/agc_2-X/branches/agc_2.4/LANG_www/agc_pl/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.4/LANG_www/agc_pl/vdc_db_query.php @@ -304,10 +304,11 @@ # 120104-2031 - Fixed missing fullname variable before dispo and start URLs # 120213-1700 - Added vendor_lead_code to all vicidial_hopper inserts # 120221-2125 - Manual dials update lastcalldate, and other small changes +# 120427-1725 - Fixed 3-way logging issue # -$version = '2.4-204'; -$build = '120221-2125'; +$version = '2.4-205'; +$build = '120427-1725'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=438; $one_mysql_log=0; @@ -3326,31 +3327,33 @@ if ($ACTION == 'manDiaLlookCaLL') if ($call_good > 0) { - $wait_sec=0; - $dead_epochSQL = ''; - $stmt = "SELECT wait_epoch,wait_sec,dead_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);} - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) + if ($stage != "YES") { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - $now_dead_epoch = $row[2]; - if ( ($now_dead_epoch > 1000) and ($now_dead_epoch < $StarTtime) ) - {$dead_epochSQL = ",dead_epoch='$StarTtime'";} + $wait_sec=0; + $dead_epochSQL = ''; + $stmt = "SELECT wait_epoch,wait_sec,dead_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ($VDpr_ct > 0) + { + $row=mysql_fetch_row($rslt); + $wait_sec = (($StarTtime - $row[0]) + $row[1]); + $now_dead_epoch = $row[2]; + if ( ($now_dead_epoch > 1000) and ($now_dead_epoch < $StarTtime) ) + {$dead_epochSQL = ",dead_epoch='$StarTtime'";} + } + $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' $dead_epochSQL where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);} + + $stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);} } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' $dead_epochSQL where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);} - - $stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);} - $stmt="UPDATE call_log set uniqueid='$uniqueid',channel='$channel' where caller_code='$MDnextCID';"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); diff --git a/agc_2-X/branches/agc_2.4/LANG_www/agc_pl/vicidial.php b/agc_2-X/branches/agc_2.4/LANG_www/agc_pl/vicidial.php index 5626f4b6..760db5eb 100644 --- a/agc_2-X/branches/agc_2.4/LANG_www/agc_pl/vicidial.php +++ b/agc_2-X/branches/agc_2.4/LANG_www/agc_pl/vicidial.php @@ -377,10 +377,11 @@ # 120223-2119 - Removed logging of good login passwords if webroot writable is enabled # 120308-1617 - Added compatibility for DAHDI phones using asterisk version for server > 1.4.21.2 # 120403-1204 - Fixed issue with MANUAL dial method hotkeys, added 1 second delay +# 120427-1726 - Fixed 3-way logging issue # -$version = '2.4-344c'; -$build = '120403-1204'; +$version = '2.4-345c'; +$build = '120427-1726'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=75; $one_mysql_log=0; @@ -6020,7 +6021,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection) } if (xmlhttp) { - manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value + "&DiaL_SecondS=" + MD_ring_secondS; + manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value + "&DiaL_SecondS=" + MD_ring_secondS + "&stage=" + taskCheckOR; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLlook_query); diff --git a/agc_2-X/branches/agc_2.4/LANG_www/agc_pt/vdc_db_query.php b/agc_2-X/branches/agc_2.4/LANG_www/agc_pt/vdc_db_query.php index 91e7ba9e..734b42b3 100644 --- a/agc_2-X/branches/agc_2.4/LANG_www/agc_pt/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.4/LANG_www/agc_pt/vdc_db_query.php @@ -304,10 +304,11 @@ # 120104-2031 - Fixed missing fullname variable before dispo and start URLs # 120213-1700 - Added vendor_lead_code to all vicidial_hopper inserts # 120221-2125 - Manual dials update lastcalldate, and other small changes +# 120427-1725 - Fixed 3-way logging issue # -$version = '2.4-204'; -$build = '120221-2125'; +$version = '2.4-205'; +$build = '120427-1725'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=438; $one_mysql_log=0; @@ -3326,31 +3327,33 @@ if ($ACTION == 'manDiaLlookCaLL') if ($call_good > 0) { - $wait_sec=0; - $dead_epochSQL = ''; - $stmt = "SELECT wait_epoch,wait_sec,dead_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);} - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) + if ($stage != "YES") { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - $now_dead_epoch = $row[2]; - if ( ($now_dead_epoch > 1000) and ($now_dead_epoch < $StarTtime) ) - {$dead_epochSQL = ",dead_epoch='$StarTtime'";} + $wait_sec=0; + $dead_epochSQL = ''; + $stmt = "SELECT wait_epoch,wait_sec,dead_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ($VDpr_ct > 0) + { + $row=mysql_fetch_row($rslt); + $wait_sec = (($StarTtime - $row[0]) + $row[1]); + $now_dead_epoch = $row[2]; + if ( ($now_dead_epoch > 1000) and ($now_dead_epoch < $StarTtime) ) + {$dead_epochSQL = ",dead_epoch='$StarTtime'";} + } + $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' $dead_epochSQL where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);} + + $stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);} } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' $dead_epochSQL where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);} - - $stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);} - $stmt="UPDATE call_log set uniqueid='$uniqueid',channel='$channel' where caller_code='$MDnextCID';"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); diff --git a/agc_2-X/branches/agc_2.4/LANG_www/agc_pt/vicidial.php b/agc_2-X/branches/agc_2.4/LANG_www/agc_pt/vicidial.php index 722e326d..2dbb7682 100644 --- a/agc_2-X/branches/agc_2.4/LANG_www/agc_pt/vicidial.php +++ b/agc_2-X/branches/agc_2.4/LANG_www/agc_pt/vicidial.php @@ -377,10 +377,11 @@ # 120223-2119 - Removed logging of good login passwords if webroot writable is enabled # 120308-1617 - Added compatibility for DAHDI phones using asterisk version for server > 1.4.21.2 # 120403-1204 - Fixed issue with MANUAL dial method hotkeys, added 1 second delay +# 120427-1726 - Fixed 3-way logging issue # -$version = '2.4-344c'; -$build = '120403-1204'; +$version = '2.4-345c'; +$build = '120427-1726'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=75; $one_mysql_log=0; @@ -6020,7 +6021,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection) } if (xmlhttp) { - manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value + "&DiaL_SecondS=" + MD_ring_secondS; + manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value + "&DiaL_SecondS=" + MD_ring_secondS + "&stage=" + taskCheckOR; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLlook_query); diff --git a/agc_2-X/branches/agc_2.4/LANG_www/agc_ru/vdc_db_query.php b/agc_2-X/branches/agc_2.4/LANG_www/agc_ru/vdc_db_query.php index ef735952..08d37054 100644 --- a/agc_2-X/branches/agc_2.4/LANG_www/agc_ru/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.4/LANG_www/agc_ru/vdc_db_query.php @@ -304,10 +304,11 @@ # 120104-2031 - Fixed missing fullname variable before dispo and start URLs # 120213-1700 - Added vendor_lead_code to all vicidial_hopper inserts # 120221-2125 - Manual dials update lastcalldate, and other small changes +# 120427-1725 - Fixed 3-way logging issue # -$version = '2.4-204'; -$build = '120221-2125'; +$version = '2.4-205'; +$build = '120427-1725'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=438; $one_mysql_log=0; @@ -3326,31 +3327,33 @@ if ($ACTION == 'manDiaLlookCaLL') if ($call_good > 0) { - $wait_sec=0; - $dead_epochSQL = ''; - $stmt = "SELECT wait_epoch,wait_sec,dead_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);} - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) + if ($stage != "YES") { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - $now_dead_epoch = $row[2]; - if ( ($now_dead_epoch > 1000) and ($now_dead_epoch < $StarTtime) ) - {$dead_epochSQL = ",dead_epoch='$StarTtime'";} + $wait_sec=0; + $dead_epochSQL = ''; + $stmt = "SELECT wait_epoch,wait_sec,dead_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ($VDpr_ct > 0) + { + $row=mysql_fetch_row($rslt); + $wait_sec = (($StarTtime - $row[0]) + $row[1]); + $now_dead_epoch = $row[2]; + if ( ($now_dead_epoch > 1000) and ($now_dead_epoch < $StarTtime) ) + {$dead_epochSQL = ",dead_epoch='$StarTtime'";} + } + $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' $dead_epochSQL where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);} + + $stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);} } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' $dead_epochSQL where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);} - - $stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);} - $stmt="UPDATE call_log set uniqueid='$uniqueid',channel='$channel' where caller_code='$MDnextCID';"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); diff --git a/agc_2-X/branches/agc_2.4/LANG_www/agc_ru/vicidial.php b/agc_2-X/branches/agc_2.4/LANG_www/agc_ru/vicidial.php index df1d84c2..a874e1e8 100644 --- a/agc_2-X/branches/agc_2.4/LANG_www/agc_ru/vicidial.php +++ b/agc_2-X/branches/agc_2.4/LANG_www/agc_ru/vicidial.php @@ -377,10 +377,11 @@ # 120223-2119 - Removed logging of good login passwords if webroot writable is enabled # 120308-1617 - Added compatibility for DAHDI phones using asterisk version for server > 1.4.21.2 # 120403-1204 - Fixed issue with MANUAL dial method hotkeys, added 1 second delay +# 120427-1726 - Fixed 3-way logging issue # -$version = '2.4-344c'; -$build = '120403-1204'; +$version = '2.4-345c'; +$build = '120427-1726'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=75; $one_mysql_log=0; @@ -6020,7 +6021,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection) } if (xmlhttp) { - manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value + "&DiaL_SecondS=" + MD_ring_secondS; + manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value + "&DiaL_SecondS=" + MD_ring_secondS + "&stage=" + taskCheckOR; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLlook_query); diff --git a/agc_2-X/branches/agc_2.4/LANG_www/agc_se/vdc_db_query.php b/agc_2-X/branches/agc_2.4/LANG_www/agc_se/vdc_db_query.php index 506615bd..2a4b34f6 100644 --- a/agc_2-X/branches/agc_2.4/LANG_www/agc_se/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.4/LANG_www/agc_se/vdc_db_query.php @@ -304,10 +304,11 @@ # 120104-2031 - Fixed missing fullname variable before dispo and start URLs # 120213-1700 - Added vendor_lead_code to all vicidial_hopper inserts # 120221-2125 - Manual dials update lastcalldate, and other small changes +# 120427-1725 - Fixed 3-way logging issue # -$version = '2.4-204'; -$build = '120221-2125'; +$version = '2.4-205'; +$build = '120427-1725'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=438; $one_mysql_log=0; @@ -3326,31 +3327,33 @@ if ($ACTION == 'manDiaLlookCaLL') if ($call_good > 0) { - $wait_sec=0; - $dead_epochSQL = ''; - $stmt = "SELECT wait_epoch,wait_sec,dead_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);} - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) + if ($stage != "YES") { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - $now_dead_epoch = $row[2]; - if ( ($now_dead_epoch > 1000) and ($now_dead_epoch < $StarTtime) ) - {$dead_epochSQL = ",dead_epoch='$StarTtime'";} + $wait_sec=0; + $dead_epochSQL = ''; + $stmt = "SELECT wait_epoch,wait_sec,dead_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ($VDpr_ct > 0) + { + $row=mysql_fetch_row($rslt); + $wait_sec = (($StarTtime - $row[0]) + $row[1]); + $now_dead_epoch = $row[2]; + if ( ($now_dead_epoch > 1000) and ($now_dead_epoch < $StarTtime) ) + {$dead_epochSQL = ",dead_epoch='$StarTtime'";} + } + $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' $dead_epochSQL where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);} + + $stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);} } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' $dead_epochSQL where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);} - - $stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);} - $stmt="UPDATE call_log set uniqueid='$uniqueid',channel='$channel' where caller_code='$MDnextCID';"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); diff --git a/agc_2-X/branches/agc_2.4/LANG_www/agc_se/vicidial.php b/agc_2-X/branches/agc_2.4/LANG_www/agc_se/vicidial.php index e3f84439..a885b66c 100644 --- a/agc_2-X/branches/agc_2.4/LANG_www/agc_se/vicidial.php +++ b/agc_2-X/branches/agc_2.4/LANG_www/agc_se/vicidial.php @@ -377,10 +377,11 @@ # 120223-2119 - Removed logging of good login passwords if webroot writable is enabled # 120308-1617 - Added compatibility for DAHDI phones using asterisk version for server > 1.4.21.2 # 120403-1204 - Fixed issue with MANUAL dial method hotkeys, added 1 second delay +# 120427-1726 - Fixed 3-way logging issue # -$version = '2.4-344c'; -$build = '120403-1204'; +$version = '2.4-345c'; +$build = '120427-1726'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=75; $one_mysql_log=0; @@ -6021,7 +6022,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection) } if (xmlhttp) { - manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value + "&DiaL_SecondS=" + MD_ring_secondS; + manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value + "&DiaL_SecondS=" + MD_ring_secondS + "&stage=" + taskCheckOR; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLlook_query); diff --git a/agc_2-X/branches/agc_2.4/LANG_www/agc_sk/vdc_db_query.php b/agc_2-X/branches/agc_2.4/LANG_www/agc_sk/vdc_db_query.php index c2a0e789..a7d8cea3 100644 --- a/agc_2-X/branches/agc_2.4/LANG_www/agc_sk/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.4/LANG_www/agc_sk/vdc_db_query.php @@ -304,10 +304,11 @@ # 120104-2031 - Fixed missing fullname variable before dispo and start URLs # 120213-1700 - Added vendor_lead_code to all vicidial_hopper inserts # 120221-2125 - Manual dials update lastcalldate, and other small changes +# 120427-1725 - Fixed 3-way logging issue # -$version = '2.4-204'; -$build = '120221-2125'; +$version = '2.4-205'; +$build = '120427-1725'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=438; $one_mysql_log=0; @@ -3326,31 +3327,33 @@ if ($ACTION == 'manDiaLlookCaLL') if ($call_good > 0) { - $wait_sec=0; - $dead_epochSQL = ''; - $stmt = "SELECT wait_epoch,wait_sec,dead_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);} - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) + if ($stage != "YES") { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - $now_dead_epoch = $row[2]; - if ( ($now_dead_epoch > 1000) and ($now_dead_epoch < $StarTtime) ) - {$dead_epochSQL = ",dead_epoch='$StarTtime'";} + $wait_sec=0; + $dead_epochSQL = ''; + $stmt = "SELECT wait_epoch,wait_sec,dead_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ($VDpr_ct > 0) + { + $row=mysql_fetch_row($rslt); + $wait_sec = (($StarTtime - $row[0]) + $row[1]); + $now_dead_epoch = $row[2]; + if ( ($now_dead_epoch > 1000) and ($now_dead_epoch < $StarTtime) ) + {$dead_epochSQL = ",dead_epoch='$StarTtime'";} + } + $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' $dead_epochSQL where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);} + + $stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);} } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' $dead_epochSQL where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);} - - $stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);} - $stmt="UPDATE call_log set uniqueid='$uniqueid',channel='$channel' where caller_code='$MDnextCID';"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); diff --git a/agc_2-X/branches/agc_2.4/LANG_www/agc_sk/vicidial.php b/agc_2-X/branches/agc_2.4/LANG_www/agc_sk/vicidial.php index b5d4ea28..538b92c7 100644 --- a/agc_2-X/branches/agc_2.4/LANG_www/agc_sk/vicidial.php +++ b/agc_2-X/branches/agc_2.4/LANG_www/agc_sk/vicidial.php @@ -377,10 +377,11 @@ # 120223-2119 - Removed logging of good login passwords if webroot writable is enabled # 120308-1617 - Added compatibility for DAHDI phones using asterisk version for server > 1.4.21.2 # 120403-1204 - Fixed issue with MANUAL dial method hotkeys, added 1 second delay +# 120427-1726 - Fixed 3-way logging issue # -$version = '2.4-344c'; -$build = '120403-1204'; +$version = '2.4-345c'; +$build = '120427-1726'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=75; $one_mysql_log=0; @@ -6020,7 +6021,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection) } if (xmlhttp) { - manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value + "&DiaL_SecondS=" + MD_ring_secondS; + manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value + "&DiaL_SecondS=" + MD_ring_secondS + "&stage=" + taskCheckOR; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLlook_query); diff --git a/agc_2-X/branches/agc_2.4/LANG_www/agc_tw/vdc_db_query.php b/agc_2-X/branches/agc_2.4/LANG_www/agc_tw/vdc_db_query.php index b9d9a64d..6e06253c 100644 --- a/agc_2-X/branches/agc_2.4/LANG_www/agc_tw/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.4/LANG_www/agc_tw/vdc_db_query.php @@ -304,10 +304,11 @@ # 120104-2031 - Fixed missing fullname variable before dispo and start URLs # 120213-1700 - Added vendor_lead_code to all vicidial_hopper inserts # 120221-2125 - Manual dials update lastcalldate, and other small changes +# 120427-1725 - Fixed 3-way logging issue # -$version = '2.4-204'; -$build = '120221-2125'; +$version = '2.4-205'; +$build = '120427-1725'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=438; $one_mysql_log=0; @@ -3326,31 +3327,33 @@ if ($ACTION == 'manDiaLlookCaLL') if ($call_good > 0) { - $wait_sec=0; - $dead_epochSQL = ''; - $stmt = "SELECT wait_epoch,wait_sec,dead_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);} - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) + if ($stage != "YES") { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - $now_dead_epoch = $row[2]; - if ( ($now_dead_epoch > 1000) and ($now_dead_epoch < $StarTtime) ) - {$dead_epochSQL = ",dead_epoch='$StarTtime'";} + $wait_sec=0; + $dead_epochSQL = ''; + $stmt = "SELECT wait_epoch,wait_sec,dead_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ($VDpr_ct > 0) + { + $row=mysql_fetch_row($rslt); + $wait_sec = (($StarTtime - $row[0]) + $row[1]); + $now_dead_epoch = $row[2]; + if ( ($now_dead_epoch > 1000) and ($now_dead_epoch < $StarTtime) ) + {$dead_epochSQL = ",dead_epoch='$StarTtime'";} + } + $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' $dead_epochSQL where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);} + + $stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);} } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' $dead_epochSQL where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);} - - $stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);} - $stmt="UPDATE call_log set uniqueid='$uniqueid',channel='$channel' where caller_code='$MDnextCID';"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); diff --git a/agc_2-X/branches/agc_2.4/LANG_www/agc_tw/vicidial.php b/agc_2-X/branches/agc_2.4/LANG_www/agc_tw/vicidial.php index 1a3ac785..4fd17949 100644 --- a/agc_2-X/branches/agc_2.4/LANG_www/agc_tw/vicidial.php +++ b/agc_2-X/branches/agc_2.4/LANG_www/agc_tw/vicidial.php @@ -377,10 +377,11 @@ # 120223-2119 - Removed logging of good login passwords if webroot writable is enabled # 120308-1617 - Added compatibility for DAHDI phones using asterisk version for server > 1.4.21.2 # 120403-1204 - Fixed issue with MANUAL dial method hotkeys, added 1 second delay +# 120427-1726 - Fixed 3-way logging issue # -$version = '2.4-344c'; -$build = '120403-1204'; +$version = '2.4-345c'; +$build = '120427-1726'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=75; $one_mysql_log=0; @@ -6020,7 +6021,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection) } if (xmlhttp) { - manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value + "&DiaL_SecondS=" + MD_ring_secondS; + manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value + "&DiaL_SecondS=" + MD_ring_secondS + "&stage=" + taskCheckOR; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLlook_query); diff --git a/agc_2-X/branches/agc_2.4/www/agc/vdc_db_query.php b/agc_2-X/branches/agc_2.4/www/agc/vdc_db_query.php index 150f7e07..e8912927 100644 --- a/agc_2-X/branches/agc_2.4/www/agc/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.4/www/agc/vdc_db_query.php @@ -304,10 +304,11 @@ # 120104-2031 - Fixed missing fullname variable before dispo and start URLs # 120213-1700 - Added vendor_lead_code to all vicidial_hopper inserts # 120221-2125 - Manual dials update lastcalldate, and other small changes +# 120427-1725 - Fixed 3-way logging issue # -$version = '2.4-204'; -$build = '120221-2125'; +$version = '2.4-205'; +$build = '120427-1725'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=438; $one_mysql_log=0; @@ -3326,31 +3327,33 @@ if ($ACTION == 'manDiaLlookCaLL') if ($call_good > 0) { - $wait_sec=0; - $dead_epochSQL = ''; - $stmt = "SELECT wait_epoch,wait_sec,dead_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);} - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) + if ($stage != "YES") { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - $now_dead_epoch = $row[2]; - if ( ($now_dead_epoch > 1000) and ($now_dead_epoch < $StarTtime) ) - {$dead_epochSQL = ",dead_epoch='$StarTtime'";} + $wait_sec=0; + $dead_epochSQL = ''; + $stmt = "SELECT wait_epoch,wait_sec,dead_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ($VDpr_ct > 0) + { + $row=mysql_fetch_row($rslt); + $wait_sec = (($StarTtime - $row[0]) + $row[1]); + $now_dead_epoch = $row[2]; + if ( ($now_dead_epoch > 1000) and ($now_dead_epoch < $StarTtime) ) + {$dead_epochSQL = ",dead_epoch='$StarTtime'";} + } + $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' $dead_epochSQL where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);} + + $stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);} } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' $dead_epochSQL where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);} - - $stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);} - $stmt="UPDATE call_log set uniqueid='$uniqueid',channel='$channel' where caller_code='$MDnextCID';"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); diff --git a/agc_2-X/branches/agc_2.4/www/agc/vicidial.php b/agc_2-X/branches/agc_2.4/www/agc/vicidial.php index 79f8ab66..d883c357 100644 --- a/agc_2-X/branches/agc_2.4/www/agc/vicidial.php +++ b/agc_2-X/branches/agc_2.4/www/agc/vicidial.php @@ -377,10 +377,11 @@ # 120223-2119 - Removed logging of good login passwords if webroot writable is enabled # 120308-1617 - Added compatibility for DAHDI phones using asterisk version for server > 1.4.21.2 # 120403-1204 - Fixed issue with MANUAL dial method hotkeys, added 1 second delay +# 120427-1726 - Fixed 3-way logging issue # -$version = '2.4-344c'; -$build = '120403-1204'; +$version = '2.4-345c'; +$build = '120427-1726'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=75; $one_mysql_log=0; @@ -6020,7 +6021,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection) } if (xmlhttp) { - manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value + "&DiaL_SecondS=" + MD_ring_secondS; + manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value + "&DiaL_SecondS=" + MD_ring_secondS + "&stage=" + taskCheckOR; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLlook_query); diff --git a/agc_2-X/trunk/extras/create-phone-alias.pl b/agc_2-X/trunk/extras/create-phone-alias.pl new file mode 100644 index 00000000..17eef457 --- /dev/null +++ b/agc_2-X/trunk/extras/create-phone-alias.pl @@ -0,0 +1,276 @@ +#!/usr/bin/perl +#use warnings; + +# Our little random password generator sub +sub randomPassword { +my $password; +my $_rand; + +my $password_length = $_[0]; + if (!$password_length) { + $password_length = 10; + } + +my @chars = split(" ", + "0 1 2 3 4 5 6 7 8 9 a b c d e + f g h i j k l m n o p q r s t u + v w x y z 0 1 2 3 4 5 6 7 8 9 A + B C D E F G H I J K L M N O P Q + R S T U V W X Y Z 0 1 2 3 4 5 6 + 7 8 9"); + +srand; + +for (my $i=0; $i <= $password_length ;$i++) { + $_rand = int(rand 41); + $password .= $chars[$_rand]; +} +return $password; +} + +# Used for number to letter substitution in loops +@abcnumsub = split(" ", "a b c d e f g h i j k l m n o p q r s t u v w x y z"); + +# default path to astguiclient configuration file: +$PATHconf = '/etc/astguiclient.conf'; + +open(conf, "$PATHconf") || die "can't open $PATHconf: $!\n"; +@conf = ; +close(conf); +$i=0; +foreach(@conf) + { + $line = $conf[$i]; + $line =~ s/ |>|\n|\r|\t|\#.*|;.*//gi; + if ( ($line =~ /^VARDB_server/) && ($CLIDB_server < 1) ) + {$VARDB_server = $line; $VARDB_server =~ s/.*=//gi;} + if ( ($line =~ /^VARDB_database/) && ($CLIDB_database < 1) ) + {$VARDB_database = $line; $VARDB_database =~ s/.*=//gi;} + if ( ($line =~ /^VARDB_user/) && ($CLIDB_user < 1) ) + {$VARDB_user = $line; $VARDB_user =~ s/.*=//gi;} + if ( ($line =~ /^VARDB_pass/) && ($CLIDB_pass < 1) ) + {$VARDB_pass = $line; $VARDB_pass =~ s/.*=//gi;} + if ( ($line =~ /^VARDB_port/) && ($CLIDB_port < 1) ) + {$VARDB_port = $line; $VARDB_port =~ s/.*=//gi;} + + $i++; + } + + +### begin parsing run-time options ### Shamelessly stolen from Matt's code +if (length($ARGV[0])>1) + { + $i=0; + while ($#ARGV >= $i) + { + $args = "$args $ARGV[$i]"; + $i++; + } + print "\n\nPhone Alias Creation Tool\n\n"; + if ($args =~ /--help/i) + { + print "allowed run time options:\n"; + print " [--start-phone=XXXX] = Phone to start from\n"; + print " [--phone-count=XXX] = Number of sequential phones to make\n"; + print " [--password=X] = Password to set all phones to, or RND if random\n"; + print " [--pass-length=X] = Length to set password to if random (Defaults to 10)\n"; + print " [--protocol=SIP/IAX] = Create SIP or IAX entries (required)\n"; + print " [--gmt-offset=-/+X] = GMT Offset of phone, I.E. -5.00 for EST, etc\n"; + print " [--server=server_id] = Don't create alias, just set up phones on a single server\n"; + print " [--debug] = debug\n"; + exit; + } + else + { + if ($args =~ /--debug/i) + { + $DB=1; + print "\n----- DEBUG -----\n\n"; + } + } + if ($args =~ /--start-phone=/i) # starting phone extension + { + @startphoneARY = split(/--start-phone=/,$args); + @startphoneARX = split(/ /,$startphoneARY[1]); + if (length($startphoneARX[0])>2) + { + $startphone = $startphoneARX[0]; + $startphone =~ s/\/$| |\r|\n|\t//gi; + print " Start Phone : $startphone\n"; + } else { + die "Need a starting phone position\n"; + } + } + + if ($args =~ /--phone-count=/i) # number of sequential phones to make + { + @phonecountARY = split(/--phone-count=/,$args); + @phonecountARX = split(/ /,$phonecountARY[1]); + if (length($phonecountARX[0])>1) + { + $phonecount = $phonecountARX[0]; + $phonecount =~ s/\/$| |\r|\n|\t//gi; + print " Phone Count : $phonecount\n"; + } else { + die "Need to be creating at least 10 phones to use this script!\n"; + } + } + + if ($args =~ /--password=/i) # static password to use + { + @passwordARY = split(/--password=/,$args); + @passwordARX = split(/ /,$passwordARY[1]); + if (length($passwordARX[0])>2) + { + $password = $passwordARX[0]; + $password =~ s/\/$| |\r|\n|\t//gi; + print " Password : $password\n"; + } else { + die "No password option given\n"; + } + } + + if ($args =~ /--pass-length=/i) # password length to use if random + { + @passlengthARY = split(/--pass-length=/,$args); + @passlengthARX = split(/ /,$passlengthARY[1]); + $passlength = $passlengthARX[0]; + $passlength =~ s/\/$| |\r|\n|\t//gi; + if ($password=='RND') + { + print " Pass Length : $passlength\n"; + $passlength = $passlength - 1 ; + } + } + + if ($args =~ /--protocol=/i) # Protocol to use + { + @protocolARY = split(/--protocol=/,$args); + @protocolARX = split(/ /,$protocolARY[1]); + if (length($protocolARX[0])>2) + { + $protocol = $protocolARX[0]; + $protocol =~ s/\/$| |\r|\n|\t//gi; + print " Protocol : $protocol\n"; + } else { + die "Need to specify SIP or IAX protocol\n"; + } + } + + if ($args =~ /--server=/i) # Protocol to use + { + @serverARY = split(/--server=/,$args); + @serverARX = split(/ /,$serverARY[1]); + if (length($serverARX[0])>2) + { + $server = $serverARX[0]; + $server =~ s/\/$| |\r|\n|\t//gi; + print " server : $server\n"; + } + } + + if ($args =~ /--gmt-offset=/i) # Protocol to use + { + @gmtoffsetARY = split(/--gmt-offset=/,$args); + @gmtoffsetARX = split(/ /,$gmtoffsetARY[1]); + if (length($gmtoffsetARX[0])>3) + { + $gmtoffset = $gmtoffsetARX[0]; + $gmtoffset =~ s/\/$| |\r|\n|\t//gi; + print " GMT offset : $gmtoffset\n"; + } else { + die "GMT Offset not set\n"; + } + } + + + } +else + { + die "no command line options set\n"; + } + +# Some other simple data validation +if (length($passlength)>0 and $password!='RND') { + die "Can not use randomn password without a password length"; +} + +# Set-up our database connection strings, die if we cant connect to either DB +use DBI; +$dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VARDB_user", "$VARDB_pass") or die "Couldn't connect to database: " . DBI->errstr; + +# Find our servers +if (length($server)>2) { + $stmtSERVERS = "select server_ip from servers where server_id='$server' and active_agent_login_server='Y' and active='Y';"; + if ($DB==1) {print "Server Selection SQL: $stmtSERVERS\n"; } + } else { + $stmtSERVERS = "select server_ip from servers where active_agent_login_server='Y' and active='Y';"; + if ($DB==1) {print "Server Selection SQL: $stmtSERVERS\n"; } +} +$sthSERVERS = $dbhA->prepare($stmtSERVERS) or die "Preparing sthSERVERS: ",$dbhA->errstr; +$sthSERVERS->execute or die "Executing sthSERVERS: ",$dbhA->errstr; +$sthSERVERSrows = $sthSERVERS->rows; + +# Now loop through our servers, creating an array of their IP's +if ($sthSERVERSrows>=1) { + $i=0; + while ($i < $sthSERVERSrows) { + @arySERVERS = $sthSERVERS->fetchrow_array; + $server_ip = $arySERVERS[0]; + if ($i==0) { + $server_ip_list = $server_ip; + } else { + $server_ip_list = $server_ip_list . " " . $server_ip; + } + + $i++; + } + if ($DB==1) { print "Server IP List: $server_ip_list\n"; } + @serverip = split(" ", $server_ip_list); + + } else { + die "That server does not exist\n"; +} + + $i=0; + # Now do some inserts + while ($i < $phonecount) { + $n=0; + $currphone = $startphone + $i; + $aliaslist = ''; + $phonepass = $password; + if ($password=='RND') { + $phonepass = randomPassword($passlength); + } + if ($DB==1) { print "Password for phone $currphone: $phonepass \n"; } + while ($n < $sthSERVERSrows) { + if ($sthSERVERSrows>1) { $currphonealias = $currphone . $abcnumsub[$n]; } else { $currphonealias = $currphone; } + + if ($n == 0) { + $aliaslist = $currphonealias; + } else { + $aliaslist = $aliaslist . "," . $currphonealias; + } + + $server_ip = $serverip[$n]; + $stmtPHONE = "INSERT INTO phones (extension,dialplan_number,voicemail_id,server_ip,login,pass,status,active,phone_type,fullname,protocol,local_gmt,outbound_cid) values('$currphonealias','$currphone','$currphone','$server_ip','$currphonealias','$phonepass','ACTIVE','Y','Agent $currphone','station $currphone','$protocol','$gmtoffset','0000000000');"; + if ($DB==1) { print "Phone insert $n for phone $currphone: $stmtPHONE \n"; } + $sthPHONE = $dbhCDR->prepare($stmtPHONE) or die "Preparing stmtPHONE: ",$dbhA->errstr; + $sthPHONE->execute or die "Executing sthPHONE: ",$dbhA->errstr; + $sthPHONE->finish; + + $n++; + } + $aliaslogin = $currphone . 'x'; + + if ($sthSERVERSrows>1) { + $stmtALIAS = "insert into phones_alias (alias_id, alias_name, logins_list) values ('$aliaslogin', '$aliaslogin', '$aliaslist');"; + if ($DB==1) { print "Phone alias insert for phone $currphone: $stmtALIAS \n"; } + $sthALIAS = $dbhCDR->prepare($stmtALIAS) or die "Preparing stmtALIAS: ",$dbhA->errstr; + $sthALIAS->execute or die "Executing sthALIAS: ",$dbhA->errstr; + $sthALIAS->finish; + } + $i++; + } + +print "\n\nAlias list done\n"; diff --git a/agc_2-X/trunk/extras/upgrade_2.6.sql b/agc_2-X/trunk/extras/upgrade_2.6.sql index 613db3f0..e8ca0f4f 100644 --- a/agc_2-X/trunk/extras/upgrade_2.6.sql +++ b/agc_2-X/trunk/extras/upgrade_2.6.sql @@ -1 +1,10 @@ UPDATE system_settings SET db_schema_version='1318',version='2.6b0.5',db_schema_update_date=NOW() where db_schema_version < 1318; + + + + + +ALTER TABLE vicidial_campaigns ADD in_group_dial ENUM('DISABLED','MANUAL_DIAL','NO_DIAL','BOTH') default 'DISABLED'; +ALTER TABLE vicidial_campaigns ADD in_group_dial_select ENUM('AGENT_SELECTED','CAMPAIGN_SELECTED','ALL_USER_GROUP') default 'AGENT_SELECTED'; + +UPDATE system_settings SET db_schema_version='1319',db_schema_update_date=NOW() where db_schema_version < 1319; diff --git a/agc_2-X/trunk/www/agc/vdc_db_query.php b/agc_2-X/trunk/www/agc/vdc_db_query.php index 150f7e07..474aa04a 100644 --- a/agc_2-X/trunk/www/agc/vdc_db_query.php +++ b/agc_2-X/trunk/www/agc/vdc_db_query.php @@ -304,10 +304,11 @@ # 120104-2031 - Fixed missing fullname variable before dispo and start URLs # 120213-1700 - Added vendor_lead_code to all vicidial_hopper inserts # 120221-2125 - Manual dials update lastcalldate, and other small changes +# 120427-1717 - Fixed 3-way logging issue # -$version = '2.4-204'; -$build = '120221-2125'; +$version = '2.4-205'; +$build = '120427-1717'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=438; $one_mysql_log=0; @@ -3326,31 +3327,33 @@ if ($ACTION == 'manDiaLlookCaLL') if ($call_good > 0) { - $wait_sec=0; - $dead_epochSQL = ''; - $stmt = "SELECT wait_epoch,wait_sec,dead_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);} - $VDpr_ct = mysql_num_rows($rslt); - if ($VDpr_ct > 0) + if ($stage != "YES") { - $row=mysql_fetch_row($rslt); - $wait_sec = (($StarTtime - $row[0]) + $row[1]); - $now_dead_epoch = $row[2]; - if ( ($now_dead_epoch > 1000) and ($now_dead_epoch < $StarTtime) ) - {$dead_epochSQL = ",dead_epoch='$StarTtime'";} + $wait_sec=0; + $dead_epochSQL = ''; + $stmt = "SELECT wait_epoch,wait_sec,dead_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);} + $VDpr_ct = mysql_num_rows($rslt); + if ($VDpr_ct > 0) + { + $row=mysql_fetch_row($rslt); + $wait_sec = (($StarTtime - $row[0]) + $row[1]); + $now_dead_epoch = $row[2]; + if ( ($now_dead_epoch > 1000) and ($now_dead_epoch < $StarTtime) ) + {$dead_epochSQL = ",dead_epoch='$StarTtime'";} + } + $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' $dead_epochSQL where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);} + + $stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);} } - $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' $dead_epochSQL where agent_log_id='$agent_log_id';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);} - - $stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);} - $stmt="UPDATE call_log set uniqueid='$uniqueid',channel='$channel' where caller_code='$MDnextCID';"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); diff --git a/agc_2-X/trunk/www/agc/vicidial.php b/agc_2-X/trunk/www/agc/vicidial.php index 9575d8cd..b777aefb 100644 --- a/agc_2-X/trunk/www/agc/vicidial.php +++ b/agc_2-X/trunk/www/agc/vicidial.php @@ -378,10 +378,11 @@ # 120308-1617 - Added compatibility for DAHDI phones using asterisk version for server > 1.4.21.2 # 120403-1204 - Fixed issue with MANUAL dial method hotkeys, added 1 second delay # 120420-1621 - Forked 2.4 to branches, changing trunk to 2.6 +# 120427-1718 - Fixed 3-way logging issue # -$version = '2.6-345c'; -$build = '120420-1621'; +$version = '2.6-347c'; +$build = '120427-1718'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=75; $one_mysql_log=0; @@ -6021,7 +6022,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection) } if (xmlhttp) { - manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value + "&DiaL_SecondS=" + MD_ring_secondS; + manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value + "&DiaL_SecondS=" + MD_ring_secondS + "&stage=" + taskCheckOR; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLlook_query);