LICENSE: GPLv2 # # make sure you have added a user to the vicidial_users MySQL table with at least # user_level 1 or greater to access this page. Also, you need to have the login # and pass of a phone listed in the asterisk.phones table. The page grabs the # server info and other details from this login and pass. # # This script works best with Firefox or Mozilla, but will run for a couple # hours on Internet Explorer before the memory leaks cause a crash. # # Other scripts that this application depends on: # - vdc_db_query.php: Updates information in the database # - manager_send.php: Sends manager actions to the DB for execution # # CHANGES # 50607-1426 - First Build of VICIDIAL web client basic login process finished # 50628-1620 - Added some basic formatting and worked on process flow # 50628-1715 - Startup variables mapped to javascript variables # 50629-1303 - Added Login Closer in-groups selection box and vla update # 50629-1530 - Rough layout for customer info form section and button links # 50630-1453 - Rough Manual Dial/Hangup with customer info displayed # 50701-1450 - Added vicidial_log entries on dial and hangup # 50701-1634 - Added Logout function # 50705-1259 - Added call disposition functionality # 50705-1432 - Added lead info DB update function # 50705-1658 - Added web form functionality # 50706-1043 - Added call park and pickup functions # 50706-1234 - Added Start/Stop Recording functionality # 50706-1614 - Added conference channels display option # 50711-1333 - Removed call check redundancy and fixed a span bug # 50727-1424 - Added customer channel and participant present sensing/alerts # 50804-1057 - Added SendDTMF function and reconfigured the transfer span # 50804-1224 - Added Local and Internal Closer transfer functions # 50804-1628 - Added Blind transfer, activated LIVE CALL image and fixed bugs # 50804-1808 - Added button images for left buttons # 50815-1151 - Added 3Way calling functions to Transfer-conf frame # 50815-1602 - Added images and buttons for xfer functions # 50816-1813 - Added basic autodial outbound call pickup functions # 50817-1113 - Fixes to auto_dialing call receipt # 50817-1234 - Added inbound call receipt capability # 50817-1541 - Added customer time display # 50817-1541 - Added customer time display # 50818-1327 - Added stop-all-recordings-after-each-vicidial-call option # 50818-1703 - Added pretty login section # 50825-1200 - Modified form field lengths, added double-click dispositions # 50831-1603 - Fixed customer time bug and fronter display bug for CLOSER # 50901-1314 - Fixed CLOSER IN-GROUP Web Form bug # 50903-0904 - Added preview-lead code for manual dialing # 50904-0016 - Added ability to hangup manual dials before pickup # 50906-1319 - Added override for filters on xfer calls, fixed login display bug # 50909-1243 - Added hotkeys functionality for quick dispoing in auto-dial mode # 50912-0958 - Modified hotkeys function, agent must have user_level >= 5 to use # 50913-1212 - Added campaign_cid to 3rd party calls # 50923-1546 - Modified to work with language translation # 50926-1656 - Added campaign pull-down at login of active campaigns # 50928-1633 - Added manual dial alternate number dial option # 50930-1538 - Added session_id empty login failure and fixed 2 minor bugs # 51004-1656 - Fixed recording filename bug and new Spanish translation # 51020-1103 - Added campaign-specific recording control abilities # 51020-1352 - Added Basic vicidial_agent_log framework # 51021-1050 - Fixed custtime display and disable Enter/Return keypresses # 51021-1718 - Allows for multi-line comments (changes \n to !N in database) # 51110-1432 - Fixed non-standard http port issue # 51111-1047 - Added vicidial_agent_log lead_id earlier for manual dial # 51118-1305 - Activate multi-line comments from $multi_line_comments var # 51118-1313 - Move Transfer DIV to a floating span to preserve 800x600 view # 51121-1506 - Small PHP optimizations in many scripts and disabled globalize # 51129-1010 - Added ability to accept calls from other VICIDIAL servers # 51129-1254 - Fixed Hangups of other agents channels when customer hangs up # 51208-1732 - Created user-first login that looks for default phone info # 51219-1526 - Added variable framework for campaign and in-group scripts # 51221-1200 - Added SCRIPT tab, layout and functionality # 51221-1714 - Added auto-switch-to-SCRIPT-tab and auto-webform-popup # 51222-1605 - Added VMail message blind transfer button to xfer-conf frame # 51229-1028 - Added checks on web_form_address to allow for var in the DB value # 60117-1312 - Added Transfer-conf frame toggle on button press # 60208-1152 - Added DTMF-xfernumber preset links to xfer-conf frame # 60213-1129 - Added vicidial_users.hotkeys_active for any user hotkeys # 60213-1210 - Added ability to sort routing of calls by user_level # 60214-0932 - Initial Callback calendar display framework # 60214-1407 - Added ability to minimize the dispo screen to see info below # 60215-1104 - Added ANYONE scheduled callbacks functionality # 60410-1116 - Added persistant pause after dispo option and change dispo text # - Added web form submit that opens new window with dispo on submit # - Added PREVIOUS CALLBACK in customer info to flag callbacks # - Added link to try to hangup the call again in the dispo screen # - Added link noone-in-session screen to call agent phone again # - Added link customer-hungup screen to go straight to dispo screen # 60410-1532 - Added agent status and campaign calls dialing display option # 60411-1547 - Add ability to set callback as USERONLY and some basic formatting # 60413-1752 - Add basic USERONLY callback frame and listings # 60414-1039 - Changed manual dial preview and alt dial checkboxes to spans # - Added beta-level USERONLY callback functionality # - Added beta-level manual dialing with lead insertion functionality # 60415-1534 - Fixed manual dial lead preview and fixed manuald dial override bug # 60417-1108 - Added capability to do alt-number-dialing in auto-dial mode # - Changed several permissions to database-defined # 60419-1529 - Prevent manual dial or callbacks when alt-dial lead not finished # 60420-1647 - Fixed DiaLDiaLAltPhonE error, Call Agent Again DialControl error # 60421-1229 - Check GET/POST vars lines with isset to not trigger PHP NOTICES # 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 # 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); } ### 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; $version = '2.0.97'; $build = '60829-1531'; if ($force_logout) { echo "Wylogowałeś się. Do zobaczenia\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(0, 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); $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 $agentcallsstatus = '0'; # set to 1 to show agent status and call count $campagentstatctmax = '0'; # Number of sekundy 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 $TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen # 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 $US='_'; $CL=':'; $AT='@'; $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 ($campaign_login_list > 0) { $camp_form_code = "\n"; } else { $camp_form_code = "\n"; } if ($relogin == 'YES') { echo "klient VICIWYBIERZ: Powtórne zalogowanie\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n";echo "\n";echo "
English Polski
\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 "
Powtórne zalogowanie
 
