diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/Thumbs.db b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/Thumbs.db index d6ae4c59..34130091 100644 Binary files a/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/Thumbs.db and b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/Thumbs.db differ diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/agc_live_call_OFF_de.jpg b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/agc_live_call_OFF_de.jpg new file mode 100644 index 00000000..af13f363 Binary files /dev/null and b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/agc_live_call_OFF_de.jpg differ diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/agc_live_call_ON_de.gif b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/agc_live_call_ON_de.gif new file mode 100644 index 00000000..957e6fdd Binary files /dev/null and b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/agc_live_call_ON_de.gif differ diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/sk.gif b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/sk.gif new file mode 100644 index 00000000..fa13224e Binary files /dev/null and b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/sk.gif differ diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_dialnextnumber_OFF_de.gif b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_dialnextnumber_OFF_de.gif new file mode 100644 index 00000000..e9658f35 Binary files /dev/null and b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_dialnextnumber_OFF_de.gif differ diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_dialnextnumber_de.gif b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_dialnextnumber_de.gif new file mode 100644 index 00000000..de377551 Binary files /dev/null and b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_dialnextnumber_de.gif differ diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_hangupcustomer_OFF_de.gif b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_hangupcustomer_OFF_de.gif new file mode 100644 index 00000000..b30b2013 Binary files /dev/null and b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_hangupcustomer_OFF_de.gif differ diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_hangupcustomer_de.gif b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_hangupcustomer_de.gif new file mode 100644 index 00000000..1e1118c0 Binary files /dev/null and b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_hangupcustomer_de.gif differ diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_parkcall_OFF_de.gif b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_parkcall_OFF_de.gif new file mode 100644 index 00000000..4ee04ce5 Binary files /dev/null and b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_parkcall_OFF_de.gif differ diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_parkcall_de.gif b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_parkcall_de.gif new file mode 100644 index 00000000..8807883b Binary files /dev/null and b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_parkcall_de.gif differ diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_resume_OFF_de.gif b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_resume_OFF_de.gif new file mode 100644 index 00000000..f707e326 Binary files /dev/null and b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_resume_OFF_de.gif differ diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_resume_de.gif b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_resume_de.gif new file mode 100644 index 00000000..a3766538 Binary files /dev/null and b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_resume_de.gif differ diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_senddtmf_OFF_de.gif b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_senddtmf_OFF_de.gif new file mode 100644 index 00000000..c6b054ae Binary files /dev/null and b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_senddtmf_OFF_de.gif differ diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_senddtmf_de.gif b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_senddtmf_de.gif new file mode 100644 index 00000000..59668706 Binary files /dev/null and b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_senddtmf_de.gif differ diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_startrecording_de.gif b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_startrecording_de.gif new file mode 100644 index 00000000..7674d776 Binary files /dev/null and b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_startrecording_de.gif differ diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_stoprecording2_de.gif b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_stoprecording2_de.gif new file mode 100644 index 00000000..ff21e557 Binary files /dev/null and b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_stoprecording2_de.gif differ diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_transferconf_OFF_de.gif b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_transferconf_OFF_de.gif new file mode 100644 index 00000000..86c2c526 Binary files /dev/null and b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_transferconf_OFF_de.gif differ diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_transferconf_de.gif b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_transferconf_de.gif new file mode 100644 index 00000000..bb0274cb Binary files /dev/null and b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_transferconf_de.gif differ diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_webform_OFF_de.gif b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_webform_OFF_de.gif new file mode 100644 index 00000000..b667ef77 Binary files /dev/null and b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_webform_OFF_de.gif differ diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_webform_de.gif b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_webform_de.gif new file mode 100644 index 00000000..24876966 Binary files /dev/null and b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_LB_webform_de.gif differ diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_XB_hotkeysactive_OFF_de.gif b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_XB_hotkeysactive_OFF_de.gif new file mode 100644 index 00000000..f334afd9 Binary files /dev/null and b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_XB_hotkeysactive_OFF_de.gif differ diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_XB_hotkeysactive_de.gif b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_XB_hotkeysactive_de.gif new file mode 100644 index 00000000..3657790c Binary files /dev/null and b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_XB_hotkeysactive_de.gif differ diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_tab_script_de.gif b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_tab_script_de.gif new file mode 100644 index 00000000..d2a252c7 Binary files /dev/null and b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_tab_script_de.gif differ diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_volume_MUTE_de.gif b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_volume_MUTE_de.gif new file mode 100644 index 00000000..b828c5fb Binary files /dev/null and b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_volume_MUTE_de.gif differ diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_volume_UNMUTE_de.gif b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_volume_UNMUTE_de.gif new file mode 100644 index 00000000..228395bf Binary files /dev/null and b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/images/vdc_volume_UNMUTE_de.gif differ diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc/vdc_db_query.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/vdc_db_query.php index 253ec880..4b428b77 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/vdc_db_query.php @@ -70,6 +70,7 @@ # - $omit_phone_code - ('Y','N') # - $no_delete_sessions - ('0','1') # - $LogouTKicKAlL - ('0','1'); +# - $manual_dial_filter = ('NONE','CAMPLISTS','DNC','CAMPLISTS_DNC'); # CHANGELOG: # 50629-1044 - First build of script @@ -143,10 +144,12 @@ # 80128-1159 - fixed vicidial_log bugs # 80402-0121 - Fixes for manual dial transfers on some systems, removed /n persist flag # 80424-0442 - Added non_latin lookup from system_settings +# 80722-1000 - Fixed small bugs +# 80815-1020 - Added manual dial list restriction option # -$version = '2.0.4-69'; -$build = '80424-0442'; +$version = '2.0.4-71'; +$build = '80815-1020'; require("dbconnect.php"); @@ -281,6 +284,8 @@ if (isset($_GET["status"])) {$status=$_GET["status"];} elseif (isset($_POST["status"])) {$status=$_POST["status"];} if (isset($_GET["LogouTKicKAlL"])) {$LogouTKicKAlL=$_GET["LogouTKicKAlL"];} elseif (isset($_POST["LogouTKicKAlL"])) {$LogouTKicKAlL=$_POST["LogouTKicKAlL"];} +if (isset($_GET["manual_dial_filter"])) {$manual_dial_filter=$_GET["manual_dial_filter"];} + elseif (isset($_POST["manual_dial_filter"])) {$manual_dial_filter=$_POST["manual_dial_filter"];} header ("Content-type: text/html; charset=utf-8"); @@ -573,6 +578,33 @@ if ($ACTION == 'manDiaLnextCaLL') exit; } } + if (ereg("CAMPLISTS",$manual_dial_filter)) + { + $stmt="SELECT list_id,active from vicidial_lists where campaign_id='$campaign'"; + $rslt=mysql_query($stmt, $link); + $lists_to_parse = mysql_num_rows($rslt); + $camp_lists=''; + $o=0; + while ($lists_to_parse > $o) + { + $rowx=mysql_fetch_row($rslt); + if (ereg("Y", $rowx[1])) {$active_lists++; $camp_lists .= "'$rowx[0]',";} + if (ereg("N", $rowx[1])) {$inactive_lists++;} + $o++; + } + $camp_lists = eregi_replace(".$","",$camp_lists); + + $stmt="SELECT count(*) FROM vicidial_list where phone_number='$phone_number' and list_id IN($camp_lists);"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $row=mysql_fetch_row($rslt); + + if ($row[0] < 1) + { + echo "NUMBER NOT IN CAMPLISTS\n"; + exit; + } + } if ($stage=='lookup') { $stmt="SELECT lead_id FROM vicidial_list where phone_number='$phone_number' order by modify_date desc LIMIT 1;"; diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc/vicidial.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/vicidial.php index 862f2936..84c55b12 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc/vicidial.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/vicidial.php @@ -177,10 +177,14 @@ # 80428-0413 - UTF8 changes and testing # 80507-0932 - Fixed Script display bug (+ instead of space) # 80519-1425 - Added calls in queue display +# 80722-1000 - Fixed quote display bug +# 80815-1015 - Added manual dial list restriction option +# 80823-2127 - Fixed form scroll for IE +# 81012-0857 - Marker for 2.0.4.1rc5 release # -$version = '2.0.4-148'; -$build = '80519-1425'; +$version = '2.0.4-152'; +$build = '81012-0857'; require("dbconnect.php"); @@ -285,6 +289,7 @@ $PreseT_DiaL_LinKs = '1'; # set to 1 to show a DIAL link for Dial Presets $LogiNAJAX = '1'; # set to 1 to do lookups $HidEMonitoRSessionS = '1'; # set to 1 to hide remote monitoring channels from "session calls" $LogouTKicKAlL = '1'; # set to 1 to hangup all calls in session upon agent logout +$CamPManDiaLLocK = '0'; # set to 1 to lock out all manual dials to only numbers in camp lists $TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen @@ -348,6 +353,11 @@ echo "\n"; echo "\n"; echo "\n"; +if ($CamPManDiaLLocK > 0) + {$manual_dial_filter = "CAMPLISTS_ONLY";} +else + {$manual_dial_filter = "NONE";} + if ($campaign_login_list > 0) { $camp_form_code = "\n";} else {echo "\n";} ?> diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_br/vdc_db_query.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_br/vdc_db_query.php index 89d7f75e..150b68a0 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_br/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_br/vdc_db_query.php @@ -70,6 +70,7 @@ # - $omit_phone_code - ('Y','N') # - $no_delete_sessions - ('0','1') # - $LogouTKicKAlL - ('0','1'); +# - $manual_dial_filter = ('NONE','CAMPLISTS','DNC','CAMPLISTS_DNC'); # CHANGELOG: # 50629-1044 - First build of script @@ -143,10 +144,12 @@ # 80128-1159 - fixed vicidial_log bugs # 80402-0121 - Fixes for manual dial transfers on some systems, removed /n persist flag # 80424-0442 - Added non_latin lookup from system_settings +# 80722-1000 - Fixed small bugs +# 80815-1020 - Added manual dial list restriction option # -$version = '2.0.4-69'; -$build = '80424-0442'; +$version = '2.0.4-71'; +$build = '80815-1020'; require("dbconnect.php"); @@ -281,6 +284,8 @@ if (isset($_GET["status"])) {$status=$_GET["status"];} elseif (isset($_POST["status"])) {$status=$_POST["status"];} if (isset($_GET["LogouTKicKAlL"])) {$LogouTKicKAlL=$_GET["LogouTKicKAlL"];} elseif (isset($_POST["LogouTKicKAlL"])) {$LogouTKicKAlL=$_POST["LogouTKicKAlL"];} +if (isset($_GET["manual_dial_filter"])) {$manual_dial_filter=$_GET["manual_dial_filter"];} + elseif (isset($_POST["manual_dial_filter"])) {$manual_dial_filter=$_POST["manual_dial_filter"];} header ("Content-type: text/html; charset=utf-8"); @@ -573,6 +578,33 @@ if ($ACTION == 'manDiaLnextCaLL') exit; } } + if (ereg("CAMPLISTS",$manual_dial_filter)) + { + $stmt="SELECT list_id,active from vicidial_lists where campaign_id='$campaign'"; + $rslt=mysql_query($stmt, $link); + $lists_to_parse = mysql_num_rows($rslt); + $camp_lists=''; + $o=0; + while ($lists_to_parse > $o) + { + $rowx=mysql_fetch_row($rslt); + if (ereg("Y", $rowx[1])) {$active_lists++; $camp_lists .= "'$rowx[0]',";} + if (ereg("N", $rowx[1])) {$inactive_lists++;} + $o++; + } + $camp_lists = eregi_replace(".$","",$camp_lists); + + $stmt="SELECT count(*) FROM vicidial_list where phone_number='$phone_number' and list_id IN($camp_lists);"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $row=mysql_fetch_row($rslt); + + if ($row[0] < 1) + { + echo "NUMERO NOT IN CAMPLISTS\n"; + exit; + } + } if ($stage=='lookup') { $stmt="SELECT lead_id FROM vicidial_list where phone_number='$phone_number' order by modify_date desc LIMIT 1;"; diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_br/vicidial.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_br/vicidial.php index a29d6984..052c82b5 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_br/vicidial.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_br/vicidial.php @@ -177,10 +177,14 @@ # 80428-0413 - UTF8 changes and testing # 80507-0932 - Fixed Script display bug (+ instead of space) # 80519-1425 - Added calls in queue display +# 80722-1000 - Fixed quote display bug +# 80815-1015 - Added manual dial list restriction option +# 80823-2127 - Fixed form scroll for IE +# 81012-0857 - Marker for 2.0.4.1rc5 release # -$version = '2.0.4-148'; -$build = '80519-1425'; +$version = '2.0.4-152'; +$build = '81012-0857'; require("dbconnect.php"); @@ -285,6 +289,7 @@ $PreseT_DiaL_LinKs = '1'; # set to 1 to show a DISCAR link for Dial Presets $LogiNAJAX = '1'; # set to 1 to do lookups $HidEMonitoRSessionS = '1'; # set to 1 to hide remote monitoring channels from "session calls" $LogouTKicKAlL = '1'; # set to 1 to hangup all calls in session upon agent logout +$CamPManDiaLLocK = '0'; # set to 1 to lock out all manual dials to only numbers in camp lists $TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen @@ -348,6 +353,11 @@ echo "\n"; echo "\n"; echo "\n"; +if ($CamPManDiaLLocK > 0) + {$manual_dial_filter = "CAMPLISTS_ONLY";} +else + {$manual_dial_filter = "NONE";} + if ($campaign_login_list > 0) { $camp_form_code = "\n";} else {echo "\n";} ?> diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/active_list_refresh.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/active_list_refresh.php index 3cd974e6..26579262 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/active_list_refresh.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/active_list_refresh.php @@ -161,10 +161,10 @@ echo "\n"; echo "\n"; echo "\n"; echo "Liste Display: "; -if ($ADD==1) {echo "Live Erweiterungen";} -if ($ADD==2) {echo "Besetzte Erweiterungen";} +if ($ADD==1) {echo "Live Nebenstellen";} +if ($ADD==2) {echo "Besetzte Nebenstellen";} if ($ADD==3) {echo "Amtsleitungen";} -if ($ADD==4) {echo "Lokale Erweiterungen";} +if ($ADD==4) {echo "Lokale Nebenstellen";} if ($ADD==5) {echo "Konferenzen";} if ($ADD==99999) {echo "HILFE";} echo "\n"; diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/astguiclient.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/astguiclient.php index 7ac371a4..2c094526 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/astguiclient.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/astguiclient.php @@ -152,7 +152,7 @@ echo "\n"; echo "\n"; echo "


"; - echo ""; + echo ""; echo ""; echo "\n"; echo "\n"; @@ -185,7 +185,7 @@ echo "
Login
 
0) { - fwrite ($fp, "VICIWÄHLEN|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n"); + fwrite ($fp, "VICIDIAL|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n"); fclose($fp); } } @@ -193,7 +193,7 @@ echo " 0) { - fwrite ($fp, "VICIWÄHLEN|FAIL|$date|$user|$pass|$ip|$browser|$LOGfullname|\n"); + fwrite ($fp, "VICIDIAL|FAIL|$date|$user|$pass|$ip|$browser|$LOGfullname|\n"); fclose($fp); } } @@ -219,7 +219,7 @@ echo "\n"; echo "\n"; echo "\n"; echo "


"; -echo ""; +echo ""; echo ""; echo "\n"; echo "\n"; @@ -256,7 +256,7 @@ echo ""; + in_log_HTML = in_log_HTML + ""; } in_log_HTML = in_log_HTML + "
Telefon Login
 
\n"; echo "\n"; echo "


"; - echo ""; + echo ""; echo ""; echo "\n"; echo "\n"; @@ -490,9 +490,9 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";} var phone_pass = ''; var session_name = ''; var image_livecall_OFF = new Image(); - image_livecall_OFF.src="../agc/images/agc_live_call_OFF.gif"; + image_livecall_OFF.src="../agc/images/agc_live_call_OFF_de.jpg"; var image_livecall_ON = new Image(); - image_livecall_ON.src="../agc/images/agc_live_call_ON.gif"; + image_livecall_ON.src="../agc/images/agc_live_call_ON_de.gif"; var image_voicemail_OFF = new Image(); image_voicemail_OFF.src="../agc/images/agc_check_voicemail_OFF.gif"; var image_voicemail_ON = new Image(); @@ -885,7 +885,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";} else { bsr_continue=0; - alert("Sie können nur ZAP Leitungen abhören:\n" + listenvalue); + alert("Sie können nur ISDN Leitungen abhören:\n" + listenvalue); } } if (bsr_continue == '1') @@ -1195,7 +1195,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";} { recLIST = recLIST + "|" + monitorchannelvalue; filename = filedate + "_" + user_abb; - var rec_start_html = "Stoppe Aufzeichnung"; + var rec_start_html = "Aufnahme stoppen"; document.getElementById(taskspan).innerHTML = rec_start_html; } @@ -1257,7 +1257,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";} recLIST = recLIST + "|" + taskconfrec; filename = filedate + "_" + user_abb; var channelrec = "Local/" + taskconfrec + "@" + ext_context; - var conf_rec_start_html = "Stoppe Aufzeichnung"; + var conf_rec_start_html = "Aufnahme stoppen"; document.getElementById(taskconfspan).innerHTML = conf_rec_start_html; } @@ -1384,7 +1384,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";} var conv_start=3; if (live_calls > 0) { - var live_calls_HTML = "LIVE ANRUFE AUF DIESEM TELEFON:
Telefon Login
 
Ihr Telefon Login ist nicht aktiv, bitte versuchen sie es noch einmal:
 
"; + var live_calls_HTML = "VERBUNDEN MIT DIESEM TELEFON:
#KUNDEN LEITUNGENTFERNTE LEITUNGAUFNAHMEAUFLEGENPARK
"; if ( (LCAcount > live_calls) || (LCAcount < live_calls) ) { LCAe[0]=''; LCAe[1]=''; LCAe[2]=''; LCAe[3]=''; LCAe[4]=''; LCAe[5]=''; @@ -1410,7 +1410,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";} var regx = new RegExp("\\|"+channelfieldBtrunk_array[1],"ig"); if (recLIST.match(regx)) - {live_calls_HTML = live_calls_HTML + "Stoppe Aufzeichnung";} + {live_calls_HTML = live_calls_HTML + "Aufnahme stoppen";} else {live_calls_HTML = live_calls_HTML + "Aufzeichnung";} @@ -1545,7 +1545,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";} var call_out_datetime = call_array[1]; var call_out_number = call_array[2]; var call_out_length = call_array[3]; - out_log_HTML = out_log_HTML + ""; + out_log_HTML = out_log_HTML + ""; } out_log_HTML = out_log_HTML + "
#KUNDEN LEITUNGENTFERNTE LEITUNGAUFNAHMEAUFLEGENPARK
" + loop_ct + "" + call_out_datetime + "" + call_out_number + "" + call_out_length + " WÄHLEN
" + loop_ct + "" + call_out_datetime + "" + call_out_number + "" + call_out_length + " DIAL
"; @@ -1575,7 +1575,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";} var call_in_idnum = call_array[3]; var call_in_idname = call_array[4]; var call_in_length = call_array[5]; - in_log_HTML = in_log_HTML + "
" + loop_ct + "" + call_in_datetime + "" + call_in_number + "" + call_in_idnum + "" + call_in_idname + "" + call_in_length + " WÄHLEN
" + loop_ct + "" + call_in_datetime + "" + call_in_number + "" + call_in_idnum + "" + call_in_idname + "" + call_in_length + " DIAL
"; @@ -1762,7 +1762,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";} show_reglink=1; reglink = "
Register"; } - var conf_head_HTML = "KONFERENZ " + head_conf + "    Registriert bei: " + head_reg + "   " + reglink + "         Betrete Konferenz
Aktualisieren     Aufzeichnung         Senden Sie DTMF         Wählen aus Konferenz
"; + var conf_head_HTML = "KONFERENZ " + head_conf + "    Registriert bei: " + head_reg + "   " + reglink + "         Betrete Konferenz
Aktualisieren     Aufzeichnung         DTMF Senden         Wählen aus Konferenz
"; document.getElementById("ConfereNceHeaderContent").innerHTML = conf_head_HTML; check_for_conf_calls(head_conf,taskrefresh); @@ -1823,7 +1823,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";} var LMAcontent_change=0; var LMAcontent_match=0; var conv_start=-1; - var live_conf_HTML = "LIVE ANRUFE IN DIESER KONFERENZ:
"; + var live_conf_HTML = "VERBINDUNGEN IN DIESER KONFERENZ:
#ENTFERNTE LEITUNGAUFLEGEN
"; if ( (LMAcount > live_conf_calls) || (LMAcount < live_conf_calls) || (LMAforce > 0)) { LMAe[0]=''; LMAe[1]=''; LMAe[2]=''; LMAe[3]=''; LMAe[4]=''; LMAe[5]=''; @@ -2288,7 +2288,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";} var VD_favlist_ct_half = parseInt(favlistCT / 2); if (VD_favlist_ct_half < 30) {VD_favlist_ct_half = 30;} var favlist_sec_col = 0; - var favedit_HTML = "
#ENTFERNTE LEITUNGAUFLEGEN
VORHANDENE EXTENSION FAVORITEN
"; + var favedit_HTML = "
VORHANDENE NEBENSTELLEN FAVORITEN
"; loop_ct = 0; while (loop_ct < favlistCT) { @@ -2323,7 +2323,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";} { if (loop_ct > 0) { - favedit_HTML = favedit_HTML + " " + favoritesEDIT[loop_ct] + " - " + favorites_namesEDIT[loop_ct] + "  
"; + favedit_HTML = favedit_HTML + " " + favoritesEDIT[loop_ct] + " - " + favorites_namesEDIT[loop_ct] + "  
"; } loop_ct++; } @@ -2466,7 +2466,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";} start_all_refresh(); } function pause() // Pauses the refreshing of the lists - {active_display=2; display_message=" - AKTIVE ANZEIGE IN PAUSE -";} + {active_display=2; display_message=" - AKTIVE ANZEIGE PAUSIERT -";} function start() // resumes the refreshing of the lists {active_display=1; display_message='';} function faster() // lowers by 1000 milliseconds the time until the next refresh @@ -2712,18 +2712,18 @@ echo "\n";
- +
- - - - - + + + + +
LOGOUT
\n"; ?>
Haupt BedienfeldAktive Leitungen BedienfeldKonferenz BedienfeldVoicemail checkenLive AnrufHaupt BedienfeldAktive Leitungen BedienfeldKonferenz BedienfeldVoicemail abhörenLive Anruf
@@ -2756,25 +2756,25 @@ echo "\n"; - +
LIVE ANRUF WEITERLEITEN
Leitung, die verbunden werden soll: Kanal
-
ANRUF WEITERLEITEN
Leitung, die verbunden werden soll: Kanal
Erweiterungen:
Extension Menü

- Senden Sie an ausgewählte Extension

- Senden Sie an ausgewählte Voicemalbox

+ Verbinden mit ausgewählter Nebenstelle

+ Weiterleiten zur ausgewählte Voicemalbox

Verbinden mit dieser Nummer:


Aktualisieren


Zurück zu Hauptfenster

Konferenzen:
(Klicken Sie unten auf eine Nummer, um mit einer Konferenz zu verbinden)
Meinen Kanal auch senden
Konferenz Menü
+
Konferenzen:
(Klicken Sie unten auf eine Nummer, um mit einer Konferenz zu verbinden)
Meinen Kanal auch verbinden
Konferenz Menü
- +
LOKALER Anruf über Extension
Telefon ruft an von: Kanal
- + - + @@ -2840,7 +2840,7 @@ echo "\n"; PAUSE | START     Aktualisierungsfrequenz: 1000 msSchneller | Langsamer

Initialisierung..
- @@ -2850,7 +2850,7 @@ echo "\n"; BESTELLEN | - diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/conf_exten_check.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/conf_exten_check.php index 081198aa..e48333b9 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/conf_exten_check.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/conf_exten_check.php @@ -155,7 +155,7 @@ if ($format=='debug') echo "\n"; echo "\n"; echo "\n"; -echo "Konferenz Erweiterung überprüfen"; +echo "<title>Conf Extension Check"; echo "\n"; echo "\n"; echo "\n"; diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/inbound_popup.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/inbound_popup.php index 1d84f761..8a2d8c1e 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/inbound_popup.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/inbound_popup.php @@ -318,11 +318,11 @@ echo "$NOW_TIME

\n"; echo "ANGEPASST - \n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; echo "
LOKALE Nebenstellen wahl
Telefon ruft an von: Kanal
Erweiterungen:
Extension Menü

- Rufe ausgewählte Extension an

+ Rufe ausgewählte Nebenstelle an

Rufe ausgewählte Voicemalbox an

Aktualisieren


Zurück zu Hauptfenster

@@ -2794,9 +2794,9 @@ echo "\n";
VOICEMAIL     NEU:     ALT:             MANUELLER ANRUF       WÄHLEN
VOICEMAIL     NEU:     ALT:             MANUELLER ANRUF       DIAL
GEPARKTE ANRUFE: 0                LOKALE ANRUF EXTENSIONS
GEPARKTE ANRUFE: 0                LOKALE NEBENSTELLEN
OUTBOUND ANRUFE:
Aktive Erweiterung
+
Aktive Nebenstellen
AKTUALISIEREN | BESTELLEN |
Lokale Erweiterungen
+
Lokale Nebenstellen
AKTUALISIEREN | BESTELLEN |
Nummer Gewählt: $row[8]
Gewählte Nummer: $row[8]
Anmerkungen: $row[9]|$row[10]|$row[11]|$row[12]|$row[13]|
\n"; echo "AUFLEGEN - \n"; - echo "SENDE AN MEINE VOICEMAILBOX\n"; + echo "AN MEINE VOICEMAILBOX SENDEN\n"; echo "
\n"; diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/live_exten_check.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/live_exten_check.php index 1fb73011..b7ab38c9 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/live_exten_check.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/live_exten_check.php @@ -109,7 +109,7 @@ if ($format=='debug') echo "\n"; echo "\n"; echo "\n"; -echo "LIVE Erweiterung überprüfen"; +echo "<title>Aktive Nebenstelle überprüfen"; echo "\n"; echo "\n"; echo "\n"; diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/manager_send.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/manager_send.php index be478aa4..22e58937 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/manager_send.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/manager_send.php @@ -250,14 +250,14 @@ if ($ACTION=="SysCIDOriginate") { if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<1) ) { - echo "Exten $exten ist unzulässig or queryCID $queryCID ist unzulässig, Originate Befehl nicht eingesetzt\n"; + echo "Exten $exten ist unzulässig or queryCID $queryCID ist unzulässig, Originate Befehl nicht abgesetzt\n"; } else { $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $queryCID','','','','','');"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); - echo "Originate Befehl gesendet um Exten $exten Kanal $channel an $server_ip\n"; + echo "Originate Befehl gesendet für Exten $exten Kanal $channel an $server_ip\n"; } } @@ -342,7 +342,7 @@ if ($ACTION=="Originate") { if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<10) ) { - echo "Exten $exten ist unzulässig or queryCID $queryCID ist unzulässig, Originate Befehl nicht eingesetzt\n"; + echo "Exten $exten ist unzulässig or queryCID $queryCID ist unzulässig, Originate Befehl nicht abgesetzt\n"; } else { @@ -353,7 +353,7 @@ if ($ACTION=="Originate") $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $outCID','','','','','');"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); - echo "Originate Befehl gesendet um Exten $exten Kanal $channel an $server_ip\n"; + echo "Originate Befehl gesendet für Exten $exten Kanal $channel an $server_ip\n"; } } @@ -369,7 +369,7 @@ if ($ACTION=="HangupConfDial") if ( (strlen($exten)<3) or (strlen($queryCID)<15) or (strlen($ext_context)<1) ) { $channel_live=0; - echo "conference $exten ist unzulässig or ext_context $ext_context or queryCID $queryCID ist unzulässig, Hangup Befehl nicht eingesetzt\n"; + echo "conference $exten ist unzulässig or ext_context $ext_context or queryCID $queryCID ist unzulässig, Hangup Befehl nicht abgesetzt\n"; } else { @@ -406,7 +406,7 @@ if ($ACTION=="Hangup") if ( (strlen($channel)<3) or (strlen($queryCID)<15) ) { $channel_live=0; - echo "Kanal $channel ist unzulässig or queryCID $queryCID ist unzulässig, Hangup Befehl nicht eingesetzt\n"; + echo "Kanal $channel ist unzulässig or queryCID $queryCID ist unzulässig, Hangup Befehl nicht abgesetzt\n"; } else { @@ -445,7 +445,7 @@ if ($ACTION=="Hangup") if ($row[0]==0) { $channel_live=0; - echo "Kanal $channel ist nicht Live an $call_server_ip, Hangup Befehl nicht eingesetzt $rowx[0]\n$stmt\n"; + echo "Kanal $channel ist nicht Live an $call_server_ip, Hangup Befehl nicht abgesetzt $rowx[0]\n$stmt\n"; } else { @@ -458,7 +458,7 @@ if ($ACTION=="Hangup") $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Hangup','$queryCID','Channel: $channel','','','','','','','','','');"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); - echo "Hangup Befehl gesendet um Kanal $channel an $call_server_ip\n"; + echo "Hangup Befehl gesendet für Kanal $channel an $call_server_ip\n"; } } } @@ -666,7 +666,7 @@ if ($ACTION=="RedirectXtraCX") if ($rowx[0]==0) { $channel_liveX=0; - echo "Kanal $channel ist nicht Live an $call_server_ip, Redirect Befehl nicht eingesetzt\n"; + echo "Kanal $channel ist nicht Live an $call_server_ip, Redirect Befehl nicht abgesetzt\n"; if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel ist nicht Live an $call_server_ip";} } } @@ -683,7 +683,7 @@ if ($ACTION=="RedirectXtraCX") if ($rowx[0]==0) { $channel_liveY=0; - echo "Kanal $channel ist nicht Live an $server_ip, Redirect Befehl nicht eingesetzt\n"; + echo "Kanal $channel ist nicht Live an $server_ip, Redirect Befehl nicht abgesetzt\n"; if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel ist nicht Live an $server_ip";} } } @@ -696,7 +696,7 @@ if ($ACTION=="RedirectXtraCX") if ($rowx[0] < 1) { $channel_liveY=0; - echo "No Local agent to send call to, Redirect Befehl nicht eingesetzt\n"; + echo "No Local agent to send call to, Redirect Befehl nicht abgesetzt\n"; if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "No Local agent to send call to";} } else @@ -729,7 +729,7 @@ if ($ACTION=="RedirectXtraCX") if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); - echo "RedirectXtraCX Befehl gesendet um Kanal $channel an $call_server_ip and \nHungup $extrachannel an $server_ip\n"; + echo "RedirectXtraCX Befehl gesendet für Kanal $channel an $call_server_ip and \nHungup $extrachannel an $server_ip\n"; if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel an $call_server_ip, Hungup $extrachannel an $server_ip";} } } @@ -804,7 +804,7 @@ if ($ACTION=="RedirectXtra") else { $channel_liveX=0; - echo "Kann keine leere Konferenz finden an $server_ip, Redirect Befehl nicht eingesetzt\n"; + echo "Kann keine leere Konferenz finden an $server_ip, Redirect Befehl nicht abgesetzt\n"; if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "Kann keine leere Konferenz finden an $server_ip";} } } @@ -824,7 +824,7 @@ if ($ACTION=="RedirectXtra") if ($rowx[0]==0) { $channel_liveX=0; - echo "Kanal $channel ist nicht Live an $call_server_ip, Redirect Befehl nicht eingesetzt\n"; + echo "Kanal $channel ist nicht Live an $call_server_ip, Redirect Befehl nicht abgesetzt\n"; if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel ist nicht Live an $call_server_ip";} } } @@ -841,7 +841,7 @@ if ($ACTION=="RedirectXtra") if ($rowx[0]==0) { $channel_liveY=0; - echo "Kanal $channel ist nicht Live an $server_ip, Redirect Befehl nicht eingesetzt\n"; + echo "Kanal $channel ist nicht Live an $server_ip, Redirect Befehl nicht abgesetzt\n"; if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel ist nicht Live an $server_ip";} } } @@ -853,7 +853,7 @@ if ($ACTION=="RedirectXtra") if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); - echo "RedirectXtra Befehl gesendet um Kanal $channel and \nExtraKanal $extrachannel\n to $exten an $server_ip\n"; + echo "RedirectXtra Befehl gesendet für Kanal $channel and \nExtraKanal $extrachannel\n to $exten an $server_ip\n"; if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel and $extrachannel to $exten an $server_ip";} } else @@ -878,7 +878,7 @@ if ($ACTION=="RedirectXtra") if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); - echo "RedirectXtra Befehl gesendet um Kanal $channel an $call_server_ip and \nExtraKanal $extrachannel\n to $exten an $server_ip\n"; + echo "RedirectXtra Befehl gesendet für Kanal $channel an $call_server_ip and \nExtraKanal $extrachannel\n to $exten an $server_ip\n"; if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel/$call_server_ip and $extrachannel/$server_ip to $exten";} } } @@ -908,7 +908,7 @@ if ($ACTION=="RedirectXtra") if ($ACTION=="Redirect") { - ### for manual dial VICIWÄHLEN calls send the second attempt to transfer the call + ### for manual dial VICIDIAL calls send the second attempt to transfer the call if ($stage=="2NDXfeR") { $local_DEF = 'Local/'; @@ -960,7 +960,7 @@ if ($ACTION=="Redirect") if ($rowx[0]==0) { $channel_live=0; - echo "Kanal $channel ist nicht Live an $server_ip, Redirect Befehl nicht eingesetzt\n"; + echo "Kanal $channel ist nicht Live an $server_ip, Redirect Befehl nicht abgesetzt\n"; } } if ($channel_live==1) @@ -969,7 +969,7 @@ if ($ACTION=="Redirect") if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); - echo "Redirect Befehl gesendet um Kanal $channel an $server_ip\n"; + echo "Redirect Befehl gesendet für Kanal $channel an $server_ip\n"; } } } @@ -991,7 +991,7 @@ if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") ) if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($filename)<15) ) { $channel_live=0; - echo "Kanal $channel ist unzulässig or queryCID $queryCID ist unzulässig or filename: $filename ist unzulässig, $ACTION Befehl nicht eingesetzt\n"; + echo "Kanal $channel ist unzulässig or queryCID $queryCID ist unzulässig or filename: $filename ist unzulässig, $ACTION Befehl nicht abgesetzt\n"; } else { @@ -1008,7 +1008,7 @@ if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") ) if ($rowx[0]==0) { $channel_live=0; - echo "Kanal $channel ist nicht Live an $server_ip, $ACTION Befehl nicht eingesetzt\n"; + echo "Kanal $channel ist nicht Live an $server_ip, $ACTION Befehl nicht abgesetzt\n"; } } if ($channel_live==1) @@ -1050,7 +1050,7 @@ if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") ) } } - echo "$ACTION Befehl gesendet um Kanal $channel an $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n"; + echo "$ACTION Befehl gesendet für Kanal $channel an $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n"; } } } @@ -1070,7 +1070,7 @@ if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") ) if ( (strlen($exten)<3) or (strlen($channel)<4) or (strlen($filename)<15) ) { $channel_live=0; - echo "Kanal $channel ist unzulässig or exten $exten ist unzulässig or filename: $filename ist unzulässig, $ACTION Befehl nicht eingesetzt\n"; + echo "Kanal $channel ist unzulässig or exten $exten ist unzulässig or filename: $filename ist unzulässig, $ACTION Befehl nicht abgesetzt\n"; } else { @@ -1134,7 +1134,7 @@ if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") ) } } - echo "$ACTION Befehl gesendet um Kanal $channel an $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n AUFNAHME DAUERT BIS ZU 60 MINUTEN\n"; + echo "$ACTION Befehl gesendet für Kanal $channel an $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n AUFNAHME DAUERT BIS ZU 60 MINUTEN\n"; } } @@ -1149,7 +1149,7 @@ if ($ACTION=="VolumeControl") { if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($stage)<1) or (strlen($queryCID)<1) ) { - echo "Konferenz $exten, Stage $stage ist unzulässig or queryCID $queryCID ist unzulässig, Originate Befehl nicht eingesetzt\n"; + echo "Konferenz $exten, Stage $stage ist unzulässig or queryCID $queryCID ist unzulässig, Originate Befehl nicht abgesetzt\n"; } else { @@ -1165,7 +1165,7 @@ if ($ACTION=="VolumeControl") $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $volume_local_channel','Context: $ext_context','Exten: 8300','Priority: 1','Callerid: $queryCID','','','','$channel','$exten');"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); - echo "Volume Befehl gesendet um Konferenz $exten, Stage $stage Kanal $channel an $server_ip\n"; + echo "Volume Befehl gesendet für Konferenz $exten, Stage $stage Kanal $channel an $server_ip\n"; } } diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/vdc_db_query.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/vdc_db_query.php index 448d3272..2d825afc 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/vdc_db_query.php @@ -70,6 +70,7 @@ # - $omit_phone_code - ('Y','N') # - $no_delete_sessions - ('0','1') # - $LogouTKicKAlL - ('0','1'); +# - $manual_dial_filter = ('NONE','CAMPLISTS','DNC','CAMPLISTS_DNC'); # CHANGELOG: # 50629-1044 - First build of script @@ -143,10 +144,12 @@ # 80128-1159 - fixed vicidial_log bugs # 80402-0121 - Fixes for manual dial transfers on some systems, removed /n persist flag # 80424-0442 - Added non_latin lookup from system_settings +# 80722-1000 - Fixed small bugs +# 80815-1020 - Added manual dial list restriction option # -$version = '2.0.4-69'; -$build = '80424-0442'; +$version = '2.0.4-71'; +$build = '80815-1020'; require("dbconnect.php"); @@ -281,6 +284,8 @@ if (isset($_GET["status"])) {$status=$_GET["status"];} elseif (isset($_POST["status"])) {$status=$_POST["status"];} if (isset($_GET["LogouTKicKAlL"])) {$LogouTKicKAlL=$_GET["LogouTKicKAlL"];} elseif (isset($_POST["LogouTKicKAlL"])) {$LogouTKicKAlL=$_POST["LogouTKicKAlL"];} +if (isset($_GET["manual_dial_filter"])) {$manual_dial_filter=$_GET["manual_dial_filter"];} + elseif (isset($_POST["manual_dial_filter"])) {$manual_dial_filter=$_POST["manual_dial_filter"];} header ("Content-type: text/html; charset=utf-8"); @@ -573,6 +578,33 @@ if ($ACTION == 'manDiaLnextCaLL') exit; } } + if (ereg("CAMPLISTS",$manual_dial_filter)) + { + $stmt="SELECT list_id,active from vicidial_lists where campaign_id='$campaign'"; + $rslt=mysql_query($stmt, $link); + $lists_to_parse = mysql_num_rows($rslt); + $camp_lists=''; + $o=0; + while ($lists_to_parse > $o) + { + $rowx=mysql_fetch_row($rslt); + if (ereg("Y", $rowx[1])) {$active_lists++; $camp_lists .= "'$rowx[0]',";} + if (ereg("N", $rowx[1])) {$inactive_lists++;} + $o++; + } + $camp_lists = eregi_replace(".$","",$camp_lists); + + $stmt="SELECT count(*) FROM vicidial_list where phone_number='$phone_number' and list_id IN($camp_lists);"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $row=mysql_fetch_row($rslt); + + if ($row[0] < 1) + { + echo "NUMMER NOT IN CAMPLISTS\n"; + exit; + } + } if ($stage=='lookup') { $stmt="SELECT lead_id FROM vicidial_list where phone_number='$phone_number' order by modify_date desc LIMIT 1;"; @@ -1033,7 +1065,7 @@ if ($stage == "start") if ($affected_rows > 0) { - echo "VICIDiaL_LOG Eingesetzt: $uniqueid|$channel|$NOW_TIME\n"; + echo "VICIDiaL_LOG Eingefügt: $uniqueid|$channel|$NOW_TIME\n"; echo "$StarTtime\n"; } else @@ -1053,7 +1085,7 @@ if ($stage == "start") # if ($affected_rows > 0) # { - # echo "CALL_LOG Eingesetzt: $uniqueid|$channel|$NOW_TIME"; + # echo "CALL_LOG Eingefügt: $uniqueid|$channel|$NOW_TIME"; # } # else # { diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/vicidial.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/vicidial.php index dc549ea5..775c7ffc 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/vicidial.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/vicidial.php @@ -177,10 +177,14 @@ # 80428-0413 - UTF8 changes and testing # 80507-0932 - Fixed Script display bug (+ instead of space) # 80519-1425 - Added calls in queue display +# 80722-1000 - Fixed quote display bug +# 80815-1015 - Added manual dial list restriction option +# 80823-2127 - Fixed form scroll for IE +# 81012-0857 - Marker for 2.0.4.1rc5 release # -$version = '2.0.4-148'; -$build = '80519-1425'; +$version = '2.0.4-152'; +$build = '81012-0857'; require("dbconnect.php"); @@ -285,6 +289,7 @@ $PreseT_DiaL_LinKs = '1'; # set to 1 to show a WÄHLEN link for Dial Presets $LogiNAJAX = '1'; # set to 1 to do lookups $HidEMonitoRSessionS = '1'; # set to 1 to hide remote monitoring channels from "session calls" $LogouTKicKAlL = '1'; # set to 1 to hangup all calls in session upon agent logout +$CamPManDiaLLocK = '0'; # set to 1 to lock out all manual dials to only numbers in camp lists $TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen @@ -348,6 +353,11 @@ echo "\n"; echo "\n"; echo "\n"; +if ($CamPManDiaLLocK > 0) + {$manual_dial_filter = "CAMPLISTS_ONLY";} +else + {$manual_dial_filter = "NONE";} + if ($campaign_login_list > 0) { $camp_form_code = "\n"; @@ -473,7 +483,7 @@ echo "
\n"; echo "\n"; echo "


"; -echo ""; +echo ""; echo ""; echo "\n"; echo "\n"; @@ -500,7 +510,7 @@ if ($user_login_first == 1) { if ( (strlen($VD_login)<1) or (strlen($VD_pass)<1) or (strlen($VD_campaign)<1) ) { - echo "VICIWÄHLEN web client: Kampagne Login\n"; + echo "VICIDIAL web client: Kampagne Login\n"; echo "\n"; echo "\n"; echo "
Re-Login
 
\n"; @@ -512,7 +522,7 @@ echo "
\n"; echo "

Benutzer Login

"; echo ""; - echo ""; + echo ""; echo ""; echo "\n"; echo "\n"; @@ -542,7 +552,7 @@ echo "
Kampagne Login
 
VICIWÄHLEN web client: Login\n"; + echo "VICIDIAL web client: Login\n"; echo "\n"; echo "\n"; echo "\n"; @@ -551,7 +561,7 @@ echo "
\n"; echo "\n"; echo "


"; - echo ""; + echo ""; echo ""; echo "\n"; echo "\n"; @@ -580,7 +590,7 @@ echo "
Login
 
VICIWÄHLEN web client: Telefon Login\n"; +echo "VICIDIAL web client: Telefon Login\n"; echo "\n"; echo "\n"; echo "\n"; @@ -589,7 +599,7 @@ echo "
\n"; echo "\n"; echo "


"; -echo ""; +echo ""; echo ""; echo "\n"; echo "\n"; @@ -661,7 +671,7 @@ $VDloginDISPLAY=0; if ( (!eregi(" $VD_campaign ",$LOGallowed_campaigns)) and (!eregi("ALL-CAMPAIGNS",$LOGallowed_campaigns)) ) { - echo "VICIWÄHLEN web client: VICIWÄHLEN Kampagne Login\n"; + echo "VICIDIAL web client: VICIDIAL Kampagne Login\n"; echo "\n"; echo "\n"; echo "
Telefon Login
 
\n"; @@ -913,7 +923,7 @@ echo "
VICIWÄHLEN web client: Kampagne Login\n"; + echo "VICIDIAL web client: Kampagne Login\n"; echo "\n"; echo "\n"; echo "\n"; @@ -925,7 +935,7 @@ echo "
\n"; echo "

$VDdisplayMESSAGE

"; echo ""; - echo ""; + echo ""; echo ""; echo "\n"; echo "\n"; @@ -953,7 +963,7 @@ $row=mysql_fetch_row($rslt); $authphone=$row[0]; if (!$authphone) { - echo "VICIWÄHLEN web client: Telefon Login Error\n"; + echo "VICIDIAL web client: Telefon Login Error\n"; echo "\n"; echo "\n"; echo "
Kampagne Login
 
\n"; @@ -965,7 +975,7 @@ echo "
\n"; echo "\n"; echo "


"; - echo ""; + echo ""; echo ""; echo "\n"; echo "\n"; @@ -983,7 +993,7 @@ echo "
Login Error
 
Ihr Telefon Login ist nicht aktiv, bitte versuchen sie es noch einmal:
 
VICIWÄHLEN web client\n"; + echo "VICIDIAL web client\n"; $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); @@ -1095,12 +1105,12 @@ else if ($allow_closers=="Y") { $VICIDiaL_allow_closers = 1; - print "\n"; + print "\n"; } else { $VICIDiaL_allow_closers = 0; - print "\n"; + print "\n"; } @@ -1142,7 +1152,7 @@ else $i++; } if ($prev_login_ct > 0) - {print "\n";} + {print "\n";} else { ##### grab the next available vicidial_conference room and reserve it @@ -1159,7 +1169,7 @@ else } $stmt="UPDATE vicidial_conferences set extension='$SIP_user' where server_ip='$server_ip' and conf_exten='$session_id';"; $rslt=mysql_query($stmt, $link); - print "\n"; + print "\n"; } @@ -1325,13 +1335,13 @@ else } else { - echo "VICIWÄHLEN web client: VICIWÄHLEN Kampagne Login\n"; + echo "VICIDIAL web client: VICIDIAL Kampagne Login\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n";echo "\n"; echo "
English Deutsch
\n"; - echo "Es sind keine aktiven Adressen mehr im Hopper\n"; + echo "Es sind für diese Kampagne keine aktiven Adressen mehr im Hopper\n"; echo "\n"; echo "\n"; echo "\n"; @@ -1348,7 +1358,7 @@ echo "
VICIWÄHLEN web client: VICIWÄHLEN Kampagne Login\n"; + echo "VICIDIAL web client: VICIDIAL Kampagne Login\n"; echo "\n"; echo "\n"; echo "\n"; @@ -1819,50 +1829,52 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var LogouTKicKAlL = ''; var flag_channels = ''; var flag_string = ''; - var DiaLControl_auto_HTML = "\"Pause\"\"WiederAufnehmen\""; - var DiaLControl_auto_HTML_ready = "\"Pause\"\"WiederAufnehmen\""; - var DiaLControl_auto_HTML_OFF = "\"Pause\"\"WiederAufnehmen\""; - var DiaLControl_manual_HTML = "\"Nächste"; + var manual_dial_filter = ''; + var useIE = ''; + var DiaLControl_auto_HTML = "\"Pause\"\"WiederAufnehmen\""; + var DiaLControl_auto_HTML_ready = "\"Pause\"\"WiederAufnehmen\""; + var DiaLControl_auto_HTML_OFF = "\"Pause\"\"WiederAufnehmen\""; + var DiaLControl_manual_HTML = "\"Nächste"; var image_blank = new Image(); image_blank.src="../agc/images/blank.gif"; var image_livecall_OFF = new Image(); - image_livecall_OFF.src="../agc/images/agc_live_call_OFF.gif"; + image_livecall_OFF.src="../agc/images/agc_live_call_OFF_de.jpg"; var image_livecall_ON = new Image(); - image_livecall_ON.src="../agc/images/agc_live_call_ON.gif"; + image_livecall_ON.src="../agc/images/agc_live_call_ON_de.gif"; var image_LB_dialnextnumber = new Image(); - image_LB_dialnextnumber.src="../agc/images/vdc_LB_dialnextnumber.gif"; + image_LB_dialnextnumber.src="../agc/images/vdc_LB_dialnextnumber_de.gif"; var image_LB_hangupcustomer = new Image(); - image_LB_hangupcustomer.src="../agc/images/vdc_LB_hangupcustomer.gif"; + image_LB_hangupcustomer.src="../agc/images/vdc_LB_hangupcustomer_de.gif"; var image_LB_transferconf = new Image(); - image_LB_transferconf.src="../agc/images/vdc_LB_transferconf.gif"; + image_LB_transferconf.src="../agc/images/vdc_LB_transferconf_de.gif"; var image_LB_grabparkedcall = new Image(); image_LB_grabparkedcall.src="../agc/images/vdc_LB_grabparkedcall.gif"; var image_LB_parkcall = new Image(); - image_LB_parkcall.src="../agc/images/vdc_LB_parkcall.gif"; + image_LB_parkcall.src="../agc/images/vdc_LB_parkcall_de.gif"; var image_LB_webform = new Image(); - image_LB_webform.src="../agc/images/vdc_LB_webform.gif"; + image_LB_webform.src="../agc/images/vdc_LB_webform_de.gif"; var image_LB_stoprecording = new Image(); - image_LB_stoprecording.src="../agc/images/vdc_LB_stoprecording.gif"; + image_LB_stoprecording.src="../agc/images/vdc_LB_stoprecording2_de.gif"; var image_LB_startrecording = new Image(); - image_LB_startrecording.src="../agc/images/vdc_LB_startrecording.gif"; + image_LB_startrecording.src="../agc/images/vdc_LB_startrecording_de.gif"; var image_LB_pause = new Image(); image_LB_pause.src="../agc/images/vdc_LB_pause.gif"; var image_LB_resume = new Image(); - image_LB_resume.src="../agc/images/vdc_LB_resume.gif"; + image_LB_resume.src="../agc/images/vdc_LB_resume_de.gif"; var image_LB_senddtmf = new Image(); - image_LB_senddtmf.src="../agc/images/vdc_LB_senddtmf.gif"; + image_LB_senddtmf.src="../agc/images/vdc_LB_senddtmf_de.gif"; var image_LB_dialnextnumber_OFF = new Image(); - image_LB_dialnextnumber_OFF.src="../agc/images/vdc_LB_dialnextnumber_OFF.gif"; + image_LB_dialnextnumber_OFF.src="../agc/images/vdc_LB_dialnextnumber_OFF_de.gif"; var image_LB_hangupcustomer_OFF = new Image(); - image_LB_hangupcustomer_OFF.src="../agc/images/vdc_LB_hangupcustomer_OFF.gif"; + image_LB_hangupcustomer_OFF.src="../agc/images/vdc_LB_hangupcustomer_OFF_de.gif"; var image_LB_transferconf_OFF = new Image(); - image_LB_transferconf_OFF.src="../agc/images/vdc_LB_transferconf_OFF.gif"; + image_LB_transferconf_OFF.src="../agc/images/vdc_LB_transferconf_OFF_de.gif"; var image_LB_grabparkedcall_OFF = new Image(); image_LB_grabparkedcall_OFF.src="../agc/images/vdc_LB_grabparkedcall_OFF.gif"; var image_LB_parkcall_OFF = new Image(); - image_LB_parkcall_OFF.src="../agc/images/vdc_LB_parkcall_OFF.gif"; + image_LB_parkcall_OFF.src="../agc/images/vdc_LB_parkcall_OFF_de.gif"; var image_LB_webform_OFF = new Image(); - image_LB_webform_OFF.src="../agc/images/vdc_LB_webform_OFF.gif"; + image_LB_webform_OFF.src="../agc/images/vdc_LB_webform_OFF_de.gif"; var image_LB_stoprecording_OFF = new Image(); image_LB_stoprecording_OFF.src="../agc/images/vdc_LB_stoprecording_OFF.gif"; var image_LB_startrecording_OFF = new Image(); @@ -1870,9 +1882,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var image_LB_pause_OFF = new Image(); image_LB_pause_OFF.src="../agc/images/vdc_LB_pause_OFF.gif"; var image_LB_resume_OFF = new Image(); - image_LB_resume_OFF.src="../agc/images/vdc_LB_resume_OFF.gif"; + image_LB_resume_OFF.src="../agc/images/vdc_LB_resume_OFF_de.gif"; var image_LB_senddtmf_OFF = new Image(); - image_LB_senddtmf_OFF.src="../agc/images/vdc_LB_senddtmf_OFF.gif"; + image_LB_senddtmf_OFF.src="../agc/images/vdc_LB_senddtmf_OFF_de.gif"; @@ -1970,11 +1982,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if (taskdirection=='MUTING') { - document.getElementById("AgentMuteSpan").innerHTML = ""; + document.getElementById("AgentMuteSpan").innerHTML = ""; } else { - document.getElementById("AgentMuteSpan").innerHTML = ""; + document.getElementById("AgentMuteSpan").innerHTML = ""; } } @@ -2151,7 +2163,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} MD_channel_look=1; XDcheck = 'YES'; - // document.getElementById("HangupXferLine").innerHTML ="\"Transferleitung"; + // document.getElementById("HangupXferLine").innerHTML ="\"Nachfrage"; } } } @@ -2328,7 +2340,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var LMAcontent_change=0; var LMAcontent_match=0; var conv_start=-1; - var live_conf_HTML = "LIVE ANRUFE IN IHRER SESSION:
>"; + var live_conf_HTML = "LIVE ANRUFE IN IHRER SITZUNG:
#ENTFERNTE LEITUNGAUFLEGENLAUTSTÄRKE
>"; if ( (LMAcount > live_conf_calls) || (LMAcount < live_conf_calls) || (LMAforce > 0)) { LMAe[0]=''; LMAe[1]=''; LMAe[2]=''; LMAe[3]=''; LMAe[4]=''; LMAe[5]=''; @@ -2365,7 +2377,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } else { - live_conf_HTML = live_conf_HTML + ""; + live_conf_HTML = live_conf_HTML + ""; } } // var debugspan = document.getElementById("debugbottomspan").innerHTML; @@ -2391,7 +2403,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { agentchannel = channelfieldA; - document.getElementById("AgentMuteSpan").innerHTML = ""; + document.getElementById("AgentMuteSpan").innerHTML = ""; } } else @@ -2400,7 +2412,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { agentchannel = channelfieldA; - document.getElementById("AgentMuteSpan").innerHTML = ""; + document.getElementById("AgentMuteSpan").innerHTML = ""; } } } @@ -2504,7 +2516,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // filename = filedate + "_" + user_abb; var query_recording_exten = recording_exten; var channelrec = "Local/" + conf_silent_prefix + '' + taskconfrec + "@" + ext_context; - var conf_rec_start_html = "\"Stope"; + var conf_rec_start_html = "\"Stope"; if (campaign_recording == 'ALLFORCE') { @@ -2520,7 +2532,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} filename = taskconffile; var query_recording_exten = session_id; var channelrec = "Local/" + conf_silent_prefix + '' + taskconfrec + "@" + ext_context; - var conf_rec_start_html = "\"Starte"; + var conf_rec_start_html = "\"Starte"; if (campaign_recording == 'ALLFORCE') { document.getElementById("RecorDControl").innerHTML = "\"Starte"; @@ -2638,7 +2650,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { xferredirect_query=''; taskvar = 'NOTHING'; - alert("Transfer Nummer muss mehr als 1 Stelle haben:" + blindxferdialstring); + alert("Telefon Nummer muss mehr als 1 Stelle haben:" + blindxferdialstring); } else { @@ -2737,7 +2749,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectFromPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + dest_dialstring + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id; - document.getElementById("ParkControl").innerHTML ="\"Parke"; + document.getElementById("ParkControl").innerHTML ="\"Parke"; customerparked=0; } @@ -2887,10 +2899,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else { MDlogEPOCH = MDlogResponse_array[1]; - // alert("VICIWÄHLEN Call log entered:\n" + document.vicidial_form.uniqueid.value); + // alert("VICIDIAL Call log entered:\n" + document.vicidial_form.uniqueid.value); if ( (taskMDstage != "start") && (VDstop_rec_after_each_call == 1) ) { - var conf_rec_start_html = "\"Starte"; + var conf_rec_start_html = "\"Starte"; if ( (campaign_recording == 'NEVER') || (campaign_recording == 'ALLFORCE') ) { document.getElementById("RecorDControl").innerHTML = "\"Starte"; @@ -2973,7 +2985,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if ( (AutoDialWaiting == 1) || (VD_live_customer_call==1) || (alt_dial_active==1) ) { - alert("SIE MÜSSEN IM PAUSE MODUS SEIN, UM DIE WIEDERVORLAGEN IM AUTOMATISCHEM WÄHLMODUS EINZUSEHEN"); + alert("SIE MÜSSEN PAUSIERT SEIN, UM DIE WIEDERVORLAGEN IM AUTOMATISCHEM WÄHLMODUS EINZUSEHEN"); } else { @@ -3083,7 +3095,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if ( (AutoDialWaiting == 1) || (VD_live_customer_call==1) || (alt_dial_active==1) ) { - alert("SIE MÜSSEN IM PAUSE MODUS SEIN, UM EINE NEUE ADRESSE IM AUTOMATISCHEM WÄHLMODUS MANUELL ZU WÄHLEN"); + alert("SIE MÜSSEN PAUSIERT SEIN, UM EINE NEUE ADRESSE IM AUTOMATISCHEM WÄHLMODUS MANUELL ZU WÄHLEN"); } else { @@ -3141,7 +3153,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if ( (MDDiaLCodEform.length < 1) || (MDPhonENumbeRform.length < 5) ) { - alert("SIE MÜSSEN Eine TELEFONNUMMER UND Einen VORWAHLKNOPF-CODE EINGEBEN,UM SCHNELLEN VORWAHLKNOPF ZU BENUTZEN"); + alert("SIE MÜSSEN Eine TELEFONNUMMER UND Einen LÄNDER-CODE EINGEBEN,UM DIE SCHNELL WAHL ZU BENUTZEN"); } else { @@ -3243,15 +3255,15 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} XD_live_call_secondS = 0; MD_channel_look=0; - document.getElementById("MainStatuSSpan").innerHTML = " Angerufener dritter Teilnehmer: " + document.vicidial_form.xfernumber.value + " UID: " + CIDcheck; + document.getElementById("MainStatuSSpan").innerHTML = " Nachfrage Teilnehmer: " + document.vicidial_form.xfernumber.value + " UID: " + CIDcheck; - document.getElementById("Leave3WayCall").innerHTML ="\"3-WEGE"; + document.getElementById("Leave3WayCall").innerHTML ="\"NACHFRAGE"; - document.getElementById("DialWithCustomer").innerHTML ="\"Kunden"; + document.getElementById("DialWithCustomer").innerHTML ="\"mit"; document.getElementById("ParkCustomerDial").innerHTML ="\"Kundenanruf"; - document.getElementById("HangupXferLine").innerHTML ="\"Transferleitung"; + document.getElementById("HangupXferLine").innerHTML ="\"Nachfrage"; document.getElementById("HangupBothLines").innerHTML ="\"Beide"; @@ -3287,23 +3299,23 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.getElementById("MainStatuSSpan").innerHTML = " Angerufen: " + status_display_number + " UID: " + CIDcheck + "  "; - document.getElementById("ParkControl").innerHTML ="\"Parke"; + document.getElementById("ParkControl").innerHTML ="\"Parke"; - document.getElementById("HangupControl").innerHTML = "\"Kunden"; + document.getElementById("HangupControl").innerHTML = "\"Kunden"; - document.getElementById("XferControl").innerHTML = "\"Transfer"; + document.getElementById("XferControl").innerHTML = "\"Transfer"; - document.getElementById("LocalCloser").innerHTML = "\"LOKALER"; + document.getElementById("LocalCloser").innerHTML = "\"LOKALE"; - document.getElementById("DialBlindTransfer").innerHTML = "\"Wähle"; + document.getElementById("DialBlindTransfer").innerHTML = "\"Verbinden"; document.getElementById("DialBlindVMail").innerHTML = "\"Blind"; - document.getElementById("VolumeUpSpan").innerHTML = ""; - document.getElementById("VolumeDownSpan").innerHTML = ""; + document.getElementById("VolumeUpSpan").innerHTML = ""; + document.getElementById("VolumeDownSpan").innerHTML = ""; - // INSERT VICIWÄHLEN_LOG ENTRY FOR THIS ANRUF PROCESS + // INSERT VICIDIAL_LOG ENTRY FOR THIS ANRUF PROCESS DialLog("start"); custchannellive=1; @@ -3330,7 +3342,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { all_record = 'NO'; all_record_count=0; - document.getElementById("DiaLControl").innerHTML = "\"Nächste"; + document.getElementById("DiaLControl").innerHTML = "\"Nächste"; if (document.vicidial_form.LeadPreview.checked==true) { reselect_preview_dial = 1; @@ -3365,7 +3377,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + dial_prefix + "&campaign_cid=" + campaign_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&omit_phone_code=" + omit_phone_code; + manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + dial_prefix + "&campaign_cid=" + campaign_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(manDiaLnext_query); @@ -3379,14 +3391,36 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var MDnextResponse_array=MDnextResponse.split("\n"); MDnextCID = MDnextResponse_array[0]; - if ( (MDnextCID == "HOPPER LEER") || (MDnextCID == "DNC NUMMER") ) + var regMNCvar = new RegExp("HOPPER","ig"); + var regMDFvarDNC = new RegExp("DNC","ig"); + var regMDFvarCAMP = new RegExp("CAMPLISTS","ig"); + if ( (MDnextCID.match(regMNCvar)) || (MDnextCID.match(regMDFvarDNC)) || (MDnextCID.match(regMDFvarCAMP)) ) { - if (MDnextCID == "HOPPER LEER") - {alert("Es sind keine Adressen im Hopper vorhanden:\n" + campaign);} - else - {alert("This phone number is in the DNC list:\n" + mdnPhonENumbeR);} + var alert_displayed=0; + alt_phone_dialing=starting_alt_phone_dialing; + auto_dial_level=starting_dial_level; + MainPanelToFront(); + CalLBacKsCounTCheck(); - document.getElementById("DiaLControl").innerHTML = "\"Nächste"; + if (MDnextCID.match(regMNCvar)) + {alert("Es sind für diese Kampagne keine aktiven Adressen mehr im Hopper:\n" + campaign); alert_displayed=1;} + if (MDnextCID.match(regMDFvarDNC)) + {alert("This phone number is in the DNC list:\n" + mdnPhonENumbeR); alert_displayed=1;} + if (MDnextCID.match(regMDFvarCAMP)) + {alert("This phone number is not in the campaign lists:\n" + mdnPhonENumbeR); alert_displayed=1;} + if (alert_displayed==0) + {alert("Unspecified error:\n" + mdnPhonENumbeR + "|" + MDnextCID); alert_displayed=1;} + + if (starting_dial_level == 0) + { + document.getElementById("DiaLControl").innerHTML = "\"Nächste"; + } + else + { + document.getElementById("MainStatuSSpan").style.background = panel_bgcolor; + document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML; + reselect_alt_dial = 0; + } } else { @@ -3486,8 +3520,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&source_id=" + source_id + '' + webform_session; -// $VICIWÄHLEN_web_QUERY_STRING =~ s/ /+/gi; -// $VICIWÄHLEN_web_QUERY_STRING =~ s/\`|\~|\:|\;|\#|\'|\"|\{|\}|\(|\)|\*|\^|\%|\$|\!|\%|\r|\t|\n//gi; +// $VICIDIAL_web_QUERY_STRING =~ s/ /+/gi; +// $VICIDIAL_web_QUERY_STRING =~ s/\`|\~|\:|\;|\#|\'|\"|\{|\}|\(|\)|\*|\^|\%|\$|\!|\%|\r|\t|\n//gi; var regWFspace = new RegExp(" ","ig"); web_form_vars = web_form_vars.replace(regWF, ''); @@ -3514,7 +3548,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {web_form_vars = '?' + web_form_vars} - document.getElementById("WebFormSpan").innerHTML = "\"Web\n"; + document.getElementById("WebFormSpan").innerHTML = "\"Web\n"; if (document.vicidial_form.LeadPreview.checked==false) { @@ -3522,7 +3556,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} MD_channel_look=1; custchannellive=1; - document.getElementById("HangupControl").innerHTML = "\"Kunden"; + document.getElementById("HangupControl").innerHTML = "\"Kunden"; if ( (campaign_recording == 'ALLCALLS') || (campaign_recording == 'ALLFORCE') ) {all_record = 'YES';} @@ -3574,7 +3608,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } else { - document.getElementById("DiaLControl").innerHTML = "\"Nächste"; + document.getElementById("DiaLControl").innerHTML = "\"Nächste"; var xmlhttp=false; /*@cc_on @*/ @@ -3651,7 +3685,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.getElementById("MainStatuSSpan").innerHTML = " Lead skipped, go an to next lead"; - document.getElementById("DiaLControl").innerHTML = "\"Nächste"; + document.getElementById("DiaLControl").innerHTML = "\"Nächste"; } } } @@ -3747,7 +3781,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { document.getElementById("MainStatuSSpan").innerHTML = " Telefonierend: " + status_display_number + " UID: " + MDnextCID + "   Warte auf Freizeichen..."; } - document.getElementById("HangupControl").innerHTML = "\"Kunden"; + document.getElementById("HangupControl").innerHTML = "\"Kunden"; if ( (campaign_recording == 'ALLCALLS') || (campaign_recording == 'ALLFORCE') ) {all_record = 'YES';} @@ -3999,7 +4033,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} VD_live_customer_call = 1; VD_live_call_secondS = 0; - // INSERT VICIWÄHLEN_LOG ENTRY FOR THIS ANRUF PROCESS + // INSERT VICIDIAL_LOG ENTRY FOR THIS ANRUF PROCESS // DialLog("start"); custchannellive=1; @@ -4070,22 +4104,22 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.getElementById("MainStatuSSpan").innerHTML = " Eingehend: " + status_display_number + " Group- " + VDIC_data_VDIG[1] + "   " + VDIC_fronter; } - document.getElementById("ParkControl").innerHTML ="\"Parke"; + document.getElementById("ParkControl").innerHTML ="\"Parke"; - document.getElementById("HangupControl").innerHTML = "\"Kunden"; + document.getElementById("HangupControl").innerHTML = "\"Kunden"; - document.getElementById("XferControl").innerHTML = "\"Transfer"; + document.getElementById("XferControl").innerHTML = "\"Transfer"; - document.getElementById("LocalCloser").innerHTML = "\"LOKALER"; + document.getElementById("LocalCloser").innerHTML = "\"LOKALE"; - document.getElementById("DialBlindTransfer").innerHTML = "\"Wähle"; + document.getElementById("DialBlindTransfer").innerHTML = "\"Verbinden"; document.getElementById("DialBlindVMail").innerHTML = "\"Blind"; if (lastcustserverip == server_ip) { - document.getElementById("VolumeUpSpan").innerHTML = ""; - document.getElementById("VolumeDownSpan").innerHTML = ""; + document.getElementById("VolumeUpSpan").innerHTML = ""; + document.getElementById("VolumeDownSpan").innerHTML = ""; } document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_OFF; @@ -4158,7 +4192,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {web_form_vars = '?' + web_form_vars} - document.getElementById("WebFormSpan").innerHTML = "\"Web\n"; + document.getElementById("WebFormSpan").innerHTML = "\"Web\n"; if ( (campaign_recording == 'ALLCALLS') || (campaign_recording == 'ALLFORCE') ) {all_record = 'YES';} @@ -4275,11 +4309,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (taskrefresh == 'OUT') { - document.getElementById("WebFormSpan").innerHTML = "\"Web\n"; + document.getElementById("WebFormSpan").innerHTML = "\"Web\n"; } else { - document.getElementById("WebFormSpan").innerHTML = "\"Web\n"; + document.getElementById("WebFormSpan").innerHTML = "\"Web\n"; } } @@ -4409,7 +4443,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} MD_ring_secondS = 0; CalLCID = ''; - // UPDATE VICIWÄHLEN_LOG ENTRY FOR THIS ANRUF PROCESS + // UPDATE VICIDIAL_LOG ENTRY FOR THIS ANRUF PROCESS DialLog("end"); if (dispowindow == 'NO') { @@ -4455,15 +4489,15 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} lastcustserverip=''; if( document.images ) { document.images['livecall'].src = image_livecall_OFF.src;} - document.getElementById("WebFormSpan").innerHTML = "\"Web"; - document.getElementById("ParkControl").innerHTML = "\"Parke"; - document.getElementById("HangupControl").innerHTML = "\"Kunden"; - document.getElementById("XferControl").innerHTML = "\"Transfer"; - document.getElementById("LocalCloser").innerHTML = "\"LOKALER"; - document.getElementById("DialBlindTransfer").innerHTML = "\"Wähle"; + document.getElementById("WebFormSpan").innerHTML = "\"Web"; + document.getElementById("ParkControl").innerHTML = "\"Parke"; + document.getElementById("HangupControl").innerHTML = "\"Kunden"; + document.getElementById("XferControl").innerHTML = "\"Transfer"; + document.getElementById("LocalCloser").innerHTML = "\"LOKALE"; + document.getElementById("DialBlindTransfer").innerHTML = "\"Verbinden"; document.getElementById("DialBlindVMail").innerHTML = "\"Blind"; - document.getElementById("VolumeUpSpan").innerHTML = ""; - document.getElementById("VolumeDownSpan").innerHTML = ""; + document.getElementById("VolumeUpSpan").innerHTML = ""; + document.getElementById("VolumeDownSpan").innerHTML = ""; document.vicidial_form.custdatetime.value = ''; @@ -4500,7 +4534,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } else { - document.getElementById("DiaLControl").innerHTML = "\"Nächste"; + document.getElementById("DiaLControl").innerHTML = "\"Nächste"; } reselect_alt_dial = 0; } @@ -4615,13 +4649,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.xferchannel.value = ""; lastxferchannel=''; - document.getElementById("Leave3WayCall").innerHTML ="\"3-WEGE"; + document.getElementById("Leave3WayCall").innerHTML ="\"NACHFRAGE"; - document.getElementById("DialWithCustomer").innerHTML ="\"Kunden"; + document.getElementById("DialWithCustomer").innerHTML ="\"mit"; document.getElementById("ParkCustomerDial").innerHTML ="\"Kundenanruf"; - document.getElementById("HangupXferLine").innerHTML ="\"Transferleitung"; + document.getElementById("HangupXferLine").innerHTML ="\"Nachfrage"; document.getElementById("HangupBothLines").innerHTML ="\"Beide"; } @@ -4782,7 +4816,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if ( (AutoDialWaiting == 1) || (VD_live_customer_call==1) || (alt_dial_active==1) ) { - alert("SIE MÜSSEN PAUSIERT WERDEN, UM Einen PAUSE CODE Im AUTO-WÄHLEN MODUSEINZUGEBEN"); + alert("SIE MÜSSEN PAUSIERT WERDEN, UM Einen PAUSE CODE Im AUTO-DIAL MODUS EINZUGEBEN"); } else { @@ -5068,7 +5102,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} dialedcall_send_hangup(); } // ################################################################################ -// Zeigen message that there are no voice channels in the VICIWÄHLEN session +// Zeigen message that there are no voice channels in the VICIDIAL session function NoneInSession() { showDiv('NoneInSessionBox'); @@ -5281,7 +5315,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (logout_stop_timeouts < 1) { LogouT(); - alert("PLEASE CLICK THE LOGOUT LINK TO LOG OUT NEXT TIME.\n"); + alert("BITTE NICHT VERGESSEN DEN LOGOUT KNOPF ZU BENÜTZEN.\n"); } } @@ -5296,7 +5330,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if (VD_live_customer_call==1) { - alert("NOCH EIN LIVE ANRUF! Beenden Sie ihn, dann können Sie sich abmelden.\n" + VD_live_customer_call); + alert("Abmelden während des Gespräches nicht möglich, bitte BEENDEN SIE ZUERST das Gespräch.\n" + VD_live_customer_call); } else { @@ -5961,7 +5995,7 @@ else if (document.vicidial_form.DiaLAltPhonE.checked==true) { reselect_alt_dial = 1; - document.getElementById("DiaLControl").innerHTML = "\"Nächste"; + document.getElementById("DiaLControl").innerHTML = "\"Nächste"; document.getElementById("MainStatuSSpan").innerHTML = "Dial Next Call"; } @@ -6163,7 +6197,7 @@ else start_all_refresh(); } function pause() // Pauses the refreshing of the lists - {active_display=2; display_message=" - AKTIVE ANZEIGE IN PAUSE - ";} + {active_display=2; display_message=" - AKTIVE ANZEIGE PAUSIERT - ";} function start() // resumes the refreshing of the lists {active_display=1; display_message='';} function faster() // lowers by 1000 milliseconds the time until the next refresh @@ -6258,7 +6292,7 @@ else } if (divvar == 'DiaLDiaLAltPhonE') { - var buildDivHTML = " ALTERNATIVE TELEFONNUMMER WÄHLEN
"; + var buildDivHTML = " ALT. NUMMER WÄHLEN
"; document.getElementById("DiaLDiaLAltPhonEHide").innerHTML = buildDivHTML; } } @@ -6279,7 +6313,7 @@ else if (divvar == 'DiaLDiaLAltPhonE') { document.getElementById("DiaLDiaLAltPhonEHide").innerHTML = ''; - var buildDivHTML = " ALTERNATIVE TELEFONNUMMER WÄHLEN
"; + var buildDivHTML = " ALT. NUMMER WÄHLEN
"; document.getElementById(divvar).innerHTML = buildDivHTML; if (reselect_alt_dial==1) {document.vicidial_form.DiaLAltPhonE.checked=true} @@ -6299,7 +6333,7 @@ else else { conf_channels_xtra_display = 0; - document.getElementById("busycallsdisplay").innerHTML = "Konferenz Informationen zeigen

 "; + document.getElementById("busycallsdisplay").innerHTML = "Konferenz Informationen anzeigen

 "; document.getElementById("outboundcallsspan").innerHTML = ''; LMAe[0]=''; LMAe[1]=''; LMAe[2]=''; LMAe[3]=''; LMAe[4]=''; LMAe[5]=''; LMAcount=0; @@ -6312,13 +6346,13 @@ else { showDiv('HotKeyEntriesBox'); hot_keys_active = 1; - document.getElementById("hotkeysdisplay").innerHTML = "\"TASTATURKÜRZEL"; + document.getElementById("hotkeysdisplay").innerHTML = "\"TASTATURKÜRZEL"; } else { hideDiv('HotKeyEntriesBox'); hot_keys_active = 0; - document.getElementById("hotkeysdisplay").innerHTML = "\"TASTATURKÜRZEL"; + document.getElementById("hotkeysdisplay").innerHTML = "\"TASTATURKÜRZEL"; } } @@ -6334,7 +6368,7 @@ else document.getElementById("TransferMain").style.top = xfer_height; HKbutton_allowed = 0; showDiv('TransferMain'); - document.getElementById("XferControl").innerHTML = "\"Transfer"; + document.getElementById("XferControl").innerHTML = "\"Transfer"; var loop_ct = 0; var live_XfeR_HTML = ''; var XfeR_SelecT = ''; @@ -6355,7 +6389,7 @@ else hideDiv('TransferMain'); if (showoffvar == 'YES') { - document.getElementById("XferControl").innerHTML = "\"Transfer"; + document.getElementById("XferControl").innerHTML = "\"Transfer"; } } } @@ -6439,7 +6473,8 @@ else .skb_text {font-size: 13px; font-family: sans-serif; font-weight: bold;} .ON_conf {font-size: 11px; font-family: monospace; color: black; background: #FFFF99} .OFF_conf {font-size: 11px; font-family: monospace; color: black; background: #FFCC77} - .cust_form {font-family: sans-serif; font-size: 10px; overflow: auto} + .cust_form {font-family: sans-serif; font-size: 10px; overflow: hidden} + .cust_form_text {font-family: sans-serif; font-size: 10px; overflow: auto} --> @@ -6451,7 +6486,7 @@ echo "\n"; -
#ENTFERNTE LEITUNGAUFLEGENLAUTSTÄRKE
" + loop_ct + "" + channelfieldA + "AUFLEGEN          
" + loop_ct + "" + channelfieldA + "AUFLEGEN          
MARGINWIDTH=0 MARGINHEIGHT=0 LEFTMARGIN=0 TOPMARGIN=0 VALIGN=TOP ALIGN=LEFT> +
MARGINWIDTH=0 MARGINHEIGHT=0 LEFTMARGIN=0 TOPMARGIN=0 VALIGN=TOP ALIGN=LEFT> - +
@@ -6463,21 +6498,21 @@ echo "\n"; height=30> - - + + - +
VICIWÄHLENSCRIPTVICIDIALSCRIPT VALIGN=MIDDLE ALIGN=CENTER>   LIVE     Session ID:     Live AnrufLive Anruf
- height=>

VICIWÄHLEN
+ height=>

VICIDIAL
-MANUELLER ANRUF       SCHNELLER VORWAHLKNOPF
+MANUELLER ANRUF       SCHNELL WAHL
@@ -6519,7 +6554,7 @@ echo "\n"; \n"; + echo "Anmerkung: eine Vorwahl für $dial_prefix wird dem Anfang dieser Telefonnummer hinzugefügt
\n"; } ?> Note: all new manual dial leads will go into list

@@ -6536,7 +6571,7 @@ echo "\n";
  (Wenn diese Option ausgewählt ist, wird versucht, die Telefonnummer im System zu finden, bevor eine neue Adresse eingefügt wird)


Wenn Sie eine Nummer wählen möchten, die nicht in der Adressliste aufgenommen werden soll, müssen die genaue Nummer in das WÄHLVORGANG OVERRIDE Feld eintragen. Um diesen Anruf aufzulegen, müssen Sie auf den ANRUFS IN THIS SESSION Link klicken, und dann mit dem Leitung Link den Anruf zu beenden..
 


Wenn Sie eine Nummer wählen möchten, die nicht in der Adressliste aufgenommen werden soll, müssen die genaue Nummer in das WÄHL OVERRIDE Feld eintragen. Um diesen Anruf dann aufzulegen, müssen Sie auf den VERBINDUNGEN IN DIESER SITZUNG Link klicken, und dann über die Auswahl der Leitung den entsprechenden Anruf zu beenden..
 
Wahl Override:   (Bitte nur Zahlen) @@ -6551,7 +6586,7 @@ echo "\n"; -
+
@@ -6570,17 +6605,17 @@ Ihr Status:
Calls Dialing:
- LOKALER SUPERVISOR - Transferleitung auflegen + LOKALE SUPERVISOR NACHFRAGE + Nachfrage auflegen Beide Leitungen auflegen
Anzurufende Telefonnummer   - WÄHLVORGANG OVERRIDE   - 3-WEGE ANRUF VERLASSEN - Wähle blinden Transfer + WÄHL OVERRIDE   + NACHFRAGE VERLASSEN + Verbinden ohne Nachfrage D1 D2 @@ -6588,7 +6623,7 @@ Ihr Status:
Calls Dialing:   channel - Kunden anrufen + mit Kunde wählen Kundenanruf parken Blind Transfer VMail Message @@ -6657,7 +6692,7 @@ Ihr Status:
Calls Dialing: - height=550>
Anruf Nachbereitung Verbleibende Sekunden der Nachbereitung

+ height=550>
Anruf Nachbereitung: Verbleibende Sekunden der Nachbereitung



Beende Nachbereitung und mache weiter @@ -6666,7 +6701,7 @@ Ihr Status:
Calls Dialing: - height=500>
Ihr Lernabschnitt ist gesperrt worden
LOGOUT

Zurück + height=500>
Ihre Sitzung ist gesperrt worden
LOGOUT

Zurück
@@ -6687,7 +6722,7 @@ Ihr Status:
Calls Dialing: - height=460>
ABSCHLUSS ANRUF :       Wieder Auflegen       minimieren
+ height=460>
ANRUF ABSCHLIESSEN :       Wieder Auflegen       minimieren
Gesprächsergebnis Auswahl
WÄHLPAUSE
@@ -6700,7 +6735,7 @@ Ihr Status:
Calls Dialing: - height=460>
WÄHLEN Sie Einen PAUSE CODE Vor :
+ height=460>
WÄHLEN Sie Einen PAUSE CODE :
Pause Code Selection

  @@ -6708,7 +6743,7 @@ Ihr Status:
Calls Dialing: - height=460>
Wählen Sie ein Rückrufadatum :
+ height=460>\r\n"; - print " \r\n"; + print " \r\n"; + print " \r\n"; + print " \r\n"; } - print " \r\n"; - print " \r\n"; - - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; } } else if (!eregi(".csv", $leadfile_name)) @@ -1393,54 +1365,22 @@ if ($leadfile) { $total=0; $good=0; $bad=0; $dup=0; $post=0; $phone_list=''; $row=fgetcsv($file, 1000, ","); for ($i=0; $i\r\n"; - print " \r\n"; - print " \r\n"; + print " \r\n"; + print " \r\n"; + print " \r\n"; } - - print " \r\n"; - print " \r\n"; - - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; } } print " \r\n"; @@ -2090,4 +2030,6 @@ if (!$AC_processed) } return $gmt_offset; -} \ No newline at end of file +} + +?> diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_de/admin.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_de/admin.php index b209a00a..996ab30c 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_de/admin.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_de/admin.php @@ -1159,11 +1159,12 @@ $list_mix_container = ereg_replace(";","",$list_mix_container); # 71125-1751 - Added allowable transfer groups to campaign detail screen # 80330-0814 - Added CBHOLD block on selecting, added user stats/status links # 80424-0442 - Added non_latin system_settings lookup at top to override dbconnect setting -# +# 81011-0855 - Version marker for 2.0.5.1rc5 release +# # make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time -$admin_version = '2.0.4-121'; -$build = '80424-0442'; +$admin_version = '2.0.4-122'; +$build = '81011-0855'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_de/new_listloader_superL.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_de/new_listloader_superL.php index e5880f87..65cd1623 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_de/new_listloader_superL.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_de/new_listloader_superL.php @@ -21,11 +21,13 @@ # 70510-1518 - Added campaign and system duplicate check and phonecode override # 80428-0417 - UTF8 changes # 80514-1030 - removed filesize limit and raised number of errors to be displayed +# 81011-2009 - a few bug fixes # + # make sure vicidial_list exists and that your file follows the formatting correctly. This page does not dedupe or do any other lead filtering actions yet at this time. -$version = '2.0.4-25'; -$build = '80514-1030'; +$version = '2.0.4-26'; +$build = '81011-2009'; require("dbconnect.php"); @@ -49,6 +51,7 @@ if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} if (isset($_GET["leadfile_name"])) {$leadfile_name=$_GET["leadfile_name"];} elseif (isset($_POST["leadfile_name"])) {$leadfile_name=$_POST["leadfile_name"];} +if (isset($_FILES["leadfile"])) {$leadfile_name=$_FILES["leadfile"]['name'];} if (isset($_GET["file_layout"])) {$file_layout=$_GET["file_layout"];} elseif (isset($_POST["file_layout"])) {$file_layout=$_POST["file_layout"];} if (isset($_GET["OK_to_process"])) {$OK_to_process=$_GET["OK_to_process"];} @@ -1291,54 +1294,23 @@ if ($leadfile) { for ($i=0; $i\r\n"; - print " \r\n"; - print " \r\n"; + print " \r\n"; + print " \r\n"; + print " \r\n"; } - print " \r\n"; - print " \r\n"; - - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; } } else if (!eregi(".csv", $leadfile_name)) @@ -1393,54 +1365,22 @@ if ($leadfile) { $total=0; $good=0; $bad=0; $dup=0; $post=0; $phone_list=''; $row=fgetcsv($file, 1000, ","); for ($i=0; $i\r\n"; - print " \r\n"; - print " \r\n"; + print " \r\n"; + print " \r\n"; + print " \r\n"; } - - print " \r\n"; - print " \r\n"; - - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; } } print " \r\n"; @@ -2090,4 +2030,6 @@ if (!$AC_processed) } return $gmt_offset; -} \ No newline at end of file +} + +?> diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_el/admin.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_el/admin.php index 8901edb6..abb778f6 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_el/admin.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_el/admin.php @@ -1159,11 +1159,12 @@ $list_mix_container = ereg_replace(";","",$list_mix_container); # 71125-1751 - Added allowable transfer groups to campaign detail screen # 80330-0814 - Added CBHOLD block on selecting, added user stats/status links # 80424-0442 - Added non_latin system_settings lookup at top to override dbconnect setting -# +# 81011-0855 - Version marker for 2.0.5.1rc5 release +# # make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time -$admin_version = '2.0.4-121'; -$build = '80424-0442'; +$admin_version = '2.0.4-122'; +$build = '81011-0855'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_el/new_listloader_superL.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_el/new_listloader_superL.php index ead8b1d3..442f2823 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_el/new_listloader_superL.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_el/new_listloader_superL.php @@ -21,11 +21,13 @@ # 70510-1518 - Added campaign and system duplicate check and phonecode override # 80428-0417 - UTF8 changes # 80514-1030 - removed filesize limit and raised number of errors to be displayed +# 81011-2009 - a few bug fixes # + # make sure vicidial_list exists and that your file follows the formatting correctly. This page does not dedupe or do any other lead filtering actions yet at this time. -$version = '2.0.4-25'; -$build = '80514-1030'; +$version = '2.0.4-26'; +$build = '81011-2009'; require("dbconnect.php"); @@ -49,6 +51,7 @@ if (isset($_GET["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET[" elseif (isset($_POST["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];} if (isset($_GET["leadfile_name"])) {$leadfile_name=$_GET["leadfile_name"];} elseif (isset($_POST["leadfile_name"])) {$leadfile_name=$_POST["leadfile_name"];} +if (isset($_FILES["leadfile"])) {$leadfile_name=$_FILES["leadfile"]['name'];} if (isset($_GET["file_layout"])) {$file_layout=$_GET["file_layout"];} elseif (isset($_POST["file_layout"])) {$file_layout=$_POST["file_layout"];} if (isset($_GET["OK_to_process"])) {$OK_to_process=$_GET["OK_to_process"];} @@ -1291,54 +1294,23 @@ if ($leadfile) { for ($i=0; $i\r\n"; - print " \r\n"; - print " \r\n"; + print " \r\n"; + print " \r\n"; + print " \r\n"; } - print " \r\n"; - print " \r\n"; - - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; } } else if (!eregi(".csv", $leadfile_name)) @@ -1393,54 +1365,22 @@ if ($leadfile) { $total=0; $good=0; $bad=0; $dup=0; $post=0; $phone_list=''; $row=fgetcsv($file, 1000, ","); for ($i=0; $i\r\n"; - print " \r\n"; - print " \r\n"; + print " \r\n"; + print " \r\n"; + print " \r\n"; } - - print " \r\n"; - print " \r\n"; - - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; } } print " \r\n"; @@ -2090,4 +2030,6 @@ if (!$AC_processed) } return $gmt_offset; -} \ No newline at end of file +} + +?> diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_es/admin.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_es/admin.php index 8a6a5b04..356455f5 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_es/admin.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_es/admin.php @@ -1159,11 +1159,12 @@ $list_mix_container = ereg_replace(";","",$list_mix_container); # 71125-1751 - Added allowable transfer groups to campaign detail screen # 80330-0814 - Added CBHOLD block on selecting, added user stats/status links # 80424-0442 - Added non_latin system_settings lookup at top to override dbconnect setting -# +# 81011-0855 - Version marker for 2.0.5.1rc5 release +# # make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time -$admin_version = '2.0.4-121'; -$build = '80424-0442'; +$admin_version = '2.0.4-122'; +$build = '81011-0855'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_es/new_listloader_superL.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_es/new_listloader_superL.php index 814667ce..fe32f04b 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_es/new_listloader_superL.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_es/new_listloader_superL.php @@ -21,11 +21,13 @@ # 70510-1518 - Added campaign and system duplicate check and phonecode override # 80428-0417 - UTF8 changes # 80514-1030 - removed filesize limit and raised number of errors to be displayed +# 81011-2009 - a few bug fixes # + # make sure vicidial_list exists and that your file follows the formatting correctly. This page does not dedupe or do any other lead filtering actions yet at this time. -$version = '2.0.4-25'; -$build = '80514-1030'; +$version = '2.0.4-26'; +$build = '81011-2009'; require("dbconnect.php"); @@ -49,6 +51,7 @@ if (isset($_GET["ENVIAR"])) {$ENVIAR=$_GET["ENVIAR"];} elseif (isset($_POST["ENVIAR"])) {$ENVIAR=$_POST["ENVIAR"];} if (isset($_GET["leadfile_name"])) {$leadfile_name=$_GET["leadfile_name"];} elseif (isset($_POST["leadfile_name"])) {$leadfile_name=$_POST["leadfile_name"];} +if (isset($_FILES["leadfile"])) {$leadfile_name=$_FILES["leadfile"]['name'];} if (isset($_GET["file_layout"])) {$file_layout=$_GET["file_layout"];} elseif (isset($_POST["file_layout"])) {$file_layout=$_POST["file_layout"];} if (isset($_GET["OK_to_process"])) {$OK_to_process=$_GET["OK_to_process"];} @@ -1291,54 +1294,23 @@ if ($leadfile) { for ($i=0; $i\r\n"; - print " \r\n"; - print " \r\n"; + print " \r\n"; + print " \r\n"; + print " \r\n"; } - print " \r\n"; - print " \r\n"; - - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; } } else if (!eregi(".csv", $leadfile_name)) @@ -1393,54 +1365,22 @@ if ($leadfile) { $total=0; $good=0; $bad=0; $dup=0; $post=0; $phone_list=''; $row=fgetcsv($file, 1000, ","); for ($i=0; $i\r\n"; - print " \r\n"; - print " \r\n"; + print " \r\n"; + print " \r\n"; + print " \r\n"; } - - print " \r\n"; - print " \r\n"; - - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; } } print " \r\n"; @@ -2090,4 +2030,6 @@ if (!$AC_processed) } return $gmt_offset; -} \ No newline at end of file +} + +?> diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/admin.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/admin.php index a02adf59..30acb1c1 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/admin.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/admin.php @@ -1159,11 +1159,12 @@ $list_mix_container = ereg_replace(";","",$list_mix_container); # 71125-1751 - Added allowable transfer groups to campaign detail screen # 80330-0814 - Added CBHOLD block on selecting, added user stats/status links # 80424-0442 - Added non_latin system_settings lookup at top to override dbconnect setting -# +# 81011-0855 - Version marker for 2.0.5.1rc5 release +# # make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time -$admin_version = '2.0.4-121'; -$build = '80424-0442'; +$admin_version = '2.0.4-122'; +$build = '81011-0855'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/new_listloader_superL.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/new_listloader_superL.php index 1ccb3472..6f68e3d0 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/new_listloader_superL.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/new_listloader_superL.php @@ -21,11 +21,13 @@ # 70510-1518 - Added campaign and system duplicate check and phonecode override # 80428-0417 - UTF8 changes # 80514-1030 - removed filesize limit and raised number of errors to be displayed +# 81011-2009 - a few bug fixes # + # make sure vicidial_list exists and that your file follows the formatting correctly. This page does not dedupe or do any other lead filtering actions yet at this time. -$version = '2.0.4-25'; -$build = '80514-1030'; +$version = '2.0.4-26'; +$build = '81011-2009'; require("dbconnect.php"); @@ -49,6 +51,7 @@ if (isset($_GET["INVIA"])) {$INVIA=$_GET["INVIA"];} elseif (isset($_POST["INVIA"])) {$INVIA=$_POST["INVIA"];} if (isset($_GET["leadfile_name"])) {$leadfile_name=$_GET["leadfile_name"];} elseif (isset($_POST["leadfile_name"])) {$leadfile_name=$_POST["leadfile_name"];} +if (isset($_FILES["leadfile"])) {$leadfile_name=$_FILES["leadfile"]['name'];} if (isset($_GET["file_layout"])) {$file_layout=$_GET["file_layout"];} elseif (isset($_POST["file_layout"])) {$file_layout=$_POST["file_layout"];} if (isset($_GET["OK_to_process"])) {$OK_to_process=$_GET["OK_to_process"];} @@ -1291,54 +1294,23 @@ if ($leadfile) { for ($i=0; $i\r\n"; - print " \r\n"; - print " \r\n"; + print " \r\n"; + print " \r\n"; + print " \r\n"; } - print " \r\n"; - print " \r\n"; - - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; } } else if (!eregi(".csv", $leadfile_name)) @@ -1393,54 +1365,22 @@ if ($leadfile) { $total=0; $good=0; $bad=0; $dup=0; $post=0; $phone_list=''; $row=fgetcsv($file, 1000, ","); for ($i=0; $i\r\n"; - print " \r\n"; - print " \r\n"; + print " \r\n"; + print " \r\n"; + print " \r\n"; } - - print " \r\n"; - print " \r\n"; - - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; - #print " \r\n"; } } print " \r\n"; @@ -2090,4 +2030,6 @@ if (!$AC_processed) } return $gmt_offset; -} \ No newline at end of file +} + +?> diff --git a/agc_2-X/branches/agc_2.0.4/UPGRADE b/agc_2-X/branches/agc_2.0.4/UPGRADE index e1d7bcb9..ab0809d2 100644 --- a/agc_2-X/branches/agc_2.0.4/UPGRADE +++ b/agc_2-X/branches/agc_2.0.4/UPGRADE @@ -49,6 +49,13 @@ INSERT INTO vicidial_phone_codes (country_code, country, areacode, state, GMT_of 8. Added calls in queue display to vicidial.php agent screen +9. New Slovak translation for the agent screen, as well as new German agent + screen translation and new German buttons for the agent screen + +10. New Welcome demo screen with links to all translations of agent and admin + screens + + diff --git a/agc_2-X/branches/agc_2.0.4/translations/de_language.txt b/agc_2-X/branches/agc_2.0.4/translations/de_language.txt index 899ac3dc..13599ac6 100644 --- a/agc_2-X/branches/agc_2.0.4/translations/de_language.txt +++ b/agc_2-X/branches/agc_2.0.4/translations/de_language.txt @@ -36,7 +36,7 @@ agc|htglobalize.php|1 "NOV"|"NOV"| "DEC"|"DEZ"| \./images/|../agc/images/| -BORDER|BORDER| +BORDER|Border| VALUE=SUBMIT|VALUE=SUBMIT| TYPE=SUBMIT|TYPE=Submit| MAXLENGTH|maxlength| diff --git a/agc_2-X/branches/agc_2.0.4/www/vicidial/welcome_demo.php b/agc_2-X/branches/agc_2.0.4/www/vicidial/welcome_demo.php index 64aedcb3..0f0ace77 100644 --- a/agc_2-X/branches/agc_2.0.4/www/vicidial/welcome_demo.php +++ b/agc_2-X/branches/agc_2.0.4/www/vicidial/welcome_demo.php @@ -19,34 +19,34 @@ echo "
Wählen Sie ein Rückrufdatum :
Wählen Sie unten ein Datum   @@ -6764,7 +6799,7 @@ Ihr Status:
Calls Dialing: height=460>
SUPERVISOR INBOUND GRUPPENWAHL
Supervisor Inbound Gruppenwahl
- GEMISCHTES ANRUFEN(Outbound aktiviert)
+ INBOUND und OUTBOUND(Outbound aktiviert)
ZURÜCKSETZEN | ÜBERNEHMEN



  @@ -6783,18 +6818,18 @@ Ihr Status:
Calls Dialing: - height=>
VICIWÄHLEN SCRIPT
+ height=>
VICIDIAL SCRIPT
0) && ( ($user_level>=$HKuser_level) or ($VU_hotkeys_active > 0) ) ) { ?> -TASTATURKÜRZEL DEAKTIVIERT +TASTATURKÜRZEL DEAKTIVIERT ->
VICIWÄHLEN Web-Client Version:     BUILD:               Server:              
-Konferenz Informationen zeigen

 
+> @@ -6807,42 +6842,42 @@ Ihr Status:
Calls Dialing:
VICIDIAL Web-Client Version:     BUILD:               Server:              
+Konferenz Informationen anzeigen

 
id="MainTable"> @@ -6879,7 +6914,7 @@ Aufzeichnugs ID:
- + @@ -6889,7 +6924,7 @@ Aufzeichnugs ID:
\n";} + {echo "\n";} else {echo "\n";} ?> @@ -6910,7 +6945,7 @@ else - +
STATUS:
-Nächste Nummer wählen
+Nächste Nummer wählen
ADRESSEN VORSCHAU
- ALTERNATIVE TELEFONNUMMER WÄHLEN
+ ALT. NUMMER WÄHLEN
Aufzeichnungsdatei:

-Aufzeichnugs ID:
+Aufzeichnungs ID:
-Starte Aufnahme
+Starte Aufnahme

-Web Formular
+Web Formular

-Parke Anruf
-Transfer - Konferenz
+Parke Anruf
+Transfer - Konferenz

-Kunden auflegen
+Kunden auflegen

-
Senden Sie DTMF

+
DTMF Senden

  Anbieter ID:
Telefon:   Vorwahl:   Alternative Telefonnummer:   LandesCode:   Alternative Telefonnummer:
Zeigen:   Email:
diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_el/vdc_db_query.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_el/vdc_db_query.php index 30401901..0201bab1 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_el/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_el/vdc_db_query.php @@ -70,6 +70,7 @@ # - $omit_phone_code - ('Y','N') # - $no_delete_sessions - ('0','1') # - $LogouTKicKAlL - ('0','1'); +# - $manual_dial_filter = ('NONE','CAMPLISTS','DNC','CAMPLISTS_DNC'); # CHANGELOG: # 50629-1044 - First build of script @@ -143,10 +144,12 @@ # 80128-1159 - fixed vicidial_log bugs # 80402-0121 - Fixes for manual dial transfers on some systems, removed /n persist flag # 80424-0442 - Added non_latin lookup from system_settings +# 80722-1000 - Fixed small bugs +# 80815-1020 - Added manual dial list restriction option # -$version = '2.0.4-69'; -$build = '80424-0442'; +$version = '2.0.4-71'; +$build = '80815-1020'; require("dbconnect.php"); @@ -281,6 +284,8 @@ if (isset($_GET["status"])) {$status=$_GET["status"];} elseif (isset($_POST["status"])) {$status=$_POST["status"];} if (isset($_GET["LogouTKicKAlL"])) {$LogouTKicKAlL=$_GET["LogouTKicKAlL"];} elseif (isset($_POST["LogouTKicKAlL"])) {$LogouTKicKAlL=$_POST["LogouTKicKAlL"];} +if (isset($_GET["manual_dial_filter"])) {$manual_dial_filter=$_GET["manual_dial_filter"];} + elseif (isset($_POST["manual_dial_filter"])) {$manual_dial_filter=$_POST["manual_dial_filter"];} header ("Content-type: text/html; charset=utf-8"); @@ -573,6 +578,33 @@ if ($ACTION == 'manDiaLnextCaLL') exit; } } + if (ereg("CAMPLISTS",$manual_dial_filter)) + { + $stmt="SELECT list_id,active from vicidial_lists where campaign_id='$campaign'"; + $rslt=mysql_query($stmt, $link); + $lists_to_parse = mysql_num_rows($rslt); + $camp_lists=''; + $o=0; + while ($lists_to_parse > $o) + { + $rowx=mysql_fetch_row($rslt); + if (ereg("Y", $rowx[1])) {$active_lists++; $camp_lists .= "'$rowx[0]',";} + if (ereg("N", $rowx[1])) {$inactive_lists++;} + $o++; + } + $camp_lists = eregi_replace(".$","",$camp_lists); + + $stmt="SELECT count(*) FROM vicidial_list where phone_number='$phone_number' and list_id IN($camp_lists);"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $row=mysql_fetch_row($rslt); + + if ($row[0] < 1) + { + echo "ΑΡΙΘΜΟΣ NOT IN CAMPLISTS\n"; + exit; + } + } if ($stage=='lookup') { $stmt="SELECT lead_id FROM vicidial_list where phone_number='$phone_number' order by modify_date desc LIMIT 1;"; diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_el/vicidial.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_el/vicidial.php index f9c10869..0eb12a6e 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_el/vicidial.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_el/vicidial.php @@ -177,10 +177,14 @@ # 80428-0413 - UTF8 changes and testing # 80507-0932 - Fixed Script display bug (+ instead of space) # 80519-1425 - Added calls in queue display +# 80722-1000 - Fixed quote display bug +# 80815-1015 - Added manual dial list restriction option +# 80823-2127 - Fixed form scroll for IE +# 81012-0857 - Marker for 2.0.4.1rc5 release # -$version = '2.0.4-148'; -$build = '80519-1425'; +$version = '2.0.4-152'; +$build = '81012-0857'; require("dbconnect.php"); @@ -285,6 +289,7 @@ $PreseT_DiaL_LinKs = '1'; # set to 1 to show a ΚΛΗΣΗ link for Dial Presets $LogiNAJAX = '1'; # set to 1 to do lookups $HidEMonitoRSessionS = '1'; # set to 1 to hide remote monitoring channels from "session calls" $LogouTKicKAlL = '1'; # set to 1 to hangup all calls in session upon agent logout +$CamPManDiaLLocK = '0'; # set to 1 to lock out all manual dials to only numbers in camp lists $TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen @@ -348,6 +353,11 @@ echo "\n"; echo "\n"; echo "\n"; +if ($CamPManDiaLLocK > 0) + {$manual_dial_filter = "CAMPLISTS_ONLY";} +else + {$manual_dial_filter = "NONE";} + if ($campaign_login_list > 0) { $camp_form_code = "\n";} else {echo "\n";} ?> diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_es/vdc_db_query.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_es/vdc_db_query.php index 42a93d8d..4ae5099f 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_es/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_es/vdc_db_query.php @@ -70,6 +70,7 @@ # - $omit_phone_code - ('Y','N') # - $no_delete_sessions - ('0','1') # - $LogouTKicKAlL - ('0','1'); +# - $manual_dial_filter = ('NONE','CAMPLISTS','DNC','CAMPLISTS_DNC'); # CHANGELOG: # 50629-1044 - First build of script @@ -143,10 +144,12 @@ # 80128-1159 - fixed vicidial_log bugs # 80402-0121 - Fixes for manual dial transfers on some systems, removed /n persist flag # 80424-0442 - Added non_latin lookup from system_settings +# 80722-1000 - Fixed small bugs +# 80815-1020 - Added manual dial list restriction option # -$version = '2.0.4-69'; -$build = '80424-0442'; +$version = '2.0.4-71'; +$build = '80815-1020'; require("dbconnect.php"); @@ -281,6 +284,8 @@ if (isset($_GET["status"])) {$status=$_GET["status"];} elseif (isset($_POST["status"])) {$status=$_POST["status"];} if (isset($_GET["LogouTKicKAlL"])) {$LogouTKicKAlL=$_GET["LogouTKicKAlL"];} elseif (isset($_POST["LogouTKicKAlL"])) {$LogouTKicKAlL=$_POST["LogouTKicKAlL"];} +if (isset($_GET["manual_dial_filter"])) {$manual_dial_filter=$_GET["manual_dial_filter"];} + elseif (isset($_POST["manual_dial_filter"])) {$manual_dial_filter=$_POST["manual_dial_filter"];} header ("Content-type: text/html; charset=utf-8"); @@ -573,6 +578,33 @@ if ($ACTION == 'manDiaLnextCaLL') exit; } } + if (ereg("CAMPLISTS",$manual_dial_filter)) + { + $stmt="SELECT list_id,active from vicidial_lists where campaign_id='$campaign'"; + $rslt=mysql_query($stmt, $link); + $lists_to_parse = mysql_num_rows($rslt); + $camp_lists=''; + $o=0; + while ($lists_to_parse > $o) + { + $rowx=mysql_fetch_row($rslt); + if (ereg("Y", $rowx[1])) {$active_lists++; $camp_lists .= "'$rowx[0]',";} + if (ereg("N", $rowx[1])) {$inactive_lists++;} + $o++; + } + $camp_lists = eregi_replace(".$","",$camp_lists); + + $stmt="SELECT count(*) FROM vicidial_list where phone_number='$phone_number' and list_id IN($camp_lists);"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $row=mysql_fetch_row($rslt); + + if ($row[0] < 1) + { + echo "NÚMERO NOT IN CAMPLISTS\n"; + exit; + } + } if ($stage=='lookup') { $stmt="SELECT lead_id FROM vicidial_list where phone_number='$phone_number' order by modify_date desc LIMIT 1;"; diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_es/vicidial.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_es/vicidial.php index 0e86d7d7..78bf33b4 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_es/vicidial.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_es/vicidial.php @@ -177,10 +177,14 @@ # 80428-0413 - UTF8 changes and testing # 80507-0932 - Fixed Script display bug (+ instead of space) # 80519-1425 - Added calls in queue display +# 80722-1000 - Fixed quote display bug +# 80815-1015 - Added manual dial list restriction option +# 80823-2127 - Fixed form scroll for IE +# 81012-0857 - Marker for 2.0.4.1rc5 release # -$version = '2.0.4-148'; -$build = '80519-1425'; +$version = '2.0.4-152'; +$build = '81012-0857'; require("dbconnect.php"); @@ -285,6 +289,7 @@ $PreseT_DiaL_LinKs = '1'; # set to 1 to show a DIAL link for Dial Presets $LogiNAJAX = '1'; # set to 1 to do lookups $HidEMonitoRSessionS = '1'; # set to 1 to hide remote monitoring channels from "session calls" $LogouTKicKAlL = '1'; # set to 1 to hangup all calls in session upon agent logout +$CamPManDiaLLocK = '0'; # set to 1 to lock out all manual dials to only numbers in camp lists $TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen @@ -348,6 +353,11 @@ echo "\n"; echo "\n"; echo "\n"; +if ($CamPManDiaLLocK > 0) + {$manual_dial_filter = "CAMPLISTS_ONLY";} +else + {$manual_dial_filter = "NONE";} + if ($campaign_login_list > 0) { $camp_form_code = "\n";} else {echo "\n";} ?> diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_fr/vdc_db_query.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_fr/vdc_db_query.php index 302c9ebf..fd4adad7 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_fr/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_fr/vdc_db_query.php @@ -70,6 +70,7 @@ # - $omit_phone_code - ('Y','N') # - $no_delete_sessions - ('0','1') # - $LogouTKicKAlL - ('0','1'); +# - $manual_dial_filter = ('NONE','CAMPLISTS','DNC','CAMPLISTS_DNC'); # CHANGELOG: # 50629-1044 - First build of script @@ -143,10 +144,12 @@ # 80128-1159 - fixed vicidial_log bugs # 80402-0121 - Fixes for manual dial transfers on some systems, removed /n persist flag # 80424-0442 - Added non_latin lookup from system_settings +# 80722-1000 - Fixed small bugs +# 80815-1020 - Added manual dial list restriction option # -$version = '2.0.4-69'; -$build = '80424-0442'; +$version = '2.0.4-71'; +$build = '80815-1020'; require("dbconnect.php"); @@ -281,6 +284,8 @@ if (isset($_GET["status"])) {$status=$_GET["status"];} elseif (isset($_POST["status"])) {$status=$_POST["status"];} if (isset($_GET["LogouTKicKAlL"])) {$LogouTKicKAlL=$_GET["LogouTKicKAlL"];} elseif (isset($_POST["LogouTKicKAlL"])) {$LogouTKicKAlL=$_POST["LogouTKicKAlL"];} +if (isset($_GET["manual_dial_filter"])) {$manual_dial_filter=$_GET["manual_dial_filter"];} + elseif (isset($_POST["manual_dial_filter"])) {$manual_dial_filter=$_POST["manual_dial_filter"];} header ("Content-type: text/html; charset=utf-8"); @@ -573,6 +578,33 @@ if ($ACTION == 'manDiaLnextCaLL') exit; } } + if (ereg("CAMPLISTS",$manual_dial_filter)) + { + $stmt="SELECT list_id,active from vicidial_lists where campaign_id='$campaign'"; + $rslt=mysql_query($stmt, $link); + $lists_to_parse = mysql_num_rows($rslt); + $camp_lists=''; + $o=0; + while ($lists_to_parse > $o) + { + $rowx=mysql_fetch_row($rslt); + if (ereg("Y", $rowx[1])) {$active_lists++; $camp_lists .= "'$rowx[0]',";} + if (ereg("N", $rowx[1])) {$inactive_lists++;} + $o++; + } + $camp_lists = eregi_replace(".$","",$camp_lists); + + $stmt="SELECT count(*) FROM vicidial_list where phone_number='$phone_number' and list_id IN($camp_lists);"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $row=mysql_fetch_row($rslt); + + if ($row[0] < 1) + { + echo "NOMBRE NOT IN CAMPLISTS\n"; + exit; + } + } if ($stage=='lookup') { $stmt="SELECT lead_id FROM vicidial_list where phone_number='$phone_number' order by modify_date desc LIMIT 1;"; diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_fr/vicidial.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_fr/vicidial.php index dc40d7d7..89524b5c 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_fr/vicidial.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_fr/vicidial.php @@ -177,10 +177,14 @@ # 80428-0413 - UTF8 changes and testing # 80507-0932 - Fixed Script display bug (+ instead of space) # 80519-1425 - Added calls in queue display +# 80722-1000 - Fixed quote display bug +# 80815-1015 - Added manual dial list restriction option +# 80823-2127 - Fixed form scroll for IE +# 81012-0857 - Marker for 2.0.4.1rc5 release # -$version = '2.0.4-148'; -$build = '80519-1425'; +$version = '2.0.4-152'; +$build = '81012-0857'; require("dbconnect.php"); @@ -285,6 +289,7 @@ $PreseT_DiaL_LinKs = '1'; # set to 1 to show a COMPOSER link for Dial Presets $LogiNAJAX = '1'; # set to 1 to do lookups $HidEMonitoRSessionS = '1'; # set to 1 to hide remote monitoring channels from "session calls" $LogouTKicKAlL = '1'; # set to 1 to hangup all calls in session upon agent logout +$CamPManDiaLLocK = '0'; # set to 1 to lock out all manual dials to only numbers in camp lists $TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen @@ -348,6 +353,11 @@ echo "\n"; echo "\n"; echo "\n"; +if ($CamPManDiaLLocK > 0) + {$manual_dial_filter = "CAMPLISTS_ONLY";} +else + {$manual_dial_filter = "NONE";} + if ($campaign_login_list > 0) { $camp_form_code = "\n";} else {echo "\n";} ?> diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/vdc_db_query.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/vdc_db_query.php index 82ee3b7a..9d48c7ff 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/vdc_db_query.php @@ -70,6 +70,7 @@ # - $omit_phone_code - ('Y','N') # - $no_delete_sessions - ('0','1') # - $LogouTKicKAlL - ('0','1'); +# - $manual_dial_filter = ('NONE','CAMPLISTS','DNC','CAMPLISTS_DNC'); # CHANGELOG: # 50629-1044 - First build of script @@ -143,10 +144,12 @@ # 80128-1159 - fixed vicidial_log bugs # 80402-0121 - Fixes for manual dial transfers on some systems, removed /n persist flag # 80424-0442 - Added non_latin lookup from system_settings +# 80722-1000 - Fixed small bugs +# 80815-1020 - Added manual dial list restriction option # -$version = '2.0.4-69'; -$build = '80424-0442'; +$version = '2.0.4-71'; +$build = '80815-1020'; require("dbconnect.php"); @@ -281,6 +284,8 @@ if (isset($_GET["status"])) {$status=$_GET["status"];} elseif (isset($_POST["status"])) {$status=$_POST["status"];} if (isset($_GET["LogouTKicKAlL"])) {$LogouTKicKAlL=$_GET["LogouTKicKAlL"];} elseif (isset($_POST["LogouTKicKAlL"])) {$LogouTKicKAlL=$_POST["LogouTKicKAlL"];} +if (isset($_GET["manual_dial_filter"])) {$manual_dial_filter=$_GET["manual_dial_filter"];} + elseif (isset($_POST["manual_dial_filter"])) {$manual_dial_filter=$_POST["manual_dial_filter"];} header ("Content-type: text/html; charset=utf-8"); @@ -573,6 +578,33 @@ if ($ACTION == 'manDiaLnextCaLL') exit; } } + if (ereg("CAMPLISTS",$manual_dial_filter)) + { + $stmt="SELECT list_id,active from vicidial_lists where campaign_id='$campaign'"; + $rslt=mysql_query($stmt, $link); + $lists_to_parse = mysql_num_rows($rslt); + $camp_lists=''; + $o=0; + while ($lists_to_parse > $o) + { + $rowx=mysql_fetch_row($rslt); + if (ereg("Y", $rowx[1])) {$active_lists++; $camp_lists .= "'$rowx[0]',";} + if (ereg("N", $rowx[1])) {$inactive_lists++;} + $o++; + } + $camp_lists = eregi_replace(".$","",$camp_lists); + + $stmt="SELECT count(*) FROM vicidial_list where phone_number='$phone_number' and list_id IN($camp_lists);"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $row=mysql_fetch_row($rslt); + + if ($row[0] < 1) + { + echo "NUMERO NOT IN CAMPLISTS\n"; + exit; + } + } if ($stage=='lookup') { $stmt="SELECT lead_id FROM vicidial_list where phone_number='$phone_number' order by modify_date desc LIMIT 1;"; diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/vicidial.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/vicidial.php index 190b0059..0349c0e4 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/vicidial.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/vicidial.php @@ -177,10 +177,14 @@ # 80428-0413 - UTF8 changes and testing # 80507-0932 - Fixed Script display bug (+ instead of space) # 80519-1425 - Added calls in queue display +# 80722-1000 - Fixed quote display bug +# 80815-1015 - Added manual dial list restriction option +# 80823-2127 - Fixed form scroll for IE +# 81012-0857 - Marker for 2.0.4.1rc5 release # -$version = '2.0.4-148'; -$build = '80519-1425'; +$version = '2.0.4-152'; +$build = '81012-0857'; require("dbconnect.php"); @@ -285,6 +289,7 @@ $PreseT_DiaL_LinKs = '1'; # set to 1 to show a CHIAMA link for Dial Presets $LogiNAJAX = '1'; # set to 1 to do lookups $HidEMonitoRSessionS = '1'; # set to 1 to hide remote monitoring channels from "session calls" $LogouTKicKAlL = '1'; # set to 1 to hangup all calls in session upon agent logout +$CamPManDiaLLocK = '0'; # set to 1 to lock out all manual dials to only numbers in camp lists $TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen @@ -348,6 +353,11 @@ echo "\n"; echo "\n"; echo "\n"; +if ($CamPManDiaLLocK > 0) + {$manual_dial_filter = "CAMPLISTS_ONLY";} +else + {$manual_dial_filter = "NONE";} + if ($campaign_login_list > 0) { $camp_form_code = "\n";} else {echo "\n";} ?> diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pl/vdc_db_query.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pl/vdc_db_query.php index 6e376e01..fdecbac0 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pl/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pl/vdc_db_query.php @@ -70,6 +70,7 @@ # - $omit_phone_code - ('Y','N') # - $no_delete_sessions - ('0','1') # - $LogouTKicKAlL - ('0','1'); +# - $manual_dial_filter = ('NONE','CAMPLISTS','DNC','CAMPLISTS_DNC'); # CHANGELOG: # 50629-1044 - First build of script @@ -143,10 +144,12 @@ # 80128-1159 - fixed vicidial_log bugs # 80402-0121 - Fixes for manual dial transfers on some systems, removed /n persist flag # 80424-0442 - Added non_latin lookup from system_settings +# 80722-1000 - Fixed small bugs +# 80815-1020 - Added manual dial list restriction option # -$version = '2.0.4-69'; -$build = '80424-0442'; +$version = '2.0.4-71'; +$build = '80815-1020'; require("dbconnect.php"); @@ -281,6 +284,8 @@ if (isset($_GET["status"])) {$status=$_GET["status"];} elseif (isset($_POST["status"])) {$status=$_POST["status"];} if (isset($_GET["LogouTKicKAlL"])) {$LogouTKicKAlL=$_GET["LogouTKicKAlL"];} elseif (isset($_POST["LogouTKicKAlL"])) {$LogouTKicKAlL=$_POST["LogouTKicKAlL"];} +if (isset($_GET["manual_dial_filter"])) {$manual_dial_filter=$_GET["manual_dial_filter"];} + elseif (isset($_POST["manual_dial_filter"])) {$manual_dial_filter=$_POST["manual_dial_filter"];} header ("Content-type: text/html; charset=utf-8"); @@ -573,6 +578,33 @@ if ($ACTION == 'manDiaLnextCaLL') exit; } } + if (ereg("CAMPLISTS",$manual_dial_filter)) + { + $stmt="SELECT list_id,active from vicidial_lists where campaign_id='$campaign'"; + $rslt=mysql_query($stmt, $link); + $lists_to_parse = mysql_num_rows($rslt); + $camp_lists=''; + $o=0; + while ($lists_to_parse > $o) + { + $rowx=mysql_fetch_row($rslt); + if (ereg("Y", $rowx[1])) {$active_lists++; $camp_lists .= "'$rowx[0]',";} + if (ereg("N", $rowx[1])) {$inactive_lists++;} + $o++; + } + $camp_lists = eregi_replace(".$","",$camp_lists); + + $stmt="SELECT count(*) FROM vicidial_list where phone_number='$phone_number' and list_id IN($camp_lists);"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $row=mysql_fetch_row($rslt); + + if ($row[0] < 1) + { + echo "NUMER NOT IN CAMPLISTS\n"; + exit; + } + } if ($stage=='lookup') { $stmt="SELECT lead_id FROM vicidial_list where phone_number='$phone_number' order by modify_date desc LIMIT 1;"; diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pl/vicidial.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pl/vicidial.php index db45d9ea..a0040eaf 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pl/vicidial.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pl/vicidial.php @@ -177,10 +177,14 @@ # 80428-0413 - UTF8 changes and testing # 80507-0932 - Fixed Script display bug (+ instead of space) # 80519-1425 - Added calls in queue display +# 80722-1000 - Fixed quote display bug +# 80815-1015 - Added manual dial list restriction option +# 80823-2127 - Fixed form scroll for IE +# 81012-0857 - Marker for 2.0.4.1rc5 release # -$version = '2.0.4-148'; -$build = '80519-1425'; +$version = '2.0.4-152'; +$build = '81012-0857'; require("dbconnect.php"); @@ -285,6 +289,7 @@ $PreseT_DiaL_LinKs = '1'; # set to 1 to show a WYBIERZ link for Dial Presets $LogiNAJAX = '1'; # set to 1 to do lookups $HidEMonitoRSessionS = '1'; # set to 1 to hide remote monitoring channels from "session calls" $LogouTKicKAlL = '1'; # set to 1 to hangup all calls in session upon agent logout +$CamPManDiaLLocK = '0'; # set to 1 to lock out all manual dials to only numbers in camp lists $TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen @@ -348,6 +353,11 @@ echo "\n"; echo "\n"; echo "\n"; +if ($CamPManDiaLLocK > 0) + {$manual_dial_filter = "CAMPLISTS_ONLY";} +else + {$manual_dial_filter = "NONE";} + if ($campaign_login_list > 0) { $camp_form_code = "\n";} else {echo "\n";} ?> diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pt/vdc_db_query.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pt/vdc_db_query.php index 4bb0456d..ac6af065 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pt/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pt/vdc_db_query.php @@ -70,6 +70,7 @@ # - $omit_phone_code - ('Y','N') # - $no_delete_sessions - ('0','1') # - $LogouTKicKAlL - ('0','1'); +# - $manual_dial_filter = ('NONE','CAMPLISTS','DNC','CAMPLISTS_DNC'); # CHANGELOG: # 50629-1044 - First build of script @@ -143,10 +144,12 @@ # 80128-1159 - fixed vicidial_log bugs # 80402-0121 - Fixes for manual dial transfers on some systems, removed /n persist flag # 80424-0442 - Added non_latin lookup from system_settings +# 80722-1000 - Fixed small bugs +# 80815-1020 - Added manual dial list restriction option # -$version = '2.0.4-69'; -$build = '80424-0442'; +$version = '2.0.4-71'; +$build = '80815-1020'; require("dbconnect.php"); @@ -281,6 +284,8 @@ if (isset($_GET["status"])) {$status=$_GET["status"];} elseif (isset($_POST["status"])) {$status=$_POST["status"];} if (isset($_GET["LogouTKicKAlL"])) {$LogouTKicKAlL=$_GET["LogouTKicKAlL"];} elseif (isset($_POST["LogouTKicKAlL"])) {$LogouTKicKAlL=$_POST["LogouTKicKAlL"];} +if (isset($_GET["manual_dial_filter"])) {$manual_dial_filter=$_GET["manual_dial_filter"];} + elseif (isset($_POST["manual_dial_filter"])) {$manual_dial_filter=$_POST["manual_dial_filter"];} header ("Content-type: text/html; charset=utf-8"); @@ -573,6 +578,33 @@ if ($ACTION == 'manDiaLnextCaLL') exit; } } + if (ereg("CAMPLISTS",$manual_dial_filter)) + { + $stmt="SELECT list_id,active from vicidial_lists where campaign_id='$campaign'"; + $rslt=mysql_query($stmt, $link); + $lists_to_parse = mysql_num_rows($rslt); + $camp_lists=''; + $o=0; + while ($lists_to_parse > $o) + { + $rowx=mysql_fetch_row($rslt); + if (ereg("Y", $rowx[1])) {$active_lists++; $camp_lists .= "'$rowx[0]',";} + if (ereg("N", $rowx[1])) {$inactive_lists++;} + $o++; + } + $camp_lists = eregi_replace(".$","",$camp_lists); + + $stmt="SELECT count(*) FROM vicidial_list where phone_number='$phone_number' and list_id IN($camp_lists);"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $row=mysql_fetch_row($rslt); + + if ($row[0] < 1) + { + echo "NÚMERO NOT IN CAMPLISTS\n"; + exit; + } + } if ($stage=='lookup') { $stmt="SELECT lead_id FROM vicidial_list where phone_number='$phone_number' order by modify_date desc LIMIT 1;"; diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pt/vicidial.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pt/vicidial.php index 5c3b12e9..6f8a3187 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pt/vicidial.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pt/vicidial.php @@ -177,10 +177,14 @@ # 80428-0413 - UTF8 changes and testing # 80507-0932 - Fixed Script display bug (+ instead of space) # 80519-1425 - Added calls in queue display +# 80722-1000 - Fixed quote display bug +# 80815-1015 - Added manual dial list restriction option +# 80823-2127 - Fixed form scroll for IE +# 81012-0857 - Marker for 2.0.4.1rc5 release # -$version = '2.0.4-148'; -$build = '80519-1425'; +$version = '2.0.4-152'; +$build = '81012-0857'; require("dbconnect.php"); @@ -285,6 +289,7 @@ $PreseT_DiaL_LinKs = '1'; # set to 1 to show a SELETOR link for Dial Presets $LogiNAJAX = '1'; # set to 1 to do lookups $HidEMonitoRSessionS = '1'; # set to 1 to hide remote monitoring channels from "session calls" $LogouTKicKAlL = '1'; # set to 1 to hangup all calls in session upon agent logout +$CamPManDiaLLocK = '0'; # set to 1 to lock out all manual dials to only numbers in camp lists $TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen @@ -348,6 +353,11 @@ echo "\n"; echo "\n"; echo "\n"; +if ($CamPManDiaLLocK > 0) + {$manual_dial_filter = "CAMPLISTS_ONLY";} +else + {$manual_dial_filter = "NONE";} + if ($campaign_login_list > 0) { $camp_form_code = "\n";} else {echo "\n";} ?> diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_sk/active_list_refresh.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_sk/active_list_refresh.php new file mode 100644 index 00000000..ec3fbaa7 --- /dev/null +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_sk/active_list_refresh.php @@ -0,0 +1,482 @@ + LICENSE: GPLv2 +### +### This script is designed purely to serve updates of the live data to the display scripts +### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table +### +### required variables: +### - $server_ip +### - $session_name +### - $user +### - $pass +### optional variables: +### - $ADD - ('1','2','3','4','5') +### - $order - ('asc','desc') +### - $format - ('text','table','menu','selectlist','textarea') +### - $bgcolor - ('#123456','white','black','etc...') +### - $txtcolor - ('#654321','black','white','etc...') +### - $txtsize - ('1','2','3','etc...') +### - $selectsize - ('2','3','4','etc...') +### - $selectfontsize - ('8','10','12','etc...') +### - $selectedext - ('cc100') +### - $selectedtrunk - ('Zap/25-1') +### - $selectedlocal - ('SIP/cc100') +### - $textareaheight - ('8','10','12','etc...') +### - $textareawidth - ('8','10','12','etc...') +### - $field_name - ('extension','busyext','extension_xfer','etc...') +### + +# changes +# 50323-1147 - First build of script +# 50401-1132 - small formatting changes +# 50502-1402 - added field_name as modifiable variable +# 50503-1213 - added session_name checking for extra security +# 50503-1311 - added conferences list +# 50610-1155 - Added NULL check on MySQL results to reduced errors +# 50711-1209 - removed HTTP authentication in favor of user/pass vars +# 60421-1155 - check GET/POST vars lines with isset to not trigger PHP NOTICES +# 60619-1118 - Added variable filters to close security holes for login form +# + +require("dbconnect.php"); + +### If you have globals turned off uncomment these lines +if (isset($_GET["user"])) {$user=$_GET["user"];} + elseif (isset($_POST["user"])) {$user=$_POST["user"];} +if (isset($_GET["pass"])) {$pass=$_GET["pass"];} + elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} +if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} + elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} +if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} + elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} +if (isset($_GET["format"])) {$format=$_GET["format"];} + elseif (isset($_POST["format"])) {$format=$_POST["format"];} +if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];} + elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];} +if (isset($_GET["order"])) {$order=$_GET["order"];} + elseif (isset($_POST["order"])) {$order=$_POST["order"];} +if (isset($_GET["bgcolor"])) {$bgcolor=$_GET["bgcolor"];} + elseif (isset($_POST["bgcolor"])) {$bgcolor=$_POST["bgcolor"];} +if (isset($_GET["txtcolor"])) {$txtcolor=$_GET["txtcolor"];} + elseif (isset($_POST["txtcolor"])) {$txtcolor=$_POST["txtcolor"];} +if (isset($_GET["txtsize"])) {$txtsize=$_GET["txtsize"];} + elseif (isset($_POST["txtsize"])) {$txtsize=$_POST["txtsize"];} +if (isset($_GET["selectsize"])) {$selectsize=$_GET["selectsize"];} + elseif (isset($_POST["selectsize"])) {$selectsize=$_POST["selectsize"];} +if (isset($_GET["selectfontsize"])) {$selectfontsize=$_GET["selectfontsize"];} + elseif (isset($_POST["selectfontsize"])) {$selectfontsize=$_POST["selectfontsize"];} +if (isset($_GET["selectedext"])) {$selectedext=$_GET["selectedext"];} + elseif (isset($_POST["selectedext"])) {$selectedext=$_POST["selectedext"];} +if (isset($_GET["selectedtrunk"])) {$selectedtrunk=$_GET["selectedtrunk"];} + elseif (isset($_POST["selectedtrunk"])) {$selectedtrunk=$_POST["selectedtrunk"];} +if (isset($_GET["selectedlocal"])) {$selectedlocal=$_GET["selectedlocal"];} + elseif (isset($_POST["selectedlocal"])) {$selectedlocal=$_POST["selectedlocal"];} +if (isset($_GET["textareaheight"])) {$textareaheight=$_GET["textareaheight"];} + elseif (isset($_POST["textareaheight"])) {$textareaheight=$_POST["textareaheight"];} +if (isset($_GET["textareawidth"])) {$textareawidth=$_GET["textareawidth"];} + elseif (isset($_POST["textareawidth"])) {$textareawidth=$_POST["textareawidth"];} +if (isset($_GET["field_name"])) {$field_name=$_GET["field_name"];} + elseif (isset($_POST["field_name"])) {$field_name=$_POST["field_name"];} + +### security strip all non-alphanumeric characters out of the variables ### + $user=ereg_replace("[^0-9a-zA-Z]","",$user); + $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); + $ADD=ereg_replace("[^0-9]","",$ADD); + $order=ereg_replace("[^0-9a-zA-Z]","",$order); + $format=ereg_replace("[^0-9a-zA-Z]","",$format); + $bgcolor=ereg_replace("[^\#0-9a-zA-Z]","",$bgcolor); + $txtcolor=ereg_replace("[^\#0-9a-zA-Z]","",$txtcolor); + $txtsize=ereg_replace("[^0-9a-zA-Z]","",$txtsize); + $selectsize=ereg_replace("[^0-9a-zA-Z]","",$selectsize); + $selectfontsize=ereg_replace("[^0-9a-zA-Z]","",$selectfontsize); + $selectedext=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$selectedext); + $selectedtrunk=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$selectedtrunk); + $selectedlocal=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$selectedlocal); + $textareaheight=ereg_replace("[^0-9a-zA-Z]","",$textareaheight); + $textareawidth=ereg_replace("[^0-9a-zA-Z]","",$textareawidth); + $field_name=ereg_replace("[^ \#\*\:\/\@\.\-\_0-9a-zA-Z]","",$field_name); + +# default optional vars if not set +if (!isset($ADD)) {$ADD="1";} +if (!isset($order)) {$order='desc';} +if (!isset($format)) {$format="text";} +if (!isset($bgcolor)) {$bgcolor='white';} +if (!isset($txtcolor)) {$txtcolor='black';} +if (!isset($txtsize)) {$txtsize='2';} +if (!isset($selectsize)) {$selectsize='4';} +if (!isset($selectfontsize)) {$selectfontsize='10';} +if (!isset($textareaheight)) {$textareaheight='10';} +if (!isset($textareawidth)) {$textareawidth='20';} + +$version = '0.0.8'; +$build = '60619-1118'; +$StarTtime = date("U"); +$NOW_DATE = date("Y-m-d"); +$NOW_TIME = date("Y-m-d H:i:s"); +if (!isset($query_date)) {$query_date = $NOW_DATE;} + + $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $auth=$row[0]; + + if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) + { + echo "Nesprávny Užívateľské meno/Heslo: |$user|$pass|\n"; + exit; + } + else + { + + if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) + { + echo "Nesprávny server_ip: |$server_ip| or Nesprávny session_name: |$session_name|\n"; + exit; + } + else + { + $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $SNauth=$row[0]; + if($SNauth==0) + { + echo "Nesprávny session_name: |$session_name|$server_ip|\n"; + exit; + } + else + { + # do nothing for now + } + } + } + +if ($format=='table') +{ +echo "\n"; +echo "\n"; +echo "\n"; +echo "Zobraziť zoznamy: "; +if ($ADD==1) {echo "Aktívne pobočky";} +if ($ADD==2) {echo "Obsadené pobočky";} +if ($ADD==3) {echo "Vonkajšie linky";} +if ($ADD==4) {echo "Lokálne pobočky";} +if ($ADD==5) {echo "Konferencie";} +if ($ADD==99999) {echo "POMOC";} +echo "\n"; +echo "\n"; +echo "\n"; +} + + + + + +###################### +# ADD=1 display all live extensions on a server +###################### +if ($ADD==1) +{ + $pt='pt'; + if (!$field_name) {$field_name = 'extension';} + if ($format=='table') {echo "\n";} + if ($format=='menu') {echo "\n"; + } + if ($format=='textarea') + { + echo "\n";} +} + + + + + + + +###################### +# ADD=2 display all busy extensions on a server +###################### +if ($ADD==2) +{ + if (!$field_name) {$field_name = 'busyext';} + if ($format=='table') {echo "
\n";} + if ($format=='menu') {echo "\n"; + } + if ($format=='textarea') + { + echo "\n";} +} + + + + + + +###################### +# ADD=3 display all busy outside lines(trunks) on a server +###################### +if ($ADD==3) +{ + if (!$field_name) {$field_name = 'trunk';} + if ($format=='table') {echo "
\n";} + if ($format=='menu') {echo "\n"; + } + if ($format=='textarea') + { + echo "\n";} +} + + + + + + +###################### +# ADD=4 display all busy Local lines on a server +###################### +if ($ADD==4) +{ + if (!$field_name) {$field_name = 'local';} + if ($format=='table') {echo "
\n";} + if ($format=='menu') {echo "\n"; + } + if ($format=='textarea') + { + echo "\n";} +} + + + + + + +###################### +# ADD=5 display all agc-usable conferences on a server +###################### +if ($ADD==5) +{ + $pt='pt'; + if (!$field_name) {$field_name = 'conferences';} + if ($format=='table') {echo "
\n";} + if ($format=='menu') {echo "\n"; + } + if ($format=='textarea') + { + echo "\n";} +} + + + + + + + + + + + + + + +$ENDtime = date("U"); +$RUNtime = ($ENDtime - $StarTtime); +if ($format=='table') {echo "\n";} +if ($format=='table') {echo "\n\n\n";} + +exit; + +?> + + + + + diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_sk/astguiclient.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_sk/astguiclient.php new file mode 100644 index 00000000..cf953ba6 --- /dev/null +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_sk/astguiclient.php @@ -0,0 +1,2905 @@ + LICENSE: GPLv2 +# +# make sure you have added a user to the vicidial_users MySQL table with at least +# user_level 1 or greater to access this page. Also you need to have the login +# and pass of a phone listed in the asterisk.phones table. The page grabs the +# server info and other details from this login and pass +# +# Other scripts that this application depends on: +# - active_list_refresh.php: displays active/live channels and phones +# - manager_send.php: sends Actions to be executed on Asterisk servers +# - live_exten_check.php: checks to see if user's phone is on a live call +# - call_log_display.php: retrieves log of inbound and outbound calls +# - voicemail_check.php: retrieves counts of new and old messages +# - inbound_popup.php: opens upon live_inbound call coming in +# - conf_exten_check.php: checks to see if and calls are in a specific conf +# - park_calls_display.php: retrieves list of parked calls +# - vdc_db_query.php: Changes values in the DB for non-calling records +# +# CHANGES +# 50215-1356 - Proof-of-concept test of XMLHttpRequest for astGUIclient web +# 50323-1411 - First build version display-only +# 50331-1040 - Second-build, added phone login and hangup/hijack display +# 50401-1006 - Trunk/Local Hangup functions enabled +# 50404-1056 - Trunk/Local Hijack functions enabled +# 50404-1459 - Simple live calls display and grabs updated time from server +# 50405-1221 - Reorganized the display and layers, added some images +# 50406-1005 - Added In/Out call log display to MAIN panel +# 50407-1254 - Start/Stop Recording on live calls enabled +# 50422-1101 - Activated Check Voicemail button and new/old messages count +# 50428-1449 - Added dial from log and basic live_inbound call popup +# 50429-1455 - Modified inbound popup code for IE and to add more functions +# 50502-1442 - Added basic method to transfer live calls somewhere else +# 50503-1205 - Added web_client_sessions entry for more security of subscripts +# 50503-1537 - Added basic conferences display +# 50509-1132 - Added conference connected list and hangup/xfer for them +# 50511-1129 - Added registration of conference rooms and added manual dial +# 50523-1342 - Added Conference recording and send DTMF +# 50523-1622 - Added Local Dial window frame for calling local extensions +# 50524-1456 - Added ability to park call and display number of parked calls +# 50524-1600 - Added ability to display and pickup/hangup/xfer parked calls +# 50525-1224 - Added ability to place outbound call from within conferene +# 50531-1225 - Added ability to do dual transfers to meetme rooms from Main +# 50711-1229 - removed HTTP authentication in favor of user/pass vars +# 50711-1610 - Added Zap monitoring to Trunk/Local Action screens +# 50804-1604 - Minor bug fix in inbound_popup functions +# 50818-1715 - Added pretty login section +# 50913-1137 - Added custom outbound_cid from phones table +# 51110-1430 - Fixed non-standard http port issue +# 60103-1421 - Added code for favorite extensions chooser +# 60104-1347 - Added basic layout for favorites editing frame +# 60105-1124 - Finished Favorites frame and added DB submission +# 60112-1622 - Several formatting changes +# 60421-1357 - check GET/POST vars lines with isset to not trigger PHP NOTICES +# 60619-1103 - Added variable filters to close security holes for login form +# 60829-1528 - Made compatible with WeBRooTWritablE setting in dbconnect.php +# + +require("dbconnect.php"); + +### If you have globals turned off uncomment these lines +if (isset($_GET["user"])) {$user=$_GET["user"];} + elseif (isset($_POST["user"])) {$user=$_POST["user"];} +if (isset($_GET["pass"])) {$pass=$_GET["pass"];} + elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} +if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];} + elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];} +if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];} + elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];} +if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} + elseif (isset($_POST["relogin"])) {$relogin=$_POST["relogin"];} + if (!isset($phone_login)) + { + if (isset($_GET["pl"])) {$phone_login=$_GET["pl"];} + elseif (isset($_POST["pl"])) {$phone_login=$_POST["pl"];} + } + if (!isset($phone_pass)) + { + if (isset($_GET["pp"])) {$phone_pass=$_GET["pp"];} + elseif (isset($_POST["pp"])) {$phone_pass=$_POST["pp"];} + } + +$forever_stop=0; +$user_abb = "$user$user$user$user"; +while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) + {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} + +$version = '2.0.1'; +$build = '60829-1528'; + +### security strip all non-alphanumeric characters out of the variables ### + $DB=ereg_replace("[^0-9a-z]","",$DB); + $phone_login=ereg_replace("[^0-9a-zA-Z]","",$phone_login); + $phone_pass=ereg_replace("[^0-9a-zA-Z]","",$phone_pass); + $user=ereg_replace("[^0-9a-zA-Z]","",$user); + $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); + + +if ($force_logout) +{ + if( (strlen($_SERVER['user'])>0) or (strlen($_SERVER['pass'])>0) ) + { + Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); + Header("HTTP/1.0 401 Unauthorized"); + } + echo "Práve ste sa odhlásili, Ďakujeme\n"; + exit; +} + +$StarTtime = date("U"); +$NOW_TIME = date("Y-m-d H:i:s"); +$FILE_TIME = date("Ymd-His"); + $month_old = mktime(0, 0, 0, date("m"), date("d")-7, date("Y")); + $past_month_date = date("Y-m-d H:i:s",$month_old); + + $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $auth=$row[0]; + +$US='_'; +$CL=':'; +if ($WeBRooTWritablE > 0) + {$fp = fopen ("./astguiclient_auth_entries.txt", "a");} +$date = date("r"); +$ip = getenv("REMOTE_ADDR"); +$browser = getenv("HTTP_USER_AGENT"); +$script_name = getenv("SCRIPT_NAME"); +$server_name = getenv("SERVER_NAME"); +$server_port = getenv("SERVER_PORT"); +if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} + else {$HTTPprotocol = 'http://';} +if (($server_port == '80') or ($server_port == '443') ) {$server_port='';} +else {$server_port = "$CL$server_port";} +$agcPAGE = "$HTTPprotocol$server_name$server_port$script_name"; +$agcDIR = $agcPAGE; +$agcDIR = eregi_replace('astguiclient.php','',$agcDIR); + + if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth) or ($relogin == 'YES') ) + { + header ("Content-type: text/html; charset=utf-8"); + + echo "web klient astGUIclient: Prihlásiť\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + echo "\n"; +echo "\n";echo "\n"; echo "
English Slovensky
\n"; + echo "\n"; + echo "\n"; + echo "


"; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo ""; + echo "\n"; + echo ""; + echo "\n"; + echo ""; + echo "\n"; + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
Prihlásiť
 
Meno užívateľa:
Heslo užívateľa:
Prihlásenie telefónu:
Heslo telefónu:

VERZIA: $version       POSTAVENÉ: $build
\n"; + echo "\n\n"; + echo "\n\n"; + echo "\n\n"; + exit; + } + else + { + + if($auth>0) + { + $office_no=strtoupper($user); + $password=strtoupper($pass); + $stmt="SELECT full_name,user_level from vicidial_users where user='$user' and pass='$pass'"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $LOGfullname=$row[0]; + if ($WeBRooTWritablE > 0) + { + fwrite ($fp, "VICIDIAL|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n"); + fclose($fp); + } + } + else + { + if ($WeBRooTWritablE > 0) + { + fwrite ($fp, "VICIDIAL|FAIL|$date|$user|$pass|$ip|$browser|$LOGfullname|\n"); + fclose($fp); + } + } + } + +header ("Content-type: text/html; charset=utf-8"); +header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 +header ("Pragma: no-cache"); // HTTP/1.0 +echo "\n"; +echo "\n"; +echo "\n"; + +if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) +{ +echo "web klient astGUIclient: Prihlásenie telefónu\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n";echo "\n";echo "
English Slovensky
\n"; +echo "
\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "


"; +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo ""; +echo "\n"; +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "
Prihlásenie telefónu
 
Prihlásenie telefónu:
Heslo telefónu:

VERZIA: $version       POSTAVENÉ: $build
\n"; +echo "\n\n"; +echo "\n\n"; +echo "\n\n"; +exit; +} +else +{ +$authphone=0; +$stmt="SELECT count(*) from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; +if ($DB) {echo "|$stmt|\n";} +$rslt=mysql_query($stmt, $link); +$row=mysql_fetch_row($rslt); +$authphone=$row[0]; +if (!$authphone) + { + echo "web klient astGUIclient: Prihlásenie telefónu\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; +echo "\n";echo "\n"; echo "
English Slovensky
\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "


"; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo ""; + echo "\n"; + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
Prihlásenie telefónu
 
Prepáčte, Vaše prihlasovacie meno a heslo nie sú aktívne v tomto systéme, prosím skúste znova:
 
Prihlásenie telefónu:
Heslo telefónu:

VERZIA: $version       POSTAVENÉ: $build
\n"; + echo "\n\n"; + echo "\n\n"; + echo "\n\n"; + exit; + } +else + { + echo "web klient astGUIclient\n"; + $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $extension=$row[0]; + $dialplan_number=$row[1]; + $voicemail_id=$row[2]; + $phone_ip=$row[3]; + $computer_ip=$row[4]; + $server_ip=$row[5]; + $phone_login=$row[6]; + $phone_pass=$row[7]; + $status=$row[8]; + $active=$row[9]; + $phone_type=$row[10]; + $fullname=$row[11]; + $company=$row[12]; + $picture=$row[13]; + $messages=$row[14]; + $old_messages=$row[15]; + $protocol=$row[16]; + $local_gmt=$row[17]; + $ASTmgrUSERNAME=$row[18]; + $ASTmgrSECRET=$row[19]; + $login_user=$row[20]; + $login_pass=$row[21]; + $login_campaign=$row[22]; + $park_on_extension=$row[23]; + $conf_on_extension=$row[24]; + $VICIDiaL_park_on_extension=$row[25]; + $VICIDiaL_park_on_filename=$row[26]; + $monitor_prefix=$row[27]; + $recording_exten=$row[28]; + $voicemail_exten=$row[29]; + $voicemail_dump_exten=$row[30]; + $ext_context=$row[31]; + $dtmf_send_extension=$row[32]; + $call_out_number_group=$row[33]; + $client_browser=$row[34]; + $install_directory=$row[35]; + $local_web_callerID_URL=$row[36]; + $VICIDiaL_web_URL=$row[37]; + $AGI_call_logging_enabled=$row[38]; + $user_switching_enabled=$row[39]; + $conferencing_enabled=$row[40]; + $admin_hangup_enabled=$row[41]; + $admin_hijack_enabled=$row[42]; + $admin_monitor_enabled=$row[43]; + $call_parking_enabled=$row[44]; + $updater_check_enabled=$row[45]; + $AFLogging_enabled=$row[46]; + $QUEUE_ACTION_enabled=$row[47]; + $CaLLerID_popup_enabled=$row[48]; + $voicemail_button_enabled=$row[49]; + $enable_fast_refresh=$row[50]; + $fast_refresh_rate=$row[51]; + $enable_persistant_mysql=$row[52]; + $auto_dial_next_number=$row[53]; + $VDstop_rec_after_each_call=$row[54]; + $DBX_server=$row[55]; + $DBX_database=$row[56]; + $DBX_user=$row[57]; + $DBX_pass=$row[58]; + $DBX_port=$row[59]; + $outbound_cid=$row[65]; + + $local_web_callerID_URL_enc = rawurlencode($local_web_callerID_URL); + + $session_ext = eregi_replace("[^a-z0-9]", "", $extension); + if (strlen($session_ext) > 10) {$session_ext = substr($session_ext, 0, 10);} + $session_rand = (rand(1,9999999) + 10000000); + $session_name = "$StarTtime$US$session_ext$session_rand"; + + $stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'agc';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + + $stmt="INSERT INTO web_client_sessions values('$extension','$server_ip','agc','$NOW_TIME','$session_name');"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + + $stmt="SELECT count(*) from phone_favorites where extension='$extension' and server_ip = '$server_ip';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $favorites_present=$row[0]; + if ($favorites_present > 0) + { + $stmt="SELECT extensions_list from phone_favorites where extension='$extension' and server_ip = '$server_ip';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $favorites_list=$row[0]; + $h=0; + $favorites_listX = eregi_replace("'",'',$favorites_list); + $favorites = explode(',',$favorites_listX); + $favorites_count = count($favorites); + $favorites_listX=''; + + $o=0; + while ($favorites_count > $o) + { + $stmt="SELECT fullname,protocol from phones where extension = '$favorites[$o]' and server_ip='$server_ip';"; + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + $favorites_names[$o] = $rowx[0]; + $favorites_listX .= "$rowx[1]/$favorites[$o],"; + $o++; + } + + echo "\n"; + echo "\n"; + } + else + { + echo "\n"; + } + +### gather phone extensions and fullnames for favorites editor ### + $stmt="SELECT extension,fullname from phones where server_ip = '$server_ip';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + $exten_ct = mysql_num_rows($rslt); + $favlistCT=0; + $nofavlistCT=0; + while ($favlistCT < $exten_ct) + { + $row=mysql_fetch_row($rslt); + $favlist[$favlistCT]= "$row[0] - $row[1]"; + $favlistCT++; + } + + } +} + + +?> + + + + + + +\n"; + + +?> + +
+ + + + + + + + + +
+ + +ODHLÁSIŤ
\n"; ?> +
Základný panelPanel aktívnych liniekPanel konferenciíOveriť hlasovú schránkuŽivý hovor
+
+ + +

Logout
+
+ + +
TRUNK POLOŹIŤ

+ Active Trunks Menu
+ Zložiť trunk   |   + Capturar Trunk   |   + Počúvať trunk   |   + Osviežiť   |   + Säť do zakladného okna +
+
+ + +
Zloženie lokálne

+ Aktívne lokálne menu
+ Zložiť lokálne   |   + Capturar Local   |   + Počúvať lokálne   |   + Osviežiť   |   + Säť do zakladného okna +
+
+ + + + + + + +
PRESMEROVANIE ŽIVÉHO HOVORU
Kanál má byť presmerovaný: Kanál
Pobočky:
Menu pobočiek
+
+ Poslať do vybranej pobočky

+ Poslať do vybranej odkazovej schránky

+ Poslať na toto číslo:


+ Osviežiť


+ Säť do zakladného okna

+
Konferencie:
(Kliknite na číslo dole pre poslanie do konferencie)
Poslať môj kanál tiež
Menu konferencií
+
+ + + + + +
Volanie LOKÁLNYCH pobočiek
Volanie telefónu z: Kanál
Pobočky:
Menu pobočiek
+
+ Volať vybrané pobočky

+ Volať vybrané hlasové schránky

+ Osviežiť


+ Säť do zakladného okna

+
+
+ + +
ZAZAPARKOVAŤOVANIE HOVOROV:
+ Säť do zakladného okna

+
+
+ + + + + + + + + + + + + + + +
  +
HLASOVÁ SCHRÁNKA     NOVÁ:     STARÁ:             RUČNÉ VOLANIE       DIAL
ZAZAPARKOVAŤOVANIE HOVOROV: 0                VOLANIE LOKÁLNYCH POBOČIEK
ODCHODZIE HOVORY:
PRÍCHODZIE HOVORY:
astGUIclient verzia web-klient: POSTAVENÉ:
+ + + + $h) + { + if (strlen($favorites[$h])>1) + { + echo "\n"; + } + $h++; + } +?> + +
FAVORIZOVANÉ       upraviť
$favorites[$h] - $favorites_names[$h]
 
+
+ + + + + + + +
FAVORIZOVANÉ

 
POTVRDIT FAVORIZOVANÉ ZMENY – vyžaduje sa odhlásenie
BACK TO MAIN WINDOW - ignore changes made
+
+ +
+ + + + + + + + + + + + + +
+PAUSE | SPUSTIŤ     Doba obnovenia: 1000 ms Rýchlejšie | Pomalšie

+
Inicializovať..
+
Aktívne pobočky
+OSVIEŽIŤ | +PORADIE | +
Vonkajšie linky
+OSVIEŽIŤ | +PORADIE | +
Lokálne pobočky
+OSVIEŽIŤ | +PORADIE | +
+ Tu sú dáta

+
+ Tu sú dáta

Trunk akcia +
+ Tu sú dáta

Lokálna akcia +
+
+ + + + +
+ + +Zoznam konferencií + + + +
+Kliknite ľavým tlačidlom na konferenciu pre získanie informácie +
+ + + +
+ + + + + + + + + + + + + + diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_sk/call_log_display.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_sk/call_log_display.php new file mode 100644 index 00000000..6e740c23 --- /dev/null +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_sk/call_log_display.php @@ -0,0 +1,196 @@ + LICENSE: GPLv2 +### +### This script is designed purely to send the inbound and outbound calls for a specific phone +### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table +### +### required variables: +### - $server_ip +### - $session_name +### - $user +### - $pass +### optional variables: +### - $format - ('text','debug') +### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) +### - $protocol - ('SIP','Zap','IAX2',...) +### - $in_limit - ('10','20','50','100',...) +### - $out_limit - ('10','20','50','100',...) +### + +# changes +# 50406-1013 - First build of script +# 50407-1452 - Added definable limits +# 50503-1236 - added session_name checking for extra security +# 50610-1158 - Added NULL check on MySQL results to reduced errors +# 50711-1202 - removed HTTP authentication in favor of user/pass vars +# 60323-1550 - added option for showing different number dialed in log +# 60421-1401 - check GET/POST vars lines with isset to not trigger PHP NOTICES +# 60619-1202 - Added variable filters to close security holes for login form +# + +require("dbconnect.php"); + +### If you have globals turned off uncomment these lines +if (isset($_GET["user"])) {$user=$_GET["user"];} + elseif (isset($_POST["user"])) {$user=$_POST["user"];} +if (isset($_GET["pass"])) {$pass=$_GET["pass"];} + elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} +if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} + elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} +if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} + elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} +if (isset($_GET["format"])) {$format=$_GET["format"];} + elseif (isset($_POST["format"])) {$format=$_POST["format"];} +if (isset($_GET["exten"])) {$exten=$_GET["exten"];} + elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} +if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} + elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} + +$user=ereg_replace("[^0-9a-zA-Z]","",$user); +$pass=ereg_replace("[^0-9a-zA-Z]","",$pass); + +# default optional vars if not set +if (!isset($format)) {$format="text";} +if (!isset($in_limit)) {$in_limit="100";} +if (!isset($out_limit)) {$out_limit="100";} +$number_dialed = 'number_dialed'; +#$number_dialed = 'extension'; + +$version = '0.0.8'; +$build = '60619-1202'; +$StarTtime = date("U"); +$NOW_DATE = date("Y-m-d"); +$NOW_TIME = date("Y-m-d H:i:s"); +if (!isset($query_date)) {$query_date = $NOW_DATE;} + + $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $auth=$row[0]; + + if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) + { + echo "Nesprávny Užívateľské meno/Heslo: |$user|$pass|\n"; + exit; + } + else + { + + if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) + { + echo "Nesprávny server_ip: |$server_ip| or Nesprávny session_name: |$session_name|\n"; + exit; + } + else + { + $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $SNauth=$row[0]; + if($SNauth==0) + { + echo "Nesprávny session_name: |$session_name|$server_ip|\n"; + exit; + } + else + { + # do nothing for now + } + } + } + +if ($format=='debug') +{ +echo "\n"; +echo "\n"; +echo "\n"; +echo "Zobraziť log hovoru"; +echo "\n"; +echo "\n"; +echo "\n"; +} + + + $row=''; $rowx=''; + $channel_live=1; + if ( (strlen($exten)<1) or (strlen($protocol)<3) ) + { + $channel_live=0; + echo "Exten $exten Nie je správny alebo protokol $protocol Nie je správny\n"; + exit; + } + else + { + ##### print outbound calls from the call_log table + $stmt="SELECT uniqueid,start_time,$number_dialed,length_in_sec FROM call_log where server_ip = '$server_ip' and channel LIKE \"$protocol/$exten%\" order by start_time desc limit $out_limit;"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($rslt) {$out_calls_count = mysql_num_rows($rslt);} + echo "$out_calls_count|"; + $loop_count=0; + while ($out_calls_count>$loop_count) + { + $loop_count++; + $row=mysql_fetch_row($rslt); + + $call_time_M = ($row[3] / 60); + $call_time_M = round($call_time_M, 2); + $call_time_M_int = intval("$call_time_M"); + $call_time_SEC = ($call_time_M - $call_time_M_int); + $call_time_SEC = ($call_time_SEC * 60); + $call_time_SEC = round($call_time_SEC, 0); + if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} + $call_time_MS = "$call_time_M_int:$call_time_SEC"; + + if ($number_dialed == 'extension') {$row[2] = substr($row[2],-10);} + echo "$row[0] ~$row[1] ~$row[2] ~$call_time_MS|"; + } + echo "\n"; + + ##### print inbound calls from the live_inbound_log table + $stmt="SELECT call_log.uniqueid,live_inbound_log.start_time,live_inbound_log.extension,caller_id,length_in_sec from live_inbound_log,call_log where phone_ext='$exten' and live_inbound_log.server_ip = '$server_ip' and call_log.uniqueid=live_inbound_log.uniqueid order by start_time desc limit $in_limit;"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($rslt) {$in_calls_count = mysql_num_rows($rslt);} + echo "$in_calls_count|"; + $loop_count=0; + while ($in_calls_count>$loop_count) + { + $loop_count++; + $row=mysql_fetch_row($rslt); + + $call_time_M = ($row[4] / 60); + $call_time_M = round($call_time_M, 2); + $call_time_M_int = intval("$call_time_M"); + $call_time_SEC = ($call_time_M - $call_time_M_int); + $call_time_SEC = ($call_time_SEC * 60); + $call_time_SEC = round($call_time_SEC, 0); + if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} + $call_time_MS = "$call_time_M_int:$call_time_SEC"; + $callerIDnum = $row[3]; $callerIDname = $row[3]; + $callerIDnum = preg_replace("/.*<|>.*/","",$callerIDnum); + $callerIDname = preg_replace("/\"| <\d*>/","",$callerIDname); + + echo "$row[0] ~$row[1] ~$row[2] ~$callerIDnum ~$callerIDname ~$call_time_MS|"; + } + echo "\n"; + + } + + + +if ($format=='debug') + { + $ENDtime = date("U"); + $RUNtime = ($ENDtime - $StarTtime); + echo "\n"; + echo "\n\n\n"; + } + +exit; + +?> diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_sk/conf_exten_check.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_sk/conf_exten_check.php new file mode 100644 index 00000000..8246c7b9 --- /dev/null +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_sk/conf_exten_check.php @@ -0,0 +1,343 @@ + LICENSE: GPLv2 +# +# This script is designed purely to send whether the meetme conference has live channels connected and which they are +# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table +# +# required variables: +# - $server_ip +# - $session_name +# - $user +# - $pass +# optional variables: +# - $format - ('text','debug') +# - $ACTION - ('refresh','register') +# - $client - ('agc','vdc') +# - $conf_exten - ('8600011',...) +# - $exten - ('123test',...) +# - $auto_dial_level - ('0','1','1.2',...) +# - $campagentstdisp - ('YES',...) +# + +# changes +# 50509-1054 - First build of script +# 50511-1112 - Added ability to register a conference room +# 50610-1159 - Added NULL check on MySQL results to reduced errors +# 50706-1429 - script changed to not use HTTP login vars, user/pass instead +# 50706-1525 - Added date-time display for vicidial client display +# 50816-1500 - Added random update to vicidial_live_agents table for vdc users +# 51121-1353 - Altered echo statements for several small PHP speed optimizations +# 60410-1424 - Added ability to grab calls-being-placed and agent status +# 60421-1405 - check GET/POST vars lines with isset to not trigger PHP NOTICES +# 60619-1201 - Added variable filters to close security holes for login form +# 61128-2255 - Added update for manual dial vicidial_live_agents +# 70319-1542 - Added agent disabled display function +# 71122-0205 - Added vicidial_live_agent status output +# 80424-0442 - Added non_latin lookup from system_settings +# 80519-1425 - Added calls-in-queue tally +# + +require("dbconnect.php"); + +### If you have globals turned off uncomment these lines +if (isset($_GET["user"])) {$user=$_GET["user"];} + elseif (isset($_POST["user"])) {$user=$_POST["user"];} +if (isset($_GET["pass"])) {$pass=$_GET["pass"];} + elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} +if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} + elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} +if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} + elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} +if (isset($_GET["format"])) {$format=$_GET["format"];} + elseif (isset($_POST["format"])) {$format=$_POST["format"];} +if (isset($_GET["ACTION"])) {$ACTION=$_GET["ACTION"];} + elseif (isset($_POST["ACTION"])) {$ACTION=$_POST["ACTION"];} +if (isset($_GET["client"])) {$client=$_GET["client"];} + elseif (isset($_POST["client"])) {$client=$_POST["client"];} +if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} + elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} +if (isset($_GET["exten"])) {$exten=$_GET["exten"];} + elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} +if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];} + elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];} +if (isset($_GET["campagentstdisp"])) {$campagentstdisp=$_GET["campagentstdisp"];} + elseif (isset($_POST["campagentstdisp"])) {$campagentstdisp=$_POST["campagentstdisp"];} + +header ("Content-type: text/html; charset=utf-8"); +header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 +header ("Pragma: no-cache"); // HTTP/1.0 + + +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ +$user=ereg_replace("[^0-9a-zA-Z]","",$user); +$pass=ereg_replace("[^0-9a-zA-Z]","",$pass); +} + +# default optional vars if not set +if (!isset($format)) {$format="text";} +if (!isset($ACTION)) {$ACTION="refresh";} +if (!isset($client)) {$client="agc";} + +$Alogin='N'; +$RingCalls='N'; +$DiaLCalls='N'; + +$version = '2.0.4-12'; +$build = '71122-0205'; +$StarTtime = date("U"); +$NOW_DATE = date("Y-m-d"); +$NOW_TIME = date("Y-m-d H:i:s"); +$FILE_TIME = date("Ymd_His"); +if (!isset($query_date)) {$query_date = $NOW_DATE;} +$random = (rand(1000000, 9999999) + 10000000); + + +$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; +if ($DB) {echo "|$stmt|\n";} +if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} +$rslt=mysql_query($stmt, $link); +$row=mysql_fetch_row($rslt); +$auth=$row[0]; + + if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) + { + echo "Nesprávny Užívateľské meno/Heslo: |$user|$pass|\n"; + exit; + } + else + { + + if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) + { + echo "Nesprávny server_ip: |$server_ip| or Nesprávny session_name: |$session_name|\n"; + exit; + } + else + { + $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $SNauth=$row[0]; + if($SNauth==0) + { + echo "Nesprávny session_name: |$session_name|$server_ip|\n"; + exit; + } + else + { + # do nothing for now + } + } + } + +if ($format=='debug') +{ +echo "\n"; +echo "\n"; +echo "\n"; +echo "Overiť konferenčnú pobočku"; +echo "\n"; +echo "\n"; +echo "\n"; +} + + if ($ACTION == 'refresh') + { + $MT[0]=''; + $row=''; $rowx=''; + $channel_live=1; + if (strlen($conf_exten)<1) + { + $channel_live=0; + echo "Conf Exten $conf_exten Nie je správny\n"; + exit; + } + else + { + + if ($client == 'vdc') + { + $Acount=0; + $AexternalDEAD=0; + + ### see if the agent has a record in the vicidial_live_agents table + $stmt="SELECT count(*) from vicidial_live_agents where user='$user' and server_ip='$server_ip';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $Acount=$row[0]; + + if ($Acount > 0) + { + $stmt="SELECT status from vicidial_live_agents where user='$user' and server_ip='$server_ip';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $Astatus=$row[0]; + } + # ### find out if external table shows agent should be disabled + # $stmt="SELECT count(*) from another_table where user='$user' and status='DEAD';"; + # if ($DB) {echo "|$stmt|\n";} + # $rslt=mysql_query($stmt, $link); + # $row=mysql_fetch_row($rslt); + # $AexternalDEAD=$row[0]; + + if ($auto_dial_level > 0) + { + ### update the vicidial_live_agents every second with a new random number so it is shown to be alive + $stmt="UPDATE vicidial_live_agents set random_id='$random' where user='$user' and server_ip='$server_ip';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + + if ($campagentstdisp == 'YES') + { + ### grab the status of this agent to display + $stmt="SELECT status,campaign_id,closer_campaigns from vicidial_live_agents where user='$user' and server_ip='$server_ip';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $Alogin=$row[0]; + $Acampaign=$row[1]; + $AccampSQL=$row[2]; + $AccampSQL = ereg_replace(' -','', $AccampSQL); + $AccampSQL = ereg_replace(' ',"','", $AccampSQL); + + ### grab the number of calls being placed from this server and campaign + $stmt="SELECT count(*) from vicidial_auto_calls where status IN('LIVE') and ( (campaign_id='$Acampaign') or (campaign_id IN('$AccampSQL')) );"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $RingCalls=$row[0]; + if ($RingCalls > 0) {$RingCalls = "Calls in Queue: $RingCalls";} + else {$RingCalls = "Calls in Queue: $RingCalls";} + + ### grab the number of calls being placed from this server and campaign + $stmt="SELECT count(*) from vicidial_auto_calls where status NOT IN('XFER') and ( (campaign_id='$Acampaign') or (campaign_id IN('$AccampSQL')) );"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $DiaLCalls=$row[0]; + + } + else + { + $Alogin='N'; + $RingCalls='N'; + $DiaLCalls='N'; + } + } + else + { + $Alogin='N'; + $RingCalls='N'; + $DiaLCalls='N'; + + ### update the vicidial_live_agents every second with a new random number so it is shown to be alive + $stmt="UPDATE vicidial_live_agents set random_id='$random' where user='$user' and server_ip='$server_ip';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + + } + + if ($Acount < 1) {$Alogin='DEAD_VLA';} + if ($AexternalDEAD > 0) {$Alogin='DEAD_EXTERNAL';} + + echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Logged-in: ' . $Alogin . '|CampCalls: ' . $RingCalls . '|Stav: ' . $Astatus . '|DiaLCalls: ' . $DiaLCalls . "|\n"; + + } + $total_conf=0; + $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and extension = '$conf_exten';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($rslt) {$sip_list = mysql_num_rows($rslt);} + # echo "$sip_list|"; + $loop_count=0; + while ($sip_list>$loop_count) + { + $loop_count++; $total_conf++; + $row=mysql_fetch_row($rslt); + $KanálA[$total_conf] = "$row[0]"; + if ($format=='debug') {echo "\n";} + } + $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and extension = '$conf_exten';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($rslt) {$channels_list = mysql_num_rows($rslt);} + # echo "$channels_list|"; + $loop_count=0; + while ($channels_list>$loop_count) + { + $loop_count++; $total_conf++; + $row=mysql_fetch_row($rslt); + $KanálA[$total_conf] = "$row[0]"; + if ($format=='debug') {echo "\n";} + } + } + $channels_list = ($channels_list + $sip_list); + echo "$channels_list|"; + + $counter=0; + $countecho=''; + while($total_conf > $counter) + { + $counter++; + $countecho = "$countecho$KanálA[$counter] ~"; + # echo "$KanálA[$counter] ~"; + } + + echo "$countecho\n"; + } + + if ($ACTION == 'register') + { + $MT[0]=''; + $row=''; $rowx=''; + $channel_live=1; + if ( (strlen($conf_exten)<1) || (strlen($exten)<1) ) + { + $channel_live=0; + echo "Conf Exten $conf_exten Nie je správny or Exten $exten Nie je správny\n"; + exit; + } + else + { + $stmt="UPDATE conferences set extension='$exten' where server_ip = '$server_ip' and conf_exten = '$conf_exten';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + echo "Konferencia $conf_exten bol zaregistrovaný $exten\n"; + } + + + +if ($format=='debug') + { + $ENDtime = date("U"); + $RUNtime = ($ENDtime - $StarTtime); + echo "\n"; + echo "\n\n\n"; + } + +exit; + +?> diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_sk/dbconnect.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_sk/dbconnect.php new file mode 100644 index 00000000..7221b35e --- /dev/null +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_sk/dbconnect.php @@ -0,0 +1,48 @@ + LICENSE: GPLv2 +# +if ( file_exists("/etc/astguiclient.conf") ) +{ +$DBCagc = file("/etc/astguiclient.conf"); +foreach ($DBCagc as $DBCline) + { + $DBCline = preg_replace("/ |>|\n|\r|\t|\#.*|;.*/","",$DBCline); + if (ereg("^PATHlogs", $DBCline)) + {$PATHlogs = $DBCline; $PATHlogs = preg_replace("/.*=/","",$PATHlogs);} + if (ereg("^PATHweb", $DBCline)) + {$WeBServeRRooT = $DBCline; $WeBServeRRooT = preg_replace("/.*=/","",$WeBServeRRooT);} + if (ereg("^VARDB_server", $DBCline)) + {$VARDB_server = $DBCline; $VARDB_server = preg_replace("/.*=/","",$VARDB_server);} + if (ereg("^VARDB_database", $DBCline)) + {$VARDB_database = $DBCline; $VARDB_database = preg_replace("/.*=/","",$VARDB_database);} + if (ereg("^VARDB_user", $DBCline)) + {$VARDB_user = $DBCline; $VARDB_user = preg_replace("/.*=/","",$VARDB_user);} + if (ereg("^VARDB_pass", $DBCline)) + {$VARDB_pass = $DBCline; $VARDB_pass = preg_replace("/.*=/","",$VARDB_pass);} + if (ereg("^VARDB_port", $DBCline)) + {$VARDB_port = $DBCline; $VARDB_port = preg_replace("/.*=/","",$VARDB_port);} + } + +} +else +{ +#defaults for DB connection +$VARDB_server = 'localhost'; +$VARDB_user = 'cron'; +$VARDB_pass = '1234'; +$VARDB_database = '1234'; +$WeBServeRRooT = '/usr/local/apache2/htdocs'; +} + +$link=mysql_connect("$VARDB_server", "$VARDB_user", "$VARDB_pass"); +mysql_select_db("$VARDB_database"); + +$local_DEF = 'Local/'; +$conf_silent_prefix = '7'; +$local_AMP = '@'; +$ext_context = 'demo'; +$recording_exten = '8309'; +$WeBRooTWritablE = '1'; + +?> diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_sk/inbound_popup.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_sk/inbound_popup.php new file mode 100644 index 00000000..63e02c45 --- /dev/null +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_sk/inbound_popup.php @@ -0,0 +1,351 @@ + LICENSE: GPLv2 +### +### This script is designed to open up when a live_inbound call comes in giving the user +### options of what to do with the call or options to lookup the callerID on various web sites +### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table +### +### required variables: +### - $server_ip +### - $session_name +### - $uniqueid - ('1234567890.123456',...) +### - $user +### - $pass +### optional variables: +### - $format - ('text','debug') +### - $vmail_box - ('101','1234',...) +### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) +### - $ext_context - ('default','demo',...) +### - $ext_priority - ('1','2',...) +### - $voicemail_dump_exten - ('85026666666666') +### - $local_web_callerID_URL_enc - ( rawurlencoded custom callerid lookup URL) +### + +# changes +# 50428-1500 - First build of script display only +# 50429-1241 - some formatting, hangup and Vmail redirect, 30s timeout on actions, and CID web lookup links +# 50503-1244 - added session_name checking for extra security +# 50711-1203 - removed HTTP authentication in favor of user/pass vars +# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES +# 60619-1205 - Added variable filters to close security holes for login form +# + +require("dbconnect.php"); + +### If you have globals turned off uncomment these lines +if (isset($_GET["user"])) {$user=$_GET["user"];} + elseif (isset($_POST["user"])) {$user=$_POST["user"];} +if (isset($_GET["pass"])) {$pass=$_GET["pass"];} + elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} +if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} + elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} +if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} + elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} +if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];} + elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];} +if (isset($_GET["format"])) {$format=$_GET["format"];} + elseif (isset($_POST["format"])) {$format=$_POST["format"];} +if (isset($_GET["exten"])) {$exten=$_GET["exten"];} + elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} +if (isset($_GET["vmail_box"])) {$vmail_box=$_GET["vmail_box"];} + elseif (isset($_POST["vmail_box"])) {$vmail_box=$_POST["vmail_box"];} +if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];} + elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} +if (isset($_GET["ext_priority"])) {$ext_priority=$_GET["ext_priority"];} + elseif (isset($_POST["ext_priority"])) {$ext_priority=$_POST["ext_priority"];} +if (isset($_GET["voicemail_dump_exten"])) {$voicemail_dump_exten=$_GET["voicemail_dump_exten"];} + elseif (isset($_POST["voicemail_dump_exten"])) {$voicemail_dump_exten=$_POST["voicemail_dump_exten"];} +if (isset($_GET["local_web_callerID_URL_enc"])) {$local_web_callerID_URL_enc=$_GET["local_web_callerID_URL_enc"];} + elseif (isset($_POST["local_web_callerID_URL_enc"])) {$local_web_callerID_URL_enc=$_POST["local_web_callerID_URL_enc"];} +if (isset($_GET["local_web_callerID_URL_enc"])) {$local_web_callerID_URL = rawurldecode($local_web_callerID_URL_enc);} + else {$local_web_callerID_URL = '';} + +$user=ereg_replace("[^0-9a-zA-Z]","",$user); +$pass=ereg_replace("[^0-9a-zA-Z]","",$pass); + +# default optional vars if not set +if (!isset($format)) {$format="text";} + +$version = '0.0.6'; +$build = '60619-1205'; +$StarTtime = date("U"); +$NOW_DATE = date("Y-m-d"); +$NOW_TIME = date("Y-m-d H:i:s"); +if (!isset($query_date)) {$query_date = $NOW_DATE;} +$DO = '-1'; +if ( (eregi("^Zap",$channel)) and (!eregi("-",$channel)) ) {$channel = "$channel$DO";} + + $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $auth=$row[0]; + + if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) + { + echo "Nesprávny Užívateľské meno/Heslo: |$user|$pass|\n"; + exit; + } + else + { + + if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) + { + echo "Nesprávny server_ip: |$server_ip| or Nesprávny session_name: |$session_name|\n"; + exit; + } + else + { + $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $SNauth=$row[0]; + if($SNauth==0) + { + echo "Nesprávny session_name: |$session_name|$server_ip|\n"; + exit; + } + else + { + # do nothing for now + } + } + } + +if ($format=='debug') +{ +$forever_stop=0; +$user_abb = "$user$user$user$user"; +while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) + {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} + +echo "\n"; +echo "\n"; +echo "\n"; +?> + + +ŽIVÝ PRÍCHODZÍ HOVOR"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "

ŽIVÝ PRÍCHODZÍ HOVOR

\n"; +echo "$NOW_TIME

\n"; +} + + + $MT[0]=''; + $row=''; $rowx=''; + $channel_live=1; + if (strlen($uniqueid)<9) + { + $channel_live=0; + echo "Uniqueid $uniqueid Nie je správny\n"; + exit; + } + else + { + $stmt="SELECT * FROM live_inbound where server_ip = '$server_ip' and uniqueid = '$uniqueid';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $channels_list = mysql_num_rows($rslt); + if ($channels_list>0) + { + $row=mysql_fetch_row($rslt); +# echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|"; +# Zap/73|"V.I.C.I. MARKET" <7275338730>|2005-04-28 14:01:21|7274514936|Inbound direct to Matt||||| + if ($format=='debug') {echo "\n";} + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
Kanál: $row[1]
IDvolajúceho: $row[3]
\n"; + + $phone = eregi_replace(".*\<","",$row[3]); + $phone = eregi_replace("\>.*","",$phone); + $NPA = substr($phone, 0, 3); + $NXX = substr($phone, 3, 3); + $XXXX = substr($phone, 6, 4); + $D='-'; + echo "GOOGLE - \n"; + echo "ANYWHO - \n"; + echo "SWITCHBOARD - \n"; + echo "VERIZON - \n"; + echo "WHITEPAGES - \n"; + echo "411.COM - \n"; + echo "411.COM - \n"; + + $local_web_callerID_QUERY_STRING =''; + $local_web_callerID_QUERY_STRING.="?callerID_areacode=$NPA"; + $local_web_callerID_QUERY_STRING.="&callerID_prefix=$NXX"; + $local_web_callerID_QUERY_STRING.="&callerID_last4=$XXXX"; + $local_web_callerID_QUERY_STRING.="&callerID_Time=$row[6]"; + $local_web_callerID_QUERY_STRING.="&callerID_Kanál=$row[1]"; + $local_web_callerID_QUERY_STRING.="&callerID_uniqueID=$row[0]"; + $local_web_callerID_QUERY_STRING.="&callerID_phone_ext=$row[5]"; + $local_web_callerID_QUERY_STRING.="&callerID_server_ip=$row[2]"; + $local_web_callerID_QUERY_STRING.="&callerID_extension=$row[4]"; + $local_web_callerID_QUERY_STRING.="&callerID_inbound_number=$row[8]"; + $local_web_callerID_QUERY_STRING.="&callerID_comment_a=$row[9]"; + $local_web_callerID_QUERY_STRING.="&callerID_comment_b=$row[10]"; + $local_web_callerID_QUERY_STRING.="&callerID_comment_c=$row[11]"; + $local_web_callerID_QUERY_STRING.="&callerID_comment_d=$row[12]"; + $local_web_callerID_QUERY_STRING.="&callerID_comment_e=$row[13]"; + echo "UPRAVENÉ - \n"; + + echo "
Volané číslo: $row[8]
Poznámka: $row[9]|$row[10]|$row[11]|$row[12]|$row[13]|
\n"; + echo "POLOŹIŤ - \n"; + echo "POSLAŤ DO MOJEJ HLASOVEJ SCHRÁNKY\n"; + echo "
\n"; + + + $stmt="UPDATE live_inbound set acknowledged='Y' where server_ip = '$server_ip' and uniqueid = '$uniqueid';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + + + } + + + } + + +if ($format=='debug') + { + $ENDtime = date("U"); + $RUNtime = ($ENDtime - $StarTtime); + echo "\n"; + echo "\n\n\n"; + } + +exit; + +?> diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_sk/live_exten_check.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_sk/live_exten_check.php new file mode 100644 index 00000000..ed1ca645 --- /dev/null +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_sk/live_exten_check.php @@ -0,0 +1,278 @@ + LICENSE: GPLv2 +### +### This script is designed purely to send whether the client channel is live and to what channel it is connected +### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table +### +### required variables: +### - $server_ip +### - $session_name +### - $user +### - $pass +### optional variables: +### - $format - ('text','debug') +### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) +### - $protocol - ('SIP','Zap','IAX2',...) +### + +# changes +# 50404-1249 - First build of script +# 50406-1402 - added connected trunk lookup +# 50428-1452 - added live_inbound check for exten on 2nd line of output +# 50503-1233 - added session_name checking for extra security +# 50524-1429 - added parked calls count +# 50610-1204 - Added NULL check on MySQL results to reduced errors +# 50711-1204 - removed HTTP authentication in favor of user/pass vars +# 60103-1541 - added favorite extens status display +# 60421-1359 - check GET/POST vars lines with isset to not trigger PHP NOTICES +# 60619-1203 - Added variable filters to close security holes for login form +# 60825-1029 - Fixed translation variable issue ChannelA +# + +require("dbconnect.php"); + +### If you have globals turned off uncomment these lines +if (isset($_GET["user"])) {$user=$_GET["user"];} + elseif (isset($_POST["user"])) {$user=$_POST["user"];} +if (isset($_GET["pass"])) {$pass=$_GET["pass"];} + elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} +if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} + elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} +if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} + elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} +if (isset($_GET["format"])) {$format=$_GET["format"];} + elseif (isset($_POST["format"])) {$format=$_POST["format"];} +if (isset($_GET["exten"])) {$exten=$_GET["exten"];} + elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} +if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} + elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} +if (isset($_GET["favorites_count"])) {$favorites_count=$_GET["favorites_count"];} + elseif (isset($_POST["favorites_count"])) {$favorites_count=$_POST["favorites_count"];} +if (isset($_GET["favorites_list"])) {$favorites_list=$_GET["favorites_list"];} + elseif (isset($_POST["favorites_list"])) {$favorites_list=$_POST["favorites_list"];} + +$user=ereg_replace("[^0-9a-zA-Z]","",$user); +$pass=ereg_replace("[^0-9a-zA-Z]","",$pass); + +# default optional vars if not set +if (!isset($format)) {$format="text";} + +$version = '2.0.1'; +$build = '60825-1029'; +$StarTtime = date("U"); +$NOW_DATE = date("Y-m-d"); +$NOW_TIME = date("Y-m-d H:i:s"); +if (!isset($query_date)) {$query_date = $NOW_DATE;} + + $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $auth=$row[0]; + + if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) + { + echo "Nesprávny Užívateľské meno/Heslo: |$user|$pass|\n"; + exit; + } + else + { + + if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) + { + echo "Nesprávny server_ip: |$server_ip| or Nesprávny session_name: |$session_name|\n"; + exit; + } + else + { + $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $SNauth=$row[0]; + if($SNauth==0) + { + echo "Nesprávny session_name: |$session_name|$server_ip|\n"; + exit; + } + else + { + # do nothing for now + } + } + } + +if ($format=='debug') +{ +echo "\n"; +echo "\n"; +echo "\n"; +echo "Overiť aktívnu pobočku"; +echo "\n"; +echo "\n"; +echo "\n"; +} + + +echo "DateTime: $NOW_TIME|"; +echo "UnixTime: $StarTtime|"; + +$stmt="SELECT count(*) FROM parked_channels where server_ip = '$server_ip';"; + if ($format=='debug') {echo "\n";} +$rslt=mysql_query($stmt, $link); +$row=mysql_fetch_row($rslt); +echo "$row[0]|"; + + $MT[0]=''; + $row=''; $rowx=''; + $channel_live=1; + if ( (strlen($exten)<1) or (strlen($protocol)<3) ) + { + $channel_live=0; + echo "Exten $exten Nie je správny alebo protokol $protocol Nie je správny\n"; + exit; + } + else + { + $stmt="SELECT channel,extension FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$protocol/$exten%\";"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($rslt) {$channels_list = mysql_num_rows($rslt);} + echo "$channels_list|"; + $loop_count=0; + while ($channels_list>$loop_count) + { + $loop_count++; + $row=mysql_fetch_row($rslt); + $ChanneLA[$loop_count] = "$row[0]"; + $ChanneLB[$loop_count] = "$row[1]"; + if ($format=='debug') {echo "\n";} + } + } + + $counter=0; + while($loop_count > $counter) + { + $counter++; + $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel_data = '$ChanneLA[$counter]';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($rslt) {$trunk_count = mysql_num_rows($rslt);} + if ($trunk_count>0) + { + $row=mysql_fetch_row($rslt); + echo "Conversation: $counter ~"; + echo "KanálA: $ChanneLA[$counter] ~"; + echo "KanálB: $ChanneLB[$counter] ~"; + echo "KanálBtrunk: $row[0]|"; + } + else + { + $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel_data = '$ChanneLA[$counter]';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($rslt) {$trunk_count = mysql_num_rows($rslt);} + if ($trunk_count>0) + { + $row=mysql_fetch_row($rslt); + echo "Conversation: $counter ~"; + echo "KanálA: $ChanneLA[$counter] ~"; + echo "KanálB: $ChanneLB[$counter] ~"; + echo "KanálBtrunk: $row[0]|"; + } + else + { + $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$ChanneLB[$counter]%\";"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($rslt) {$trunk_count = mysql_num_rows($rslt);} + if ($trunk_count>0) + { + $row=mysql_fetch_row($rslt); + echo "Conversation: $counter ~"; + echo "KanálA: $ChanneLA[$counter] ~"; + echo "KanálB: $ChanneLB[$counter] ~"; + echo "KanálBtrunk: $row[0]|"; + } + else + { + $stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and channel LIKE \"$ChanneLB[$counter]%\";"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($rslt) {$trunk_count = mysql_num_rows($rslt);} + if ($trunk_count>0) + { + $row=mysql_fetch_row($rslt); + echo "Conversation: $counter ~"; + echo "KanálA: $ChanneLA[$counter] ~"; + echo "KanálB: $ChanneLB[$counter] ~"; + echo "KanálBtrunk: $row[0]|"; + } + else + { + echo "Conversation: $counter ~"; + echo "KanálA: $ChanneLA[$counter] ~"; + echo "KanálB: $ChanneLB[$counter] ~"; + echo "KanálBtrunk: $ChanneLA[$counter]|"; + } + } + } + } + } + +echo "\n"; + +### check for live_inbound entry +$stmt="select * from live_inbound where server_ip = '$server_ip' and phone_ext = '$exten' and acknowledged='N';"; + if ($format=='debug') {echo "\n";} +$rslt=mysql_query($stmt, $link); +if ($rslt) {$channels_list = mysql_num_rows($rslt);} + if ($channels_list>0) + { + $row=mysql_fetch_row($rslt); + $LIuniqueid = "$row[0]"; + $LIchannel = "$row[1]"; + $LIcallerid = "$row[3]"; + $LIdatetime = "$row[6]"; + echo "$LIuniqueid|$LIchannel|$LIcallerid|$LIdatetime|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]|"; + if ($format=='debug') {echo "\n";} + } + +echo "\n"; + + +### if favorites are present do a lookup to see if any are active +if ($favorites_count > 0) + { + $favorites = explode(',',$favorites_list); + $h=0; + $favs_print=''; + while ($favorites_count > $h) + { + $fav_extension = explode('/',$favorites[$h]); + $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$favorites[$h]%\";"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $favs_print .= "$fav_extension[1]: $row[0] ~"; + $h++; + } + echo "$favs_print\n"; + } + +if ($format=='debug') {echo "\n";} + + +if ($format=='debug') + { + $ENDtime = date("U"); + $RUNtime = ($ENDtime - $StarTtime); + echo "\n"; + echo "\n\n\n"; + } + +exit; + +?> diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_sk/manager_send.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_sk/manager_send.php new file mode 100644 index 00000000..a0ce8ea7 --- /dev/null +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_sk/manager_send.php @@ -0,0 +1,1195 @@ + LICENSE: GPLv2 +# +# This script is designed purely to insert records into the vicidial_manager table to signal Actions to an asterisk server +# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table +# +# required variables: +# - $server_ip +# - $session_name +# - $user +# - $pass +# optional variables: +# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectXtraCX','RedirectVD','HangupConfDial','VolumeControl','OriginateVDRelogin') +# - $queryCID - ('CN012345678901234567',...) +# - $format - ('text','debug') +# - $channel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) +# - $exten - ('1234','913125551212',...) +# - $ext_context - ('default','demo',...) +# - $ext_priority - ('1','2',...) +# - $filename - ('20050406-125623_44444',...) +# - $extenName - ('phone100',...) +# - $parkedby - ('phone100',...) +# - $extrachannel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) +# - $auto_dial_level - ('0','1','1.1',...) +# - $campaign - ('CLOSER','TESTCAMP',...) +# - $uniqueid - ('1120232758.2406800',...) +# - $lead_id - ('1234',...) +# - $seconds - ('32',...) +# - $outbound_cid - ('3125551212','0000000000',...) +# - $agent_log_id - ('123456',...) +# - $call_server_ip - ('10.10.10.15',...) +# - $CalLCID - ('VD01234567890123456',...) +# - $stage - ('UP','DOWN','2NDXfeR') +# - $session_id - ('8600051') + +# CHANGELOG: +# 50401-1002 - First build of script, Hangup function only +# 50404-1045 - Redirect basic function enabled +# 50406-1522 - Monitor basic function enabled +# 50407-1647 - Monitor and StopMonitor full functions enabled +# 50422-1120 - basic Originate function enabled +# 50428-1451 - basic SysCIDOriginate function enabled for checking voicemail +# 50502-1539 - basic RedirectName and RedirectNameVmail added +# 50503-1227 - added session_name checking for extra security +# 50523-1341 - added Conference call start/stop recording +# 50523-1421 - added OriginateName and OriginateNameVmail for local calls +# 50524-1602 - added RedirectToPark and RedirectFromPark +# 50531-1203 - added RedirecXtra for dual channel redirection +# 50630-1100 - script changed to not use HTTP login vars, user/pass instead +# 50804-1148 - Added RedirectVD for VICIDIAL blind redirection with logging +# 50815-1204 - Added NEXTAVAILABLE to RedirectXtra function +# 50903-2343 - Added HangupConfDial function to hangup in-dial channels in conf +# 50913-1057 - Added outbound_cid set if present to originate call +# 51020-1556 - Added agent_log_id framework for detailed agent activity logging +# 51118-1204 - Fixed Blind transfer bug from VICIDIAL when in manual dial mode +# 51129-1014 - Added ability to accept calls from other VICIDIAL servers +# 51129-1253 - Fixed Hangups of other agents channels in VICIDIAL AD +# 60310-2022 - Fixed NEXTAVAILABLE bug in leave-3way-call redirect function +# 60421-1413 - check GET/POST vars lines with isset to not trigger PHP NOTICES +# 60619-1158 - Added variable filters to close security holes for login form +# 60809-1544 - Added direct transfers to leave-3ways in consultative transfers +# 61004-1526 - Added parsing of volume control command and lookup or number +# 61130-1617 - Added lead_id to MonitorConf for recording_log +# 61201-1115 - Added user to MonitorConf for recording_log +# 70111-1600 - added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns +# 70226-1251 - Added Mute/UnMute to conference volume control +# 70320-1502 - Added option to allow retry of leave-3way-call and debug logging +# 70322-1636 - Added sipsak display ability +# 80331-1433 - Added second transfer try for VICIDIAL transfers on manual dial calls +# 80402-0121 - Fixes for manual dial transfers on some systems +# 80424-0442 - Added non_latin lookup from system_settings +# + +$version = '2.0.4-31'; +$build = '80424-0442'; + +require("dbconnect.php"); + +### These are variable assignments for PHP globals off +if (isset($_GET["user"])) {$user=$_GET["user"];} + elseif (isset($_POST["user"])) {$user=$_POST["user"];} +if (isset($_GET["pass"])) {$pass=$_GET["pass"];} + elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} +if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} + elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} +if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} + elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} +if (isset($_GET["ACTION"])) {$ACTION=$_GET["ACTION"];} + elseif (isset($_POST["ACTION"])) {$ACTION=$_POST["ACTION"];} +if (isset($_GET["queryCID"])) {$queryCID=$_GET["queryCID"];} + elseif (isset($_POST["queryCID"])) {$queryCID=$_POST["queryCID"];} +if (isset($_GET["format"])) {$format=$_GET["format"];} + elseif (isset($_POST["format"])) {$format=$_POST["format"];} +if (isset($_GET["channel"])) {$channel=$_GET["channel"];} + elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} +if (isset($_GET["exten"])) {$exten=$_GET["exten"];} + elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} +if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];} + elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} +if (isset($_GET["ext_priority"])) {$ext_priority=$_GET["ext_priority"];} + elseif (isset($_POST["ext_priority"])) {$ext_priority=$_POST["ext_priority"];} +if (isset($_GET["filename"])) {$filename=$_GET["filename"];} + elseif (isset($_POST["filename"])) {$filename=$_POST["filename"];} +if (isset($_GET["extenName"])) {$extenName=$_GET["extenName"];} + elseif (isset($_POST["extenName"])) {$extenName=$_POST["extenName"];} +if (isset($_GET["parkedby"])) {$parkedby=$_GET["parkedby"];} + elseif (isset($_POST["parkedby"])) {$parkedby=$_POST["parkedby"];} +if (isset($_GET["extrachannel"])) {$extrachannel=$_GET["extrachannel"];} + elseif (isset($_POST["extrachannel"])) {$extrachannel=$_POST["extrachannel"];} +if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];} + elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];} +if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];} + elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];} +if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];} + elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];} +if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} + elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} +if (isset($_GET["secondS"])) {$secondS=$_GET["secondS"];} + elseif (isset($_POST["secondS"])) {$secondS=$_POST["secondS"];} +if (isset($_GET["outbound_cid"])) {$outbound_cid=$_GET["outbound_cid"];} + elseif (isset($_POST["outbound_cid"])) {$outbound_cid=$_POST["outbound_cid"];} +if (isset($_GET["agent_log_id"])) {$agent_log_id=$_GET["agent_log_id"];} + elseif (isset($_POST["agent_log_id"])) {$agent_log_id=$_POST["agent_log_id"];} +if (isset($_GET["call_server_ip"])) {$call_server_ip=$_GET["call_server_ip"];} + elseif (isset($_POST["call_server_ip"])) {$call_server_ip=$_POST["call_server_ip"];} +if (isset($_GET["CalLCID"])) {$CalLCID=$_GET["CalLCID"];} + elseif (isset($_POST["CalLCID"])) {$CalLCID=$_POST["CalLCID"];} +if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];} + elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];} +if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} + elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} +if (isset($_GET["stage"])) {$stage=$_GET["stage"];} + elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} +if (isset($_GET["extension"])) {$extension=$_GET["extension"];} + elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} +if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} + elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} +if (isset($_GET["phone_ip"])) {$phone_ip=$_GET["phone_ip"];} + elseif (isset($_POST["phone_ip"])) {$phone_ip=$_POST["phone_ip"];} +if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["enable_sipsak_messages"];} + elseif (isset($_POST["enable_sipsak_messages"])) {$enable_sipsak_messages=$_POST["enable_sipsak_messages"];} +if (isset($_GET["allow_sipsak_messages"])) {$allow_sipsak_messages=$_GET["allow_sipsak_messages"];} + elseif (isset($_POST["allow_sipsak_messages"])) {$allow_sipsak_messages=$_POST["allow_sipsak_messages"];} +if (isset($_GET["session_id"])) {$session_id=$_GET["session_id"];} + elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];} + +header ("Content-type: text/html; charset=utf-8"); +header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 +header ("Pragma: no-cache"); // HTTP/1.0 + +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ +$user=ereg_replace("[^0-9a-zA-Z]","",$user); +$pass=ereg_replace("[^0-9a-zA-Z]","",$pass); +$secondS = ereg_replace("[^0-9]","",$secondS); +} + +# default optional vars if not set +if (!isset($ACTION)) {$ACTION="Originate";} +if (!isset($format)) {$format="alert";} +if (!isset($ext_priority)) {$ext_priority="1";} + +$StarTtime = date("U"); +$NOW_DATE = date("Y-m-d"); +$NOW_TIME = date("Y-m-d H:i:s"); +if (!isset($query_date)) {$query_date = $NOW_DATE;} + +$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; +if ($DB) {echo "|$stmt|\n";} +if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} +$rslt=mysql_query($stmt, $link); +$row=mysql_fetch_row($rslt); +$auth=$row[0]; + + if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) + { + echo "Nesprávny Užívateľské meno/Heslo: |$user|$pass|\n"; + exit; + } + else + { + + if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) + { + echo "Nesprávny server_ip: |$server_ip| or Nesprávny session_name: |$session_name|\n"; + exit; + } + else + { + $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $SNauth=$row[0]; + if($SNauth==0) + { + echo "Nesprávny session_name: |$session_name|$server_ip|\n"; + exit; + } + else + { + # do nothing for now + } + } + } + +if ($format=='debug') +{ +echo "\n"; +echo "\n"; +echo "\n"; +echo "Poslať manažér: "; +if ($ACTION=="Originate") {echo "Originate";} +if ($ACTION=="Redirect") {echo "Redirect";} +if ($ACTION=="RedirectName") {echo "RedirectName";} +if ($ACTION=="Hangup") {echo "Hangup";} +if ($ACTION=="Command") {echo "Command";} +if ($ACTION==99999) {echo "POMOC";} +echo "\n"; +echo "\n"; +echo "\n"; +} + + + + + +###################### +# ACTION=SysCIDOriginate - insert Originate Manager statement allowing small CIDs for system calls +###################### +if ($ACTION=="SysCIDOriginate") +{ + if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<1) ) + { + echo "Exten $exten Nie je správny or queryCID $queryCID Nie je správny, Originate príkaz nebol vložený\n"; + } + else + { + $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $queryCID','','','','','');"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + echo "Originate príkaz poslaný pre Exten $exten Kanál $channel na $server_ip\n"; + } +} + + + +###################### +# ACTION=Originate, OriginateName, OriginateNameVmail - insert Originate Manager statement +###################### +if ($ACTION=="OriginateName") +{ + if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) + { + $channel_live=0; + echo "Jeden z týchto premených Nie je správny:\n"; + echo "Kanál $channel musí byť viac ako 2 znaky\n"; + echo "queryCID $queryCID musí byť viac ako 14 znakov\n"; + echo "extenName $extenName musí byť nastavené\n"; + echo "ext_context $ext_context musí byť nastavené\n"; + echo "ext_priority $ext_priority musí byť nastavené\n"; + echo "\nOriginateName Action neodoslané\n"; + } + else + { + $stmt="SELECT dialplan_number FROM phones where server_ip = '$server_ip' and extension='$extenName';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $name_count = mysql_num_rows($rslt); + if ($name_count>0) + { + $row=mysql_fetch_row($rslt); + $exten = $row[0]; + $ACTION="Originate"; + } + } +} + +if ($ACTION=="OriginateNameVmail") +{ + if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) + { + $channel_live=0; + echo "Jeden z týchto premených Nie je správny:\n"; + echo "Kanál $channel musí byť viac ako 2 znaky\n"; + echo "queryCID $queryCID musí byť viac ako 14 znakov\n"; + echo "extenName $extenName musí byť nastavené\n"; + echo "exten $exten musí byť nastavené\n"; + echo "ext_context $ext_context musí byť nastavené\n"; + echo "ext_priority $ext_priority musí byť nastavené\n"; + echo "\nOriginateNameVmail Action neodoslané\n"; + } + else + { + $stmt="SELECT voicemail_id FROM phones where server_ip = '$server_ip' and extension='$extenName';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $name_count = mysql_num_rows($rslt); + if ($name_count>0) + { + $row=mysql_fetch_row($rslt); + $exten = "$exten$row[0]"; + $ACTION="Originate"; + } + } +} + +if ($ACTION=="OriginateVDRelogin") +{ + if ( ($enable_sipsak_messages > 0) and ($allow_sipsak_messages > 0) and (eregi("SIP",$protocol)) ) + { + $CIDdate = date("ymdHis"); + $DS='-'; + $SIPSAK_prefix = 'LIN-'; + print "\n"; + passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_prefix$campaign\" -r 5060 -s sip:$extension@$phone_ip > /dev/null"); + $queryCID = "$SIPSAK_prefix$campaign$DS$CIDdate"; + + } + $ACTION="Originate"; +} + +if ($ACTION=="Originate") +{ + if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<10) ) + { + echo "Exten $exten Nie je správny or queryCID $queryCID Nie je správny, Originate príkaz nebol vložený\n"; + } + else + { + if (strlen($outbound_cid)>1) + {$outCID = "\"$queryCID\" <$outbound_cid>";} + else + {$outCID = "$queryCID";} + $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $outCID','','','','','');"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + echo "Originate príkaz poslaný pre Exten $exten Kanál $channel na $server_ip\n"; + } +} + + + +###################### +# ACTION=HangupConfDial - find the Local channel that is in the conference and needs to be hung up +###################### +if ($ACTION=="HangupConfDial") +{ + $row=''; $rowx=''; + $channel_live=1; + if ( (strlen($exten)<3) or (strlen($queryCID)<15) or (strlen($ext_context)<1) ) + { + $channel_live=0; + echo "conference $exten Nie je správny or ext_context $ext_context or queryCID $queryCID Nie je správny, Hangup príkaz nebol vložený\n"; + } + else + { + $local_DEF = 'Local/'; + $local_AMP = '@'; + $hangup_channel_prefix = "$local_DEF$exten$local_AMP$ext_context"; + + $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row > 0) + { + $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + $channel=$rowx[0]; + $ACTION="Hangup"; + $queryCID = eregi_replace("^.","G",$queryCID); + } + } +} + + + +###################### +# ACTION=Hangup - insert Hangup Manager statement +###################### +if ($ACTION=="Hangup") +{ + $row=''; $rowx=''; + $channel_live=1; + if ( (strlen($channel)<3) or (strlen($queryCID)<15) ) + { + $channel_live=0; + echo "Kanál $channel Nie je správny or queryCID $queryCID Nie je správny, Hangup príkaz nebol vložený\n"; + } + else + { + if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} + +# $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';"; +# if ($format=='debug') {echo "\n";} +# $rslt=mysql_query($stmt, $link); +# $row=mysql_fetch_row($rslt); +# if ($row[0]==0) +# { +# $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; +# if ($format=='debug') {echo "\n";} +# $rslt=mysql_query($stmt, $link); +# $rowx=mysql_fetch_row($rslt); +# if ($rowx[0]==0) +# { +# $channel_live=0; +# echo "Channel $channel is not live on $call_server_ip, Hangup command not inserted\n"; +# } +# } + if ( ($auto_dial_level > 0) and (strlen($CalLCID)>2) and (strlen($exten)>2) and ($secondS > 4)) + { + $stmt="SELECT count(*) FROM vicidial_auto_calls where channel='$channel' and callerid='$CalLCID';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + if ($rowx[0]==0) + { + echo "Call $CalLCID $channel nie je živá na $call_server_ip, Checking Live Kanál...\n"; + + $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel' and extension LIKE \"%$exten\";"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0]==0) + { + $channel_live=0; + echo "Kanál $channel nie je živá na $call_server_ip, Hangup príkaz nebol vložený $rowx[0]\n$stmt\n"; + } + else + { + echo "$stmt\n"; + } + } + } + if ($channel_live==1) + { + $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Hangup','$queryCID','Channel: $channel','','','','','','','','','');"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + echo "Hangup príkaz poslaný pre Kanál $channel na $call_server_ip\n"; + } + } +} + + + +###################### +# ACTION=Redirect, RedirectName, RedirectNameVmail, RedirectToPark, RedirectFromPark, RedirectVD, RedirectXtra, RedirectXtraCX +# - insert Redirect Manager statement using extensions name +###################### +if ($ACTION=="RedirectVD") +{ + if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($campaign)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($uniqueid)<2) or (strlen($lead_id)<1) ) + { + $channel_live=0; + echo "Jeden z týchto premených Nie je správny:\n"; + echo "Kanál $channel musí byť viac ako 2 znaky\n"; + echo "queryCID $queryCID musí byť viac ako 14 znakov\n"; + echo "exten $exten musí byť nastavené\n"; + echo "ext_context $ext_context musí byť nastavené\n"; + echo "ext_priority $ext_priority musí byť nastavené\n"; + echo "auto_dial_level $auto_dial_level musí byť nastavené\n"; + echo "campaign $campaign musí byť nastavené\n"; + echo "uniqueid $uniqueid musí byť nastavené\n"; + echo "lead_id $lead_id musí byť nastavené\n"; + echo "\nRedirectVD Action neodoslané\n"; + } + else + { + if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} + $stmt = "select count(*) from vicidial_campaigns where campaign_id='$campaign' and campaign_allow_inbound='Y';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + { + $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='XFER' where lead_id='$lead_id' order by start_epoch desc limit 1;"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + if ($auto_dial_level < 1) + { + $stmt = "UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='XFER' where uniqueid='$uniqueid';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + else + { + $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + + $ACTION="Redirect"; + } +} + +if ($ACTION=="RedirectToPark") +{ + if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($extenName)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($parkedby)<1) ) + { + $channel_live=0; + echo "Jeden z týchto premených Nie je správny:\n"; + echo "Kanál $channel musí byť viac ako 2 znaky\n"; + echo "queryCID $queryCID musí byť viac ako 14 znakov\n"; + echo "exten $exten musí byť nastavené\n"; + echo "extenName $extenName musí byť nastavené\n"; + echo "ext_context $ext_context musí byť nastavené\n"; + echo "ext_priority $ext_priority musí byť nastavené\n"; + echo "parkedby $parkedby musí byť nastavené\n"; + echo "\nRedirectToPark Action neodoslané\n"; + } + else + { + if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} + $stmt = "INSERT INTO parked_channels values('$channel','$server_ip','','$extenName','$parkedby','$NOW_TIME');"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $ACTION="Redirect"; + } +} + +if ($ACTION=="RedirectFromPark") +{ + if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) + { + $channel_live=0; + echo "Jeden z týchto premených Nie je správny:\n"; + echo "Kanál $channel musí byť viac ako 2 znaky\n"; + echo "queryCID $queryCID musí byť viac ako 14 znakov\n"; + echo "exten $exten musí byť nastavené\n"; + echo "ext_context $ext_context musí byť nastavené\n"; + echo "ext_priority $ext_priority musí byť nastavené\n"; + echo "\nRedirectFromPark Action neodoslané\n"; + } + else + { + if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} + $stmt = "DELETE FROM parked_channels where server_ip='$server_ip' and channel='$channel';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $ACTION="Redirect"; + } +} + +if ($ACTION=="RedirectName") +{ + if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) + { + $channel_live=0; + echo "Jeden z týchto premených Nie je správny:\n"; + echo "Kanál $channel musí byť viac ako 2 znaky\n"; + echo "queryCID $queryCID musí byť viac ako 14 znakov\n"; + echo "extenName $extenName musí byť nastavené\n"; + echo "ext_context $ext_context musí byť nastavené\n"; + echo "ext_priority $ext_priority musí byť nastavené\n"; + echo "\nRedirectName Action neodoslané\n"; + } + else + { + $stmt="SELECT dialplan_number FROM phones where server_ip = '$server_ip' and extension='$extenName';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $name_count = mysql_num_rows($rslt); + if ($name_count>0) + { + $row=mysql_fetch_row($rslt); + $exten = $row[0]; + $ACTION="Redirect"; + } + } +} + +if ($ACTION=="RedirectNameVmail") +{ + if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) + { + $channel_live=0; + echo "Jeden z týchto premených Nie je správny:\n"; + echo "Kanál $channel musí byť viac ako 2 znaky\n"; + echo "queryCID $queryCID musí byť viac ako 14 znakov\n"; + echo "extenName $extenName musí byť nastavené\n"; + echo "exten $exten musí byť nastavené\n"; + echo "ext_context $ext_context musí byť nastavené\n"; + echo "ext_priority $ext_priority musí byť nastavené\n"; + echo "\nRedirectNameVmail Action neodoslané\n"; + } + else + { + $stmt="SELECT voicemail_id FROM phones where server_ip = '$server_ip' and extension='$extenName';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $name_count = mysql_num_rows($rslt); + if ($name_count>0) + { + $row=mysql_fetch_row($rslt); + $exten = "$exten$row[0]"; + $ACTION="Redirect"; + } + } +} + +if ($ACTION=="RedirectXtraCX") +{ + $DBout=''; + $row=''; $rowx=''; + $channel_liveX=1; + $channel_liveY=1; + if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($extrachannel)<3) ) + { + $channel_liveX=0; + $channel_liveY=0; + echo "Jeden z týchto premených Nie je správny:\n"; + echo "Kanál $channel musí byť viac ako 2 znaky\n"; + echo "ExtraKanál $extrachannel musí byť viac ako 2 znaky\n"; + echo "queryCID $queryCID musí byť viac ako 14 znakov\n"; + echo "exten $exten musí byť nastavené\n"; + echo "ext_context $ext_context musí byť nastavené\n"; + echo "ext_priority $ext_priority musí byť nastavené\n"; + echo "\nRedirect Action neodoslané\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDCXC|$filename|$user|$campaign|$channel|$extrachannel|$queryCID|$exten|$ext_context|ext_priority|\n"); + fclose($fp); + } + } + } + else + { + if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} + + $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0]==0) + { + $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + if ($rowx[0]==0) + { + $channel_liveX=0; + echo "Kanál $channel nie je živá na $call_server_ip, Redirect príkaz nebol vložený\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel nie je živá na $call_server_ip";} + } + } + $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0]==0) + { + $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$extrachannel';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + if ($rowx[0]==0) + { + $channel_liveY=0; + echo "Kanál $channel nie je živá na $server_ip, Redirect príkaz nebol vložený\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel nie je živá na $server_ip";} + } + } + if ( ($channel_liveX==1) && ($channel_liveY==1) ) + { + $stmt="SELECT count(*) FROM vicidial_live_agents where lead_id='$lead_id' and user!='$user';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + if ($rowx[0] < 1) + { + $channel_liveY=0; + echo "No Local agent to send call to, Redirect príkaz nebol vložený\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "No Local agent to send call to";} + } + else + { + $stmt="SELECT server_ip,conf_exten,user FROM vicidial_live_agents where lead_id='$lead_id' and user!='$user';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + $dest_server_ip = $rowx[0]; + $dest_session_id = $rowx[1]; + $dest_user = $rowx[2]; + $S='*'; + + $D_s_ip = explode('.', $dest_server_ip); + if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";} + if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";} + if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";} + if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";} + if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";} + if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";} + if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";} + if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";} + $dest_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S$dest_session_id$S$lead_id$S$dest_user$S$phone_code$S$phone_number$S$campaign$S"; + + $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $dest_dialstring','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + + $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','$queryCID','Channel: $extrachannel','','','','','','','','','');"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + + echo "RedirectXtraCX príkaz poslaný pre Kanál $channel na $call_server_ip and \nHungup $extrachannel na $server_ip\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel na $call_server_ip, Hungup $extrachannel na $server_ip";} + } + } + else + { + if ($channel_liveX==1) + {$ACTION="Redirect"; $server_ip = $call_server_ip;} + if ($channel_liveY==1) + {$ACTION="Redirect"; $channel=$extrachannel;} + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "Changed to Redirect: $channel na $server_ip";} + } + + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDCXC|$filename|$user|$campaign|$DBout|\n"); + fclose($fp); + } + } + + } +} + +if ($ACTION=="RedirectXtra") +{ + if ($channel=="$extrachannel") + {$ACTION="Redirect";} + else + { + $row=''; $rowx=''; + $channel_liveX=1; + $channel_liveY=1; + if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($extrachannel)<3) ) + { + $channel_liveX=0; + $channel_liveY=0; + echo "Jeden z týchto premených Nie je správny:\n"; + echo "Kanál $channel musí byť viac ako 2 znaky\n"; + echo "ExtraKanál $extrachannel musí byť viac ako 2 znaky\n"; + echo "queryCID $queryCID musí byť viac ako 14 znakov\n"; + echo "exten $exten musí byť nastavené\n"; + echo "ext_context $ext_context musí byť nastavené\n"; + echo "ext_priority $ext_priority musí byť nastavené\n"; + echo "\nRedirect Action neodoslané\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDX|$filename|$user|$campaign|$$channel|$extrachannel|$queryCID|$exten|$ext_context|ext_priority|\n"); + fclose($fp); + } + } + } + else + { + if ($exten == "NEXTAVAILABLE") + { + $stmt="SELECT conf_exten FROM conferences where server_ip='$server_ip' and ((extension='') or (extension is null)) limit 1;"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if (strlen($row[0]) > 3) + { + $stmt="UPDATE conferences set extension='$user' where server_ip='$server_ip' and conf_exten='$row[0]';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $exten = $row[0]; + } + else + { + $channel_liveX=0; + echo "Nie je možné nájsť prázdnu konferenciu na $server_ip, Redirect príkaz nebol vložený\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "Nie je možné nájsť prázdnu konferenciu na $server_ip";} + } + } + + if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} + + $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ( ($row[0]==0) && (!ereg("SECOND",$filename)) ) + { + $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + if ($rowx[0]==0) + { + $channel_liveX=0; + echo "Kanál $channel nie je živá na $call_server_ip, Redirect príkaz nebol vložený\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel nie je živá na $call_server_ip";} + } + } + $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ( ($row[0]==0) && (!ereg("SECOND",$filename)) ) + { + $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$extrachannel';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + if ($rowx[0]==0) + { + $channel_liveY=0; + echo "Kanál $channel nie je živá na $server_ip, Redirect príkaz nebol vložený\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel nie je živá na $server_ip";} + } + } + if ( ($channel_liveX==1) && ($channel_liveY==1) ) + { + if ( ($server_ip=="$call_server_ip") or (strlen($call_server_ip)<7) ) + { + $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $channel','ExtraChannel: $extrachannel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','');"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + + echo "RedirectXtra príkaz poslaný pre Kanál $channel and \nExtraKanál $extrachannel\n to $exten na $server_ip\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel and $extrachannel to $exten na $server_ip";} + } + else + { + $S='*'; + $D_s_ip = explode('.', $server_ip); + if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";} + if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";} + if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";} + if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";} + if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";} + if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";} + if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";} + if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";} + $dest_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S$exten"; + + $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $dest_dialstring','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + + $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $extrachannel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + + echo "RedirectXtra príkaz poslaný pre Kanál $channel na $call_server_ip and \nExtraKanál $extrachannel\n to $exten na $server_ip\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel/$call_server_ip and $extrachannel/$server_ip to $exten";} + } + } + else + { + if ($channel_liveX==1) + {$ACTION="Redirect"; $server_ip = $call_server_ip;} + if ($channel_liveY==1) + {$ACTION="Redirect"; $channel=$extrachannel;} + + } + + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDX|$filename|$user|$campaign|$DBout|\n"); + fclose($fp); + } + } + + } + } +} + + +if ($ACTION=="Redirect") +{ + ### for manual dial VICIDIAL calls send the second attempt to transfer the call + if ($stage=="2NDXfeR") + { + $local_DEF = 'Local/'; + $local_AMP = '@'; + $hangup_channel_prefix = "$local_DEF$session_id$local_AMP$ext_context"; + + $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row > 0) + { + $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + $channel=$rowx[0]; + $channel = eregi_replace("1$","2",$channel); + $queryCID = eregi_replace("^.","Q",$queryCID); + } + } + + $row=''; $rowx=''; + $channel_live=1; + if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) + { + $channel_live=0; + echo "Jeden z týchto premených Nie je správny:\n"; + echo "Kanál $channel musí byť viac ako 2 znaky\n"; + echo "queryCID $queryCID musí byť viac ako 14 znakov\n"; + echo "exten $exten musí byť nastavené\n"; + echo "ext_context $ext_context musí byť nastavené\n"; + echo "ext_priority $ext_priority musí byť nastavené\n"; + echo "\nRedirect Action neodoslané\n"; + } + else + { + if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} + $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$channel';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0]==0) + { + $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$channel';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + if ($rowx[0]==0) + { + $channel_live=0; + echo "Kanál $channel nie je živá na $server_ip, Redirect príkaz nebol vložený\n"; + } + } + if ($channel_live==1) + { + $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','CallerID: $queryCID','','','','','');"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + + echo "Redirect príkaz poslaný pre Kanál $channel na $server_ip\n"; + } + } +} + + + +###################### +# ACTION=Monitor or Stop Monitor - insert Monitor/StopMonitor Manager statement to start recording on a channel +###################### +if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") ) +{ + if ($ACTION=="StopMonitor") + {$SQLfile = "";} + else + {$SQLfile = "File: $filename";} + + $row=''; $rowx=''; + $channel_live=1; + if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($filename)<15) ) + { + $channel_live=0; + echo "Kanál $channel Nie je správny or queryCID $queryCID Nie je správny or filename: $filename Nie je správny, $ACTION príkaz nebol vložený\n"; + } + else + { + $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$channel';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0]==0) + { + $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$channel';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + if ($rowx[0]==0) + { + $channel_live=0; + echo "Kanál $channel nie je živá na $server_ip, $ACTION príkaz nebol vložený\n"; + } + } + if ($channel_live==1) + { + $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','$ACTION','$queryCID','Channel: $channel','$SQLfile','','','','','','','','');"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + + if ($ACTION=="Monitor") + { + $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename','$lead_id','$user')"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + + $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $row=mysql_fetch_row($rslt); + $recording_id = $row[0]; + } + else + { + $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename'"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $rec_count = mysql_num_rows($rslt); + if ($rec_count>0) + { + $row=mysql_fetch_row($rslt); + $recording_id = $row[0]; + $start_time = $row[1]; + $length_in_sec = ($StarTtime - $start_time); + $length_in_min = ($length_in_sec / 60); + $length_in_min = sprintf("%8.2f", $length_in_min); + + $stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename'"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + } + + } + echo "$ACTION príkaz poslaný pre Kanál $channel na $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n"; + } + } +} + + + + + + +###################### +# ACTION=MonitorConf or StopMonitorConf - insert Monitor/StopMonitor Manager statement to start recording on a conference +###################### +if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") ) +{ + $row=''; $rowx=''; + $channel_live=1; + if ( (strlen($exten)<3) or (strlen($channel)<4) or (strlen($filename)<15) ) + { + $channel_live=0; + echo "Kanál $channel Nie je správny or exten $exten Nie je správny or filename: $filename Nie je správny, $ACTION príkaz nebol vložený\n"; + } + else + { + + if ($ACTION=="MonitorConf") + { + $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$filename','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $filename','','','','','');"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + + $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename','$lead_id','$user')"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + + $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $row=mysql_fetch_row($rslt); + $recording_id = $row[0]; + } + else + { + $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename'"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $rec_count = mysql_num_rows($rslt); + if ($rec_count>0) + { + $row=mysql_fetch_row($rslt); + $recording_id = $row[0]; + $start_time = $row[1]; + $length_in_sec = ($StarTtime - $start_time); + $length_in_min = ($length_in_sec / 60); + $length_in_min = sprintf("%8.2f", $length_in_min); + + $stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename'"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + } + + # find and hang up all recordings going na in this conference # and extension = '$exten' + $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$channel%\" and channel LIKE \"%,1\";"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + # $rec_count = intval(mysql_num_rows($rslt) / 2); + $rec_count = mysql_num_rows($rslt); + $h=0; + while ($rec_count>$h) + { + $rowx=mysql_fetch_row($rslt); + $HUchannel[$h] = $rowx[0]; + $h++; + } + $i=0; + while ($h>$i) + { + $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH12345$StarTtime$i','Channel: $HUchannel[$i]','','','','','','','','','');"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $i++; + } + + } + echo "$ACTION príkaz poslaný pre Kanál $channel na $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n NAHRÁVAŤ SA BUDE 60 MINÚT\n"; + } +} + + + + + +###################### +# ACTION=VolumeControl - raise or lower the volume of a meetme participant +###################### +if ($ACTION=="VolumeControl") +{ + if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($stage)<1) or (strlen($queryCID)<1) ) + { + echo "Konferencia $exten, Stage $stage Nie je správny or queryCID $queryCID Nie je správny, Originate príkaz nebol vložený\n"; + } + else + { + $participant_number='XXYYXXYYXXYYXX'; + if (eregi('UP',$stage)) {$vol_prefix='4';} + if (eregi('DOWN',$stage)) {$vol_prefix='3';} + if (eregi('UNMUTE',$stage)) {$vol_prefix='2';} + if (eregi('MUTING',$stage)) {$vol_prefix='1';} + $local_DEF = 'Local/'; + $local_AMP = '@'; + $volume_local_channel = "$local_DEF$participant_number$vol_prefix$exten$local_AMP$ext_context"; + + $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $volume_local_channel','Context: $ext_context','Exten: 8300','Priority: 1','Callerid: $queryCID','','','','$channel','$exten');"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + echo "Volume príkaz poslaný pre Konferencia $exten, Stage $stage Kanál $channel na $server_ip\n"; + } +} + + + + + + + + + + + + +$ENDtime = date("U"); +$RUNtime = ($ENDtime - $StarTtime); +if ($format=='debug') {echo "\n";} +if ($format=='debug') {echo "\n\n\n";} + +exit; + +?> + + + + + diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_sk/park_calls_display.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_sk/park_calls_display.php new file mode 100644 index 00000000..72e81612 --- /dev/null +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_sk/park_calls_display.php @@ -0,0 +1,146 @@ + LICENSE: GPLv2 +### +### This script is designed purely to send the details on the parked calls on the server +### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table +### +### required variables: +### - $server_ip +### - $session_name +### - $user +### - $pass +### optional variables: +### - $format - ('text','debug') +### - $exten - ('cc101','testphone','49-1','1234','913125551212',...) +### - $protocol - ('SIP','Zap','IAX2',...) +### + +# changes +# 50524-1515 - First build of script +# 50711-1208 - removed HTTP authentication in favor of user/pass vars +# 60421-1111 - check GET/POST vars lines with isset to not trigger PHP NOTICES +# 60619-1205 - Added variable filters to close security holes for login form +# + +require("dbconnect.php"); + +### If you have globals turned off uncomment these lines +if (isset($_GET["user"])) {$user=$_GET["user"];} + elseif (isset($_POST["user"])) {$user=$_POST["user"];} +if (isset($_GET["pass"])) {$pass=$_GET["pass"];} + elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} +if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} + elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} +if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} + elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} +if (isset($_GET["format"])) {$format=$_GET["format"];} + elseif (isset($_POST["format"])) {$format=$_POST["format"];} +if (isset($_GET["exten"])) {$exten=$_GET["exten"];} + elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} +if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} + elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} + +$user=ereg_replace("[^0-9a-zA-Z]","",$user); +$pass=ereg_replace("[^0-9a-zA-Z]","",$pass); + +# default optional vars if not set +if (!isset($format)) {$format="text";} +if (!isset($park_limit)) {$park_limit="1000";} + +$version = '0.0.4'; +$build = '60619-1205'; +$StarTtime = date("U"); +$NOW_DATE = date("Y-m-d"); +$NOW_TIME = date("Y-m-d H:i:s"); +if (!isset($query_date)) {$query_date = $NOW_DATE;} + + $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $auth=$row[0]; + + if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0) ) + { + echo "Nesprávny Užívateľské meno/Heslo: |$user|$pass|\n"; + exit; + } + else + { + + if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) { + echo "Nesprávny server_ip: |$server_ip| or Nesprávny session_name: |$session_name|\n"; + exit; + } + else + { + $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $SNauth=$row[0]; + if($SNauth==0) + { + echo "Nesprávny session_name: |$session_name|$server_ip|\n"; + exit; + } + else + { + # do nothing for now + } + } + } + +if ($format=='debug') +{ +echo "\n"; +echo "\n"; +echo "\n"; +echo "Zobraziť zaparkované hovory"; +echo "\n"; +echo "\n"; +echo "\n"; +} + + + $row=''; $rowx=''; + $channel_live=1; + if ( (strlen($exten)<1) or (strlen($protocol)<3) ) + { + $channel_live=0; + echo "Exten $exten Nie je správny alebo protokol $protocol Nie je správny\n"; + exit; + } + else + { + ##### print parked calls from the parked_channels table + $stmt="SELECT * from parked_channels where server_ip = '$server_ip' order by parked_time limit $park_limit;"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $park_calls_count = mysql_num_rows($rslt); + echo "$park_calls_count\n"; + $loop_count=0; + while ($park_calls_count>$loop_count) + { + $loop_count++; + $row=mysql_fetch_row($rslt); + echo "$row[0] ~$row[2] ~$row[3] ~$row[4] ~$row[5]|"; + } + echo "\n"; + } + + + +if ($format=='debug') + { + $ENDtime = date("U"); + $RUNtime = ($ENDtime - $StarTtime); + echo "\n"; + echo "\n\n\n"; + } + +exit; + +?> diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_sk/vdc_db_query.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_sk/vdc_db_query.php new file mode 100644 index 00000000..bd91388b --- /dev/null +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_sk/vdc_db_query.php @@ -0,0 +1,2598 @@ + LICENSE: GPLv2 +# +# This script is designed purely to send whether the meetme conference has live channels connected and which they are +# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table +# +# required variables: +# - $server_ip +# - $session_name +# - $user +# - $pass +# optional variables: +# - $format - ('text','debug') +# - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT','PauseCodeSubmit','LogiNCamPaigns') +# - $stage - ('start','finish','lookup','new') +# - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -') +# - $conf_exten - ('8600011',...) +# - $exten - ('123test',...) +# - $ext_context - ('default','demo',...) +# - $ext_priority - ('1','2',...) +# - $campaign - ('testcamp',...) +# - $dial_timeout - ('60','26',...) +# - $dial_prefix - ('9','8',...) +# - $campaign_cid - ('3125551212','0000000000',...) +# - $MDnextCID - ('M06301413000000002',...) +# - $uniqueid - ('1120232758.2406800',...) +# - $lead_id - ('36524',...) +# - $list_id - ('101','123456',...) +# - $length_in_sec - ('12',...) +# - $phone_code - ('1',...) +# - $phone_number - ('3125551212',...) +# - $channel - ('Zap/12-1',...) +# - $start_epoch - ('1120236911',...) +# - $vendor_lead_code - ('1234test',...) +# - $title - ('Mr.',...) +# - $first_name - ('Bob',...) +# - $middle_initial - ('L',...) +# - $last_name - ('Wilson',...) +# - $address1 - ('1324 Main St.',...) +# - $address2 - ('Apt. 12',...) +# - $address3 - ('co Robert Wilson',...) +# - $city - ('Chicago',...) +# - $state - ('IL',...) +# - $province - ('NA',...) +# - $postal_code - ('60054',...) +# - $country_code - ('USA',...) +# - $gender - ('M',...) +# - $date_of_birth - ('1970-01-01',...) +# - $alt_phone - ('3125551213',...) +# - $email - ('bob@bob.com',...) +# - $security_phrase - ('Hello',...) +# - $comments - ('Good Customer',...) +# - $auto_dial_level - ('0','1','1.2',...) +# - $VDstop_rec_after_each_call - ('0','1') +# - $conf_silent_prefix - ('7','8','',...) +# - $extension - ('123','user123','25-1',...) +# - $protocol - ('Zap','SIP','IAX2',...) +# - $user_abb - ('1234','6666',...) +# - $preview - ('YES','NO',...) +# - $called_count - ('0','1','2',...) +# - $agent_log_id - ('123456',...) +# - $agent_log - ('NO',...) +# - $favorites_list - (",'cc160','cc100'",...) +# - $CallBackDatETimE - ('2006-04-21 14:30:00',...) +# - $recipient - ('ANYONE,'USERONLY') +# - $callback_id - ('12345','12346',...) +# - $use_internal_dnc - ('Y','N') +# - $omit_phone_code - ('Y','N') +# - $no_delete_sessions - ('0','1') +# - $LogouTKicKAlL - ('0','1'); +# - $manual_dial_filter = ('NONE','CAMPLISTS','DNC','CAMPLISTS_DNC'); + +# CHANGELOG: +# 50629-1044 - First build of script +# 50630-1422 - Added manual dial action and MD channel lookup +# 50701-1451 - Added dial log for start and end of vicidial calls +# 50705-1239 - Added call disposition update +# 50804-1627 - Fixed updateDispo to update vicidial_log entry +# 50816-1605 - Added VDADpause/ready for auto dialing +# 50816-1811 - Added basic autodial call pickup functions +# 50817-1005 - Altered logging functions to accomodate auto_dialing +# 50818-1305 - Added stop-all-recordings-after-each-vicidial-call option +# 50818-1411 - Added hangup of agent phone after Logout +# 50901-1315 - Fixed CLOSER IN-GROUP Web Form bug +# 50902-1507 - Fixed CLOSER log length_in_sec bug +# 50902-1730 - Added functions for manual preview dialing and revert +# 50913-1214 - Added agent random update to leadupdate +# 51020-1421 - Added agent_log_id framework for detailed agent activity logging +# 51021-1717 - Allows for multi-line comments (changes \n to !N in database) +# 51111-1046 - Added vicidial_agent_log lead_id earlier for manual dial +# 51121-1445 - Altered echo statements for several small PHP speed optimizations +# 51122-1328 - Fixed UserLogout issue not removing conference reservation +# 51129-1012 - Added ability to accept calls from other VICIDIAL servers +# 51129-1729 - Changed manual dial to use the '/n' flag for calls +# 51221-1154 - Added SCRIPT id lookup and sending to vicidial.php for display +# 60105-1059 - Added Updating of astguiclient favorites in the DB +# 60208-1617 - Added dtmf buttons output per call +# 60213-1521 - Added closer_campaigns update to vicidial_users +# 60215-1036 - Added Callback date-time entry into vicidial_callbacks table +# 60413-1541 - Added USERONLY Callback listings output - CalLBacKLisT +# - Added USERONLY Callback count output - CalLBacKCounT +# 60414-1140 - Added Callback lead lookup for manual dialing +# 60419-1517 - After CALLBK is sent to agent, update callback record to INACTIVE +# 60421-1419 - Check GET/POST vars lines with isset to not trigger PHP NOTICES +# 60427-1236 - Fixed closer_choice error for CLOSER campaigns +# 60609-1148 - Added ability to check for manual dial numbers in DNC +# 60619-1117 - Added variable filters to close security holes for login form +# 60623-1414 - Fixed variable filter for phone_code and fixed manual dial logic +# 60821-1600 - Added ability to omit the phone code on vicidial lead dialing +# 60821-1647 - Added ability to not delete sessions at logout +# 60906-1124 - Added lookup and sending of callback data for CALLBK calls +# 61128-2229 - Added vicidial_live_agents and vicidial_auto_calls manual dial entries +# 70111-1600 - Added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns +# 70115-1733 - Added alt_dial functionality in auto-dial modes +# 70118-1501 - Added user_group to vicidial_log,_agent_log,_closer_log,_callbacks +# 70123-1357 - Fixed bug that would not update vicidial_closer_log status to dispo +# 70202-1438 - Added pause code submit function +# 70203-0930 - Added dialed_number to lead info output +# 70203-1030 - Added dialed_label to lead info output +# 70206-1126 - Added INBOUND status for inbound/closer calls in vicidial_live_agents +# 70212-1253 - Fixed small issue with CXFER +# 70213-1431 - Added QueueMetrics PAUSE/UNPAUSE/AGENTLOGIN/AGENTLOGOFF actions +# 70214-1231 - Added queuemetrics_log_id field for server_id in queue_log +# 70215-1210 - Added queuemetrics COMPLETEAGENT action +# 70216-1051 - Fixed double call complete queuemetrics logging +# 70222-1616 - Changed queue_log PAUSE/UNPAUSE to PAUSEALL/UNPAUSEALL +# 70309-1034 - Allow amphersands and questions marks in comments to pass through +# 70313-1052 - Allow pound signs(hash) in comments to pass through +# 70319-1544 - Added agent disable update customer data function +# 70322-1545 - Added sipsak display ability +# 70413-1253 - Fixed bug for outbound call time in CLOSER-type blended campaigns +# 70424-1100 - Fixed bug for fronter/closer calls that would delete vdac records +# 70802-1729 - Fixed bugs with pause_sec and wait_sec under certain call handling +# 70828-1443 - Added source_id to output of SCRIPTtab-IFRAME and WEBFORM +# 71029-1855 - removed campaign_id naming restrictions for CLOSER-type campaigns +# 71030-2047 - added hopper priority for auto alt dial entries +# 71116-1011 - added calls_today count updating of the vicidial_live_agents upon INCALL +# 71120-1520 - added LogiNCamPaigns to show only allowed campaigns for agents upon login +# 71125-1751 - Added inbound-group default inbound group sending to vicidial.php +# 71129-2025 - restricted callbacks count and list to campaign only +# 71226-1117 - added option to kick all calls from conference upon logout +# 80128-1159 - fixed vicidial_log bugs +# 80402-0121 - Fixes for manual dial transfers on some systems, removed /n persist flag +# 80424-0442 - Added non_latin lookup from system_settings +# 80722-1000 - Fixed small bugs +# 80815-1020 - Added manual dial list restriction option +# + +$version = '2.0.4-71'; +$build = '80815-1020'; + +require("dbconnect.php"); + +### If you have globals turned off uncomment these lines +if (isset($_GET["user"])) {$user=$_GET["user"];} + elseif (isset($_POST["user"])) {$user=$_POST["user"];} +if (isset($_GET["pass"])) {$pass=$_GET["pass"];} + elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} +if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} + elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} +if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} + elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} +if (isset($_GET["format"])) {$format=$_GET["format"];} + elseif (isset($_POST["format"])) {$format=$_POST["format"];} +if (isset($_GET["ACTION"])) {$ACTION=$_GET["ACTION"];} + elseif (isset($_POST["ACTION"])) {$ACTION=$_POST["ACTION"];} +if (isset($_GET["stage"])) {$stage=$_GET["stage"];} + elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} +if (isset($_GET["closer_choice"])) {$closer_choice=$_GET["closer_choice"];} + elseif (isset($_POST["closer_choice"])) {$closer_choice=$_POST["closer_choice"];} +if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} + elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} +if (isset($_GET["exten"])) {$exten=$_GET["exten"];} + elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];} +if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];} + elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} +if (isset($_GET["ext_priority"])) {$ext_priority=$_GET["ext_priority"];} + elseif (isset($_POST["ext_priority"])) {$ext_priority=$_POST["ext_priority"];} +if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];} + elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];} +if (isset($_GET["dial_timeout"])) {$dial_timeout=$_GET["dial_timeout"];} + elseif (isset($_POST["dial_timeout"])) {$dial_timeout=$_POST["dial_timeout"];} +if (isset($_GET["dial_prefix"])) {$dial_prefix=$_GET["dial_prefix"];} + elseif (isset($_POST["dial_prefix"])) {$dial_prefix=$_POST["dial_prefix"];} +if (isset($_GET["campaign_cid"])) {$campaign_cid=$_GET["campaign_cid"];} + elseif (isset($_POST["campaign_cid"])) {$campaign_cid=$_POST["campaign_cid"];} +if (isset($_GET["MDnextCID"])) {$MDnextCID=$_GET["MDnextCID"];} + elseif (isset($_POST["MDnextCID"])) {$MDnextCID=$_POST["MDnextCID"];} +if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];} + elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];} +if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} + elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} +if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} + elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} +if (isset($_GET["length_in_sec"])) {$length_in_sec=$_GET["length_in_sec"];} + elseif (isset($_POST["length_in_sec"])) {$length_in_sec=$_POST["length_in_sec"];} +if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];} + elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];} +if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} + elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} +if (isset($_GET["channel"])) {$channel=$_GET["channel"];} + elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} +if (isset($_GET["start_epoch"])) {$start_epoch=$_GET["start_epoch"];} + elseif (isset($_POST["start_epoch"])) {$start_epoch=$_POST["start_epoch"];} +if (isset($_GET["dispo_choice"])) {$dispo_choice=$_GET["dispo_choice"];} + elseif (isset($_POST["dispo_choice"])) {$dispo_choice=$_POST["dispo_choice"];} +if (isset($_GET["vendor_lead_code"])) {$vendor_lead_code=$_GET["vendor_lead_code"];} + elseif (isset($_POST["vendor_lead_code"])) {$vendor_lead_code=$_POST["vendor_lead_code"];} +if (isset($_GET["title"])) {$title=$_GET["title"];} + elseif (isset($_POST["title"])) {$title=$_POST["title"];} +if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];} + elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];} +if (isset($_GET["middle_initial"])) {$middle_initial=$_GET["middle_initial"];} + elseif (isset($_POST["middle_initial"])) {$middle_initial=$_POST["middle_initial"];} +if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];} + elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];} +if (isset($_GET["address1"])) {$address1=$_GET["address1"];} + elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];} +if (isset($_GET["address2"])) {$address2=$_GET["address2"];} + elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];} +if (isset($_GET["address3"])) {$address3=$_GET["address3"];} + elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];} +if (isset($_GET["city"])) {$city=$_GET["city"];} + elseif (isset($_POST["city"])) {$city=$_POST["city"];} +if (isset($_GET["state"])) {$state=$_GET["state"];} + elseif (isset($_POST["state"])) {$state=$_POST["state"];} +if (isset($_GET["province"])) {$province=$_GET["province"];} + elseif (isset($_POST["province"])) {$province=$_POST["province"];} +if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];} + elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];} +if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];} + elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];} +if (isset($_GET["gender"])) {$gender=$_GET["gender"];} + elseif (isset($_POST["gender"])) {$gender=$_POST["gender"];} +if (isset($_GET["date_of_birth"])) {$date_of_birth=$_GET["date_of_birth"];} + elseif (isset($_POST["date_of_birth"])) {$date_of_birth=$_POST["date_of_birth"];} +if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];} + elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];} +if (isset($_GET["email"])) {$email=$_GET["email"];} + elseif (isset($_POST["email"])) {$email=$_POST["email"];} +if (isset($_GET["security_phrase"])) {$security_phrase=$_GET["security_phrase"];} + elseif (isset($_POST["security_phrase"])) {$security_phrase=$_POST["security_phrase"];} +if (isset($_GET["comments"])) {$comments=$_GET["comments"];} + elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];} +if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];} + elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];} +if (isset($_GET["VDstop_rec_after_each_call"])) {$VDstop_rec_after_each_call=$_GET["VDstop_rec_after_each_call"];} + elseif (isset($_POST["VDstop_rec_after_each_call"])) {$VDstop_rec_after_each_call=$_POST["VDstop_rec_after_each_call"];} +if (isset($_GET["conf_silent_prefix"])) {$conf_silent_prefix=$_GET["conf_silent_prefix"];} + elseif (isset($_POST["conf_silent_prefix"])) {$conf_silent_prefix=$_POST["conf_silent_prefix"];} +if (isset($_GET["extension"])) {$extension=$_GET["extension"];} + elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} +if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];} + elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];} +if (isset($_GET["user_abb"])) {$user_abb=$_GET["user_abb"];} + elseif (isset($_POST["user_abb"])) {$user_abb=$_POST["user_abb"];} +if (isset($_GET["preview"])) {$preview=$_GET["preview"];} + elseif (isset($_POST["preview"])) {$preview=$_POST["preview"];} +if (isset($_GET["called_count"])) {$called_count=$_GET["called_count"];} + elseif (isset($_POST["called_count"])) {$called_count=$_POST["called_count"];} +if (isset($_GET["agent_log_id"])) {$agent_log_id=$_GET["agent_log_id"];} + elseif (isset($_POST["agent_log_id"])) {$agent_log_id=$_POST["agent_log_id"];} +if (isset($_GET["agent_log"])) {$agent_log=$_GET["agent_log"];} + elseif (isset($_POST["agent_log"])) {$agent_log=$_POST["agent_log"];} +if (isset($_GET["favorites_list"])) {$favorites_list=$_GET["favorites_list"];} + elseif (isset($_POST["favorites_list"])) {$favorites_list=$_POST["favorites_list"];} +if (isset($_GET["CallBackDatETimE"])) {$CallBackDatETimE=$_GET["CallBackDatETimE"];} + elseif (isset($_POST["CallBackDatETimE"])) {$CallBackDatETimE=$_POST["CallBackDatETimE"];} +if (isset($_GET["recipient"])) {$recipient=$_GET["recipient"];} + elseif (isset($_POST["recipient"])) {$recipient=$_POST["recipient"];} +if (isset($_GET["callback_id"])) {$callback_id=$_GET["callback_id"];} + elseif (isset($_POST["callback_id"])) {$callback_id=$_POST["callback_id"];} +if (isset($_GET["use_internal_dnc"])) {$use_internal_dnc=$_GET["use_internal_dnc"];} + elseif (isset($_POST["use_internal_dnc"])) {$use_internal_dnc=$_POST["use_internal_dnc"];} +if (isset($_GET["omit_phone_code"])) {$omit_phone_code=$_GET["omit_phone_code"];} + elseif (isset($_POST["omit_phone_code"])) {$omit_phone_code=$_POST["omit_phone_code"];} +if (isset($_GET["phone_ip"])) {$phone_ip=$_GET["phone_ip"];} + elseif (isset($_POST["phone_ip"])) {$phone_ip=$_POST["phone_ip"];} +if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["enable_sipsak_messages"];} + elseif (isset($_POST["enable_sipsak_messages"])) {$enable_sipsak_messages=$_POST["enable_sipsak_messages"];} +if (isset($_GET["status"])) {$status=$_GET["status"];} + elseif (isset($_POST["status"])) {$status=$_POST["status"];} +if (isset($_GET["LogouTKicKAlL"])) {$LogouTKicKAlL=$_GET["LogouTKicKAlL"];} + elseif (isset($_POST["LogouTKicKAlL"])) {$LogouTKicKAlL=$_POST["LogouTKicKAlL"];} +if (isset($_GET["manual_dial_filter"])) {$manual_dial_filter=$_GET["manual_dial_filter"];} + elseif (isset($_POST["manual_dial_filter"])) {$manual_dial_filter=$_POST["manual_dial_filter"];} + + +header ("Content-type: text/html; charset=utf-8"); +header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 +header ("Pragma: no-cache"); // HTTP/1.0 + +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ +$user=ereg_replace("[^0-9a-zA-Z]","",$user); +$pass=ereg_replace("[^0-9a-zA-Z]","",$pass); +$length_in_sec = ereg_replace("[^0-9]","",$length_in_sec); +$phone_code = ereg_replace("[^0-9]","",$phone_code); +$phone_number = ereg_replace("[^0-9]","",$phone_number); +} + +# default optional vars if not set +if (!isset($format)) {$format="text";} + if ($format == 'debug') {$DB=1;} +if (!isset($ACTION)) {$ACTION="refresh";} + +$StarTtime = date("U"); +$NOW_DATE = date("Y-m-d"); +$NOW_TIME = date("Y-m-d H:i:s"); +$CIDdate = date("mdHis"); +$ENTRYdate = date("YmdHis"); +if (!isset($query_date)) {$query_date = $NOW_DATE;} +$MT[0]=''; +$agents='@agents'; + +if ($ACTION == 'LogiNCamPaigns') + { + $skip_user_validation=1; + } +else + { + $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; + if ($DB) {echo "|$stmt|\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $auth=$row[0]; + + if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) + { + echo "Nesprávny Užívateľské meno/Heslo: |$user|$pass|\n"; + exit; + } + else + { + if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) + { + echo "Nesprávny server_ip: |$server_ip| or Nesprávny session_name: |$session_name|\n"; + exit; + } + else + { + $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $SNauth=$row[0]; + if($SNauth==0) + { + echo "Nesprávny session_name: |$session_name|$server_ip|\n"; + exit; + } + else + { + # do nothing for now + } + } + } +} + +if ($format=='debug') +{ +echo "\n"; +echo "\n"; +echo "\n"; +echo "VICIDiaL Databázový dotaz-script"; +echo "\n"; +echo "\n"; +echo "\n"; +} + + + +################################################################################ +### LogiNCamPaigns - generates an HTML SELECT list of allowed campaigns for a +### specific agent on the login screen +################################################################################ +if ($ACTION == 'LogiNCamPaigns') +{ + if ( (strlen($user)<1) ) + { + echo "\n"; + exit; + } + else + { + echo "\n"; + exit; + } +} + + + +################################################################################ +### regCLOSER - update the vicidial_live_agents table to reflect the closer +### inbound choices made upon login +################################################################################ +if ($ACTION == 'regCLOSER') +{ + $row=''; $rowx=''; + $channel_live=1; + if ( (strlen($closer_choice)<1) || (strlen($user)<1) ) + { + $channel_live=0; + echo "Zmena skupiny $closer_choice Nie je správny\n"; + exit; + } + else + { + if ($closer_choice == "MGRLOCK-") + { + $stmt="SELECT closer_campaigns FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $row=mysql_fetch_row($rslt); + $closer_choice =$row[0]; + + $stmt="UPDATE vicidial_live_agents set closer_campaigns='$closer_choice' where user='$user' and server_ip='$server_ip';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + else + { + $stmt="UPDATE vicidial_live_agents set closer_campaigns='$closer_choice' where user='$user' and server_ip='$server_ip';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + + $stmt="UPDATE vicidial_users set closer_campaigns='$closer_choice' where user='$user';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + + $in_groups_pre = preg_replace('/-$/','',$closer_choice); + $in_groups = explode(" ",$in_groups_pre); + $in_groups_ct = count($in_groups); + $k=1; + while ($k < $in_groups_ct) + { + if (strlen($in_groups[$k])>1) + { + $stmt="SELECT group_weight,calls_today FROM vicidial_inbound_group_agents where user='$user' and group_id='$in_groups[$k]';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $viga_ct = mysql_num_rows($rslt); + if ($viga_ct > 0) + { + $row=mysql_fetch_row($rslt); + $group_weight = $row[0]; + $calls_today = $row[1]; + } + else + { + $group_weight = 0; + $calls_today = 0; + } + $stmt="INSERT INTO vicidial_live_inbound_agents set user='$user',group_id='$in_groups[$k]',group_weight='$group_weight',calls_today='$calls_today',last_call_time='$NOW_TIME',last_call_finish='$NOW_TIME';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + $k++; + } + + } + echo "Closer In Zmena skupiny $closer_choice bol zaregistrovaný pre užívateľa $user\n"; +} + + +################################################################################ +### manDiaLnextCALL - for manual VICIDiaL dialing this will grab the next lead +### in the campaign, reserve it, send data back to client and +### place the call by inserting into vicidial_manager +################################################################################ +if ($ACTION == 'manDiaLnextCaLL') +{ + $MT[0]=''; + $row=''; $rowx=''; + $channel_live=1; + if ( (strlen($conf_exten)<1) || (strlen($campaign)<1) || (strlen($ext_context)<1) ) + { + $channel_live=0; + echo "ZASOBNIK JE PRAZDNY\n"; + echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context Nie je správny\n"; + exit; + } + else + { + + ##### grab number of calls today in this campaign and increment + $stmt="SELECT calls_today FROM vicidial_live_agents WHERE user='$user' and campaign_id='$campaign';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $vla_cc_ct = mysql_num_rows($rslt); + if ($vla_cc_ct > 0) + { + $row=mysql_fetch_row($rslt); + $calls_today =$row[0]; + } + else + {$calls_today ='0';} + $calls_today++; + + ### check if this is a callback, if it is, skip the grabbing of a new lead and mark the callback as INACTIVE + if ( (strlen($callback_id)>0) and (strlen($lead_id)>0) ) + { + $affected_rows=1; + $CBleadIDset=1; + + $stmt = "UPDATE vicidial_callbacks set status='INACTIVE' where callback_id='$callback_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + } + else + { + if (strlen($phone_number)>3) + { + if ($use_internal_dnc=='Y') + { + $stmt="SELECT count(*) FROM vicidial_dnc where phone_number='$phone_number';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $row=mysql_fetch_row($rslt); + + if ($row[0] > 0) + { + echo "DNC ČÍSLO\n"; + exit; + } + } + if (ereg("CAMPLISTS",$manual_dial_filter)) + { + $stmt="SELECT list_id,active from vicidial_lists where campaign_id='$campaign'"; + $rslt=mysql_query($stmt, $link); + $lists_to_parse = mysql_num_rows($rslt); + $camp_lists=''; + $o=0; + while ($lists_to_parse > $o) + { + $rowx=mysql_fetch_row($rslt); + if (ereg("Y", $rowx[1])) {$active_lists++; $camp_lists .= "'$rowx[0]',";} + if (ereg("N", $rowx[1])) {$inactive_lists++;} + $o++; + } + $camp_lists = eregi_replace(".$","",$camp_lists); + + $stmt="SELECT count(*) FROM vicidial_list where phone_number='$phone_number' and list_id IN($camp_lists);"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $row=mysql_fetch_row($rslt); + + if ($row[0] < 1) + { + echo "ČÍSLO NOT IN CAMPLISTS\n"; + exit; + } + } + if ($stage=='lookup') + { + $stmt="SELECT lead_id FROM vicidial_list where phone_number='$phone_number' order by modify_date desc LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $man_leadID_ct = mysql_num_rows($rslt); + if ($man_leadID_ct > 0) + { + $row=mysql_fetch_row($rslt); + $affected_rows=1; + $lead_id =$row[0]; + $CBleadIDset=1; + } + else + { + ### insert a new lead in the system with this phone number + $stmt = "INSERT INTO vicidial_list SET phone_code='$phone_code',phone_number='$phone_number',list_id='$list_id',status='QUEUE',user='$user',called_since_last_reset='Y',entry_date='$ENTRYdate';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + $lead_id = mysql_insert_id($link); + $CBleadIDset=1; + } + } + else + { + ### insert a new lead in the system with this phone number + $stmt = "INSERT INTO vicidial_list SET phone_code='$phone_code',phone_number='$phone_number',list_id='$list_id',status='QUEUE',user='$user',called_since_last_reset='Y',entry_date='$ENTRYdate';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + $lead_id = mysql_insert_id($link); + $CBleadIDset=1; + } + } + else + { + ### grab the next lead in the hopper for this campaign and reserve it for the user + $stmt = "UPDATE vicidial_hopper set status='QUEUE', user='$user' where campaign_id='$campaign' and status='READY' order by priority desc,hopper_id LIMIT 1"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + } + } + + if ($affected_rows > 0) + { + if (!$CBleadIDset) + { + ##### grab the lead_id of the reserved user in vicidial_hopper + $stmt="SELECT lead_id FROM vicidial_hopper where campaign_id='$campaign' and status='QUEUE' and user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $hopper_leadID_ct = mysql_num_rows($rslt); + if ($hopper_leadID_ct > 0) + { + $row=mysql_fetch_row($rslt); + $lead_id =$row[0]; + } + } + + ##### grab the data from vicidial_list for the lead_id + $stmt="SELECT * FROM vicidial_list where lead_id='$lead_id' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $list_lead_ct = mysql_num_rows($rslt); + if ($list_lead_ct > 0) + { + $row=mysql_fetch_row($rslt); + # $lead_id = trim("$row[0]"); + $dispo = trim("$row[3]"); + $tsr = trim("$row[4]"); + $vendor_id = trim("$row[5]"); + $source_id = trim("$row[6]"); + $list_id = trim("$row[7]"); + $gmt_offset_now = trim("$row[8]"); + $phone_code = trim("$row[10]"); + $phone_number = trim("$row[11]"); + $title = trim("$row[12]"); + $first_name = trim("$row[13]"); + $middle_initial = trim("$row[14]"); + $last_name = trim("$row[15]"); + $address1 = trim("$row[16]"); + $address2 = trim("$row[17]"); + $address3 = trim("$row[18]"); + $city = trim("$row[19]"); + $state = trim("$row[20]"); + $province = trim("$row[21]"); + $postal_code = trim("$row[22]"); + $country_code = trim("$row[23]"); + $gender = trim("$row[24]"); + $date_of_birth = trim("$row[25]"); + $alt_phone = trim("$row[26]"); + $email = trim("$row[27]"); + $security = trim("$row[28]"); + $comments = stripslashes(trim("$row[29]")); + $called_count = trim("$row[30]"); + } + + $called_count++; + + ##### check if system is set to generate logfile for transfers + $stmt="SELECT enable_agc_xfer_log FROM system_settings;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $enable_agc_xfer_log_ct = mysql_num_rows($rslt); + if ($enable_agc_xfer_log_ct > 0) + { + $row=mysql_fetch_row($rslt); + $enable_agc_xfer_log =$row[0]; + } + + if ( ($WeBRooTWritablE > 0) and ($enable_agc_xfer_log > 0) ) + { + # DATETIME|campaign|lead_id|phone_number|user|type + # 2007-08-22 11:11:11|TESTCAMP|65432|3125551212|1234|M + $fp = fopen ("./xfer_log.txt", "a"); + fwrite ($fp, "$NOW_TIME|$campaign|$lead_id|$phone_number|$user|M\n"); + fclose($fp); + } + + ##### if lead is a callback, grab the callback comments + $CBentry_time = ''; + $CBcallback_time = ''; + $CBuser = ''; + $CBcomments = ''; + if (ereg("CALLBK",$dispo)) + { + $stmt="SELECT entry_time,callback_time,user,comments FROM vicidial_callbacks where lead_id='$lead_id' order by callback_id desc LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $cb_record_ct = mysql_num_rows($rslt); + if ($cb_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $CBentry_time = trim("$row[0]"); + $CBcallback_time = trim("$row[1]"); + $CBuser = trim("$row[2]"); + $CBcomments = trim("$row[3]"); + } + } + + ### flag the lead as called and change it's status to INCALL + $stmt = "UPDATE vicidial_list set status='INCALL', called_since_last_reset='Y', called_count='$called_count',user='$user' where lead_id='$lead_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + + if (!$CBleadIDset) + { + ### delete the lead from the hopper + $stmt = "DELETE FROM vicidial_hopper where lead_id='$lead_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + } + + $stmt="UPDATE vicidial_agent_log set lead_id='$lead_id',comments='MANUAL' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + + ### if preview dialing, do not send the call + if ( (strlen($preview)<1) || ($preview == 'NO') ) + { + ### prepare variables to place manual call from VICIDiaL + $CCID_on=0; $CCID=''; + $local_DEF = 'Local/'; + $local_AMP = '@'; + $Local_out_prefix = '9'; + $Local_dial_timeout = '60'; + # $Local_persist = '/n'; + $Local_persist = ''; + if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} + $Local_dial_timeout = ($Local_dial_timeout * 1000); + if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} + if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++;} + if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';} + + $PADlead_id = sprintf("%09s", $lead_id); + while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);} + + # Create unique calleridname to track the call: MmmddhhmmssLLLLLLLLL + $MqueryCID = "M$CIDdate$PADlead_id"; + if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";} + else {$CIDstring = "$MqueryCID";} + + ### whether to omit phone_code or not + if (eregi('Y',$omit_phone_code)) + {$Ndialstring = "$Local_out_prefix$phone_number";} + else + {$Ndialstring = "$Local_out_prefix$phone_code$phone_number";} + ### insert the call action into the vicidial_manager table to initiate the call + # $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; + $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Ndialstring','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + + $stmt = "INSERT INTO vicidial_auto_calls (server_ip,campaign_id,status,lead_id,callerid,phone_code,phone_number,call_time,call_type) values('$server_ip','$campaign','XFER','$lead_id','$MqueryCID','$phone_code','$phone_number','$NOW_TIME','OUT')"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + + ### update the agent status to INCALL in vicidial_live_agents + $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id',comments='MANUAL',calls_today='$calls_today' where user='$user' and server_ip='$server_ip';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + + ### update calls_today count in vicidial_campaign_agents + $stmt = "UPDATE vicidial_campaign_agents set calls_today='$calls_today' where user='$user' and campaign_id='$campaign';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + } + + $comments = eregi_replace("\r",'',$comments); + $comments = eregi_replace("\n",'!N',$comments); + + $LeaD_InfO = $MqueryCID . "\n"; + $LeaD_InfO .= $lead_id . "\n"; + $LeaD_InfO .= $dispo . "\n"; + $LeaD_InfO .= $tsr . "\n"; + $LeaD_InfO .= $vendor_id . "\n"; + $LeaD_InfO .= $list_id . "\n"; + $LeaD_InfO .= $gmt_offset_now . "\n"; + $LeaD_InfO .= $phone_code . "\n"; + $LeaD_InfO .= $phone_number . "\n"; + $LeaD_InfO .= $title . "\n"; + $LeaD_InfO .= $first_name . "\n"; + $LeaD_InfO .= $middle_initial . "\n"; + $LeaD_InfO .= $last_name . "\n"; + $LeaD_InfO .= $address1 . "\n"; + $LeaD_InfO .= $address2 . "\n"; + $LeaD_InfO .= $address3 . "\n"; + $LeaD_InfO .= $city . "\n"; + $LeaD_InfO .= $state . "\n"; + $LeaD_InfO .= $province . "\n"; + $LeaD_InfO .= $postal_code . "\n"; + $LeaD_InfO .= $country_code . "\n"; + $LeaD_InfO .= $gender . "\n"; + $LeaD_InfO .= $date_of_birth . "\n"; + $LeaD_InfO .= $alt_phone . "\n"; + $LeaD_InfO .= $email . "\n"; + $LeaD_InfO .= $security . "\n"; + $LeaD_InfO .= $comments . "\n"; + $LeaD_InfO .= $called_count . "\n"; + $LeaD_InfO .= $CBentry_time . "\n"; + $LeaD_InfO .= $CBcallback_time . "\n"; + $LeaD_InfO .= $CBuser . "\n"; + $LeaD_InfO .= $CBcomments . "\n"; + $LeaD_InfO .= $phone_number . "\n"; + $LeaD_InfO .= "MAIN\n"; + $LeaD_InfO .= $source_id . "\n"; + + echo $LeaD_InfO; + + } + else + { + echo "ZASOBNIK JE PRAZDNY\n"; + } + } +} + + +################################################################################ +### manDiaLskip - for manual VICIDiaL dialing this skips the lead that was +### previewed in the step above and puts it back in orig status +################################################################################ +if ($ACTION == 'manDiaLskip') +{ + $MT[0]=''; + $row=''; $rowx=''; + $channel_live=1; + if ( (strlen($stage)<1) || (strlen($called_count)<1) || (strlen($lead_id)<1) ) + { + $channel_live=0; + echo "LEAD NOT REVERTED\n"; + echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context Nie je správny\n"; + exit; + } + else + { + $called_count = ($called_count - 1); + ### flag the lead as called and change it's status to INCALL + $stmt = "UPDATE vicidial_list set status='$stage', called_count='$called_count',user='$user' where lead_id='$lead_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + + + echo "LEAD REVERTED\n"; + } +} + + +################################################################################ +### manDiaLonly - for manual VICIDiaL dialing this sends the call that was +### previewed in the step above +################################################################################ +if ($ACTION == 'manDiaLonly') +{ + $MT[0]=''; + $row=''; $rowx=''; + $channel_live=1; + if ( (strlen($conf_exten)<1) || (strlen($campaign)<1) || (strlen($ext_context)<1) || (strlen($phone_number)<1) || (strlen($lead_id)<1) ) + { + $channel_live=0; + echo " HOVOR NOT PLACED\n"; + echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context Nie je správny\n"; + exit; + } + else + { + ##### grab number of calls today in this campaign and increment + $stmt="SELECT calls_today FROM vicidial_live_agents WHERE user='$user' and campaign_id='$campaign';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $vla_cc_ct = mysql_num_rows($rslt); + if ($vla_cc_ct > 0) + { + $row=mysql_fetch_row($rslt); + $calls_today =$row[0]; + } + else + {$calls_today ='0';} + $calls_today++; + + ### prepare variables to place manual call from VICIDiaL + $CCID_on=0; $CCID=''; + $local_DEF = 'Local/'; + $local_AMP = '@'; + $Local_out_prefix = '9'; + $Local_dial_timeout = '60'; + $Local_persist = '/n'; + if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} + $Local_dial_timeout = ($Local_dial_timeout * 1000); + if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} + if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++;} + if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';} + + $PADlead_id = sprintf("%09s", $lead_id); + while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);} + + # Create unique calleridname to track the call: MmmddhhmmssLLLLLLLLL + $MqueryCID = "M$CIDdate$PADlead_id"; + if ($CCID_on) {$CIDstring = "\"$MqueryCID\" <$CCID>";} + else {$CIDstring = "$MqueryCID";} + + ### whether to omit phone_code or not + if (eregi('Y',$omit_phone_code)) + {$Ndialstring = "$Local_out_prefix$phone_number";} + else + {$Ndialstring = "$Local_out_prefix$phone_code$phone_number";} + ### insert the call action into the vicidial_manager table to initiate the call + # $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $conf_exten','Context: $ext_context','Channel: $local_DEF$Local_out_prefix$phone_code$phone_number$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; + $stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$MqueryCID','Exten: $Ndialstring','Context: $ext_context','Channel: $local_DEF$conf_exten$local_AMP$ext_context$Local_persist','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','');"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + + $stmt = "INSERT INTO vicidial_auto_calls (server_ip,campaign_id,status,lead_id,callerid,phone_code,phone_number,call_time,call_type) values('$server_ip','$campaign','XFER','$lead_id','$MqueryCID','$phone_code','$phone_number','$NOW_TIME','OUT')"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + + ### update the agent status to INCALL in vicidial_live_agents + $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id',comments='MANUAL',calls_today='$calls_today' where user='$user' and server_ip='$server_ip';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + + $stmt = "UPDATE vicidial_campaign_agents set calls_today='$calls_today' where user='$user' and campaign_id='$campaign';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + + echo "$MqueryCID\n"; + } +} + + +################################################################################ +### manDiaLlookCALL - for manual VICIDiaL dialing this will attempt to look up +### the trunk channel that the call was placed on +################################################################################ +if ($ACTION == 'manDiaLlookCaLL') +{ + $MT[0]=''; + $row=''; $rowx=''; +if (strlen($MDnextCID)<18) + { + echo "NO\n"; + echo "MDnextCID $MDnextCID Nie je správny\n"; + exit; + } +else + { + ##### look for the channel in the UPDATED vicidial_manager record of the call initiation + $stmt="SELECT uniqueid,channel FROM vicidial_manager where callerid='$MDnextCID' and server_ip='$server_ip' and status='UPDATED' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VM_mancall_ct = mysql_num_rows($rslt); + if ($VM_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $uniqueid =$row[0]; + $channel =$row[1]; + echo "$uniqueid\n$channel"; + + $wait_sec=0; + $stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $VDpr_ct = mysql_num_rows($rslt); + if ($VDpr_ct > 0) + { + $row=mysql_fetch_row($rslt); + $wait_sec = (($StarTtime - $row[0]) + $row[1]); + } + $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',wait_epoch='$StarTtime',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + else + { + echo "NO\n"; + } + } +} + + + +################################################################################ +### manDiaLlogCALL - for manual VICIDiaL logging of calls places record in +### vicidial_log and then sends process to call_log entry +################################################################################ +if ($ACTION == 'manDiaLlogCaLL') +{ + $MT[0]=''; + $row=''; $rowx=''; + +if ($stage == "start") + { + if ( (strlen($uniqueid)<1) || (strlen($lead_id)<1) || (strlen($list_id)<1) || (strlen($phone_number)<1) || (strlen($campaign)<1) ) + { + echo "LOG NEBOL ZADANÝ\n"; + echo "uniqueid $uniqueid or lead_id: $lead_id or list_id: $list_id or phone_number: $phone_number or campaign: $campaign Nie je správny\n"; + exit; + } + else + { + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } + ##### insert log into vicidial_log for manual VICIDiaL call + $stmt="INSERT INTO vicidial_log (uniqueid,lead_id,list_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,comments,processed,user_group) values('$uniqueid','$lead_id','$list_id','$campaign','$NOW_TIME','$StarTtime','INCALL','$phone_code','$phone_number','$user','MANUAL','N','$user_group');"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + + if ($affected_rows > 0) + { + echo "VICIDiaL_LOG Vložiť: $uniqueid|$channel|$NOW_TIME\n"; + echo "$StarTtime\n"; + } + else + { + echo "LOG NEBOL ZADANÝ\n"; + } + + $stmt = "UPDATE vicidial_auto_calls SET uniqueid='$uniqueid' where lead_id='$lead_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + + # ##### insert log into call_log for manual VICIDiaL call + # $stmt = "INSERT INTO call_log (uniqueid,channel,server_ip,extension,number_dialed,caller_code,start_time,start_epoch) values('$uniqueid','$channel','$server_ip','$exten','$phone_code$phone_number','MD $user $lead_id','$NOW_TIME','$StarTtime')"; + # if ($DB) {echo "$stmt\n";} + # $rslt=mysql_query($stmt, $link); + # $affected_rows = mysql_affected_rows($link); + + # if ($affected_rows > 0) + # { + # echo "CALL_LOG Vložiť: $uniqueid|$channel|$NOW_TIME"; + # } + # else + # { + # echo "LOG NEBOL ZADANÝ\n"; + # } + } + } + +if ($stage == "end") + { + if ( (strlen($uniqueid)<1) || (strlen($lead_id)<1) ) + { + echo "LOG NEBOL ZADANÝ\n"; + echo "uniqueid $uniqueid or lead_id: $lead_id Nie je správny\n"; + exit; + } + else + { + if ($start_epoch < 1000) + { + $stmt = "select count(*) from vicidial_campaigns where campaign_id='$campaign' and campaign_allow_inbound='Y';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $check_inbound = $row[0]; + if ($check_inbound > 0) + { + ##### look for the start epoch in the vicidial_closer_log table + $stmt="SELECT start_epoch FROM vicidial_closer_log where phone_number='$phone_number' and lead_id='$lead_id' and user='$user' order by closecallid desc limit 1;"; + } + else + { + ##### look for the start epoch in the vicidial_log table + $stmt="SELECT start_epoch FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$lead_id';"; + } + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VM_mancall_ct = mysql_num_rows($rslt); + if ($VM_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $start_epoch =$row[0]; + $length_in_sec = ($StarTtime - $start_epoch); + } + else + { + $length_in_sec = 0; + } + + if ( ($length_in_sec < 1) and ($check_inbound > 0) ) + { + ##### start epoch in the vicidial_log table, couldn't find one in vicidial_closer_log + $stmt="SELECT start_epoch FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VM_mancall_ct = mysql_num_rows($rslt); + if ($VM_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $start_epoch =$row[0]; + $length_in_sec = ($StarTtime - $start_epoch); + } + else + { + $length_in_sec = 0; + } + } + } + else {$length_in_sec = ($StarTtime - $start_epoch);} + + $closer_logged=0; + if ($check_inbound > 0) + { + $four_hours_ago = date("Y-m-d H:i:s", mktime(date("H")-4,date("i"),date("s"),date("m"),date("d"),date("Y"))); + + $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where lead_id='$lead_id' and call_date > \"$four_hours_ago\" order by start_epoch desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + $closer_logged=1; + echo "$uniqueid\n$channel\n"; + } + } + + ############################################# + ##### SPUSTIŤ QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + + if ($auto_dial_level > 0) + { + ### check to see if campaign has alt_dial enabled + $stmt="SELECT auto_alt_dial FROM vicidial_campaigns where campaign_id='$campaign';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $auto_alt_dial =$row[0]; + } + else {$auto_alt_dial = 'NONE';} + if (eregi("(ALT_ONLY|ADDR3_ONLY|ALT_AND_ADDR3)",$auto_alt_dial)) + { + ### check to see if lead should be alt_dialed + $stmt="SELECT alt_dial FROM vicidial_auto_calls where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $alt_dial =$row[0]; + } + else {$alt_dial = 'NONE';} + + if ( (eregi("(NONE|MAIN)",$alt_dial)) and (eregi("(ALT_ONLY|ALT_AND_ADDR3)",$auto_alt_dial)) ) + { + $stmt="SELECT alt_phone,gmt_offset_now,state FROM vicidial_list where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $alt_phone = $row[0]; + $alt_phone = eregi_replace("[^0-9]","",$alt_phone); + $gmt_offset_now = $row[1]; + $state = $row[2]; + } + else {$alt_phone = '';} + if (strlen($alt_phone)>5) + { + ### insert record into vicidial_hopper for alt_phone call attempt + $stmt = "INSERT INTO vicidial_hopper SET lead_id='$lead_id',campaign_id='$campaign',status='HOLD',list_id='$list_id',gmt_offset_now='$gmt_offset_now',state='$state',alt_dial='ALT',user='',priority='25';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + } + } + if ( ( (eregi("(ALT)",$alt_dial)) and (eregi("ALT_AND_ADDR3",$auto_alt_dial)) ) or ( (eregi("(NONE|MAIN)",$alt_dial)) and (eregi("ADDR3_ONLY",$auto_alt_dial)) ) ) + { + $stmt="SELECT address3,gmt_offset_now,state FROM vicidial_list where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $address3 = $row[0]; + $address3 = eregi_replace("[^0-9]","",$address3); + $gmt_offset_now = $row[1]; + $state = $row[2]; + } + else {$address3 = '';} + if (strlen($address3)>5) + { + ### insert record into vicidial_hopper for address3 call attempt + $stmt = "INSERT INTO vicidial_hopper SET lead_id='$lead_id',campaign_id='$campaign',status='HOLD',list_id='$list_id',gmt_offset_now='$gmt_offset_now',state='$state',alt_dial='ADDR3',user='',priority='20';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + } + } + } + + if ($enable_queuemetrics_logging > 0) + { + ### check to see if lead should be alt_dialed + $stmt="SELECT auto_call_id,lead_id,phone_number,status,campaign_id,phone_code,alt_dial,stage,callerid,uniqueid from vicidial_auto_calls where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_qm_ct = mysql_num_rows($rslt); + if ($VAC_qm_ct > 0) + { + $row=mysql_fetch_row($rslt); + $auto_call_id = $row[0]; + $CLlead_id = $row[1]; + $CLphone_number = $row[2]; + $CLstatus = $row[3]; + $CLcampaign_id = $row[4]; + $CLphone_code = $row[5]; + $CLalt_dial = $row[6]; + $CLstage = $row[7]; + $CLcallerid = $row[8]; + $CLuniqueid = $row[9]; + } + + $CLstage = preg_replace("/.*-/",'',$CLstage); + if (strlen($CLstage) < 1) {$CLstage=0;} + + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt="SELECT count(*) from queue_log where call_id='$MDnextCID' and verb='COMPLETECALLER';"; + $rslt=mysql_query($stmt, $linkB); + if ($DB) {echo "$stmt\n";} + $VAC_cc_ct = mysql_num_rows($rslt); + if ($VAC_cc_ct > 0) + { + $row=mysql_fetch_row($rslt); + $caller_complete = $row[0]; + } + + if ($caller_complete < 1) + { + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='$MDnextCID',queue='$campaign',agent='Agent/$user',verb='COMPLETEAGENT',data1='$CLstage',data2='$length_in_sec',data3='1',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + } + mysql_close($linkB); + } + + ### delete call record from vicidial_auto_calls + $stmt = "DELETE from vicidial_auto_calls where lead_id='$lead_id' and uniqueid='$uniqueid';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + + + + $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME',comments='' where user='$user' and server_ip='$server_ip';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='NONE',agent='Agent/$user',verb='PAUSEALL',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } + } + else + { + if ($enable_queuemetrics_logging > 0) + { + ### check to see if lead should be alt_dialed + $stmt="SELECT auto_call_id,lead_id,phone_number,status,campaign_id,phone_code,alt_dial,stage,callerid,uniqueid from vicidial_auto_calls where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_qm_ct = mysql_num_rows($rslt); + if ($VAC_qm_ct > 0) + { + $row=mysql_fetch_row($rslt); + $auto_call_id = $row[0]; + $CLlead_id = $row[1]; + $CLphone_number = $row[2]; + $CLstatus = $row[3]; + $CLcampaign_id = $row[4]; + $CLphone_code = $row[5]; + $CLalt_dial = $row[6]; + $CLstage = $row[7]; + $CLcallerid = $row[8]; + $CLuniqueid = $row[9]; + } + + $CLstage = preg_replace("/XFER|-/",'',$CLstage); + if ($CLstage < 0.25) {$CLstage=0;} + + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='$MDnextCID',queue='$campaign',agent='Agent/$user',verb='COMPLETEAGENT',data1='$CLstage',data2='$length_in_sec',data3='1',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + + $stmt = "DELETE from vicidial_auto_calls lead_id='$lead_id' and uniqueid='$uniqueid';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + + $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME',comments='' where user='$user' and server_ip='$server_ip';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='NONE',agent='Agent/$user',verb='PAUSEALL',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } + } + + if ($closer_logged < 1) + { + ##### update the duration and end time in the vicidial_log table + $stmt="UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + + if ($affected_rows > 0) + { + echo "$uniqueid\n$channel\n"; + } + else + { + echo "LOG NEBOL ZADANÝ\n\n"; + } + } + } + + echo $VDstop_rec_after_each_call . '|' . $extension . '|' . $conf_silent_prefix . '|' . $conf_exten . '|' . $user_abb . "|\n"; + + ##### if VICIDiaL call and hangup_after_each_call activated, find all recording + ##### channels and hang them up while entering info into recording_log and + ##### returning filename/recordingID + if ($VDstop_rec_after_each_call == 1) + { + $local_DEF = 'Local/'; + $local_AMP = '@'; + $total_rec=0; + $loop_count=0; + $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and extension = '$conf_exten' order by channel desc;"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($rslt) {$rec_list = mysql_num_rows($rslt);} + while ($rec_list>$loop_count) + { + $row=mysql_fetch_row($rslt); + if (preg_match("/Local\/$conf_silent_prefix$conf_exten\@/i",$row[0])) + { + $rec_channels[$total_rec] = "$row[0]"; + $total_rec++; + } + if ($format=='debug') {echo "\n";} + $loop_count++; + } + + $total_recFN=0; + $loop_count=0; + $filename=$MT; # not necessary : and cmd_line_f LIKE \"%_$user_abb\" + $stmt="SELECT cmd_line_f FROM vicidial_manager where server_ip='$server_ip' and action='Originate' and cmd_line_b = 'Channel: $local_DEF$conf_silent_prefix$conf_exten$local_AMP$ext_context' order by entry_date desc limit $total_rec;"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($rslt) {$recFN_list = mysql_num_rows($rslt);} + while ($recFN_list>$loop_count) + { + $row=mysql_fetch_row($rslt); + $filename[$total_recFN] = preg_replace("/Callerid: /i","",$row[0]); + if ($format=='debug') {echo "\n";} + $total_recFN++; + $loop_count++; + } + + $loop_count=0; + while($loop_count < $total_rec) + { + if (strlen($rec_channels[$loop_count])>5) + { + $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH12345$StarTtime$loop_count','Channel: $rec_channels[$loop_count]','','','','','','','','','');"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + + echo "REC_ZASTAVIŤ|$rec_channels[$loop_count]|$filename[$loop_count]|"; + if (strlen($filename)>2) + { + $stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename[$loop_count]'"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($rslt) {$fn_count = mysql_num_rows($rslt);} + if ($fn_count) + { + $row=mysql_fetch_row($rslt); + $recording_id = $row[0]; + $start_time = $row[1]; + + $length_in_sec = ($StarTtime - $start_time); + $length_in_min = ($length_in_sec / 60); + $length_in_min = sprintf("%8.2f", $length_in_min); + + $stmt="UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' where filename='$filename[$loop_count]' and end_epoch is NULL;"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + + echo "$recording_id|$length_in_min|"; + } + else {echo "||";} + } + else {echo "||";} + echo "\n"; + } + $loop_count++; + } + } + + + $talk_sec=0; + $StarTtime = date("U"); + $stmt = "select talk_epoch,talk_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $VDpr_ct = mysql_num_rows($rslt); + if ($VDpr_ct > 0) + { + $row=mysql_fetch_row($rslt); + $talk_sec = (($StarTtime - $row[0]) + $row[1]); + } + $stmt="UPDATE vicidial_agent_log set talk_sec='$talk_sec',talk_epoch='$StarTtime',dispo_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + + } +} + + +################################################################################ +### VDADREcheckINCOMING - for auto-dial VICIDiaL dialing this will recheck for +### calls to see if the channel has updated +################################################################################ +if ($ACTION == 'VDADREcheckINCOMING') +{ + $MT[0]=''; + $row=''; $rowx=''; + $channel_live=1; + if ( (strlen($campaign)<1) || (strlen($server_ip)<1) || (strlen($lead_id)<1) ) + { + $channel_live=0; + echo "0\n"; + echo "Kampaň $campaign Nie je správny\n"; + echo "lead_id $lead_id Nie je správny\n"; + exit; + } + else + { + ### grab the call and lead info from the vicidial_live_agents table + $stmt = "SELECT lead_id,uniqueid,callerid,channel,call_server_ip FROM vicidial_live_agents where server_ip = '$server_ip' and user='$user' and campaign_id='$campaign' and lead_id='$lead_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $queue_leadID_ct = mysql_num_rows($rslt); + + if ($queue_leadID_ct > 0) + { + $row=mysql_fetch_row($rslt); + $lead_id =$row[0]; + $uniqueid =$row[1]; + $callerid =$row[2]; + $channel =$row[3]; + $call_server_ip =$row[4]; + if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} + echo "1\n" . $lead_id . '|' . $uniqueid . '|' . $callerid . '|' . $channel . '|' . $call_server_ip . "|\n"; + } + } +} + + +################################################################################ +### VDADcheckINCOMING - for auto-dial VICIDiaL dialing this will check for calls +### in the vicidial_live_agents table in QUEUE status, then +### lookup the lead info and pass it back to vicidial.php +################################################################################ +if ($ACTION == 'VDADcheckINCOMING') +{ + $Ctype = 'A'; + $MT[0]=''; + $row=''; $rowx=''; + $channel_live=1; + if ( (strlen($campaign)<1) || (strlen($server_ip)<1) ) + { + $channel_live=0; + echo "0\n"; + echo "Kampaň $campaign Nie je správny\n"; + exit; + } + else + { + ### grab the call and lead info from the vicidial_live_agents table + $stmt = "SELECT lead_id,uniqueid,callerid,channel,call_server_ip FROM vicidial_live_agents where server_ip = '$server_ip' and user='$user' and campaign_id='$campaign' and status='QUEUE';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $queue_leadID_ct = mysql_num_rows($rslt); + + if ($queue_leadID_ct > 0) + { + $row=mysql_fetch_row($rslt); + $lead_id =$row[0]; + $uniqueid =$row[1]; + $callerid =$row[2]; + $channel =$row[3]; + $call_server_ip =$row[4]; + if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;} + echo "1\n" . $lead_id . '|' . $uniqueid . '|' . $callerid . '|' . $channel . '|' . $call_server_ip . "|\n"; + + ##### grab number of calls today in this campaign and increment + $stmt="SELECT calls_today FROM vicidial_live_agents WHERE user='$user' and campaign_id='$campaign';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $vla_cc_ct = mysql_num_rows($rslt); + if ($vla_cc_ct > 0) + { + $row=mysql_fetch_row($rslt); + $calls_today =$row[0]; + } + else + {$calls_today ='0';} + $calls_today++; + + ### update the agent status to INCALL in vicidial_live_agents + $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',comments='AUTO',calls_today='$calls_today' where user='$user' and server_ip='$server_ip';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + + $stmt = "UPDATE vicidial_campaign_agents set calls_today='$calls_today' where user='$user' and campaign_id='$campaign';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + + ##### grab the data from vicidial_list for the lead_id + $stmt="SELECT * FROM vicidial_list where lead_id='$lead_id' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $list_lead_ct = mysql_num_rows($rslt); + if ($list_lead_ct > 0) + { + $row=mysql_fetch_row($rslt); + # $lead_id = trim("$row[0]"); + $dispo = trim("$row[3]"); + $tsr = trim("$row[4]"); + $vendor_id = trim("$row[5]"); + $source_id = trim("$row[6]"); + $list_id = trim("$row[7]"); + $gmt_offset_now = trim("$row[8]"); + $phone_code = trim("$row[10]"); + $phone_number = trim("$row[11]"); + $title = trim("$row[12]"); + $first_name = trim("$row[13]"); + $middle_initial = trim("$row[14]"); + $last_name = trim("$row[15]"); + $address1 = trim("$row[16]"); + $address2 = trim("$row[17]"); + $address3 = trim("$row[18]"); + $city = trim("$row[19]"); + $state = trim("$row[20]"); + $province = trim("$row[21]"); + $postal_code = trim("$row[22]"); + $country_code = trim("$row[23]"); + $gender = trim("$row[24]"); + $date_of_birth = trim("$row[25]"); + $alt_phone = trim("$row[26]"); + $email = trim("$row[27]"); + $security = trim("$row[28]"); + $comments = stripslashes(trim("$row[29]")); + $called_count = trim("$row[30]"); + } + + ##### if lead is a callback, grab the callback comments + $CBentry_time = ''; + $CBcallback_time = ''; + $CBuser = ''; + $CBcomments = ''; + if (ereg("CALLBK",$dispo)) + { + $stmt="SELECT entry_time,callback_time,user,comments FROM vicidial_callbacks where lead_id='$lead_id' order by callback_id desc LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $cb_record_ct = mysql_num_rows($rslt); + if ($cb_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $CBentry_time = trim("$row[0]"); + $CBcallback_time = trim("$row[1]"); + $CBuser = trim("$row[2]"); + $CBcomments = trim("$row[3]"); + } + } + + ### update the lead status to INCALL + $stmt = "UPDATE vicidial_list set status='INCALL', user='$user' where lead_id='$lead_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + + ### update the log status to INCALL + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } + + + $stmt = "select campaign_id,phone_number,alt_dial,call_type from vicidial_auto_calls where callerid = '$callerid' order by call_time desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $VDAC_cid_ct = mysql_num_rows($rslt); + if ($VDAC_cid_ct > 0) + { + $row=mysql_fetch_row($rslt); + $VDADchannel_group =$row[0]; + $dialed_number =$row[1]; + $dialed_label =$row[2]; + $call_type =$row[3]; + } + else + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|INBND|$callerid|$user|$user_group|$list_id|$lead_id|$phone_number|$uniqueid|\n"); + fclose($fp); + } + } + + if ( ($call_type=='OUT') or ($call_type=='OUTBALANCE') ) + { + $stmt = "UPDATE vicidial_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL', user_group='$user_group' where lead_id='$lead_id' and uniqueid='$uniqueid';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + + $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$campaign';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $VDIG_cid_ct = mysql_num_rows($rslt); + if ($VDIG_cid_ct > 0) + { + $row=mysql_fetch_row($rslt); + $VDCL_campaign_script = $row[0]; + $VDCL_get_call_launch = $row[1]; + $VDCL_xferconf_a_dtmf = $row[2]; + $VDCL_xferconf_a_number = $row[3]; + $VDCL_xferconf_b_dtmf = $row[4]; + $VDCL_xferconf_b_number = $row[5]; + } + echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n|\n"; + + $stmt = "select phone_number,alt_dial from vicidial_auto_calls where callerid = '$callerid' order by call_time desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $VDAC_cid_ct = mysql_num_rows($rslt); + if ($VDAC_cid_ct > 0) + { + $row=mysql_fetch_row($rslt); + $dialed_number =$row[0]; + $dialed_label =$row[1]; + } + } + else + { + ### update the vicidial_closer_log user to INCALL + $stmt = "UPDATE vicidial_closer_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL', user_group='$user_group' where lead_id='$lead_id' order by closecallid desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + + $stmt = "select count(*) from vicidial_log where lead_id='$lead_id' and uniqueid='$uniqueid';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $VDL_cid_ct = mysql_num_rows($rslt); + if ($VDL_cid_ct > 0) + { + $row=mysql_fetch_row($rslt); + $VDCL_front_VDlog =$row[0]; + } + + $stmt = "select * from vicidial_inbound_groups where group_id='$VDADchannel_group';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $VDIG_cid_ct = mysql_num_rows($rslt); + if ($VDIG_cid_ct > 0) + { + $row=mysql_fetch_row($rslt); + $VDCL_group_name = $row[1]; + $VDCL_group_color = $row[2]; + $VDCL_group_web = $row[4]; + $VDCL_fronter_display = $row[7]; + $VDCL_ingroup_script = $row[8]; + $VDCL_get_call_launch = $row[9]; + $VDCL_xferconf_a_dtmf = $row[10]; + $VDCL_xferconf_a_number = $row[11]; + $VDCL_xferconf_b_dtmf = $row[12]; + $VDCL_xferconf_b_number = $row[13]; + $VDCL_default_xfer_group= $row[28]; + + ### update the comments in vicidial_live_agents record + $stmt = "UPDATE vicidial_live_agents set comments='INBOUND' where user='$user' and server_ip='$server_ip';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + + $Ctype = 'I'; + } + else + { + $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$VDADchannel_group';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $VDIG_cid_ct = mysql_num_rows($rslt); + if ($VDIG_cid_ct > 0) + { + $row=mysql_fetch_row($rslt); + $VDCL_ingroup_script = $row[0]; + $VDCL_get_call_launch = $row[1]; + $VDCL_xferconf_a_dtmf = $row[2]; + $VDCL_xferconf_a_number = $row[3]; + $VDCL_xferconf_b_dtmf = $row[4]; + $VDCL_xferconf_b_number = $row[5]; + } + } + + ### if web form is set then send na to vicidial.php for override of WEB_FORM address + if ( (strlen($VDCL_group_web)>5) or (strlen($VDCL_group_name)>0) ) {echo "$VDCL_group_web|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|\n";} + else {echo "|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|\n";} + + $stmt = "SELECT full_name from vicidial_users where user='$tsr';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $VDU_cid_ct = mysql_num_rows($rslt); + if ($VDU_cid_ct > 0) + { + $row=mysql_fetch_row($rslt); + $fronter_full_name = $row[0]; + echo $fronter_full_name . '|' . $tsr . "\n"; + } + else {echo '|' . $tsr . "\n";} + } + + $comments = eregi_replace("\r",'',$comments); + $comments = eregi_replace("\n",'!N',$comments); + + $LeaD_InfO = $callerid . "\n"; + $LeaD_InfO .= $lead_id . "\n"; + $LeaD_InfO .= $dispo . "\n"; + $LeaD_InfO .= $tsr . "\n"; + $LeaD_InfO .= $vendor_id . "\n"; + $LeaD_InfO .= $list_id . "\n"; + $LeaD_InfO .= $gmt_offset_now . "\n"; + $LeaD_InfO .= $phone_code . "\n"; + $LeaD_InfO .= $phone_number . "\n"; + $LeaD_InfO .= $title . "\n"; + $LeaD_InfO .= $first_name . "\n"; + $LeaD_InfO .= $middle_initial . "\n"; + $LeaD_InfO .= $last_name . "\n"; + $LeaD_InfO .= $address1 . "\n"; + $LeaD_InfO .= $address2 . "\n"; + $LeaD_InfO .= $address3 . "\n"; + $LeaD_InfO .= $city . "\n"; + $LeaD_InfO .= $state . "\n"; + $LeaD_InfO .= $province . "\n"; + $LeaD_InfO .= $postal_code . "\n"; + $LeaD_InfO .= $country_code . "\n"; + $LeaD_InfO .= $gender . "\n"; + $LeaD_InfO .= $date_of_birth . "\n"; + $LeaD_InfO .= $alt_phone . "\n"; + $LeaD_InfO .= $email . "\n"; + $LeaD_InfO .= $security . "\n"; + $LeaD_InfO .= $comments . "\n"; + $LeaD_InfO .= $called_count . "\n"; + $LeaD_InfO .= $CBentry_time . "\n"; + $LeaD_InfO .= $CBcallback_time . "\n"; + $LeaD_InfO .= $CBuser . "\n"; + $LeaD_InfO .= $CBcomments . "\n"; + $LeaD_InfO .= $dialed_number . "\n"; + $LeaD_InfO .= $dialed_label . "\n"; + $LeaD_InfO .= $source_id . "\n"; + + echo $LeaD_InfO; + + + + $wait_sec=0; + $StarTtime = date("U"); + $stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $VDpr_ct = mysql_num_rows($rslt); + if ($VDpr_ct > 0) + { + $row=mysql_fetch_row($rslt); + $wait_sec = (($StarTtime - $row[0]) + $row[1]); + } + $stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + + ### If HOVORBK, change vicidial_callback record to INACTIVE + if (eregi("CALLBK|CBHOLD", $dispo)) + { + $stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='$lead_id' and status NOT IN('INACTIVE','DEAD','ARCHIVE');"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + + ##### check if system is set to generate logfile for transfers + $stmt="SELECT enable_agc_xfer_log FROM system_settings;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $enable_agc_xfer_log_ct = mysql_num_rows($rslt); + if ($enable_agc_xfer_log_ct > 0) + { + $row=mysql_fetch_row($rslt); + $enable_agc_xfer_log =$row[0]; + } + + if ( ($WeBRooTWritablE > 0) and ($enable_agc_xfer_log > 0) ) + { + # DATETIME|campaign|lead_id|phone_number|user|type + # 2007-08-22 11:11:11|TESTCAMP|65432|3125551212|1234|A + $fp = fopen ("./xfer_log.txt", "a"); + fwrite ($fp, "$NOW_TIME|$campaign|$lead_id|$phone_number|$user|$Ctype\n"); + fclose($fp); + } + + } + else + { + echo "0\n"; + # echo "No calls in QUEUE for $user na $server_ip\n"; + exit; + } + } +} + + +################################################################################ +### userLOGout - Logs the user out of VICIDiaL client, deleting db records and +### inserting into vicidial_user_log +################################################################################ +if ($ACTION == 'userLOGout') +{ + $MT[0]=''; + $row=''; $rowx=''; +if ( (strlen($campaign)<1) || (strlen($conf_exten)<1) ) + { + echo "NO\n"; + echo "campaign $campaign or conf_exten $conf_exten Nie je správny\n"; + exit; + } +else + { + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } + ##### Insert a ODHLÁSIŤ record into the user log + $stmt="INSERT INTO vicidial_user_log (user,event,campaign_id,event_date,event_epoch,user_group) values('$user','ODHLÁSIŤ','$campaign','$NOW_TIME','$StarTtime','$user_group');"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $vul_insert = mysql_affected_rows($link); + + if ($no_delete_sessions < 1) + { + ##### Remove the reservation na the vicidial_conferences meetme room + $stmt="UPDATE vicidial_conferences set extension='' where server_ip='$server_ip' and conf_exten='$conf_exten';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $vc_remove = mysql_affected_rows($link); + } + + ##### Delete the vicidial_live_agents record for this session + $stmt="DELETE from vicidial_live_agents where server_ip='$server_ip' and user ='$user';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $vla_delete = mysql_affected_rows($link); + + ##### Delete the vicidial_live_inbound_agents records for this session + $stmt="DELETE from vicidial_live_inbound_agents where user ='$user';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $vlia_delete = mysql_affected_rows($link); + + ##### Delete the web_client_sessions + $stmt="DELETE from web_client_sessions where server_ip='$server_ip' and session_name ='$session_name';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $wcs_delete = mysql_affected_rows($link); + + ##### Hangup the client phone + $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$protocol/$extension%\" order by channel desc;"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($rslt) + { + $row=mysql_fetch_row($rslt); + $agent_channel = "$row[0]"; + if ($format=='debug') {echo "\n";} + $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','ULGH3459$StarTtime','Channel: $agent_channel','','','','','','','','','');"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + + if ($LogouTKicKAlL > 0) + { + $local_DEF = 'Local/5555'; + $local_AMP = '@'; + $kick_local_channel = "$local_DEF$conf_exten$local_AMP$ext_context"; + $queryCID = "ULGH3458$StarTtime"; + + $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $kick_local_channel','Context: $ext_context','Exten: 8300','Priority: 1','Callerid: $queryCID','','','','$channel','$exten');"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $VDpr_ct = mysql_num_rows($rslt); + if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + + if ($vla_delete > 0) + { + ############################################# + ##### SPUSTIŤ QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,allow_sipsak_messages FROM system_settings;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $allow_sipsak_messages = $row[6]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ( ($enable_sipsak_messages > 0) and ($allow_sipsak_messages > 0) and (eregi("SIP",$protocol)) ) + { + $SIPSAK_message = 'LOGGED OUT'; + passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_message\" -r 5060 -s sip:$extension@$phone_ip > /dev/null"); + } + + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + # $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='$campaign',agent='Agent/$user',verb='PAUSE',serverid='1';"; + # if ($DB) {echo "$stmt\n";} + # + # $rslt=mysql_query($stmt, $linkB); + # $affected_rows = mysql_affected_rows($linkB); + + $stmt = "SELECT time_id FROM queue_log where agent='Agent/$user' and verb='AGENTLOGIN' order by time_id desc limit 1;"; + $rslt=mysql_query($stmt, $linkB); + if ($DB) {echo "$stmt\n";} + echo "$stmt\n"; + $li_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $li_conf_ct) + { + $row=mysql_fetch_row($rslt); + $logintime = $row[0]; + $i++; + } + + $time_logged_in = ($StarTtime - $logintime); + if ($time_logged_in > 1000000) {$time_logged_in=1;} + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='$campaign',agent='Agent/$user',verb='AGENTLOGOFF',data1='$user$agents',data2='$time_logged_in',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } + + echo "$vul_insert|$vc_remove|$vla_delete|$wcs_delete|$agent_channel|$vlia_delete\n"; + } +} + + +################################################################################ +### updateDISPO - update the vicidial_list table to reflect the agent choice of +### call disposition for that leand +################################################################################ +if ($ACTION == 'updateDISPO') +{ + $MT[0]=''; + $row=''; $rowx=''; + if ( (strlen($dispo_choice)<1) || (strlen($lead_id)<1) ) + { + echo "Dispo Choice $dispo or lead_id $lead_id Nie je správny\n"; + exit; + } + else + { + $stmt="UPDATE vicidial_list set status='$dispo_choice', user='$user' where lead_id='$lead_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + + $stmt="UPDATE vicidial_log set status='$dispo_choice' where lead_id='$lead_id' and user='$user' order by uniqueid desc limit 1;"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + + $stmt = "select count(*) from vicidial_campaigns where campaign_id='$campaign' and campaign_allow_inbound='Y';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + { + $stmt = "UPDATE vicidial_closer_log set status='$dispo_choice' where lead_id='$lead_id' and user='$user' order by closecallid desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + } + + if ( ($use_internal_dnc=='Y') and ($dispo_choice=='DNC') ) + { + $stmt = "select phone_number from vicidial_list where lead_id='$lead_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $stmt="INSERT INTO vicidial_dnc (phone_number) values('$row[0]');"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + } + } + + $dispo_sec=0; + $StarTtime = date("U"); + $stmt = "select dispo_epoch,dispo_sec from vicidial_agent_log where agent_log_id='$agent_log_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $VDpr_ct = mysql_num_rows($rslt); + if ($VDpr_ct > 0) + { + $row=mysql_fetch_row($rslt); + $dispo_sec = (($StarTtime - $row[0]) + $row[1]); + } + $stmt="UPDATE vicidial_agent_log set dispo_sec='$dispo_sec',dispo_epoch='$StarTtime',status='$dispo_choice' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } + + $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch,user_group) values('$user','$server_ip','$NOW_TIME','$campaign','$StarTtime','0','$StarTtime','$user_group');"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + $agent_log_id = mysql_insert_id($link); + + ### HOVORBACK ENTRY + if ( ($dispo_choice == 'CBHOLD') and (strlen($CallBackDatETimE)>10) ) + { + $stmt="INSERT INTO vicidial_callbacks (lead_id,list_id,campaign_id,status,entry_time,callback_time,user,recipient,comments,user_group) values('$lead_id','$list_id','$campaign','ACTIVE','$NOW_TIME','$CallBackDatETimE','$user','$recipient','$comments','$user_group');"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + } + + $stmt="SELECT auto_alt_dial_statuses from vicidial_campaigns where campaign_id='$campaign';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + if ( ($auto_dial_level > 0) and (ereg(" $dispo_choice ",$row[0])) ) + { + $stmt = "select count(*) from vicidial_hopper where lead_id='$lead_id' and status='HOLD';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + if ($row[0] > 0) + { + $stmt="UPDATE vicidial_hopper set status='READY' where lead_id='$lead_id' and status='HOLD' limit 1;"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + } + else + { + $stmt="DELETE from vicidial_hopper where lead_id='$lead_id' and status='HOLD';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + + ############################################# + ##### SPUSTIŤ QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='$MDnextCID',queue='$campaign',agent='Agent/$user',verb='CALLSTATUS',data1='$dispo_choice',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + + echo 'Lead ' . $lead_id . ' bol zmenený pre ' . $dispo_choice . " Stav\nNext agent_log_id:\n" . $agent_log_id . "\n"; +} + +################################################################################ +### updateLEAD - update the vicidial_list table to reflect the values that are +### in the agents screen at time of call hangup +################################################################################ +if ($ACTION == 'updateLEAD') +{ + $MT[0]=''; + $row=''; $rowx=''; + $DO_NOT_UPDATE=0; + $DO_NOT_UPDATE_text=''; + if ( (strlen($phone_number)<1) || (strlen($lead_id)<1) ) + { + echo "phone_number $phone_number or lead_id $lead_id Nie je správny\n"; + exit; + } + else + { + + $stmt = "SELECT disable_alter_custdata FROM vicidial_campaigns where campaign_id='$campaign'"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $dac_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $dac_conf_ct) + { + $row=mysql_fetch_row($rslt); + $disable_alter_custdata = $row[0]; + $i++; + } + if (ereg('Y',$disable_alter_custdata)) + { + $DO_NOT_UPDATE=1; + $DO_NOT_UPDATE_text=' NOT'; + $stmt = "SELECT alter_custdata_override FROM vicidial_users where user='$user'"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $aco_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $aco_conf_ct) + { + $row=mysql_fetch_row($rslt); + $alter_custdata_override = $row[0]; + $i++; + } + if (ereg('ALLOW_ALTER',$alter_custdata_override)) + { + $DO_NOT_UPDATE=0; + $DO_NOT_UPDATE_text=''; + } + } + + if ($DO_NOT_UPDATE < 1) + { + $comments = eregi_replace("\r",'',$comments); + $comments = eregi_replace("\n",'!N',$comments); + $comments = eregi_replace("--AMP--",'&',$comments); + $comments = eregi_replace("--QUES--",'?',$comments); + $comments = eregi_replace("--POUND--",'#',$comments); + + $stmt="UPDATE vicidial_list set vendor_lead_code='" . mysql_real_escape_string($vendor_lead_code) . "', title='" . mysql_real_escape_string($title) . "', first_name='" . mysql_real_escape_string($first_name) . "', middle_initial='" . mysql_real_escape_string($middle_initial) . "', last_name='" . mysql_real_escape_string($last_name) . "', address1='" . mysql_real_escape_string($address1) . "', address2='" . mysql_real_escape_string($address2) . "', address3='" . mysql_real_escape_string($address3) . "', city='" . mysql_real_escape_string($city) . "', state='" . mysql_real_escape_string($state) . "', province='" . mysql_real_escape_string($province) . "', postal_code='" . mysql_real_escape_string($postal_code) . "', country_code='" . mysql_real_escape_string($country_code) . "', gender='" . mysql_real_escape_string($gender) . "', date_of_birth='" . mysql_real_escape_string($date_of_birth) . "', alt_phone='" . mysql_real_escape_string($alt_phone) . "', email='" . mysql_real_escape_string($email) . "', security_phrase='" . mysql_real_escape_string($security_phrase) . "', comments='" . mysql_real_escape_string($comments) . "' where lead_id='$lead_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + + $random = (rand(1000000, 9999999) + 10000000); + $stmt="UPDATE vicidial_live_agents set random_id='$random' where user='$user' and server_ip='$server_ip';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + + } + echo "Lead $lead_id information has$DO_NOT_UPDATE_text been updated\n"; +} + + +################################################################################ +### VDADpause - update the vicidial_live_agents table to show that the agent is +### or ready now active and ready to take calls +################################################################################ +if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) +{ + $MT[0]=''; + $row=''; $rowx=''; + if ( (strlen($stage)<2) || (strlen($server_ip)<1) ) + { + echo "stage $stage Nie je správny\n"; + exit; + } + else + { + $random = (rand(1000000, 9999999) + 10000000); + $stmt="UPDATE vicidial_live_agents set lead_id='',uniqueid=0,callerid='',channel='', random_id='$random',comments='' where user='$user' and server_ip='$server_ip';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + + $stmt="UPDATE vicidial_live_agents set status='$stage' where user='$user' and server_ip='$server_ip';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + ############################################# + ##### SPUSTIŤ QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ($enable_queuemetrics_logging > 0) + { + if (ereg('READY',$stage)) {$QMstatus='UNPAUSEALL';} + if (ereg('PAUSE',$stage)) {$QMstatus='PAUSEALL';} + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='NONE',agent='Agent/$user',verb='$QMstatus',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } + + if ($agent_log == 'NO') + {$donothing=1;} + else + { + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,wait_sec,dispo_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $VDpr_ct = mysql_num_rows($rslt); + if ($VDpr_ct > 0) + { + $row=mysql_fetch_row($rslt); + $wait_sec=0; + if ($row[2] > 0) + { + $wait_sec = (($StarTtime - $row[2]) + $row[3]); + } + if ( (eregi("NULL",$row[4])) or ($row[4] < 1000) ) + {$pause_sec = (($StarTtime - $row[0]) + $row[1]);} + else + {$pause_sec = (($row[4] - $row[0]) + $row[1]);} + + } + if ($ACTION == 'VDADready') + { + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + if ($ACTION == 'VDADpause') + { + $stmt="UPDATE vicidial_agent_log set pause_epoch='$StarTtime',wait_sec='$wait_sec' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + } + } + echo 'Agent ' . $user . ' je teraz v stave ' . $stage . "\n"; +} + + +################################################################################ +### UpdatEFavoritEs - update the astguiclient favorites list for this extension +################################################################################ +if ($ACTION == 'UpdatEFavoritEs') +{ + $row=''; $rowx=''; + $channel_live=1; + if ( (strlen($favorites_list)<1) || (strlen($user)<1) || (strlen($exten)<1) ) + { + echo "favorites list $favorites_list Nie je správny\n"; + exit; + } + else + { + $stmt = "select count(*) from phone_favorites where extension='$exten' and server_ip='$server_ip';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + if ($row[0] > 0) + { + $stmt="UPDATE phone_favorites set extensions_list=\"$favorites_list\" where extension='$exten' and server_ip='$server_ip';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + else + { + $stmt="INSERT INTO phone_favorites values('$exten','$server_ip',\"$favorites_list\");"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + } + echo "Favorites list has been updated to $favorites_list for $exten\n"; +} + + +################################################################################ +### PauseCodeSubmit - Update vicidial_agent_log with pause code +################################################################################ +if ($ACTION == 'PauzaCodeSubmit') +{ + $row=''; $rowx=''; + if ( (strlen($status)<1) || (strlen($agent_log_id)<1) ) + { + echo "agent_log_id $agent_log_id or pause_code $status Nie je správny\n"; + exit; + } + else + { + $stmt="UPDATE vicidial_agent_log set sub_status=\"$status\" where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + ############################################# + ##### SPUSTIŤ QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,allow_sipsak_messages FROM system_settings;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $allow_sipsak_messages = $row[6]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ( ($enable_sipsak_messages > 0) and ($allow_sipsak_messages > 0) and (eregi("SIP",$protocol)) ) + { + $SIPSAK_prefix = 'BK-'; + passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_prefix$status\" -r 5060 -s sip:$extension@$phone_ip > /dev/null"); + } + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='$campaign',agent='Agent/$user',verb='PAUSEREASON',serverid='$queuemetrics_log_id',data1='$status';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } + } +echo "Pauza Code has been updated to $status for $agent_log_id\n"; +} + + +################################################################################ +### CalLBacKLisT - List the USERONLY callbacks for an agent +################################################################################ +if ($ACTION == 'CalLBacKLisT') +{ +$stmt = "select callback_id,lead_id,campaign_id,status,entry_time,callback_time,comments from vicidial_callbacks where recipient='USERONLY' and user='$user' and campaign_id='$campaign' and status NOT IN('INACTIVE','DEAD') order by callback_time;"; +if ($DB) {echo "$stmt\n";} +$rslt=mysql_query($stmt, $link); +if ($rslt) {$callbacks_count = mysql_num_rows($rslt);} +echo "$callbacks_count\n"; +$loop_count=0; + while ($callbacks_count>$loop_count) + { + $row=mysql_fetch_row($rslt); + $callback_id[$loop_count] = $row[0]; + $lead_id[$loop_count] = $row[1]; + $campaign_id[$loop_count] = $row[2]; + $status[$loop_count] = $row[3]; + $entry_time[$loop_count] = $row[4]; + $callback_time[$loop_count] = $row[5]; + $comments[$loop_count] = $row[6]; + $loop_count++; + } +$loop_count=0; + while ($callbacks_count>$loop_count) + { + $stmt = "select first_name,last_name,phone_number from vicidial_list where lead_id='$lead_id[$loop_count]';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + echo "$row[0] ~$row[1] ~$row[2] ~$callback_id[$loop_count] ~$lead_id[$loop_count] ~$campaign_id[$loop_count] ~$status[$loop_count] ~$entry_time[$loop_count] ~$callback_time[$loop_count] ~$comments[$loop_count]\n"; + $loop_count++; + } + +} + + +################################################################################ +### CalLBacKCounT - send the count of the USERONLY callbacks for an agent +################################################################################ +if ($ACTION == 'CalLBacKCounT') +{ +$stmt = "select count(*) from vicidial_callbacks where recipient='USERONLY' and user='$user' and campaign_id='$campaign' and status NOT IN('INACTIVE','DEAD');"; +if ($DB) {echo "$stmt\n";} +$rslt=mysql_query($stmt, $link); +$row=mysql_fetch_row($rslt); +$cbcount=$row[0]; + +echo "$cbcount"; +} + + + + +if ($format=='debug') +{ +$ENDtime = date("U"); +$RUNtime = ($ENDtime - $StarTtime); +echo "\n"; +echo "\n\n\n"; +} + +exit; + +?> diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_sk/vicidial.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_sk/vicidial.php new file mode 100644 index 00000000..a397569e --- /dev/null +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_sk/vicidial.php @@ -0,0 +1,6969 @@ + LICENSE: GPLv2 +# +# make sure you have added a user to the vicidial_users MySQL table with at least +# user_level 1 or greater to access this page. Also, you need to have the login +# and pass of a phone listed in the asterisk.phones table. The page grabs the +# server info and other details from this login and pass. +# +# This script works best with Firefox or Mozilla, but will run for a couple +# hours on Internet Explorer before the memory leaks cause a crash. +# +# Other scripts that this application depends on: +# - vdc_db_query.php: Updates information in the database +# - manager_send.php: Sends manager actions to the DB for execution +# +# CHANGELOG +# 50607-1426 - First Build of VICIDIAL web client basic login process finished +# 50628-1620 - Added some basic formatting and worked on process flow +# 50628-1715 - Startup variables mapped to javascript variables +# 50629-1303 - Added Login Closer in-groups selection box and vla update +# 50629-1530 - Rough layout for customer info form section and button links +# 50630-1453 - Rough Manual Dial/Hangup with customer info displayed +# 50701-1450 - Added vicidial_log entries on dial and hangup +# 50701-1634 - Added Logout function +# 50705-1259 - Added call disposition functionality +# 50705-1432 - Added lead info DB update function +# 50705-1658 - Added web form functionality +# 50706-1043 - Added call park and pickup functions +# 50706-1234 - Added Start/Stop Recording functionality +# 50706-1614 - Added conference channels display option +# 50711-1333 - Removed call check redundancy and fixed a span bug +# 50727-1424 - Added customer channel and participant present sensing/alerts +# 50804-1057 - Added SendDTMF function and reconfigured the transfer span +# 50804-1224 - Added Local and Internal Closer transfer functions +# 50804-1628 - Added Blind transfer, activated LIVE CALL image and fixed bugs +# 50804-1808 - Added button images for left buttons +# 50815-1151 - Added 3Way calling functions to Transfer-conf frame +# 50815-1602 - Added images and buttons for xfer functions +# 50816-1813 - Added basic autodial outbound call pickup functions +# 50817-1113 - Fixes to auto_dialing call receipt +# 50817-1234 - Added inbound call receipt capability +# 50817-1541 - Added customer time display +# 50817-1541 - Added customer time display +# 50818-1327 - Added stop-all-recordings-after-each-vicidial-call option +# 50818-1703 - Added pretty login section +# 50825-1200 - Modified form field lengths, added double-click dispositions +# 50831-1603 - Fixed customer time bug and fronter display bug for CLOSER +# 50901-1314 - Fixed CLOSER IN-GROUP Web Form bug +# 50903-0904 - Added preview-lead code for manual dialing +# 50904-0016 - Added ability to hangup manual dials before pickup +# 50906-1319 - Added override for filters on xfer calls, fixed login display bug +# 50909-1243 - Added hotkeys functionality for quick dispoing in auto-dial mode +# 50912-0958 - Modified hotkeys function, agent must have user_level >= 5 to use +# 50913-1212 - Added campaign_cid to 3rd party calls +# 50923-1546 - Modified to work with language translation +# 50926-1656 - Added campaign pull-down at login of active campaigns +# 50928-1633 - Added manual dial alternate number dial option +# 50930-1538 - Added session_id empty login failure and fixed 2 minor bugs +# 51004-1656 - Fixed recording filename bug and new Spanish translation +# 51020-1103 - Added campaign-specific recording control abilities +# 51020-1352 - Added Basic vicidial_agent_log framework +# 51021-1050 - Fixed custtime display and disable Enter/Return keypresses +# 51021-1718 - Allows for multi-line comments (changes \n to !N in database) +# 51110-1432 - Fixed non-standard http port issue +# 51111-1047 - Added vicidial_agent_log lead_id earlier for manual dial +# 51118-1305 - Activate multi-line comments from $multi_line_comments var +# 51118-1313 - Move Transfer DIV to a floating span to preserve 800x600 view +# 51121-1506 - Small PHP optimizations in many scripts and disabled globalize +# 51129-1010 - Added ability to accept calls from other VICIDIAL servers +# 51129-1254 - Fixed Hangups of other agents channels when customer hangs up +# 51208-1732 - Created user-first login that looks for default phone info +# 51219-1526 - Added variable framework for campaign and in-group scripts +# 51221-1200 - Added SCRIPT tab, layout and functionality +# 51221-1714 - Added auto-switch-to-SCRIPT-tab and auto-webform-popup +# 51222-1605 - Added VMail message blind transfer button to xfer-conf frame +# 51229-1028 - Added checks on web_form_address to allow for var in the DB value +# 60117-1312 - Added Transfer-conf frame toggle on button press +# 60208-1152 - Added DTMF-xfernumber preset links to xfer-conf frame +# 60213-1129 - Added vicidial_users.hotkeys_active for any user hotkeys +# 60213-1210 - Added ability to sort routing of calls by user_level +# 60214-0932 - Initial Callback calendar display framework +# 60214-1407 - Added ability to minimize the dispo screen to see info below +# 60215-1104 - Added ANYONE scheduled callbacks functionality +# 60410-1116 - Added persistant pause after dispo option and change dispo text +# - Added web form submit that opens new window with dispo on submit +# - Added PREVIOUS CALLBACK in customer info to flag callbacks +# - Added link to try to hangup the call again in the dispo screen +# - Added link noone-in-session screen to call agent phone again +# - Added link customer-hungup screen to go straight to dispo screen +# 60410-1532 - Added agent status and campaign calls dialing display option +# 60411-1547 - Add ability to set callback as USERONLY and some basic formatting +# 60413-1752 - Add basic USERONLY callback frame and listings +# 60414-1039 - Changed manual dial preview and alt dial checkboxes to spans +# - Added beta-level USERONLY callback functionality +# - Added beta-level manual dialing with lead insertion functionality +# 60415-1534 - Fixed manual dial lead preview and fixed manuald dial override bug +# 60417-1108 - Added capability to do alt-number-dialing in auto-dial mode +# - Changed several permissions to database-defined +# 60419-1529 - Prevent manual dial or callbacks when alt-dial lead not finished +# 60420-1647 - Fixed DiaLDiaLAltPhonE error, Call Agent Again DialControl error +# 60421-1229 - Check GET/POST vars lines with isset to not trigger PHP NOTICES +# 60424-1005 - Fixed Alt phone disabled bug for callbacks and manual dials +# 60426-1058 - Added vicidial_user setting for default blended check for CLOSER +# 60501-1008 - Added option to manual dial screen to manually lookup phone number +# 60503-1653 - Fixed agentonly_callback not-defined bug in scheduled callbacks screen +# 60504-1032 - Fixed manual dial display bug and transfer dispo alert bug +# - Fixed recording filename display to not overrun 25 characters +# 60510-1051 - Added Wrapup timer and wrapup message on wrapup screen after dispo +# 60608-1453 - Added CLOSER campaign allowable in-groups limitations +# 60609-1123 - Added add-number-to-DNC-list function and manual dial check DNC +# 60619-1047 - Added variable filters to close security holes for login form +# 60804-1710 - fixed scheduled CALLBK for other languages build +# 60808-1145 - Added consultative transfers with customer data +# 60808-2232 - Added campaign name to pulldown for login screen +# 60809-1603 - Added option to locally transfer consult xfers +# 60809-1732 - Added recheck of transferred channels before customer gone mesg +# 60810-1011 - Fixed CXFER leave 3way call bugs +# 60816-1602 - Added ALLCALLS recording delay option allcalls_delay +# 60816-1716 - Fixed customer time display bug and client DST setting +# 60821-1555 - Added option to omit phone_code on dialout of leads +# 60821-1628 - Added ALLFORCE recording option +# 60821-1643 - Added no_delete_sessions option to not delete sessions +# 60822-0512 - Changed phone number fields to be maxlength of 12 +# 60829-1531 - Made compatible with WeBRooTWritablE setting in dbconnect.php +# 60906-1152 - Added Previous CallBack info display span +# 60906-1715 - Allow for Local phone extension conferences +# 61004-1729 - Add ability to control volume per channel in "calls in this session" +# 61122-1341 - Added vicidial_user_groups allowed_campaigns restrictions +# 61122-1523 - Added more SCRIPT variables +# 61128-2229 - Added vicidial_live_agents and vicidial_auto_calls manual dial entries +# 61130-1617 - Added lead_id to MonitorConf for recording_log +# 61221-1212 - Changed width to 760 to better fit 800x600 screens, widened SCRIPT +# 70109-1128 - Fixed wrapup timer bug +# 70109-1635 - Added option for HotKeys automatically dialing next number in manual mode +# - Added option for alternate number dialing with hotkeys +# 70111-1600 - Added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns +# 70118-1517 - Added vicidial_agent_log and vicidial_user_log logging of user_group +# 70201-1249 - Added FAST DIAL option for manually dialing, added UTF8 compatible code +# 70201-1703 - Fixed cursor bug for most text input fields +# 70202-1453 - Added first portions of Agent Pause Codes +# 70203-0108 - Finished Agent Pause Codes functionality +# 70203-0930 - Added dialed_number to webform output +# 70203-1010 - Added dialed_label to webform output +# 70206-1201 - Fixed allow_closers bug +# 70206-1332 - Added vicidial_recording_override users setting function +# 70212-1252 - Fixed small issue with CXFER +# 70213-1018 - Changed CXFER and AXFER to update customer information before transfer +# 70214-1233 - Added queuemetrics_log_id field for server_id in queue_log +# 70215-1240 - Added queuemetrics_log_id field for server_id in queue_log +# 70222-1617 - Changed queue_log PAUSE/UNPAUSE to PAUSEALL/UNPAUSEALL +# 70226-1252 - Added Mute/UnMute to agent screen +# 70309-1035 - Allow amphersands and questions marks in comments to pass through +# 70313-1052 - Allow pound signs(hash) in comments to pass through +# 70316-1406 - Moved the MUTE button to be accessible during a transfer/conf +# 70319-1446 - Added agent-deactive-display and disable customer info update functions +# 70319-1626 - Added option to allow agent logins to campaigns with no leads in the hopper +# 70320-1501 - Added option to allow retry of leave-3way-call from dispo screen +# 70322-1545 - Added sipsak display ability +# 70510-1319 - Added onUnload force Logout +# 70806-1530 - Added Presets Dial links above agent mute button +# 70823-2118 - Fixed XMLHTTPRequest, HotKeys and Scheduled Callbacks issues with MSIE +# 70828-1443 - Added source_id to output of SCRIPTtab-IFRAME and WEBFORM +# 71022-1427 - Added formatting of the customer phone number in the main status bar +# 71029-1848 - Changed CLOSER-type campaign to not use campaign_id restrictions +# 71101-1204 - Fixed bug in callback calendar with DST +# 71116-0957 - Added campaign_weight and calls_today to the vla table insertion +# 71120-1719 - Added XMLHTPRequest lookup of allowable campaigns for agents during login +# 71122-0256 - Added auto-pause notification +# 71125-1751 - Changed Transfer section to allow for selection of in-groups to send calls to +# 71127-0408 - Added height and width settings for easier modification of screen size +# 71129-2025 - restricted callbacks count and list to campaign only +# 71226-1117 - added option to kick all calls from conference upon logout +# 80330-0823 - Added new AST_blind monitoring ability and minor cleanup for release +# 80402-0121 - Fixes for Manual Dial hangups and transfers +# 80428-0413 - UTF8 changes and testing +# 80507-0932 - Fixed Script display bug (+ instead of space) +# 80519-1425 - Added calls in queue display +# 80722-1000 - Fixed quote display bug +# 80815-1015 - Added manual dial list restriction option +# 80823-2127 - Fixed form scroll for IE +# 81012-0857 - Marker for 2.0.4.1rc5 release +# + +$version = '2.0.4-152'; +$build = '81012-0857'; + +require("dbconnect.php"); + +if (isset($_GET["DB"])) {$DB=$_GET["DB"];} + elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} +if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];} + elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];} +if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];} + elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];} +if (isset($_GET["VD_login"])) {$VD_login=$_GET["VD_login"];} + elseif (isset($_POST["VD_login"])) {$VD_login=$_POST["VD_login"];} +if (isset($_GET["VD_pass"])) {$VD_pass=$_GET["VD_pass"];} + elseif (isset($_POST["VD_pass"])) {$VD_pass=$_POST["VD_pass"];} +if (isset($_GET["VD_campaign"])) {$VD_campaign=$_GET["VD_campaign"];} + elseif (isset($_POST["VD_campaign"])) {$VD_campaign=$_POST["VD_campaign"];} +if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} + elseif (isset($_POST["relogin"])) {$relogin=$_POST["relogin"];} + if (!isset($phone_login)) + { + if (isset($_GET["pl"])) {$phone_login=$_GET["pl"];} + elseif (isset($_POST["pl"])) {$phone_login=$_POST["pl"];} + } + if (!isset($phone_pass)) + { + if (isset($_GET["pp"])) {$phone_pass=$_GET["pp"];} + elseif (isset($_POST["pp"])) {$phone_pass=$_POST["pp"];} + } + if (isset($VD_campaign)) + { + $VD_campaign = strtoupper($VD_campaign); + $VD_campaign = eregi_replace(" ",'',$VD_campaign); + } + if (!isset($flag_channels)) + { + $flag_channels=0; + $flag_string=''; + } + +### security strip all non-alphanumeric characters out of the variables ### + $DB=ereg_replace("[^0-9a-z]","",$DB); + $phone_login=ereg_replace("[^0-9a-zA-Z]","",$phone_login); + $phone_pass=ereg_replace("[^0-9a-zA-Z]","",$phone_pass); + $VD_login=ereg_replace("[^0-9a-zA-Z]","",$VD_login); + $VD_pass=ereg_replace("[^0-9a-zA-Z]","",$VD_pass); + $VD_campaign=ereg_replace("[^0-9a-zA-Z_]","",$VD_campaign); + + +$forever_stop=0; + +if ($force_logout) +{ + echo "Práve ste sa odhlásili, Ďakujeme\n"; + exit; +} + +$isdst = date("I"); +$StarTtimE = date("U"); +$NOW_TIME = date("Y-m-d H:i:s"); +$tsNOW_TIME = date("YmdHis"); +$FILE_TIME = date("Ymd-His"); +$CIDdate = date("ymdHis"); + $month_old = mktime(11, 0, 0, date("m"), date("d")-2, date("Y")); + $past_month_date = date("Y-m-d H:i:s",$month_old); + + +$random = (rand(1000000, 9999999) + 10000000); + +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +$conf_silent_prefix = '7'; # vicidial_conferences prefix to enter silently +$HKuser_level = '5'; # minimum vicidial user_level for HotKeys +$campaign_login_list = '1'; # show drop-down list of campaigns at login +$manual_dial_preview = '1'; # allow preview lead option when manual dial +$multi_line_comments = '1'; # set to 1 to allow multi-line comment box +$user_login_first = '0'; # set to 1 to have the vicidial_user login before the phone login +$view_scripts = '1'; # set to 1 to show the SCRIPTS tab +$dispo_check_all_pause = '0'; # set to 1 to allow for persistent pause after dispo +$callholdstatus = '1'; # set to 1 to show calls na hold count +$agentcallsstatus = '0'; # set to 1 to show agent status and call dialed count + $campagentstatctmax = '3'; # Number of sekúnd for campaign call and agent stats +$show_campname_pulldown = '1'; # set to 1 to show campaign name na login pulldown +$webform_sessionname = '1'; # set to 1 to include the session_name in webform URL +$local_consult_xfers = '1'; # set to 1 to send consultative transfers from original server +$clientDST = '1'; # set to 1 to check for DST na server for agent time +$no_delete_sessions = '0'; # set to 1 to not delete sessions at logout +$volumecontrol_active = '1'; # set to 1 to allow agents to alter volume of channels +$PreseT_DiaL_LinKs = '1'; # set to 1 to show a VOLAŤ link for Dial Presets +$LogiNAJAX = '1'; # set to 1 to do lookups +$HidEMonitoRSessionS = '1'; # set to 1 to hide remote monitoring channels from "session calls" +$LogouTKicKAlL = '1'; # set to 1 to hangup all calls in session upon agent logout +$CamPManDiaLLocK = '0'; # set to 1 to lock out all manual dials to only numbers in camp lists + +$TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen + +$BROWSER_HEIGHT = 500; # set to the minimum browser height, default=500 +$BROWSER_WIDTH = 770; # set to the minimum browser width, default=770 + + +# options now set in DB: +#$alt_phone_dialing = '1'; # allow agents to call alt phone numbers +#$scheduled_callbacks = '1'; # set to 1 to allow agent to choose scheduled callbacks +# $agentonly_callbacks = '1'; # set to 1 to allow agent to choose agent-only scheduled callbacks +#$agentcall_manual = '1'; # set to 1 to allow agent to make manual calls during autodial session + +### SCREEN WIDTH AND HEIGHT CALCULATIONS ### +### DO NOT EDIT! ### +$MASTERwidth=($BROWSER_WIDTH - 340); +$MASTERheight=($BROWSER_HEIGHT - 200); +if ($MASTERwidth < 430) {$MASTERwidth = '430';} +if ($MASTERheight < 300) {$MASTERheight = '300';} + +$CAwidth = ($MASTERwidth + 340); # 770 - cover all (none-in-session, customer hunngup, etc...) +$MNwidth = ($MASTERwidth + 330); # 760 - main frame +$XFwidth = ($MASTERwidth + 320); # 750 - transfer/conference +$HCwidth = ($MASTERwidth + 310); # 740 - hotkeys and callbacks +$AMwidth = ($MASTERwidth + 270); # 700 - agent mute and preset-dial links +$SSwidth = ($MASTERwidth + 176); # 606 - scroll script +$SDwidth = ($MASTERwidth + 170); # 600 - scroll script, customer data and calls-in-session +$HKwidth = ($MASTERwidth + 70); # 500 - Hotkeys button +$HSwidth = ($MASTERwidth + 1); # 431 - Header spacer + +$HKheight = ($MASTERheight + 105); # 405 - HotKey active Button +$AMheight = ($MASTERheight + 100); # 400 - Agent mute and preset dial links +$MBheight = ($MASTERheight + 65); # 365 - Manual Dial Buttons +$CBheight = ($MASTERheight + 50); # 350 - Agent Callback, pause code, volume control Buttons and agent status +$SSheight = ($MASTERheight + 31); # 331 - script content +$HTheight = ($MASTERheight + 10); # 310 - transfer frame, callback comments and hotkey +$BPheight = ($MASTERheight - 250); # 50 - bottom buffer + + +$US='_'; +$CL=':'; +$AT='@'; +$DS='-'; +$date = date("r"); +$ip = getenv("REMOTE_ADDR"); +$browser = getenv("HTTP_USER_AGENT"); +$script_name = getenv("SCRIPT_NAME"); +$server_name = getenv("SERVER_NAME"); +$server_port = getenv("SERVER_PORT"); +if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} + else {$HTTPprotocol = 'http://';} +if (($server_port == '80') or ($server_port == '443') ) {$server_port='';} +else {$server_port = "$CL$server_port";} +$agcPAGE = "$HTTPprotocol$server_name$server_port$script_name"; +$agcDIR = eregi_replace('vicidial.php','',$agcPAGE); + +header ("Content-type: text/html; charset=utf-8"); +header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 +header ("Pragma: no-cache"); // HTTP/1.0 +echo "\n"; +echo "\n"; +echo "\n"; + +if ($CamPManDiaLLocK > 0) + {$manual_dial_filter = "CAMPLISTS_ONLY";} +else + {$manual_dial_filter = "NONE";} + +if ($campaign_login_list > 0) +{ +$camp_form_code = "\n"; +} +else +{ +$camp_form_code = "\n"; +} + + +if ($LogiNAJAX > 0) +{ +?> + + + +web klient VICIDIAL: Znova prihlásiť\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n";echo "\n";echo "
English Slovensky
\n"; +echo "
\n"; +echo "\n"; +echo "


"; +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo ""; +echo "\n"; +echo ""; +echo "\n"; +echo ""; +echo "\n"; +echo ""; +echo "\n"; +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "
Znova prihlásiť
 
Prihlásenie telefónu:
Heslo telefónu:
Meno užívateľa:
Heslo užívateľa:
Kampaň: $camp_form_code

VERZIA: $version       POSTAVENÉ: $build
\n"; +echo "\n\n"; +echo "\n\n"; +echo "\n\n"; +exit; +} + +if ($user_login_first == 1) +{ + if ( (strlen($VD_login)<1) or (strlen($VD_pass)<1) or (strlen($VD_campaign)<1) ) + { + echo "web klient VICIDIAL: Prihlásenie kampane\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; +echo "\n";echo "\n"; echo "
English Slovensky
\n"; + echo "
\n"; + echo "\n"; + #echo "\n"; + #echo "\n"; + echo "

Meno užívateľa

"; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo ""; + echo "\n"; + echo ""; + echo "\n"; + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
Prihlásenie kampane
 
Meno užívateľa:
Heslo užívateľa:
Kampaň: $camp_form_code
  \n"; + echo "

VERZIA: $version       POSTAVENÉ: $build
\n"; + echo "\n\n"; + echo "\n\n"; + echo "\n\n"; + exit; + } + else + { + if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) + { + $stmt="SELECT phone_login,phone_pass from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $phone_login=$row[0]; + $phone_pass=$row[1]; + + echo "web klient VICIDIAL: Prihlásiť\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; +echo "\n";echo "\n"; echo "
English Slovensky
\n"; + echo "
\n"; + echo "\n"; + echo "


"; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo ""; + echo "\n"; + echo ""; + echo "\n"; + echo ""; + echo "\n"; + echo ""; + echo "\n"; + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
Prihlásiť
 
Prihlásenie telefónu:
Heslo telefónu:
Meno užívateľa:
Heslo užívateľa:
Kampaň: $camp_form_code
  \n"; + echo "

VERZIA: $version       POSTAVENÉ: $build
\n"; + echo "\n\n"; + echo "\n\n"; + echo "\n\n"; + exit; + + } + } +} + +if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) +{ +echo "web klient VICIDIAL: Prihlásenie telefónu\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n";echo "\n";echo "
English Slovensky
\n"; +echo "
\n"; +echo "\n"; +echo "


"; +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo ""; +echo "\n"; +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "
Prihlásenie telefónu
 
Prihlásenie telefónu:
Heslo telefónu:
  \n"; +echo "

VERZIA: $version       POSTAVENÉ: $build
\n"; +echo "\n\n"; +echo "\n\n"; +echo "\n\n"; +exit; +} +else +{ +if ($WeBRooTWritablE > 0) + {$fp = fopen ("./vicidial_auth_entries.txt", "a");} +$VDloginDISPLAY=0; + + if ( (strlen($VD_login)<2) or (strlen($VD_pass)<2) or (strlen($VD_campaign)<2) ) + { + $VDloginDISPLAY=1; + } + else + { + $stmt="SELECT count(*) from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $auth=$row[0]; + + if($auth>0) + { + $login=strtoupper($VD_login); + $password=strtoupper($VD_pass); + ##### grab the full name of the agent + $stmt="SELECT full_name,user_level,hotkeys_active,agent_choose_ingroups,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,closer_default_blended,user_group,vicidial_recording_override from vicidial_users where user='$VD_login' and pass='$VD_pass'"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $LOGfullname=$row[0]; + $user_level=$row[1]; + $VU_hotkeys_active=$row[2]; + $VU_agent_choose_ingroups=$row[3]; + $VU_scheduled_callbacks=$row[4]; + $agentonly_callbacks=$row[5]; + $agentcall_manual=$row[6]; + $VU_vicidial_recording=$row[7]; + $VU_vicidial_transfers=$row[8]; + $VU_closer_default_blended=$row[9]; + $VU_user_group=$row[10]; + $VU_vicidial_recording_override=$row[11]; + + if ($WeBRooTWritablE > 0) + { + fwrite ($fp, "vdweb|GOOD|$date|$VD_login|$VD_pass|$ip|$browser|$LOGfullname|\n"); + fclose($fp); + } + $user_abb = "$VD_login$VD_login$VD_login$VD_login"; + while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) + {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} + + $stmt="SELECT allowed_campaigns from vicidial_user_groups where user_group='$VU_user_group';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $LOGallowed_campaigns =$row[0]; + + if ( (!eregi(" $VD_campaign ",$LOGallowed_campaigns)) and (!eregi("ALL-CAMPAIGNS",$LOGallowed_campaigns)) ) + { + echo "web klient VICIDIAL: VICIDIAL Prihlásenie kampane\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; +echo "\n";echo "\n"; echo "
English Slovensky
\n"; + echo "Sorry, you are not allowed to login to this campaign: $VD_campaign\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "Prihlásiť: \n
"; + echo "Heslo:
\n"; + echo "Kampaň: $camp_form_code
\n"; + echo "   \n"; + echo "\n"; + echo "
\n\n"; + echo "\n\n"; + echo "\n\n"; + exit; + } + + ##### check to see that the campaign is active + $stmt="SELECT count(*) FROM vicidial_campaigns where campaign_id='$VD_campaign' and active='Y';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $CAMPactive=$row[0]; + if($CAMPactive>0) + { + if ($TEST_all_statuses > 0) {$selectableSQL = '';} + else {$selectableSQL = "selectable='Y' and";} + $VARstatuses=''; + $VARstatusnames=''; + ##### grab the statuses that can be used for dispositioning by an agent + $stmt="SELECT status,status_name FROM vicidial_statuses WHERE $selectableSQL status != 'NEW' order by status limit 50;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VD_statuses_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $VD_statuses_ct) + { + $row=mysql_fetch_row($rslt); + $statuses[$i] =$row[0]; + $status_names[$i] =$row[1]; + $VARstatuses = "$VARstatuses'$statuses[$i]',"; + $VARstatusnames = "$VARstatusnames'$status_names[$i]',"; + $i++; + } + + ##### grab the campaign-specific statuses that can be used for dispositioning by an agent + $stmt="SELECT status,status_name FROM vicidial_campaign_statuses WHERE $selectableSQL status != 'NEW' and campaign_id='$VD_campaign' order by status limit 50;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VD_statuses_camp = mysql_num_rows($rslt); + $j=0; + while ($j < $VD_statuses_camp) + { + $row=mysql_fetch_row($rslt); + $statuses[$i] =$row[0]; + $status_names[$i] =$row[1]; + $VARstatuses = "$VARstatuses'$statuses[$i]',"; + $VARstatusnames = "$VARstatusnames'$status_names[$i]',"; + $i++; + $j++; + } + $VD_statuses_ct = ($VD_statuses_ct+$VD_statuses_camp); + $VARstatuses = substr("$VARstatuses", 0, -1); + $VARstatusnames = substr("$VARstatusnames", 0, -1); + + ##### grab the campaign-specific HotKey statuses that can be used for dispositioning by an agent + $stmt="SELECT hotkey,status,status_name FROM vicidial_campaign_hotkeys WHERE selectable='Y' and status != 'NEW' and campaign_id='$VD_campaign' order by hotkey limit 9;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $HK_statuses_camp = mysql_num_rows($rslt); + $w=0; + $HKboxA=''; + $HKboxB=''; + $HKboxC=''; + while ($w < $HK_statuses_camp) + { + $row=mysql_fetch_row($rslt); + $HKhotkey[$w] =$row[0]; + $HKstatus[$w] =$row[1]; + $HKstatus_name[$w] =$row[2]; + $HKhotkeys = "$HKhotkeys'$HKhotkey[$w]',"; + $HKstatuses = "$HKstatuses'$HKstatus[$w]',"; + $HKstatusnames = "$HKstatusnames'$HKstatus_name[$w]',"; + if ($w < 3) + {$HKboxA = "$HKboxA $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
";} + if ( ($w >= 3) and ($w < 6) ) + {$HKboxB = "$HKboxB $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
";} + if ($w >= 6) + {$HKboxC = "$HKboxC $HKhotkey[$w] - $HKstatus[$w] - $HKstatus_name[$w]
";} + $w++; + } + $HKhotkeys = substr("$HKhotkeys", 0, -1); + $HKstatuses = substr("$HKstatuses", 0, -1); + $HKstatusnames = substr("$HKstatusnames", 0, -1); + + ##### grab the statuses to be dialed for your campaign as well as other campaign settings + $stmt="SELECT park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,agent_pause_codes_active,no_hopper_leads_logins,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $row=mysql_fetch_row($rslt); + $park_ext = $row[0]; + $park_file_name = $row[1]; + $web_form_address = $row[2]; + $allow_closers = $row[3]; + $auto_dial_level = $row[4]; + $dial_timeout = $row[5]; + $dial_prefix = $row[6]; + $campaign_cid = $row[7]; + $campaign_vdad_exten = $row[8]; + $campaign_rec_exten = $row[9]; + $campaign_recording = $row[10]; + $campaign_rec_filename = $row[11]; + $campaign_script = $row[12]; + $get_call_launch = $row[13]; + $campaign_am_message_exten = $row[14]; + $xferconf_a_dtmf = $row[15]; + $xferconf_a_number = $row[16]; + $xferconf_b_dtmf = $row[17]; + $xferconf_b_number = $row[18]; + $alt_number_dialing = $row[19]; + $VC_scheduled_callbacks = $row[20]; + $wrapup_sekúnd = $row[21]; + $wrapup_message = $row[22]; + $closer_campaigns = $row[23]; + $use_internal_dnc = $row[24]; + $allcalls_delay = $row[25]; + $omit_phone_code = $row[26]; + $agent_pause_codes_active = $row[27]; + $no_hopper_leads_logins = $row[28]; + $campaign_allow_inbound = $row[29]; + $manual_dial_list_id = $row[30]; + $default_xfer_group = $row[31]; + $xfer_groups = $row[32]; + + if ( (!ereg('DISABLED',$VU_vicidial_recording_override)) and ($VU_vicidial_recording > 0) ) + { + $campaign_recording = $VU_vicidial_recording_override; + print "\n"; + } + if ( ($VC_scheduled_callbacks=='Y') and ($VU_scheduled_callbacks=='1') ) + {$scheduled_callbacks='1';} + if ($VU_vicidial_recording=='0') + {$campaign_recording='NEVER';} + if ($alt_number_dialing=='Y') + {$alt_phone_dialing='1';} + else + {$alt_phone_dialing='0';} + $closer_campaigns = preg_replace("/^ | -$/","",$closer_campaigns); + $closer_campaigns = preg_replace("/ /","','",$closer_campaigns); + $closer_campaigns = "'$closer_campaigns'"; + + if ($agent_pause_codes_active=='Y') + { + ##### grab the pause codes for this campaign + $stmt="SELECT pause_code,pause_code_name FROM vicidial_pause_codes WHERE campaign_id='$VD_campaign' order by pause_code limit 50;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VD_pause_codes = mysql_num_rows($rslt); + $j=0; + while ($j < $VD_pause_codes) + { + $row=mysql_fetch_row($rslt); + $pause_codes[$i] =$row[0]; + $pause_code_names[$i] =$row[1]; + $VARpause_codes = "$VARpause_codes'$pause_codes[$i]',"; + $VARpause_code_names = "$VARpause_code_names'$pause_code_names[$i]',"; + $i++; + $j++; + } + $VD_pause_codes_ct = ($VD_pause_codes_ct+$VD_pause_codes); + $VARpause_codes = substr("$VARpause_codes", 0, -1); + $VARpause_code_names = substr("$VARpause_code_names", 0, -1); + } + + ##### grab the inbound groups to choose from if campaign contains CLOSER + $VARingroups="''"; + if ($campaign_allow_inbound == 'Y') + { + $VARingroups=''; + $stmt="select group_id from vicidial_inbound_groups where active = 'Y' and group_id IN($closer_campaigns) order by group_id limit 60;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $closer_ct = mysql_num_rows($rslt); + $INgrpCT=0; + while ($INgrpCT < $closer_ct) + { + $row=mysql_fetch_row($rslt); + $closer_groups[$INgrpCT] =$row[0]; + $VARingroups = "$VARingroups'$closer_groups[$INgrpCT]',"; + $INgrpCT++; + } + $VARingroups = substr("$VARingroups", 0, -1); + } + + ##### grab the allowable inbound groups to choose from for transfer options + $xfer_groups = preg_replace("/^ | -$/","",$xfer_groups); + $xfer_groups = preg_replace("/ /","','",$xfer_groups); + $xfer_groups = "'$xfer_groups'"; + $VARxfergroups="''"; + if ($allow_closers == 'Y') + { + $VARxfergroups=''; + $stmt="select group_id,group_name from vicidial_inbound_groups where active = 'Y' and group_id IN($xfer_groups) order by group_id limit 60;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $xfer_ct = mysql_num_rows($rslt); + $XFgrpCT=0; + while ($XFgrpCT < $xfer_ct) + { + $row=mysql_fetch_row($rslt); + $VARxfergroups = "$VARxfergroups'$row[0]',"; + $VARxfergroupsnames = "$VARxfergroupsnames'$row[1]',"; + if ($row[0] == "$default_xfer_group") {$default_xfer_group_name = $row[1];} + $XFgrpCT++; + } + $VARxfergroups = substr("$VARxfergroups", 0, -1); + $VARxfergroupsnames = substr("$VARxfergroupsnames", 0, -1); + } + + ##### grab the number of leads in the hopper for this campaign + $stmt="SELECT count(*) FROM vicidial_hopper where campaign_id = '$VD_campaign' and status='READY';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $row=mysql_fetch_row($rslt); + $campaign_leads_to_call = $row[0]; + print "\n"; + + } + else + { + $VDloginDISPLAY=1; + $VDdisplayMESSAGE = "Kampaň nie je aktívna, prosím skúste znova
"; + } + } + else + { + if ($WeBRooTWritablE > 0) + { + fwrite ($fp, "vdweb|FAIL|$date|$VD_login|$VD_pass|$ip|$browser|\n"); + fclose($fp); + } + $VDloginDISPLAY=1; + $VDdisplayMESSAGE = "Prihlasovacie meno je nesprávne, prosím skúste znova
"; + } + } + if ($VDloginDISPLAY) + { + echo "web klient VICIDIAL: Prihlásenie kampane\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; +echo "\n";echo "\n"; echo "
English Slovensky
\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "

$VDdisplayMESSAGE

"; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo ""; + echo "\n"; + echo ""; + echo "\n"; + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
Prihlásenie kampane
 
Meno užívateľa:
Heslo užívateľa:
Kampaň: $camp_form_code
  \n"; + echo "

VERZIA: $version       POSTAVENÉ: $build
\n"; + echo "\n\n"; + echo "\n\n"; + echo "\n\n"; + exit; + } + +$authphone=0; +$stmt="SELECT count(*) from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; +if ($DB) {echo "|$stmt|\n";} +$rslt=mysql_query($stmt, $link); +$row=mysql_fetch_row($rslt); +$authphone=$row[0]; +if (!$authphone) + { + echo "web klient VICIDIAL: Prihlásenie telefónu Error\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; +echo "\n";echo "\n"; echo "
English Slovensky
\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "


"; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo ""; + echo "\n"; + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
Prihlásiť Error
 
Prepáčte, Vaše prihlasovacie meno a heslo nie sú aktívne v tomto systéme, prosím skúste znova:
 
Prihlásenie telefónu:
Heslo telefónu:

VERZIA: $version       POSTAVENÉ: $build
\n"; + echo "\n\n"; + echo "\n\n"; + echo "\n\n"; + exit; + } +else + { + echo "web klient VICIDIAL\n"; + $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $extension=$row[0]; + $dialplan_number=$row[1]; + $voicemail_id=$row[2]; + $phone_ip=$row[3]; + $computer_ip=$row[4]; + $server_ip=$row[5]; + $login=$row[6]; + $pass=$row[7]; + $status=$row[8]; + $active=$row[9]; + $phone_type=$row[10]; + $fullname=$row[11]; + $company=$row[12]; + $picture=$row[13]; + $messages=$row[14]; + $old_messages=$row[15]; + $protocol=$row[16]; + $local_gmt=$row[17]; + $ASTmgrUSERNAME=$row[18]; + $ASTmgrSECRET=$row[19]; + $login_user=$row[20]; + $login_pass=$row[21]; + $login_campaign=$row[22]; + $park_on_extension=$row[23]; + $conf_on_extension=$row[24]; + $VICIDiaL_park_on_extension=$row[25]; + $VICIDiaL_park_on_filename=$row[26]; + $monitor_prefix=$row[27]; + $recording_exten=$row[28]; + $voicemail_exten=$row[29]; + $voicemail_dump_exten=$row[30]; + $ext_context=$row[31]; + $dtmf_send_extension=$row[32]; + $call_out_number_group=$row[33]; + $client_browser=$row[34]; + $install_directory=$row[35]; + $local_web_callerID_URL=$row[36]; + $VICIDiaL_web_URL=$row[37]; + $AGI_call_logging_enabled=$row[38]; + $user_switching_enabled=$row[39]; + $conferencing_enabled=$row[40]; + $admin_hangup_enabled=$row[41]; + $admin_hijack_enabled=$row[42]; + $admin_monitor_enabled=$row[43]; + $call_parking_enabled=$row[44]; + $updater_check_enabled=$row[45]; + $AFLogging_enabled=$row[46]; + $QUEUE_ACTION_enabled=$row[47]; + $IDvolajúceho_popup_enabled=$row[48]; + $voicemail_button_enabled=$row[49]; + $enable_fast_refresh=$row[50]; + $fast_refresh_rate=$row[51]; + $enable_persistant_mysql=$row[52]; + $auto_dial_next_number=$row[53]; + $VDstop_rec_after_each_call=$row[54]; + $DBX_server=$row[55]; + $DBX_database=$row[56]; + $DBX_user=$row[57]; + $DBX_pass=$row[58]; + $DBX_port=$row[59]; + $enable_sipsak_messages=$row[66]; + + if ($clientDST) + { + $local_gmt = ($local_gmt + $isdst); + } + if ($protocol == 'EXTERNAL') + { + $protocol = 'Local'; + $extension = "$dialplan_number$AT$ext_context"; + } + $SIP_user = "$protocol/$extension"; + + $stmt="SELECT asterisk_version from servers where server_ip='$server_ip';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $asterisk_version=$row[0]; + + # If a park extension is not set, use the default one + if ( (strlen($park_ext)>0) && (strlen($park_file_name)>0) ) + { + $VICIDiaL_park_on_extension = "$park_ext"; + $VICIDiaL_park_on_filename = "$park_file_name"; + print "\n"; + } + print "\n"; + + # If a web form address is not set, use the default one + if (strlen($web_form_address)>0) + { + $VICIDiaL_web_form_address = "$web_form_address"; + print "\n"; + } + else + { + $VICIDiaL_web_form_address = "$VICIDiaL_web_URL"; + print "\n"; + $VICIDiaL_web_form_address_enc = rawurlencode($VICIDiaL_web_form_address); + + } + $VICIDiaL_web_form_address_enc = rawurlencode($VICIDiaL_web_form_address); + + # If closers are allowed na this campaign + if ($allow_closers=="Y") + { + $VICIDiaL_allow_closers = 1; + print "\n"; + } + else + { + $VICIDiaL_allow_closers = 0; + print "\n"; + } + + + $session_ext = eregi_replace("[^a-z0-9]", "", $extension); + if (strlen($session_ext) > 10) {$session_ext = substr($session_ext, 0, 10);} + $session_rand = (rand(1,9999999) + 10000000); + $session_name = "$StarTtimE$US$session_ext$session_rand"; + + if ($webform_sessionname) + {$webform_sessionname = "&session_name=$session_name";} + else + {$webform_sessionname = '';} + + $stmt="DELETE from web_client_sessions where start_time < '$past_month_date' and extension='$extension' and server_ip = '$server_ip' and program = 'vicidial';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + + $stmt="INSERT INTO web_client_sessions values('$extension','$server_ip','vicidial','$NOW_TIME','$session_name');"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + + if ( ($campaign_allow_inbound == 'Y') || ($campaign_leads_to_call > 0) || (ereg('Y',$no_hopper_leads_logins)) ) + { + ### insert an entry into the user log for the login event + $stmt = "INSERT INTO vicidial_user_log (user,event,campaign_id,event_date,event_epoch,user_group) values('$VD_login','LOGIN','$VD_campaign','$NOW_TIME','$StarTtimE','$VU_user_group')"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + + ##### check to see if the user has a conf extension already, this happens if they previously exited uncleanly + $stmt="SELECT conf_exten FROM vicidial_conferences where extension='$SIP_user' and server_ip = '$server_ip' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $prev_login_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $prev_login_ct) + { + $row=mysql_fetch_row($rslt); + $session_id =$row[0]; + $i++; + } + if ($prev_login_ct > 0) + {print "\n";} + else + { + ##### grab the next available vicidial_conference room and reserve it + $stmt="SELECT conf_exten FROM vicidial_conferences where server_ip = '$server_ip' and ((extension='') or (extension is null)) LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $free_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $free_conf_ct) + { + $row=mysql_fetch_row($rslt); + $session_id =$row[0]; + $i++; + } + $stmt="UPDATE vicidial_conferences set extension='$SIP_user' where server_ip='$server_ip' and conf_exten='$session_id';"; + $rslt=mysql_query($stmt, $link); + print "\n"; + + } + + $stmt="UPDATE vicidial_list set status='N', user='' where status IN('QUEUE','INCALL') and user ='$VD_login';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + print "\n"; + + $stmt="DELETE from vicidial_hopper where status IN('QUEUE','INCALL','DONE') and user ='$VD_login';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + print "\n"; + + $stmt="DELETE from vicidial_live_agents where user ='$VD_login';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + print "\n"; + + $stmt="DELETE from vicidial_live_inbound_agents where user ='$VD_login';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + print "\n"; + + # print "You have logged in as user: $VD_login na phone: $SIP_user do kampane: $VD_campaign
\n"; + $VICIDiaL_is_logged_in=1; + + ### set the callerID for manager middleware-app to connect the phone to the user + $SIqueryCID = "S$CIDdate$session_id"; + + ############################################# + ##### SPUSTIŤ SYSTEM_SETTINGS LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,vicidial_agent_disable,allow_sipsak_messages FROM system_settings;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $vicidial_agent_disable = $row[6]; + $allow_sipsak_messages = $row[7]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + + if ( ($enable_sipsak_messages > 0) and ($allow_sipsak_messages > 0) and (eregi("SIP",$protocol)) ) + { + $SIPSAK_prefix = 'LIN-'; + print "\n"; + passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_prefix$VD_campaign\" -r 5060 -s sip:$extension@$phone_ip > /dev/null"); + $SIqueryCID = "$SIPSAK_prefix$VD_campaign$DS$CIDdate"; + } + + ### insert a NOVÁ record to the vicidial_manager table to be processed + $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$SIqueryCID','Channel: $SIP_user','Context: $ext_context','Exten: $session_id','Priority: 1','Callerid: $SIqueryCID','','','','','');"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + print "\n"; + + if ($auto_dial_level > 0) + { + print "\n"; + + ##### grab the campaign_weight and number of calls today na that campaign for the agent + $stmt="SELECT campaign_weight,calls_today FROM vicidial_campaign_agents where user='$VD_login' and campaign_id = '$VD_campaign';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $vca_ct = mysql_num_rows($rslt); + if ($vca_ct > 0) + { + $row=mysql_fetch_row($rslt); + $campaign_weight = $row[0]; + $calls_today = $row[1]; + $i++; + } + else + { + $campaign_weight = '0'; + $calls_today = '0'; + $stmt="INSERT INTO vicidial_campaign_agents (user,campaign_id,campaign_rank,campaign_weight,calls_today) values('$VD_login','$VD_campaign','0','0','$calls_today');"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + print "\n"; + } + $closer_chooser_string=''; + $stmt="INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,lead_id,campaign_id,uniqueid,callerid,channel,random_id,last_call_time,last_update_time,last_call_finish,closer_campaigns,user_level,campaign_weight,calls_today) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$closer_chooser_string','$user_level','$campaign_weight','$calls_today');"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + print "\n"; + + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='$VD_campaign',agent='Agent/$VD_login',verb='AGENTLOGIN',data1='$VD_login@agents',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + print "\n"; + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='NONE',agent='Agent/$VD_login',verb='PAUSEALL',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + print "\n"; + + mysql_close($linkB); + mysql_select_db("$VARDB_database", $link); + } + + + if ($campaign_allow_inbound == 'Y') + { + print "\n"; + } + } + else + { + print "\n"; + + $stmt="INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,lead_id,campaign_id,uniqueid,callerid,channel,random_id,last_call_time,last_update_time,last_call_finish,user_level) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$user_level');"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + print "\n"; + + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='$VD_campaign',agent='Agent/$VD_login',verb='AGENTLOGIN',data1='$VD_login@agents',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + print "\n"; + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='NONE',agent='Agent/$VD_login',verb='PAUSEALL',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + print "\n"; + + mysql_close($linkB); + mysql_select_db("$VARDB_database", $link); + } + } + } + else + { + echo "web klient VICIDIAL: VICIDIAL Prihlásenie kampane\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; +echo "\n";echo "\n"; echo "
English Slovensky
\n"; + echo "Prepáčte, ale nie sú záznamy v zásobníku pre túto kamaň\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "Prihlásiť: \n
"; + echo "Heslo:
\n"; + echo "Kampaň: $camp_form_code
\n"; + echo "   \n"; + echo "\n"; + echo "
\n\n"; + echo "\n\n"; + echo "\n\n"; + exit; + } + if (strlen($session_id) < 1) + { + echo "web klient VICIDIAL: VICIDIAL Prihlásenie kampane\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; +echo "\n";echo "\n"; echo "
English Slovensky
\n"; + echo "Sorry, there are no available sessions\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "Prihlásiť: \n
"; + echo "Heslo:
\n"; + echo "Kampaň: $camp_form_code
\n"; + echo "   \n"; + echo "\n"; + echo "
\n\n"; + echo "\n\n"; + echo "\n\n"; + exit; + } + + if (ereg('MSIE',$browser)) + { + $useIE=1; + print "\n"; + } + else + { + $useIE=0; + print "\n"; + } + + $StarTtimE = date("U"); + $NOW_TIME = date("Y-m-d H:i:s"); + ##### Agent is going to log in so insert the vicidial_agent_log entry now + $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch,user_group,sub_status) values('$VD_login','$server_ip','$NOW_TIME','$VD_campaign','$StarTtimE','0','$StarTtimE','$VU_user_group','LOGIN');"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + $agent_log_id = mysql_insert_id($link); + print "\n"; + + $S='*'; + $D_s_ip = explode('.', $server_ip); + if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";} + if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";} + if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";} + if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";} + if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";} + if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";} + if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";} + if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";} + $server_ip_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S"; + + ##### grab the datails of all active scripts in the system + $stmt="SELECT script_id,script_name,script_text FROM vicidial_scripts WHERE active='Y' order by script_id limit 100;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $MM_scripts = mysql_num_rows($rslt); + $e=0; + while ($e < $MM_scripts) + { + $row=mysql_fetch_row($rslt); + $MMscriptid[$e] =$row[0]; + $MMscriptname[$e] = urlencode($row[1]); + $MMscripttext[$e] = urlencode($row[2]); + $MMscriptids = "$MMscriptids'$MMscriptid[$e]',"; + $MMscriptnames = "$MMscriptnames'$MMscriptname[$e]',"; + $MMscripttexts = "$MMscripttexts'$MMscripttext[$e]',"; + $e++; + } + $MMscriptids = substr("$MMscriptids", 0, -1); + $MMscriptnames = substr("$MMscriptnames", 0, -1); + $MMscripttexts = substr("$MMscripttexts", 0, -1); + + } +} + +################################################################ +### BEGIN - build the callback calendar (12 months) ### +################################################################ +define ('ADAY', (60*60*24)); +$CdayARY = getdate(); +$Cmon = $CdayARY['mon']; +$Cyear = $CdayARY['year']; +$CTODAY = date("Y-m"); +$CTODAYmday = date("j"); +$CINC=0; + +$Cmonths = Array('Január','February','Marec','Apríl','Máj','Jún', + 'Júl','August','September','Október','November','Decemeber'); +$Cdays = Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat'); + +$CCAL_OUT = ''; + +$CCAL_OUT .= ""; + +while ($CINC < 12) +{ +if ( ($CINC == 0) || ($CINC == 4) ||($CINC == 8) ) + {$CCAL_OUT .= "";} + +$CCAL_OUT .= ""; + +if ( ($CINC == 3) || ($CINC == 7) ||($CINC == 11) ) + {$CCAL_OUT .= "";} +$CINC++; +} + +$CCAL_OUT .= "
"; + +$CYyear = $Cyear; +$Cmonth= ($Cmon + $CINC); +if ($Cmonth > 12) + { + $Cmonth = ($Cmonth - 12); + $CYyear++; + } +$Cstart= mktime(11,0,0,$Cmonth,1,$CYyear); +$CfirstdayARY = getdate($Cstart); +#echo "|$Cmon|$Cmonth|$CINC|\n"; +$CPRNTDAY = date("Y-m", $Cstart); + +$CCAL_OUT .= ""; +$CCAL_OUT .= ""; +$CCAL_OUT .= ""; +$CCAL_OUT .= ""; + +foreach($Cdays as $Cday) +{ + $CDCLR="#ffffff"; +$CCAL_OUT .= ""; +} + +for( $Ccount=0;$Ccount<(6*7);$Ccount++) +{ + $Cdayarray = getdate($Cstart); + if((($Ccount) % 7) == 0) + { + if($Cdayarray['mon'] != $CfirstdayARY['mon']) + break; + $CCAL_OUT .= ""; + } + if($Ccount < $CfirstdayARY['wday'] || $Cdayarray['mon'] != $Cmonth) + { + $CCAL_OUT .= ""; + } + else + { + if( ($Cdayarray['mday'] == $CTODAYmday) and ($CPRNTDAY == $CTODAY) ) + { + $CPRNTmday = $Cdayarray['mday']; + if ($CPRNTmday < 10) {$CPRNTmday = "0$CPRNTmday";} + $CBL = ""; + $CEL = ""; + + $CCAL_OUT .= ""; + $Cstart += ADAY; + } + else + { + $CDCLR="#ffffff"; + if ( ($Cdayarray['mday'] < $CTODAYmday) and ($CPRNTDAY == $CTODAY) ) + { + $CDCLR="#CCCCCC"; + $CBL = ''; + $CEL = ''; + } + else + { + $CPRNTmday = $Cdayarray['mday']; + if ($CPRNTmday < 10) {$CPRNTmday = "0$CPRNTmday";} + $CBL = ""; + $CEL = ""; + } + + $CCAL_OUT .= ""; + $Cstart += ADAY; + } + } +} +$CCAL_OUT .= ""; +$CCAL_OUT .= "
"; +$CCAL_OUT .= "
"; +$CCAL_OUT .= "$CfirstdayARY[month] $CfirstdayARY[year]"; +$CCAL_OUT .= "
"; +$CCAL_OUT .= "
"; +$CCAL_OUT .= "
"; +$CCAL_OUT .= "$Cday"; +$CCAL_OUT .= "
"; +$CCAL_OUT .= "
 "; + $CCAL_OUT .= "
"; + $CCAL_OUT .= "$CBL$Cdayarray[mday]$CEL"; + $CCAL_OUT .= "
"; + $CCAL_OUT .= "
"; + $CCAL_OUT .= "
"; + $CCAL_OUT .= "$CBL$Cdayarray[mday]$CEL"; + $CCAL_OUT .= "
"; + $CCAL_OUT .= "
"; +$CCAL_OUT .= "
"; + +#echo "$CCAL_OUT\n"; +################################################################ +### END - build the callback calendar (12 months) ### +################################################################ + + +?> + + + + +\n"; + + +?> + +
+ + MARGINWIDTH=0 MARGINHEIGHT=0 LEFTMARGIN=0 TOPMARGIN=0 VALIGN=TOP ALIGN=LEFT> +
+ + + +ODHLÁSIŤ\n"; ?> +
+
+ + + height=30> + + + + + +
VICIDIALSCRIPT VALIGN=MIDDLE ALIGN=CENTER>   LIVE     ID relácie:     Živý hovor
+
+ + + + + height=>

VICIDIAL
+
+ + +RUČNÉ VOLANIE       RÝCHLE VOLANIE
+
+ + +X AKTÍVNE PREPLÁNOVANÉ HOVORY
+
+ + +
+
+ + + D1 - VOLAŤ\n"; + echo "
\n"; + echo "D2 - VOLAŤ\n"; + } + else {echo "
\n";} + ?> +

+
+
+ + + height=460>
PREPLÁNOVANÉ HOVORY PRE AGENTA :
Kliknite na preplánovanie hovoru na volanie zákaznikovi znova. Ak kliknete na záznam nižšie budete ho volať a bude odstránený zo zoznamu. +
+
+
  + Osviežiť +                 + Vrátiť späť +
+
+ + + height=460>
NOVÉ manuálne vytáčanie pre zoznam kontaktov :

Zadajte nižšie uvedené informácie pre nový zoznam kontaktov, ktorý chcete volať. +
+ \n"; + } + ?> + Note: all new manual dial leads will go into list

+ + + + + + + + + + + + + + + +
Volať kód:   (To je obvykle 1 v USA-Kanada)
Telefón Number: +   (12 digits max - digits only) +
Vyhľadať existujúce zoznamy kontaktov:   (Táto voľba skontroluje, ak sa bude snažiť nájsť telefónne číslo do systému pred jeho vloženie ako nového zoznamu kontaktov)


Ak chcete vytočiť číslo, a nemáte ho v novom zozname kontaktov, vložte volané číslo , ktoré chcete volať do poľa Prepísať volanie. Pre ukončenie hovoru, budete musieť otvoriť odkaz HOVORY V TEJTO RELÁCII v spodnej časti obrazovky, a ukončiť požadovaný kanál.
 
Prepísanie volania:   (prosím len čísla) +
+
+ Volať znova +                 + Vrátiť späť +
+
+ + + +
+
+ + + + +Váš stav:
Calls Dialing: +
+ + + + + > + +
+
+ + Presmerovanie - Konferencia
+ + + LOKALNE ROZSIRENIE + Zložiť Xfer linku + Zložiť obe linky + +
+ + Číslo na volanie   + + PREPISAT VOLANIE   + PONECHAT 3 CESTNE VOLANIE + Volať slepé presmerovanie + D1 + D2 + +
+ + sekúnd   + channel + Volanie so zákazníkom + Zaparkovať hovor so zákazníkom + Blind Transfer VMail Message +
+
+
+
+ + + + height=70> + +
Kontakty pripravené ako:

+ -
+
+
+ + + height=70> + + + + +
Rozloženie horúcich kláves: + Keď je aktívne, jednoducho stlačte na klávesnici tlačidlo pre požadovanú dispozíciu pre tento hovor. Hovor bude potom ukončený automaticky:
+ + + + + +
+
+ + + height=70> + + + + + + +
Predchádzajúca informácia o preplánovaní hovoru: close
+
+
+
+
+ +
+
+ + + height=500>
Nikto nie je vo Vašej relácii:
+ Vrátiť späť +

+ Volať agenta znova +
+
+ + + height=500>
Zákazník položil:
+ Vrátiť späť +

+ Ukončenie a umiestnenie hovoru + +
+
+ + + height=550>
Volanie Wrapup: sekúnd zostávajúcich na wrapup

+ +

+ Dokončiť Wrapup a presunúť na + +
+
+ + + height=500>
Vaša relácia bola ukončená
ODHLÁSIŤ

Vrátiť späť +
+
+ + + height=500>

ODHLÁSIŤ
+
+ + +
+
+ + +
 
+
+ + + height=47>
Všetky zmeny vykonané v informáciách o zákazníkovi teraz , budú vykonané, musíte zmeniť informácie o zákazníkovi pred ukončením hovoru.
+
+ + + height=460>
VYKONANIE HOVORU :       Položte znova       minimalizovať
+ Ukončenie hovoru vybranej dispozície +
+ PAUZA VOLAJUCEHO AGENTA
+ VYMAZAŤ FORMULÁR | + POTVRDIŤ +

+ WEB FORM POTVRDIŤ +

  +
+
+ + + height=460>
VYBRAŤ KÓD PAUZY :
+ Pauza Code Selection + +

  +
+
+ + + height=460>
Vyberte dátum preplánovania hovoru :
+ + + Vyberte dátum nižšie   +     + Hour: +   + Minutes: +   + +  
+ LEN MOJE PREPLÁNOVANÉ HOVORY
";} + ?> + Poznámky CB:

+ + POTVRDIŤ

+ +

  +
+
+ + + height=460>
Užší výber prichádzajúce skupiny
+ Užší výber prichádzajúce skupiny +
+ ZMIESANE VOLANIE(Odchádzaúce volanie aktivované)
+ ZNOVU INCIALIZOVAŤ | + POTVRDIŤ +



  +
+
+ + + + Kanál + Kanál + LEN MOJE PREPLÁNOVANÉ HOVORY
";} + ?> +
+ + + + height=>
VICIDIAL SCRIPT
+
+ + + 0) && ( ($user_level>=$HKuser_level) or ($VU_hotkeys_active > 0) ) ) { ?> +NEAKTÍVNE RÝCHLE TLAČIDLÁ + + + + +> + + + +
verzia web klient VICIDIAL:     POSTAVENÉ:               Server:              
+Ukázať informáciu o konferenčnom kanále

 
+
+ + + +
+
+ + + + + id="MainTable"> + + + + + + + + + + + + + + + +
STAV:
+
+Volať ďalšie číslo
+ PREZRIET ZOZNAM KONTAKTOV
+ ALTER. ČÍSLO TELEFÓNU
+ + +SÚBOR NAHRÁVKY:
+
+
+ID NAHRÁVKY:
+
+ +Spustiť nahrávanie
+
+Web formulár
+
+Zaparkovaný hovor
+Presmerovanie - Konferencia
+
+Zložiť zákazníka
+
+
Poslať DTMF

+
+
+
align=left valign=top> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
sekúnd:   Kanál:   Čas:
Informácia o zákazníkovi:
Titul:   Prvý:   MI:   Posledný:
Adresa1:
Adresa2:   Adresa3:
Mesto:   Štát:   PSČ:
Kraj:   zákaznícke ID:
Telefón:   Volací kód:   Alternatívne číslo:
Prezrieť:   Email:
Poznámky: + +\n";} +else + {echo "\n";} +?> + +
+
+ +
+
> + 
+ + + + + + + + + + + + diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_sk/voicemail_check.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_sk/voicemail_check.php new file mode 100644 index 00000000..f0637681 --- /dev/null +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_sk/voicemail_check.php @@ -0,0 +1,140 @@ + LICENSE: GPLv2 +### +### This script is designed purely to check whether the voicemail box on the server defined has new and old messages +### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table +### +### required variables: +### - $server_ip +### - $session_name +### - $user +### - $pass +### optional variables: +### - $format - ('text','debug') +### - $vmail_box - ('101','1234',...) +### + +# changes +# 50422-1147 - First build of script +# 50503-1241 - added session_name checking for extra security +# 50711-1201 - removed HTTP authentication in favor of user/pass vars +# 60421-1147 - check GET/POST vars lines with isset to not trigger PHP NOTICES +# 60619-1204 - Added variable filters to close security holes for login form +# + +require("dbconnect.php"); + +### If you have globals turned off uncomment these lines +if (isset($_GET["user"])) {$user=$_GET["user"];} + elseif (isset($_POST["user"])) {$user=$_POST["user"];} +if (isset($_GET["pass"])) {$pass=$_GET["pass"];} + elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} +if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} + elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} +if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];} + elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];} +if (isset($_GET["format"])) {$format=$_GET["format"];} + elseif (isset($_POST["format"])) {$format=$_POST["format"];} +if (isset($_GET["vmail_box"])) {$vmail_box=$_GET["vmail_box"];} + elseif (isset($_POST["vmail_box"])) {$vmail_box=$_POST["vmail_box"];} + +$user=ereg_replace("[^0-9a-zA-Z]","",$user); +$pass=ereg_replace("[^0-9a-zA-Z]","",$pass); + +# default optional vars if not set +if (!isset($format)) {$format="text";} + +$version = '0.0.5'; +$build = '60619-1204'; +$StarTtime = date("U"); +$NOW_DATE = date("Y-m-d"); +$NOW_TIME = date("Y-m-d H:i:s"); +if (!isset($query_date)) {$query_date = $NOW_DATE;} + + $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $auth=$row[0]; + + if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) + { + echo "Nesprávny Užívateľské meno/Heslo: |$user|$pass|\n"; + exit; + } + else + { + + if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) + { + echo "Nesprávny server_ip: |$server_ip| or Nesprávny session_name: |$session_name|\n"; + exit; + } + else + { + $stmt="SELECT count(*) from web_client_sessions where session_name='$session_name' and server_ip='$server_ip';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $SNauth=$row[0]; + if($SNauth==0) + { + echo "Nesprávny session_name: |$session_name|$server_ip|\n"; + exit; + } + else + { + # do nothing for now + } + } + } + +if ($format=='debug') +{ +echo "\n"; +echo "\n"; +echo "\n"; +echo "Overiť hlasovú schránku"; +echo "\n"; +echo "\n"; +echo "\n"; +} + + $MT[0]=''; + $row=''; $rowx=''; + if (strlen($vmail_box)<1) + { + $channel_live=0; + echo "hlasová schránka $vmail_box Nie je správny\n"; + exit; + } + else + { + $stmt="SELECT messages,old_messages FROM phones where server_ip='$server_ip' and voicemail_id='$vmail_box' limit 1;"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $vmails_list = mysql_num_rows($rslt); + $loop_count=0; + while ($vmails_list>$loop_count) + { + $loop_count++; + $row=mysql_fetch_row($rslt); + echo "$row[0]|$row[1]"; + if ($format=='debug') {echo "\n";} + } + } + + +if ($format=='debug') + { + $ENDtime = date("U"); + $RUNtime = ($ENDtime - $StarTtime); + echo "\n"; + echo "\n\n\n"; + } + +exit; + +?> diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial/admin.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial/admin.php index 978928b9..0b797a71 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial/admin.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial/admin.php @@ -1159,11 +1159,12 @@ $list_mix_container = ereg_replace(";","",$list_mix_container); # 71125-1751 - Added allowable transfer groups to campaign detail screen # 80330-0814 - Added CBHOLD block on selecting, added user stats/status links # 80424-0442 - Added non_latin system_settings lookup at top to override dbconnect setting -# +# 81011-0855 - Version marker for 2.0.5.1rc5 release +# # make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time -$admin_version = '2.0.4-121'; -$build = '80424-0442'; +$admin_version = '2.0.4-122'; +$build = '81011-0855'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial/new_listloader_superL.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial/new_listloader_superL.php index 0b05dd69..dc20bf50 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial/new_listloader_superL.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial/new_listloader_superL.php @@ -21,11 +21,13 @@ # 70510-1518 - Added campaign and system duplicate check and phonecode override # 80428-0417 - UTF8 changes # 80514-1030 - removed filesize limit and raised number of errors to be displayed +# 81011-2009 - a few bug fixes # + # make sure vicidial_list exists and that your file follows the formatting correctly. This page does not dedupe or do any other lead filtering actions yet at this time. -$version = '2.0.4-25'; -$build = '80514-1030'; +$version = '2.0.4-26'; +$build = '81011-2009'; require("dbconnect.php"); @@ -49,6 +51,7 @@ if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} if (isset($_GET["leadfile_name"])) {$leadfile_name=$_GET["leadfile_name"];} elseif (isset($_POST["leadfile_name"])) {$leadfile_name=$_POST["leadfile_name"];} +if (isset($_FILES["leadfile"])) {$leadfile_name=$_FILES["leadfile"]['name'];} if (isset($_GET["file_layout"])) {$file_layout=$_GET["file_layout"];} elseif (isset($_POST["file_layout"])) {$file_layout=$_POST["file_layout"];} if (isset($_GET["OK_to_process"])) {$OK_to_process=$_GET["OK_to_process"];} @@ -1291,54 +1294,23 @@ if ($leadfile) { for ($i=0; $i\r\n"; - print "
".strtoupper(eregi_replace("_", " ", mysql_field_name($rslt, $i))).":
".strtoupper(eregi_replace("_", " ", mysql_field_name($rslt, $i))).":
$row[$i]
".strtoupper(eregi_replace("_", " ", mysql_field_name($rslt, $i))).":
".strtoupper(eregi_replace("_", " ", mysql_field_name($rslt, $i))).":
$row[$i]
".strtoupper(eregi_replace("_", " ", mysql_field_name($rslt, $i))).":
".strtoupper(eregi_replace("_", " ", mysql_field_name($rslt, $i))).":
$row[$i]
".strtoupper(eregi_replace("_", " ", mysql_field_name($rslt, $i))).":
".strtoupper(eregi_replace("_", " ", mysql_field_name($rslt, $i))).":
$row[$i]
".strtoupper(eregi_replace("_", " ", mysql_field_name($rslt, $i))).":
".strtoupper(eregi_replace("_", " ", mysql_field_name($rslt, $i))).":
$row[$i]
".strtoupper(eregi_replace("_", " ", mysql_field_name($rslt, $i))).":
".strtoupper(eregi_replace("_", " ", mysql_field_name($rslt, $i))).":
$row[$i]
".strtoupper(eregi_replace("_", " ", mysql_field_name($rslt, $i))).":
".strtoupper(eregi_replace("_", " ", mysql_field_name($rslt, $i))).":
$row[$i]
".strtoupper(eregi_replace("_", " ", mysql_field_name($rslt, $i))).":
".strtoupper(eregi_replace("_", " ", mysql_field_name($rslt, $i))).":
$row[$i]
".strtoupper(eregi_replace("_", " ", mysql_field_name($rslt, $i))).":
".strtoupper(eregi_replace("_", " ", mysql_field_name($rslt, $i))).":
$row[$i]
".strtoupper(eregi_replace("_", " ", mysql_field_name($rslt, $i))).":
".strtoupper(eregi_replace("_", " ", mysql_field_name($rslt, $i))).":
$row[$i]
\n"; echo ""; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"; -echo "   English Agent Login"; +echo "   English Agent Login"; echo "
"; -echo "   Spanish Agent Login"; +echo "   Spanish Agent Login"; echo "
"; -echo "   German Agent Login"; +echo "   German Agent Login"; echo "
"; -echo "   Italian Agent Login"; +echo "   Italian Agent Login"; echo "
"; -echo "   Greek Agent Login"; +echo "   Greek Agent Login"; echo "
"; -echo "   French Agent Login"; +echo "   French Agent Login"; echo "
"; -echo "   Brazillian Portuguese Agent Login"; +echo "   Brazillian Portuguese Agent Login"; echo "
"; -echo "   Portuguese Agent Login"; +echo "   Portuguese Agent Login"; echo "
"; -echo "   Polish Agent Login"; +echo "   Polish Agent Login"; echo "
"; -echo "   Slovak Agent Login"; +echo "   Slovak Agent Login"; echo "
\n"; echo "
\n"; diff --git a/agc_2-X/branches/agc_2.0.4/www/vicidial/welcome_languages.php b/agc_2-X/branches/agc_2.0.4/www/vicidial/welcome_languages.php new file mode 100644 index 00000000..64aedcb3 --- /dev/null +++ b/agc_2-X/branches/agc_2.0.4/www/vicidial/welcome_languages.php @@ -0,0 +1,76 @@ + LICENSE: GPLv2 +# +header ("Content-type: text/html; charset=utf-8"); + +echo "VICIDIAL Welcome\n"; +echo "\n"; +echo "\n"; +echo "



"; +echo ""; +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "
Welcome! Bienvenue!   Willkommen! Benvenuto! Υποδοχή!
 
\n"; + +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "
"; +echo "   English Agent Login"; +echo "
"; +echo "   Spanish Agent Login"; +echo "
"; +echo "   German Agent Login"; +echo "
"; +echo "   Italian Agent Login"; +echo "
"; +echo "   Greek Agent Login"; +echo "
"; +echo "   French Agent Login"; +echo "
"; +echo "   Brazillian Portuguese Agent Login"; +echo "
"; +echo "   Portuguese Agent Login"; +echo "
"; +echo "   Polish Agent Login"; +echo "
"; +echo "   Slovak Agent Login"; +echo "
\n"; + +echo "
\n"; + +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "
"; +echo "   English Administration"; +echo "
"; +echo "   Spanish Administration"; +echo "
"; +echo "   German Administration"; +echo "
"; +echo "   Italian Administration"; +echo "
"; +echo "   Greek Administration"; +echo "
\n"; +echo "
 
\n"; +echo "\n\n"; +echo "\n\n"; +echo "\n\n"; + +?> \ No newline at end of file diff --git a/agc_2-X/trunk/UPGRADE b/agc_2-X/trunk/UPGRADE index 1a08588f..812064f9 100644 --- a/agc_2-X/trunk/UPGRADE +++ b/agc_2-X/trunk/UPGRADE @@ -186,6 +186,12 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom 40. Added ability to set callerID number on outgoing conference calls to CAMPAIGN, CUSTOMER or AGENT_PHONE callerID settings. +41. New Slovak translation for the agent screen, as well as new German agent + screen translation and new German buttons for the agent screen + +42. New Welcome demo screen with links to all translations of agent and admin + screens + diff --git a/agc_2-X/trunk/translations/de_language.txt b/agc_2-X/trunk/translations/de_language.txt index 92b189c3..42adfbc5 100644 --- a/agc_2-X/trunk/translations/de_language.txt +++ b/agc_2-X/trunk/translations/de_language.txt @@ -36,7 +36,7 @@ agc|htglobalize.php|1 "NOV"|"NOV"| "DEC"|"DEZ"| \./images/|../agc/images/| -BORDER|BORDER| +BORDER|Border| VALUE=SUBMIT|VALUE=SUBMIT| TYPE=SUBMIT|TYPE=Submit| MAXLENGTH|maxlength| diff --git a/agc_2-X/trunk/www/vicidial/welcome_demo.php b/agc_2-X/trunk/www/vicidial/welcome_demo.php index 64aedcb3..0f0ace77 100644 --- a/agc_2-X/trunk/www/vicidial/welcome_demo.php +++ b/agc_2-X/trunk/www/vicidial/welcome_demo.php @@ -19,34 +19,34 @@ echo "
\n"; echo ""; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"; -echo "   English Agent Login"; +echo "   English Agent Login"; echo "
"; -echo "   Spanish Agent Login"; +echo "   Spanish Agent Login"; echo "
"; -echo "   German Agent Login"; +echo "   German Agent Login"; echo "
"; -echo "   Italian Agent Login"; +echo "   Italian Agent Login"; echo "
"; -echo "   Greek Agent Login"; +echo "   Greek Agent Login"; echo "
"; -echo "   French Agent Login"; +echo "   French Agent Login"; echo "
"; -echo "   Brazillian Portuguese Agent Login"; +echo "   Brazillian Portuguese Agent Login"; echo "
"; -echo "   Portuguese Agent Login"; +echo "   Portuguese Agent Login"; echo "
"; -echo "   Polish Agent Login"; +echo "   Polish Agent Login"; echo "
"; -echo "   Slovak Agent Login"; +echo "   Slovak Agent Login"; echo "
\n"; echo "
\n"; diff --git a/agc_2-X/trunk/www/vicidial/welcome_languages.php b/agc_2-X/trunk/www/vicidial/welcome_languages.php new file mode 100644 index 00000000..64aedcb3 --- /dev/null +++ b/agc_2-X/trunk/www/vicidial/welcome_languages.php @@ -0,0 +1,76 @@ + LICENSE: GPLv2 +# +header ("Content-type: text/html; charset=utf-8"); + +echo "VICIDIAL Welcome\n"; +echo "\n"; +echo "\n"; +echo "



"; +echo ""; +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "
Welcome! Bienvenue!   Willkommen! Benvenuto! Υποδοχή!
 
\n"; + +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "
"; +echo "   English Agent Login"; +echo "
"; +echo "   Spanish Agent Login"; +echo "
"; +echo "   German Agent Login"; +echo "
"; +echo "   Italian Agent Login"; +echo "
"; +echo "   Greek Agent Login"; +echo "
"; +echo "   French Agent Login"; +echo "
"; +echo "   Brazillian Portuguese Agent Login"; +echo "
"; +echo "   Portuguese Agent Login"; +echo "
"; +echo "   Polish Agent Login"; +echo "
"; +echo "   Slovak Agent Login"; +echo "
\n"; + +echo "
\n"; + +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "
"; +echo "   English Administration"; +echo "
"; +echo "   Spanish Administration"; +echo "
"; +echo "   German Administration"; +echo "
"; +echo "   Italian Administration"; +echo "
"; +echo "   Greek Administration"; +echo "
\n"; +echo "
 
\n"; +echo "\n\n"; +echo "\n\n"; +echo "\n\n"; + +?> \ No newline at end of file