Login telefonu:
Hasło telefonu:
Login użytkownika:
Hasło użytkownika:
Kampania: $camp_form_code

WERSJA: $version       KOMPILACJA: $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 "klient VICIWYBIERZ: Logowanie do kampani\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n";echo "\n"; echo "
English Polski
\n"; echo "
\n"; echo "\n"; #echo "\n"; #echo "\n"; echo "

Login użytkownika

"; echo ""; echo ""; echo ""; echo "\n"; echo "\n"; echo ""; echo "\n"; echo ""; echo "\n"; echo ""; echo "\n"; echo "\n"; echo "\n"; echo "
Logowanie do kampani
 
Login użytkownika:
Hasło użytkownika:
Kampania: $camp_form_code

WERSJA: $version       KOMPILACJA: $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 "klient VICIWYBIERZ: Login\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n";echo "\n"; echo "
English Polski
\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 "
Login
 
Login telefonu:
Hasło telefonu:
Login użytkownika:
Hasło użytkownika:
Kampania: $camp_form_code

WERSJA: $version       KOMPILACJA: $build
\n"; echo "\n\n"; echo "\n\n"; echo "\n\n"; exit; } } } if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) { echo "klient VICIWYBIERZ: Login telefonu\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n";echo "\n";echo "
English Polski
\n"; echo "
\n"; echo "\n"; echo "


"; echo ""; echo ""; echo "\n"; echo "\n"; echo ""; echo "\n"; echo ""; echo "\n"; echo "\n"; echo "\n"; echo "
Login telefonu
 
Login telefonu:
Hasło telefonu:

WERSJA: $version       KOMPILACJA: $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 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]; 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++;} ##### 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 dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,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 FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); $status_A = $row[0]; $status_B = $row[1]; $status_C = $row[2]; $status_D = $row[3]; $status_E = $row[4]; $park_ext = $row[5]; $park_file_name = $row[6]; $web_form_address = $row[7]; $allow_closers = $row[8]; $auto_dial_level = $row[9]; $dial_timeout = $row[10]; $dial_prefix = $row[11]; $campaign_cid = $row[12]; $campaign_vdad_exten = $row[13]; $campaign_rec_exten = $row[14]; $campaign_recording = $row[15]; $campaign_rec_filename = $row[16]; $campaign_script = $row[17]; $get_call_launch = $row[18]; $campaign_am_message_exten = $row[19]; $xferconf_a_dtmf = $row[20]; $xferconf_a_number = $row[21]; $xferconf_b_dtmf = $row[22]; $xferconf_b_number = $row[23]; $alt_number_dialing=$row[24]; $VC_scheduled_callbacks=$row[25]; $wrapup_sekundy=$row[26]; $wrapup_message=$row[27]; $closer_campaigns=$row[28]; $use_internal_dnc=$row[29]; $allcalls_delay=$row[30]; $omit_phone_code=$row[31]; 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'"; ##### grab the inbound groups to choose from if campaign contains CLOSER $VARingroups="''"; if (eregi("CLOSER", $VD_campaign)) { $VARingroups=''; $stmt="select group_id from vicidial_inbound_groups where active = 'Y' and group_id IN($closer_campaigns) order by group_id limit 20;"; $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 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 = "Kampania nie aktywna, spróbuj jeszcze raz
"; } } else { if ($WeBRooTWritablE > 0) { fwrite ($fp, "vdweb|FAIL|$date|$VD_login|$VD_pass|$ip|$browser|\n"); fclose($fp); } $VDloginDISPLAY=1; $VDdisplayMESSAGE = "Login nie aktywny, spróbuj jeszcze raz
"; } } if ($VDloginDISPLAY) { echo "klient VICIWYBIERZ: Logowanie do kampani\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n";echo "\n"; echo "
English Polski
\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 "
Logowanie do kampani
 
Login użytkownika:
Hasło użytkownika:
Kampania: $camp_form_code

WERSJA: $version       KOMPILACJA: $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 "klient VICIWYBIERZ: Login telefonu Error\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n";echo "\n"; echo "
English Polski
\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 "
Login Error
 
Login Twojego telefonu lub hasło są nieaktywne w tym systememie, spróbuj jeszcze raz:
 
Login telefonu:
Hasło telefonu:

WERSJA: $version       KOMPILACJA: $build
\n"; echo "\n\n"; echo "\n\n"; echo "\n\n"; exit; } else { echo "klient VICIWYBIERZ\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]; $IDRozmówcy_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]; 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 ( (eregi("CLOSER", $VD_campaign)) || ($campaign_leads_to_call > 0) ) { ### insert an entry into the user log for the login event $stmt = "INSERT INTO vicidial_user_log values('','$VD_login','LOGIN','$VD_campaign','$NOW_TIME','$StarTtimE')"; 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"; # print "You have logged in as user: $VD_login na phone: $SIP_user do kampani: $VD_campaign
\n"; $VICIDiaL_is_logged_in=1; ### use manager middleware-app to connect the phone to the user $SIqueryCID = "S$CIDdate$session_id"; ### insert a NOWY 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"; $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) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$closer_chooser_string','$user_level');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); print "\n"; if (eregi("CLOSER", $VD_campaign)) { print "\n"; } } else { print "\n"; } } else { echo "klient VICIWYBIERZ: VICIWYBIERZ Logowanie do kampani\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n";echo "\n"; echo "
English Polski
\n"; echo "Niestety, w zasobniku nie ma kontaktów oczekujących wykonania połączeń dla tej kampanii\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "Login: \n
"; echo "Hasło:
\n"; echo "Kampania: $camp_form_code
\n"; echo "\n"; echo "
\n\n"; echo "\n\n"; echo "\n\n"; exit; } if (strlen($session_id) < 1) { echo "klient VICIWYBIERZ: VICIWYBIERZ Logowanie do kampani\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n";echo "\n"; echo "
English Polski
\n"; echo "Sorry, there are no available sessions\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "Login: \n
"; echo "Hasło:
\n"; echo "Kampania: $camp_form_code
\n"; echo "\n"; echo "
\n\n"; echo "\n\n"; echo "\n\n"; exit; } $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) values('$VD_login','$server_ip','$NOW_TIME','$VD_campaign','$StarTtimE','0','$StarTtimE');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); $agent_log_id = mysql_insert_id(); 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] = rawurlencode($row[1]); $MMscripttext[$e] = rawurlencode($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('Styczeń','February','Marzec','Kwiecień','Maj','Czerwiec', 'Lipiec','Sierpień','Wrzesień','Październik','Listopad','Grudzień'); $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(0,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"; ?>
WYLOGUJ\n"; ?>
VICIWYBIERZ SCRIPT   LIVE     ID sesji: Aktywna rozmowa

VICIWYBIERZ
WYBIERANIE RĘCZNE
X AKTYWNE INNE TERMINY
INNE TERMINY DLA AGENTA :
Kliknij poniżej na Inne terminy żeby teraz zadzwonić do klienta. Jeżeli klikniesz na rekordzie by zadzwonić, rekord zostanie usunięty z listy.

  Odswież                 Wróć
NOWE RĘCZNE WYBIERANIE NUMERU DLA :

Wpisz poniżej informacje o kontakcie do którego chcesz wykonać połączenie.
\n"; } ?> Ważne: nowe kontakty z ręcznym wybieraniem zostaną zapisane na liście 999

Kod wybierania:   (dla polski będzie to 48)
Telefon Number:   (12 digits max - digits only)
Przeszukuj rekordy:   (This option if checked will attempt to find the phone number in the system before inserting it as a new lead)


Jeżeli chcesz wybrać numer tak aby NIE został dodany jako nowy kontakt, wpisz dokładny numer telefonu w polu Wybierz ten numer poniżej. By zakończyć połączenie musisz otworzyć ROZMOWY W TEJ SESJI (w dole ekranu), i zakończyć połączenie klinając na link jego kanału..
 
Wybierz ten numer:   (tylko cyfry)

Wybierz teraz                 Wróć
Twój Status:
Calls Dialing:
Transfer - Konferencja
WEWNĘTRZNY FINALIZUJĄCYCH LOKALNY FINALIZUJĄCYCH CODE Rozłącz linię transferu Rozłącz obie linie
Numer do wybrania   sekundy   channel OVERRIDE   D1 D2
Połącz z klientem Zawieś połączenie z klientem WYJDŹ Z ROZMOWY 3-STRONNEJ Wybierz numer do nieweryfikowanego transferu Blind Transfer VMail Message
Połączenie rozdysponowane jako:

-
Klawisze skrótu dyspozycji: Kiedy aktywne, naciśnij guzik na klawiaturze w celu wybrania opcji dla tej rozmowy. Rozmowa zostanie automatycznie rozłączona a opcja ustawiona:
Nikt nie uczestniczy w Twojej sesji:
Wróć

Ponownie połącz się z telefonem
Klient sie rozłączył:
Wróć

Zakończ i wprowadź rezultat rozmowy
Call Wrapup sekundy remaining in wrapup



Finish Wrapup and Move On

WYLOGUJ
 
Zmiany wprowadzone w informacjach o kliencie będą zapisane tylko podczas trwania połączenia. Nie po rozłączaniu!.
REZULTAT ROZMOWY :       Rozłącz się ponownie       minimalizuj
Koniec rozmowy, wybierz rezultat
ZATRZYMAJ DZWONIENIE
WYCZYŚĆ FORMULARZ | ZATWIERDŹ

WEB FORM ZATWIERDŹ

 
Wybierz datę oddzwonienia :
Wybierz datę poniżej       Hour:   Minutes:    
TYLKO MOJE INNE TERMINY
";} ?> Notatki:

ZATWIERDŹ



 
SELEKCJA GRUPY ZAWNĘTRZNYCH FINALIZUJĄCYCH
Selekcja grupy zawnętrznych finalizujących
KOMBINOWANE POŁĄCZENIA(wychodzące aktywowane)
RESET | ZATWIERDŹ



 
Kanał Kanał TYLKO MOJE INNE TERMINY
";} ?>
AKTYWNA ROZMOWA PRZENIESIONA
Kanały do przeniesienia: Kanał
NumerWenętrzny:
Menu rozszerzeń

Przełącz do wybranego numeru wewnętrznego

Przełącz do poczty głosowej

Przełącz do numeru:


ODSWIEŻ


Wróć do Głównego okna

Konferencje:
(wybierz poniższy numer w celu przełączenia do konferencji)
Przełącz również mój kanał
Menu konferencji
VICIWYBIERZ SCRIPT
STATUS:
Wybierz kolejny numer
PODGLĄD POŁĄCZEŃ
WYBIERANIE DRUGIEGO NUMERU
PLIK NAGRANIA:

NUMER NAGRANIA:
Rozpocznij nagrywanie

Web Formularz

Zawieś rozmowę
Transfer - Konferencja

Odłącz kilenta

Wyślij tonowo
\n";} else {echo "\n";} ?>
sekundy:   Kanał:   Ustawiony Czas:
Informacje o kliencie:
Tytuł:   Imię:   2 Imię:   Nazwisko:
Adres1:
Adres2:   Adres3:
Miasto:   Stan:   KodPocztowy:
Powiat:   Vendedor ID:
Telefon:   Prefiks:   Drugi telefon:
Pokaż:   Email:
Komentarz:
 

 
wersja klienta VICIWYBIERZ:     KOMPILACJA:               Serwer:              
Pokaż informacje o kanałach konferencyjnych
0) && ( ($user_level>=$HKuser_level) or ($VU_hotkeys_active > 0) ) ) { ?> KLAWISZE SKRÓTU NIEAKTYWNE