From 325d5bcce84c548776e83866e12c159516f3ff8b Mon Sep 17 00:00:00 2001 From: mattf Date: Tue, 29 Dec 2009 17:04:26 +0000 Subject: [PATCH] Added an agent API function to update vicidial_list fields and the field values in the agent screen on-the-fly for the agent's current call. Added timer action options to campaigns and in-groups allowing a message, webform or D1/D2-dial to happen at a specified number of seconds after the customer connects to the agent. Also, an API callw as added for this updated the Vtiger 5.1.0 patch git-svn-id: svn://192.168.202.10@1289 3d104415-ff17-0410-8863-d5cf3c621b8a --- agc_2-X/trunk/UPGRADE | 7 + agc_2-X/trunk/bin/AST_VDauto_dial.pl | 4 +- agc_2-X/trunk/bin/FastAGI_log.pl | 12 +- agc_2-X/trunk/docs/AGENT_API.txt | 85 +++ .../trunk/extras/MySQL_AST_CREATE_tables.sql | 17 +- .../Vtiger510_vicidial_002_noclose.patch | 406 +++++++++++++++ agc_2-X/trunk/extras/upgrade_2.2.0.sql | 16 + .../TO_BE_TRANSLATED_2.2.0.txt | 12 +- agc_2-X/trunk/www/agc/api.php | 422 ++++++++++++++- agc_2-X/trunk/www/agc/conf_exten_check.php | 51 +- agc_2-X/trunk/www/agc/vdc_db_query.php | 216 ++++++-- agc_2-X/trunk/www/agc/vicidial.php | 484 +++++++++++++++++- agc_2-X/trunk/www/vicidial/admin.php | 103 +++- agc_2-X/trunk/www/vicidial/vtiger_search.php | 34 +- 14 files changed, 1734 insertions(+), 135 deletions(-) create mode 100644 agc_2-X/trunk/extras/Vtiger510_vicidial_002_noclose.patch diff --git a/agc_2-X/trunk/UPGRADE b/agc_2-X/trunk/UPGRADE index 56171190..9b167778 100644 --- a/agc_2-X/trunk/UPGRADE +++ b/agc_2-X/trunk/UPGRADE @@ -344,6 +344,13 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom ID number that will be populated in the vendor ID(vendor_lead_code) field. +83. Added an agent API function to update vicidial_list fields and the field + values in the agent screen on-the-fly for the agent's current call + +84. Added timer action options to campaigns and in-groups allowing a message, + webform or D1/D2-dial to happen at a specified number of seconds after + the customer connects to the agent. Also, an API callw as added for this + diff --git a/agc_2-X/trunk/bin/AST_VDauto_dial.pl b/agc_2-X/trunk/bin/AST_VDauto_dial.pl index d53d0ec2..cd10af28 100644 --- a/agc_2-X/trunk/bin/AST_VDauto_dial.pl +++ b/agc_2-X/trunk/bin/AST_VDauto_dial.pl @@ -206,8 +206,7 @@ $stmtA = "SELECT telnet_host,telnet_port,ASTmgrUSERNAME,ASTmgrSECRET,ASTmgrUSERN $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; $sthArows=$sthA->rows; -$rec_count=0; -while ($sthArows > $rec_count) +if ($sthArows > 0) { @aryA = $sthA->fetchrow_array; $DBtelnet_host = $aryA[0]; @@ -235,7 +234,6 @@ while ($sthArows > $rec_count) if ($DBext_context) {$ext_context = $DBext_context;} if ($DBvd_server_logs =~ /Y/) {$SYSLOG = '1';} else {$SYSLOG = '0';} - $rec_count++; } $sthA->finish(); diff --git a/agc_2-X/trunk/bin/FastAGI_log.pl b/agc_2-X/trunk/bin/FastAGI_log.pl index 6b7807b9..bb2562d5 100644 --- a/agc_2-X/trunk/bin/FastAGI_log.pl +++ b/agc_2-X/trunk/bin/FastAGI_log.pl @@ -128,12 +128,10 @@ $stmtB = "SELECT vd_server_logs FROM servers where server_ip = '$VARserver_ip';" $sthB = $dbhB->prepare($stmtB) or die "preparing: ",$dbhB->errstr; $sthB->execute or die "executing: $stmtB ", $dbhB->errstr; $sthBrows=$sthB->rows; -$rec_count=0; -while ($sthBrows > $rec_count) +if ($sthBrows > 0) { @aryB = $sthB->fetchrow_array; - $SERVERLOG = "$aryB[0]"; - $rec_count++; + $SERVERLOG = $aryB[0]; } $sthB->finish(); $dbhB->disconnect(); @@ -224,16 +222,14 @@ sub process_request $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; $sthArows=$sthA->rows; - $rec_count=0; - while ($sthArows > $rec_count) + if ($sthArows > 0) { $AGILOG = '0'; @aryA = $sthA->fetchrow_array; - $DBagi_output = "$aryA[0]"; + $DBagi_output = $aryA[0]; if ($DBagi_output =~ /STDERR/) {$AGILOG = '1';} if ($DBagi_output =~ /FILE/) {$AGILOG = '2';} if ($DBagi_output =~ /BOTH/) {$AGILOG = '3';} - $rec_count++; } $sthA->finish(); diff --git a/agc_2-X/trunk/docs/AGENT_API.txt b/agc_2-X/trunk/docs/AGENT_API.txt index 2abc6c9a..96988779 100644 --- a/agc_2-X/trunk/docs/AGENT_API.txt +++ b/agc_2-X/trunk/docs/AGENT_API.txt @@ -16,6 +16,8 @@ external_status - sends command to set the disposition for one specific agent an external_pause - sends command to pause/resume an agent now if not on a call, or pause after their next call if on call external_dial - sends command to manually dial a number on the agent's screen change_ingroups - changes the selected in-groups for a logged-in agent +update_fields - changes values for selected data fields in the agent interface +set_timer_action - sets timer action for the current call the agent is on st_login_log - looks up the vicidial_users.custom_three field and logs event from CRM st_get_agent_active_lead - looks up active lead info for an agent and outputs lead information @@ -213,6 +215,89 @@ SUCCESS: change_ingroups function set - YES| TEST_IN SALESLINE -|6666 + + + + + +-------------------------------------------------------------------------------- +update_fields - + +DESCRIPTION: +Updates the fields that are specified with the values. This will update the data that is on the agent's screen in the customer information section. + +VALUES: +agent_user - + REQUIRED alphanumeric string for agent user +LEAD DATA (must populate at least one) + NOTE: Only fields that are specified in the API call will be modified + address1 + address2 + address3 + alt_phone + city + comments + country_code + date_of_birth + email + first_name + gender + gmt_offset_now + last_name + middle_initial + phone_number + phone_code + postal_code + province + security_phrase + source_id + state + title + vendor_lead_code + rank + owner + +EXAMPLE URLS: +http://server/agc/api.php?source=test&user=6666&pass=1234&function=update_fields&agent_user=6666&vendor_lead_code=1234567&address1= + +RESPONSES: +ERROR: update_fields not valid - 6666 +ERROR: agent_user is not logged in - 6666 +ERROR: user is not allowed to modify lead information - 6666|1234 +ERROR: agent_user does not have a lead on their screen - 6666|1234 +ERROR: no fields have been defined - 6666 +SUCCESS: update_fields lead updated - 6666|1234|87498|vendor_lead_code='1234567',address1='' + + + +-------------------------------------------------------------------------------- +set_timer_action - + +DESCRIPTION: +Updates the fields that are specified with the values. This will update the data that is on the agent's screen in the customer information section. + +VALUES: +agent_user - + REQUIRED, alphanumeric string for agent user +value - + REQUIRED, one of these choices: 'NONE','WEBFORM','WEBFORM2','D1_DIAL','D2_DIAL','MESSAGE_ONLY','BALANCE_CHECK' +notes - + Optional, the message to be displayed with the timer action +rank - + Optional, the number of seconds into the call to display + + +EXAMPLE URLS: +http://server/agc/api.php?source=test&user=6666&pass=1234&function=set_timer_action&agent_user=6666&value=MESSAGE_ONLY¬es=test+message&rank=15 + +RESPONSES: +ERROR: set_timer_action not valid - 6666 +ERROR: agent_user is not logged in - 6666 +ERROR: user is not allowed to modify campaign settings - 6666|1234 +SUCCESS: set_timer_action lead updated - 6666|1234|MESSAGE_ONLY|test message|15 + + + -------------------------------------------------------------------------------- st_login_log - diff --git a/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql b/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql index 608fbe40..8507b83c 100644 --- a/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql +++ b/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql @@ -355,6 +355,11 @@ external_dial VARCHAR(100) default '', external_ingroups TEXT, external_blended ENUM('0','1') default '0', external_igb_set_user VARCHAR(20) default '', +external_update_fields ENUM('0','1') default '0', +external_update_fields_data VARCHAR(255) default '', +external_timer_action VARCHAR(20) default '', +external_timer_action_message VARCHAR(255) default '', +external_timer_action_seconds MEDIUMINT(7) default '-1', agent_log_id INT(9) UNSIGNED default '0', last_state_change DATETIME, agent_territories TEXT, @@ -696,7 +701,10 @@ waitforsilence_options VARCHAR(25) default '', agent_select_territories ENUM('Y','N') default 'N', campaign_calldate DATETIME, crm_popup_login ENUM('Y','N') default 'N', -crm_login_address TEXT +crm_login_address TEXT, +timer_action ENUM('NONE','WEBFORM','WEBFORM2','D1_DIAL','D2_DIAL','MESSAGE_ONLY') default 'NONE', +timer_action_message VARCHAR(255) default '', +timer_action_seconds MEDIUMINT(7) default '-1' ); CREATE TABLE vicidial_lists ( @@ -832,7 +840,10 @@ default_group_alias VARCHAR(30) default '', no_agent_no_queue ENUM('N','Y','NO_PAUSED') default 'N', no_agent_action ENUM('CALLMENU','INGROUP','DID','MESSAGE','EXTENSION','VOICEMAIL') default 'MESSAGE', no_agent_action_value VARCHAR(255) default 'nbdy-avail-to-take-call|vm-goodbye', -web_form_address_two TEXT +web_form_address_two TEXT, +timer_action ENUM('NONE','WEBFORM','WEBFORM2','D1_DIAL','D2_DIAL','MESSAGE_ONLY') default 'NONE', +timer_action_message VARCHAR(255) default '', +timer_action_seconds MEDIUMINT(7) default '-1' ); CREATE TABLE vicidial_stations ( @@ -1990,7 +2001,7 @@ CREATE INDEX phone_number on vicidial_closer_log (phone_number); CREATE INDEX date_user on vicidial_closer_log (call_date,user); CREATE INDEX comment_a on live_inbound_log (comment_a); -UPDATE system_settings SET db_schema_version='1188',db_schema_update_date=NOW(); +UPDATE system_settings SET db_schema_version='1189',db_schema_update_date=NOW(); GRANT RELOAD ON *.* TO cron@'%'; GRANT RELOAD ON *.* TO cron@localhost; diff --git a/agc_2-X/trunk/extras/Vtiger510_vicidial_002_noclose.patch b/agc_2-X/trunk/extras/Vtiger510_vicidial_002_noclose.patch new file mode 100644 index 00000000..c64b3bee --- /dev/null +++ b/agc_2-X/trunk/extras/Vtiger510_vicidial_002_noclose.patch @@ -0,0 +1,406 @@ +--- ../vtigercrm510orig/Smarty/templates/DetailViewFields.tpl 2009-12-29 10:45:35.000000000 -0500 ++++ ./Smarty/templates/DetailViewFields.tpl 2009-12-29 10:46:20.000000000 -0500 +@@ -13,7 +13,7 @@ + -->*} + + +- {if $keyid eq '1' || $keyid eq 2 || $keyid eq '11' || $keyid eq '7' || $keyid eq '9' || $keyid eq '55' || $keyid eq '71' || $keyid eq '72' || $keyid eq '255'} ++ {if $keyid eq '1' || $keyid eq '2' || $keyid eq '7' || $keyid eq '9' || $keyid eq '55' || $keyid eq '71' || $keyid eq '72' || $keyid eq '255'} +   + {if $keyid eq '55' || $keyid eq '255'} + {if $keyaccess eq $APP.LBL_NOT_ACCESSIBLE} +@@ -71,6 +71,12 @@ + {/if} + + ++ {elseif $keyid eq '11'} ++ ++ ++ VCcall: {$keyval} ++ ++ + {elseif $keyid eq '15' || $keyid eq '16'} +   + {foreach item=arr from=$keyoptions} +--- ../vtigercrm510orig/Smarty/templates/DetailViewUI.tpl 2009-12-29 10:45:35.000000000 -0500 ++++ ./Smarty/templates/DetailViewUI.tpl 2009-12-29 10:46:20.000000000 -0500 +@@ -13,7 +13,7 @@ + -->*} + + +- {if $keyid eq '1' || $keyid eq 2 || $keyid eq '11' || $keyid eq '7' || $keyid eq '9' || $keyid eq '55' || $keyid eq '71' || $keyid eq '72' || $keyid eq '103' || $keyid eq '255'} ++ {if $keyid eq '1' || $keyid eq '2' || $keyid eq '7' || $keyid eq '9' || $keyid eq '11' || $keyid eq '55' || $keyid eq '71' || $keyid eq '72' || $keyid eq '103' || $keyid eq '255'} + + {if $keyid eq '55' || $keyid eq '255'} + {if $keyaccess eq $APP.LBL_NOT_ACCESSIBLE} +@@ -23,11 +23,13 @@ + {/if} + {/if} + +- {if $keyid eq 11} ++ {if $keyid eq '11'} + {if $USE_ASTERISK eq 'true'} +   {$keyval} + {else} +-   {$keyval} ++ VCcall: ++ {$keyval} ++ + {/if} + {else} +   {$keyval} +--- ../vtigercrm510orig/include/js/dtlviewajax.js 2009-12-29 10:45:35.000000000 -0500 ++++ ./include/js/dtlviewajax.js 2009-12-29 10:46:20.000000000 -0500 +@@ -293,7 +293,7 @@ + if(typeof(use_asterisk) != 'undefined' && use_asterisk == true){ + getObj(dtlView).innerHTML = ""+tagValue+""; + }else{ +- getObj(dtlView).innerHTML = tagValue; ++ getObj(dtlView).innerHTML = ""+tagValue+" "; + } + }else if(uitype == '17') + { +--- ../vtigercrm510orig/include/utils/ListViewUtils.php 2009-12-29 10:45:35.000000000 -0500 ++++ ./include/utils/ListViewUtils.php 2009-12-29 10:46:20.000000000 -0500 +@@ -1861,7 +1861,7 @@ + } + //added for asterisk integration + elseif($uitype == 11){ +- $value = "".$temp_val.""; ++ $value = "VCcall: user_name');\">$temp_val"; + } + //asterisk changes end here + //Added for email status tracking +@@ -4596,4 +4596,4 @@ + return $recordListRangeMsg; + } + +-?> +\ No newline at end of file ++?> +--- ../vtigercrm510orig/include/utils/UserInfoUtil.php 2009-12-29 10:45:35.000000000 -0500 ++++ ./include/utils/UserInfoUtil.php 2009-12-29 10:46:20.000000000 -0500 +@@ -748,6 +748,18 @@ + global $adb; + global $current_user; + global $seclog; ++ if (!file_exists('user_privileges/user_privileges_'.$current_user->id.'.php')) ++ { ++ # create User Priviledges file ++ require('modules/Users/CreateUserPrivilegeFile.php'); ++ createUserPrivilegesfile($current_user->id); ++ } ++ if (!file_exists('user_privileges/sharing_privileges_'.$current_user->id.'.php')) ++ { ++ # create Sharing Priviledges file ++ require('modules/Users/CreateUserPrivilegeFile.php'); ++ createUserSharingPrivilegesfile($current_user->id); ++ } + require('user_privileges/user_privileges_'.$current_user->id.'.php'); + require('user_privileges/sharing_privileges_'.$current_user->id.'.php'); + $permission = "no"; +@@ -4403,4 +4415,4 @@ + return ($fieldid !== false); + } + +-?> +\ No newline at end of file ++?> +--- ../vtigercrm510orig/Smarty/templates/DetailView.tpl 2009-12-29 10:45:35.000000000 -0500 ++++ ./Smarty/templates/DetailView.tpl 2009-12-29 11:13:21.000000000 -0500 +@@ -444,7 +444,16 @@ + + {/if} + {/if} +- ++ {if $MODULE eq 'Accounts'} ++ VC fax log     ++ VC email log ++ {/if} ++ ++ {if $MODULE eq 'Contacts'} ++ VC SELECT THIS CONTACT ++ {/if} ++ ++ + {if $MODULE eq 'Contacts' || $EVENT_PERMISSION eq 'true'} + + +@@ -717,4 +726,4 @@ + + {if $MODULE eq 'Leads' or $MODULE eq 'Contacts' or $MODULE eq 'Accounts' or $MODULE eq 'Campaigns' or $MODULE eq 'Vendors'} +
+-{/if} +\ No newline at end of file ++{/if} +--- ../vtigercrm510orig/include/js/general.js 2009-12-29 10:45:35.000000000 -0500 ++++ ./include/js/general.js 2009-12-29 11:16:03.000000000 -0500 +@@ -1849,6 +1849,119 @@ + openPopUp('xComposeEmail',this,url,'createemailWin',830,662,opts); + } + ++function VICIDIALcall(record_id,field_name,phone,user_name) { ++//alert(record_id + "|" + field_name + "|" + phone + "|" user_name); ++var xmlhttp=false; ++/*@cc_on @*/ ++/*@if (@_jscript_version >= 5) ++// JScript gives us Conditional compilation, we can cope with old IE versions. ++// and security blocked creation of the objects. ++ try { ++ xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); ++ } catch (e) { ++ try { ++ xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); ++ } catch (E) { ++ xmlhttp = false; ++ } ++ } ++@end @*/ ++if (!xmlhttp && typeof XMLHttpRequest!='undefined') ++ { ++ xmlhttp = new XMLHttpRequest(); ++ } ++if (xmlhttp) ++ { ++ var callback_flag=''; ++ if (field_name=='CallBack') ++ { ++ var log_call = record_id + ''; ++ while (log_call.length < 10) ++ {log_call = "0" + log_call;} ++ phone = "99" + log_call; ++ callback_flag = '&callback=1'; ++ } ++ if (field_name=='fax') ++ { ++ var log_call = record_id + ''; ++ while (log_call.length < 8) ++ {log_call = "0" + log_call;} ++ phone = "18" + log_call; ++ } ++ if (field_name=='email') ++ { ++ var log_call = record_id + ''; ++ while (log_call.length < 8) ++ {log_call = "0" + log_call;} ++ phone = "19" + log_call; ++ } ++ var VCcallQuery = "VCcall=1&phone=" + phone + "&vendor_id=" + record_id + '' + callback_flag; ++ xmlhttp.open('POST', 'vtigerservice.php'); ++ xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); ++ xmlhttp.send(VCcallQuery); ++ xmlhttp.onreadystatechange = function() ++ { ++ if (xmlhttp.readyState == 4 && xmlhttp.status == 200) ++ { ++ // alert(xmlhttp.responseText); ++ var Xoutput = null; ++ Xoutput = xmlhttp.responseText; ++ var regXFerr = new RegExp("ERROR","g"); ++ if (Xoutput.match(regXFerr)) ++ { ++ alert(xmlhttp.responseText); ++ } ++ } ++ } ++ delete xmlhttp; ++ } ++} ++ ++function VICIDIALupdate(record_id,field_name) { ++//alert(record_id + "|" + field_name + "|"); ++var xmlhttp=false; ++/*@cc_on @*/ ++/*@if (@_jscript_version >= 5) ++// JScript gives us Conditional compilation, we can cope with old IE versions. ++// and security blocked creation of the objects. ++ try { ++ xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); ++ } catch (e) { ++ try { ++ xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); ++ } catch (E) { ++ xmlhttp = false; ++ } ++ } ++@end @*/ ++if (!xmlhttp && typeof XMLHttpRequest!='undefined') ++ { ++ xmlhttp = new XMLHttpRequest(); ++ } ++if (xmlhttp) ++ { ++ var VCupdateQuery = "VCupdate=1&contact_id=" + record_id + ''; ++ xmlhttp.open('POST', 'vtigerservice.php'); ++ xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); ++ xmlhttp.send(VCupdateQuery); ++ xmlhttp.onreadystatechange = function() ++ { ++ if (xmlhttp.readyState == 4 && xmlhttp.status == 200) ++ { ++ // alert(xmlhttp.responseText); ++ var Xoutput = null; ++ Xoutput = xmlhttp.responseText; ++ var regXFerr = new RegExp("ERROR","g"); ++ if (Xoutput.match(regXFerr)) ++ { ++ alert(xmlhttp.responseText); ++ } ++ } ++ } ++ delete xmlhttp; ++ } ++} ++ + function fnHide_Event(obj){ + document.getElementById(obj).style.visibility = 'hidden'; + } +--- ../vtigercrm510orig/vtigerservice.php 2009-12-29 10:45:35.000000000 -0500 ++++ ./vtigerservice.php 2009-12-29 10:53:48.000000000 -0500 +@@ -41,13 +41,115 @@ + } + else + { +- echo "

vtigerCRM Soap Services

"; ++ if(isset($_REQUEST['VCcall'])) ++ { ++ $CL=':'; ++ $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";} ++ $URLbase = "$HTTPprotocol$server_name$server_port"; ++ ++ $callback_flag=''; ++ if(isset($_REQUEST['callback'])) ++ { ++ $callback_flag = '&vtiger_callback=YES'; ++ } ++ global $entityDel; ++ global $display; ++ global $category; ++ header('Content-Type: text/html; charset='. $charset); ++ session_start(); ++ require_once('include/utils/utils.php'); ++ require_once('config.inc.php'); ++ $default_config_values = Array( "allow_exports"=>"all","upload_maxsize"=>"3000000", "listview_max_textlength" => "40" ); ++ set_default_config($default_config_values); ++ require_once('include/logging.php'); ++ require_once('modules/Users/Users.php'); ++ global $currentModule; ++ $current_user = new Users(); ++ ++ $log =& LoggerManager::getLogger('index'); ++ global $seclog; ++ $seclog =& LoggerManager::getLogger('SECURITY'); ++ $log->debug($_REQUEST); ++ ++ // Check to see if there is an authenticated user in the session. ++ if(isset($_SESSION["authenticated_user_id"]) && (isset($_SESSION["app_unique_key"]) && $_SESSION["app_unique_key"] == $application_unique_key)) ++ { ++ $log->debug("We have an authenticated user id: ".$_SESSION["authenticated_user_id"]); ++ $result = $current_user->retrieveCurrentUserInfoFromFile($_SESSION['authenticated_user_id']); ++ $log->debug('Current user is: '.$current_user->user_name); ++ } ++ ++ $phone = $_REQUEST['phone']; $vendor_id = $_REQUEST['vendor_id']; ++ $user = $current_user->user_name; ++ ++ $VCapiURL = "/agc/api.php"; ++ $VCpauseQuery = "?source=vtiger&user=1000&pass=1234&agent_user=$user&function=external_pause&value=PAUSE"; ++ $VCcallQuery = "?source=vtiger&user=1000&pass=1234&agent_user=$user&function=external_dial&value=$phone&phone_code=1&search=YES&preview=NO&focus=YES&vendor_id=$vendor_id$callback_flag"; ++ $replyP = file("$URLbase$VCapiURL$VCpauseQuery"); ++// sleep(1); ++ $replyC = file("$URLbase$VCapiURL$VCcallQuery"); ++ echo "$replyP[0]|$replyC[0]\n"; ++// echo "$URLbase$VCapiURL$VCcallQuery\n"; ++ } ++ elseif(isset($_REQUEST['VCupdate'])) ++ { ++ $CL=':'; ++ $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";} ++ $URLbase = "$HTTPprotocol$server_name$server_port"; ++ global $entityDel; ++ global $display; ++ global $category; ++ header('Content-Type: text/html; charset='. $charset); ++ session_start(); ++ require_once('include/utils/utils.php'); ++ require_once('config.inc.php'); ++ $default_config_values = Array( "allow_exports"=>"all","upload_maxsize"=>"3000000", "listview_max_textlength" => "40" ); ++ set_default_config($default_config_values); ++ require_once('include/logging.php'); ++ require_once('modules/Users/Users.php'); ++ global $currentModule; ++ $current_user = new Users(); ++ ++ $log =& LoggerManager::getLogger('index'); ++ global $seclog; ++ $seclog =& LoggerManager::getLogger('SECURITY'); ++ $log->debug($_REQUEST); ++ ++ // Check to see if there is an authenticated user in the session. ++ if(isset($_SESSION["authenticated_user_id"]) && (isset($_SESSION["app_unique_key"]) && $_SESSION["app_unique_key"] == $application_unique_key)) ++ { ++ $log->debug("We have an authenticated user id: ".$_SESSION["authenticated_user_id"]); ++ $result = $current_user->retrieveCurrentUserInfoFromFile($_SESSION['authenticated_user_id']); ++ $log->debug('Current user is: '.$current_user->user_name); ++ } ++ ++ $contact_id = $_REQUEST['contact_id']; ++ $user = $current_user->user_name; ++ ++ $VCapiURL = "/agc/api.php"; ++ $VCupdateQuery = "?source=vtiger&user=1000&pass=1234&agent_user=$user&function=update_fields&vendor_lead_code=$contact_id"; ++ $replyU = file("$URLbase$VCapiURL$VCupdateQuery"); ++ echo "$replyU[0]\n"; ++ } ++ else ++ { echo "

vtigerCRM Soap Services

"; + echo "
  • vtigerCRM Outlook Plugin EndPoint URL -- Click here
  • "; + echo "
  • vtigerCRM Word Plugin EndPoint URL -- Click here
  • "; + echo "
  • vtigerCRM ThunderBird Extenstion EndPoint URL -- Click here
  • "; + echo "
  • vtigerCRM Customer Portal EndPoint URL -- Click here
  • "; + echo "
  • vtigerCRM WebForm EndPoint URL -- Click here
  • "; + echo "
  • vtigerCRM FireFox Extension EndPoint URL -- Click here
  • "; ++ } + } + + +--- ../vtigercrm510orig/modules/Users/Authenticate.php 2009-12-29 10:45:35.000000000 -0500 ++++ ./modules/Users/Authenticate.php 2009-12-29 10:46:20.000000000 -0500 +@@ -64,7 +64,19 @@ + //Security related entries start + require_once('include/utils/UserInfoUtil.php'); + +- createUserPrivilegesfile($focus->id); ++ if (file_exists('user_privileges/user_privileges_'.$focus->id.'.php')) ++ { ++ # delete User Priviledges file ++ unlink('user_privileges/user_privileges_'.$focus->id.'.php'); ++ } ++ if (file_exists('user_privileges/sharing_privileges_'.$focus->id.'.php')) ++ { ++ # delete Sharing Priviledges file ++ unlink('user_privileges/sharing_privileges_'.$focus->id.'.php'); ++ } ++ # create User Sharing Priviledges files ++ createUserPrivilegesfile($focus->id); ++ createUserSharingPrivilegesfile($focus->id); + + //Security related entries end + session_unregister('login_password'); +@@ -142,4 +154,4 @@ + header("Location: index.php"); + } + +-?> +\ No newline at end of file ++?> diff --git a/agc_2-X/trunk/extras/upgrade_2.2.0.sql b/agc_2-X/trunk/extras/upgrade_2.2.0.sql index fb521193..6c212217 100644 --- a/agc_2-X/trunk/extras/upgrade_2.2.0.sql +++ b/agc_2-X/trunk/extras/upgrade_2.2.0.sql @@ -672,3 +672,19 @@ ALTER TABLE vicidial_closer_log ADD queue_position SMALLINT(4) UNSIGNED default ALTER TABLE vicidial_auto_calls ADD queue_position SMALLINT(4) UNSIGNED default '1'; UPDATE system_settings SET db_schema_version='1188',db_schema_update_date=NOW(); + +ALTER TABLE vicidial_live_agents ADD external_update_fields ENUM('0','1') default '0' AFTER external_igb_set_user; +ALTER TABLE vicidial_live_agents ADD external_update_fields_data VARCHAR(255) default '' AFTER external_update_fields; +ALTER TABLE vicidial_live_agents ADD external_timer_action VARCHAR(20) default '' AFTER external_update_fields_data; +ALTER TABLE vicidial_live_agents ADD external_timer_action_message VARCHAR(255) default '' AFTER external_timer_action; +ALTER TABLE vicidial_live_agents ADD external_timer_action_seconds MEDIUMINT(7) default '-1' AFTER external_timer_action_message; + +ALTER TABLE vicidial_campaigns ADD timer_action ENUM('NONE','WEBFORM','WEBFORM2','D1_DIAL','D2_DIAL','MESSAGE_ONLY') default 'NONE'; +ALTER TABLE vicidial_campaigns ADD timer_action_message VARCHAR(255) default ''; +ALTER TABLE vicidial_campaigns ADD timer_action_seconds MEDIUMINT(7) default '-1'; + +ALTER TABLE vicidial_inbound_groups ADD timer_action ENUM('NONE','WEBFORM','WEBFORM2','D1_DIAL','D2_DIAL','MESSAGE_ONLY') default 'NONE'; +ALTER TABLE vicidial_inbound_groups ADD timer_action_message VARCHAR(255) default ''; +ALTER TABLE vicidial_inbound_groups ADD timer_action_seconds MEDIUMINT(7) default '-1'; + +UPDATE system_settings SET db_schema_version='1189',db_schema_update_date=NOW(); diff --git a/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.2.0.txt b/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.2.0.txt index ec9a9cb6..61f4e50e 100644 --- a/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.2.0.txt +++ b/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.2.0.txt @@ -356,7 +356,15 @@ CRM Popup Login|| If set to Y, the CRM Popup Address is used to open a new window on agent login to this campaign. Default is N|| CRM Popup Address|| The web address of a CRM login page, it can have variables populated just like the web form address, with the VAR in the front and using --A--user_custom_one--B-- to define variables|| -VIDPROMPT will prompt the caller for their ID number and will create a new lead record with the CallerID as the phone number and the ID as the Vendor ID, VIDPROMPTLOOKUP will attempt to lookup the ID in the entire system, VIDPROMPTLOOKUPRL will attampt to lookup the vendor ID by the ID in only one specified list, VIDPROMPTLOOKUPRC will attampt to lookup the vendor ID by the ID in all of the lists that belong to the specified campaign|| +If IN_GROUP is selected as the DID Route, then this is the call handling method used for these calls. CID will add a new lead record with every call using the CallerID as the phone number, CIDLOOKUP will attempt to lookup the phone number by the CallerID in the entire system, CIDLOOKUPRL will attempt to lookup the phone number by the CallerID in only one specified list, CIDLOOKUPRC will attempt to lookup the phone number by the CallerID in all of the lists that belong to the specified campaign, CLOSER is specified for VICIDIAL Closer calls, ANI will add a new lead record with every call using the ANI as the phone number, ANILOOKUP will attempt to lookup the phone number by the ANI in the entire system, ANILOOKUPRL will attempt to lookup the phone number by the ANI in only one specified list, XDIGITID will prompt the caller for an X digit code before the call will be put into the queue, VIDPROMPT will prompt the caller for their ID number and will create a new lead record with the CallerID as the phone number and the ID as the Vendor ID, VIDPROMPTLOOKUP will attempt to lookup the ID in the entire system, VIDPROMPTLOOKUPRL will attempt to lookup the vendor ID by the ID in only one specified list, VIDPROMPTLOOKUPRC will attempt to lookup the vendor ID by the ID in all of the lists that belong to the specified campaign. Default is CID|| +UNIFIED_CONTACT- This option will use the beta Vtiger 5.1.0 feature to search by phone number and bring up a search page in Vtiger|| +Timer Action|| +This feature allows you to trigger actions after a certain amount of time. the D1 and D2 DIAL options will launch a call to the Transfer Conference Number presets and send them to the agent session, this is usually used for simple IVR validation AGI applications or just to play a pre-recorded message. WEBFORM will open the web form address. MESSAGE_ONLY will simply display the message that is in the field below. NONE will disable this feature and is the default|| +Timer Action Message|| +This is the message that appears on the agent screen at the time the Timer Action is triggered|| +Timer Action Seconds|| +This is the amount of time after the call is connected to the customer that the Timer Action is triggered. Default is -1 which is also inactive|| +This setting will override the Campaign settings|| add-file: user_territories.php @@ -378,6 +386,8 @@ YOU MUST BE PAUSED TO GRAB CALLS IN QUEUE|| Manager || has selected your in-group choices|| CONSULTATIVE|| +Close Message|| +TIMER NOTIFICATION|| add-file: vdc_script_display.php diff --git a/agc_2-X/trunk/www/agc/api.php b/agc_2-X/trunk/www/agc/api.php index 2529bf60..3f8dc490 100644 --- a/agc_2-X/trunk/www/agc/api.php +++ b/agc_2-X/trunk/www/agc/api.php @@ -39,13 +39,16 @@ # 90522-0506 - Security fix # 91130-1307 - Added change_ingroups(Manager InGroup change feature) # 91211-1805 - Added st_login_log and st_get_agent_active_lead functions, added alt_user +# 91228-1059 - Added update_fields function # -$version = '2.2.0-10'; -$build = '91211-1805'; +$version = '2.2.0-11'; +$build = '91228-1059'; require("dbconnect.php"); +$query_string = getenv("QUERY_STRING"); + ### If you have globals turned off uncomment these lines if (isset($_GET["user"])) {$user=$_GET["user"];} elseif (isset($_POST["user"])) {$user=$_POST["user"];} @@ -87,6 +90,56 @@ if (isset($_GET["set_as_default"])) {$set_as_default=$_GET["set_as_default"]; elseif (isset($_POST["set_as_default"])) {$set_as_default=$_POST["set_as_default"];} if (isset($_GET["alt_user"])) {$alt_user=$_GET["alt_user"];} elseif (isset($_POST["alt_user"])) {$alt_user=$_POST["alt_user"];} +if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} + elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} +if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} + elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} +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["source_id"])) {$source_id=$_GET["source_id"];} + elseif (isset($_POST["source_id"])) {$source_id=$_POST["source_id"];} +if (isset($_GET["gmt_offset_now"])) {$gmt_offset_now=$_GET["gmt_offset_now"];} + elseif (isset($_POST["gmt_offset_now"])) {$gmt_offset_now=$_POST["gmt_offset_now"];} +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["rank"])) {$rank=$_GET["rank"];} + elseif (isset($_POST["rank"])) {$rank=$_POST["rank"];} +if (isset($_GET["owner"])) {$owner=$_GET["owner"];} + elseif (isset($_POST["owner"])) {$owner=$_POST["owner"];} header ("Content-type: text/html; charset=utf-8"); header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 @@ -107,6 +160,7 @@ if ($qm_conf_ct > 0) ########################################### $ingroup_choices = ereg_replace("\+"," ",$ingroup_choices); +$query_string = ereg_replace("'|\"|\\\\|;","",$query_string); if ($non_latin < 1) { @@ -119,7 +173,7 @@ if ($non_latin < 1) $focus = ereg_replace("[^-\_0-9a-zA-Z]","",$focus); $preview = ereg_replace("[^-\_0-9a-zA-Z]","",$preview); $notes = ereg_replace("\+"," ",$notes); - $notes = ereg_replace("[^ -\_0-9a-zA-Z]","",$notes); + $notes = ereg_replace("[^ -\.\_0-9a-zA-Z]","",$notes); $phone_code = ereg_replace("[^0-9X]","",$phone_code); $search = ereg_replace("[^-\_0-9a-zA-Z]","",$search); $group_alias = ereg_replace("[^0-9a-zA-Z]","",$group_alias); @@ -130,6 +184,30 @@ if ($non_latin < 1) $blended = ereg_replace("[^A-Z]","",$blended); $ingroup_choices = ereg_replace("[^ -\_0-9a-zA-Z]","",$ingroup_choices); $set_as_default = ereg_replace("[^A-Z]","",$set_as_default); + $phone_number = ereg_replace("[^0-9]","",$phone_number); + $address1 = ereg_replace("[^ -\_0-9a-zA-Z]","",$address1); + $address2 = ereg_replace("[^ -\_0-9a-zA-Z]","",$address2); + $address3 = ereg_replace("[^ -\_0-9a-zA-Z]","",$address3); + $alt_phone = ereg_replace("[^ -\_0-9a-zA-Z]","",$alt_phone); + $city = ereg_replace("[^ -\_0-9a-zA-Z]","",$city); + $comments = ereg_replace("[^ -\_0-9a-zA-Z]","",$comments); + $country_code = ereg_replace("[^A-Z]","",$country_code); + $date_of_birth = ereg_replace("[^ -\_0-9]","",$date_of_birth); + $email = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$email); + $first_name = ereg_replace("[^ -\_0-9a-zA-Z]","",$first_name); + $gender = ereg_replace("[^A-Z]","",$gender); + $gmt_offset_now = ereg_replace("[^ \.-\_0-9]","",$gmt_offset_now); + $last_name = ereg_replace("[^ -\_0-9a-zA-Z]","",$last_name); + $lead_id = ereg_replace("[^0-9]","",$lead_id); + $middle_initial = ereg_replace("[^ -\_0-9a-zA-Z]","",$middle_initial); + $province = ereg_replace("[^ -\.\_0-9a-zA-Z]","",$province); + $security_phrase = ereg_replace("[^ -\.\_0-9a-zA-Z]","",$security_phrase); + $source_id = ereg_replace("[^ -\.\_0-9a-zA-Z]","",$source_id); + $state = ereg_replace("[^ -\_0-9a-zA-Z]","",$state); + $title = ereg_replace("[^ -\_0-9a-zA-Z]","",$title); + $vendor_lead_code = ereg_replace("[^ -\.\_0-9a-zA-Z]","",$vendor_lead_code); + $rank = ereg_replace("[^ -0-9]","",$rank); + $owner = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$owner); } else { @@ -935,6 +1013,344 @@ if ($function == 'change_ingroups') +################################################################################ +### BEGIN - update_fields +################################################################################ +if ($function == 'update_fields') + { + if (strlen($agent_user)<1) + { + $result = 'ERROR'; + $result_reason = "st_login_log not valid"; + $data = "$agent_user"; + echo "$result: $result_reason - $data\n"; + api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data); + exit; + } + else + { + $stmt = "select count(*) from vicidial_live_agents where user='$agent_user';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + { + $stmt = "select count(*) from vicidial_users where user='$user' and modify_leads='1';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + { + $stmt = "select lead_id from vicidial_live_agents where user='$agent_user';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $lead_id = $row[0]; + if ($lead_id > 0) + { + $fieldsSQL=''; + $fieldsLISTS=''; + $field_set=0; + if (ereg('phone_code',$query_string)) + { + if ($DB) {echo "phone_code set to $phone_code\n";} + $fieldsSQL .= "phone_code='$phone_code',"; + $fieldsLIST .= "phone_code,"; + $field_set++; + } + if (ereg('address1',$query_string)) + { + if ($DB) {echo "address1 set to $address1\n";} + $fieldsSQL .= "address1='$address1',"; + $fieldsLIST .= "address1,"; + $field_set++; + } + if (ereg('address2',$query_string)) + { + if ($DB) {echo "address2 set to $address2\n";} + $fieldsSQL .= "address2='$address2',"; + $fieldsLIST .= "address2,"; + $field_set++; + } + if (ereg('address3',$query_string)) + { + if ($DB) {echo "address3 set to $address3\n";} + $fieldsSQL .= "address3='$address3',"; + $fieldsLIST .= "address3,"; + $field_set++; + } + if (ereg('alt_phone',$query_string)) + { + if ($DB) {echo "alt_phone set to $alt_phone\n";} + $fieldsSQL .= "alt_phone='$alt_phone',"; + $fieldsLIST .= "alt_phone,"; + $field_set++; + } + if (ereg('city',$query_string)) + { + if ($DB) {echo "city set to $city\n";} + $fieldsSQL .= "city='$city',"; + $fieldsLIST .= "city,"; + $field_set++; + } + if (ereg('comments',$query_string)) + { + if ($DB) {echo "comments set to $comments\n";} + $fieldsSQL .= "comments='$comments',"; + $fieldsLIST .= "comments,"; + $field_set++; + } + if (ereg('country_code',$query_string)) + { + if ($DB) {echo "country_code set to $country_code\n";} + $fieldsSQL .= "country_code='$country_code',"; + $fieldsLIST .= "country_code,"; + $field_set++; + } + if (ereg('date_of_birth',$query_string)) + { + if ($DB) {echo "date_of_birth set to $date_of_birth\n";} + $fieldsSQL .= "date_of_birth='$date_of_birth',"; + $fieldsLIST .= "date_of_birth,"; + $field_set++; + } + if (ereg('email',$query_string)) + { + if ($DB) {echo "email set to $email\n";} + $fieldsSQL .= "email='$email',"; + $fieldsLIST .= "email,"; + $field_set++; + } + if (ereg('first_name',$query_string)) + { + if ($DB) {echo "first_name set to $first_name\n";} + $fieldsSQL .= "first_name='$first_name',"; + $fieldsLIST .= "first_name,"; + $field_set++; + } + if (ereg('gender',$query_string)) + { + if ($DB) {echo "gender set to $gender\n";} + $fieldsSQL .= "gender='$gender',"; + $fieldsLIST .= "gender,"; + $field_set++; + } + if (ereg('gmt_offset_now',$query_string)) + { + if ($DB) {echo "gmt_offset_now set to $gmt_offset_now\n";} + $fieldsSQL .= "gmt_offset_now='$gmt_offset_now',"; + $fieldsLIST .= "gmt_offset_now,"; + $field_set++; + } + if (ereg('last_name',$query_string)) + { + if ($DB) {echo "last_name set to $last_name\n";} + $fieldsSQL .= "last_name='$last_name',"; + $fieldsLIST .= "last_name,"; + $field_set++; + } + if (ereg('middle_initial',$query_string)) + { + if ($DB) {echo "middle_initial set to $middle_initial\n";} + $fieldsSQL .= "middle_initial='$middle_initial',"; + $fieldsLIST .= "middle_initial,"; + $field_set++; + } + if (ereg('phone_number',$query_string)) + { + if ($DB) {echo "phone_number set to $phone_number\n";} + $fieldsSQL .= "phone_number='$phone_number',"; + $fieldsLIST .= "phone_number,"; + $field_set++; + } + if (ereg('postal_code',$query_string)) + { + if ($DB) {echo "postal_code set to $postal_code\n";} + $fieldsSQL .= "postal_code='$postal_code',"; + $fieldsLIST .= "postal_code,"; + $field_set++; + } + if (ereg('province',$query_string)) + { + if ($DB) {echo "province set to $province\n";} + $fieldsSQL .= "province='$province',"; + $fieldsLIST .= "province,"; + $field_set++; + } + if (ereg('security_phrase',$query_string)) + { + if ($DB) {echo "security_phrase set to $security_phrase\n";} + $fieldsSQL .= "security_phrase='$security_phrase',"; + $fieldsLIST .= "security_phrase,"; + $field_set++; + } + if (ereg('source_id',$query_string)) + { + if ($DB) {echo "source_id set to $source_id\n";} + $fieldsSQL .= "source_id='$source_id',"; + $fieldsLIST .= "source_id,"; + $field_set++; + } + if (ereg('state',$query_string)) + { + if ($DB) {echo "state set to $state\n";} + $fieldsSQL .= "state='$state',"; + $fieldsLIST .= "state,"; + $field_set++; + } + if (ereg('title',$query_string)) + { + if ($DB) {echo "title set to $title\n";} + $fieldsSQL .= "title='$title',"; + $fieldsLIST .= "title,"; + $field_set++; + } + if (ereg('vendor_lead_code',$query_string)) + { + if ($DB) {echo "vendor_lead_code set to $vendor_lead_code\n";} + $fieldsSQL .= "vendor_lead_code='$vendor_lead_code',"; + $fieldsLIST .= "vendor_lead_code,"; + $field_set++; + } + if (ereg('rank',$query_string)) + { + if ($DB) {echo "rank set to $rank\n";} + $fieldsSQL .= "rank='$rank',"; + $fieldsLIST .= "rank,"; + $field_set++; + } + if (ereg('owner',$query_string)) + { + if ($DB) {echo "owner set to $owner\n";} + $fieldsSQL .= "owner='$owner',"; + $fieldsLIST .= "owner,"; + $field_set++; + } + if ($field_set > 0) + { + $fieldsSQL = preg_replace("/,$/","",$fieldsSQL); + $fieldsLIST = preg_replace("/,$/","",$fieldsLIST); + + $stmt="UPDATE vicidial_list set $fieldsSQL where lead_id='$lead_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + + $stmt="UPDATE vicidial_live_agents set external_update_fields='1',external_update_fields_data='$fieldsLIST' where user='$agent_user';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + + $result = 'SUCCESS'; + $result_reason = "update_fields lead updated"; + $data = "$user|$agent_user|$lead_id|$fieldsSQL"; + echo "$result: $result_reason - $data\n"; + api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data); + } + else + { + $result = 'ERROR'; + $result_reason = "no fields have been defined"; + echo "$result: $result_reason - $agent_user\n"; + api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data); + exit; + } + } + else + { + $result = 'ERROR'; + $result_reason = "agent_user does not have a lead on their screen"; + echo "$result: $result_reason - $agent_user\n"; + api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data); + exit; + } + } + else + { + $result = 'ERROR'; + $result_reason = "user is not allowed to modify lead information"; + echo "$result: $result_reason - $agent_user|$user\n"; + api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data); + } + } + else + { + $result = 'ERROR'; + $result_reason = "agent_user is not logged in"; + echo "$result: $result_reason - $agent_user\n"; + api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data); + } + } + } +################################################################################ +### END - update_fields +################################################################################ + + + + + +################################################################################ +### BEGIN - set_timer_action +################################################################################ +if ($function == 'set_timer_action') + { + if ( (strlen($agent_user)<1) or (strlen($value)<2) ) + { + $result = 'ERROR'; + $result_reason = "set_timer_action not valid"; + $data = "$agent_user|$value"; + echo "$result: $result_reason - $data\n"; + api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data); + exit; + } + else + { + $stmt = "select count(*) from vicidial_live_agents where user='$agent_user';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + { + $stmt = "select count(*) from vicidial_users where user='$user' and modify_campaigns='1';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + { + $stmt="UPDATE vicidial_live_agents set external_timer_action='$value',external_timer_action_message='$notes',external_timer_action_seconds='$rank' where user='$agent_user';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + + $result = 'SUCCESS'; + $result_reason = "set_timer_action lead updated"; + $data = "$user|$agent_user|$value|$notes|$rank"; + echo "$result: $result_reason - $data\n"; + api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data); + } + else + { + $result = 'ERROR'; + $result_reason = "user is not allowed to modify campaign settings"; + echo "$result: $result_reason - $agent_user|$user\n"; + api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data); + } + } + else + { + $result = 'ERROR'; + $result_reason = "agent_user is not logged in"; + echo "$result: $result_reason - $agent_user\n"; + api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data); + } + } + } +################################################################################ +### END - set_timer_action +################################################################################ + + + + + ################################################################################ ### BEGIN - st_login_log - looks up vicidial_users.custom_three from a CRM ################################################################################ diff --git a/agc_2-X/trunk/www/agc/conf_exten_check.php b/agc_2-X/trunk/www/agc/conf_exten_check.php index c787bf06..fe7b63b5 100644 --- a/agc_2-X/trunk/www/agc/conf_exten_check.php +++ b/agc_2-X/trunk/www/agc/conf_exten_check.php @@ -48,10 +48,11 @@ # 90706-1430 - Fixed AGENTDIRECT calls in queue display count # 90908-1037 - Added DEAD call logging # 91130-2022 - Added code for manager override of in-group selection +# 91228-1341 - Added API fields update functions # -$version = '2.2.0-23'; -$build = '91130-2022'; +$version = '2.2.0-24'; +$build = '91228-1341'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=17; $one_mysql_log=0; @@ -248,7 +249,7 @@ echo " $stmt="SELECT count(*) from vicidial_auto_calls where callerid='$Acallerid';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03XXX',$user,$server_ip,$session_name,$one_mysql_log);} + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03018',$user,$server_ip,$session_name,$one_mysql_log);} $row=mysql_fetch_row($rslt); $AcalleridCOUNT=$row[0]; @@ -259,7 +260,7 @@ echo " $stmt="SELECT count(*) from vicidial_agent_log where agent_log_id='$Aagent_log_id' and ( (dead_epoch IS NOT NULL) or (dead_epoch > 10000) );"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03XXX',$user,$server_ip,$session_name,$one_mysql_log);} + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03019',$user,$server_ip,$session_name,$one_mysql_log);} $row=mysql_fetch_row($rslt); $Aagent_log_idCOUNT=$row[0]; @@ -270,12 +271,12 @@ echo " $stmt="UPDATE vicidial_agent_log set dead_epoch='$NEWdead_epoch' where agent_log_id='$Aagent_log_id';"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03XXX',$user,$server_ip,$session_name,$one_mysql_log);} + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03020',$user,$server_ip,$session_name,$one_mysql_log);} $stmt="UPDATE vicidial_live_agents set last_state_change='$deadNOW_TIME' where agent_log_id='$Aagent_log_id';"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03XXX',$user,$server_ip,$session_name,$one_mysql_log);} + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03021',$user,$server_ip,$session_name,$one_mysql_log);} } } ##### END DEAD logging section ##### @@ -349,15 +350,21 @@ echo " } ### grab the API hangup and API dispo fields in vicidial_live_agents - $stmt="SELECT external_hangup,external_status,external_pause,external_dial from vicidial_live_agents where user='$user' and server_ip='$server_ip';"; + $stmt="SELECT external_hangup,external_status,external_pause,external_dial,external_update_fields,external_update_fields_data,external_timer_action,external_timer_action_message,external_timer_action_seconds from vicidial_live_agents where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03010',$user,$server_ip,$session_name,$one_mysql_log);} $row=mysql_fetch_row($rslt); - $external_hangup = $row[0]; - $external_status = $row[1]; - $external_pause = $row[2]; - $external_dial = $row[3]; + $external_hangup = $row[0]; + $external_status = $row[1]; + $external_pause = $row[2]; + $external_dial = $row[3]; + $external_update_fields = $row[4]; + $external_update_fields_data = $row[5]; + $timer_action = $row[6]; + $timer_action_message = $row[7]; + $timer_action_seconds = $row[8]; + if (strlen($external_status)<1) {$external_status = '::::::::::';} $web_epoch = date("U"); @@ -376,7 +383,7 @@ echo " $manager_ingroup_set=0; $stmt="SELECT count(*) FROM vicidial_live_agents where user='$user' and manager_ingroup_set='SET';"; $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03022',$user,$server_ip,$session_name,$one_mysql_log);} if ($DB) {echo "$stmt\n";} $mis_record_ct = mysql_num_rows($rslt); if ($mis_record_ct > 0) @@ -389,13 +396,13 @@ echo " $stmt="UPDATE vicidial_live_agents SET closer_campaigns=external_ingroups, manager_ingroup_set='Y' where user='$user' and manager_ingroup_set='SET';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$VD_login,$server_ip,$session_name,$one_mysql_log);} + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03023',$VD_login,$server_ip,$session_name,$one_mysql_log);} $VLAMISaffected_rows_update = mysql_affected_rows($link); if ($VLAMISaffected_rows_update > 0) { $stmt="SELECT external_ingroups,external_blended,external_igb_set_user,outbound_autodial,dial_method FROM vicidial_live_agents vla, vicidial_campaigns vc where user='$user' and manager_ingroup_set='Y' and vla.campaign_id=vc.campaign_id;"; $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03024',$user,$server_ip,$session_name,$one_mysql_log);} if ($DB) {echo "$stmt\n";} $migs_record_ct = mysql_num_rows($rslt); if ($migs_record_ct > 0) @@ -409,7 +416,7 @@ echo " $stmt="SELECT full_name FROM vicidial_users where user='$external_igb_set_user';"; $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03025',$user,$server_ip,$session_name,$one_mysql_log);} if ($DB) {echo "$stmt\n";} $mign_record_ct = mysql_num_rows($rslt); if ($mign_record_ct > 0) @@ -425,7 +432,7 @@ echo " $stmt="UPDATE vicidial_live_agents SET outbound_autodial='$NEWoutbound_autodial' where user='$user';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$VD_login,$server_ip,$session_name,$one_mysql_log);} + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03026',$VD_login,$server_ip,$session_name,$one_mysql_log);} $VLAMIBaffected_rows_update = mysql_affected_rows($link); $InGroupChangeDetails = "1|$external_blended|$external_igb_set_user|$external_igb_set_name"; @@ -433,7 +440,7 @@ echo " $stmt="INSERT INTO vicidial_user_closer_log set user='$user',campaign_id='$Acampaign_id',event_date='$NOW_TIME',blended='$external_blended',closer_campaigns='$external_ingroups',manager_change='$external_igb_set_user';"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03027',$user,$server_ip,$session_name,$one_mysql_log);} } } } @@ -526,8 +533,16 @@ echo " if ($Ashift_logout > 0) {$Alogin='SHIFT_LOGOUT';} - echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Logged-in: ' . $Alogin . '|CampCalls: ' . $RingCalls . '|Status: ' . $Astatus . '|DiaLCalls: ' . $DiaLCalls . '|APIHanguP: ' . $external_hangup . '|APIStatuS: ' . $external_status . '|APIPausE: ' . $external_pause . '|APIDiaL: ' . $external_dial . '|DEADcall: ' . $DEADcustomer . '|InGroupChange: ' . $InGroupChangeDetails . "\n"; + echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Logged-in: ' . $Alogin . '|CampCalls: ' . $RingCalls . '|Status: ' . $Astatus . '|DiaLCalls: ' . $DiaLCalls . '|APIHanguP: ' . $external_hangup . '|APIStatuS: ' . $external_status . '|APIPausE: ' . $external_pause . '|APIDiaL: ' . $external_dial . '|DEADcall: ' . $DEADcustomer . '|InGroupChange: ' . $InGroupChangeDetails . '|APIFields: ' . $external_update_fields . '|APIFieldsData: ' . $external_update_fields_data . '|APITimerAction: ' . $timer_action . '|APITimerMessage: ' . $timer_action_message . '|APITimerSeconds: ' . $timer_action_seconds . "\n"; + if (strlen($timer_action) > 3) + { + $stmt="UPDATE vicidial_live_agents SET external_timer_action='' where user='$user';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03028',$VD_login,$server_ip,$session_name,$one_mysql_log);} + $VLAETAaffected_rows_update = mysql_affected_rows($link); + } } $total_conf=0; $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and extension = '$conf_exten';"; diff --git a/agc_2-X/trunk/www/agc/vdc_db_query.php b/agc_2-X/trunk/www/agc/vdc_db_query.php index 9d3fac86..d3c07e2a 100644 --- a/agc_2-X/trunk/www/agc/vdc_db_query.php +++ b/agc_2-X/trunk/www/agc/vdc_db_query.php @@ -13,7 +13,7 @@ # - $pass # optional variables: # - $format - ('text','debug') -# - $ACTION - ('regCLOSER','regTERRITORY','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','updateLEAD','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT','PauseCodeSubmit','LogiNCamPaigns','alt_phone_change','AlertControl','AGENTSview','CALLSINQUEUEview','CALLSINQUEUEgrab','DiaLableLeaDsCounT') +# - $ACTION - ('regCLOSER','regTERRITORY','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','updateLEAD','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT','PauseCodeSubmit','LogiNCamPaigns','alt_phone_change','AlertControl','AGENTSview','CALLSINQUEUEview','CALLSINQUEUEgrab','DiaLableLeaDsCounT','UpdateFields') # - $stage - ('start','finish','lookup','new') # - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -') # - $conf_exten - ('8600011',...) @@ -224,12 +224,13 @@ # 91123-1801 - Added outbound_autodial field # 91204-1937 - Added logging of agent grab calls # 91213-0946 - Added queue_position to queue_log COMPLETE... records +# 91228-1340 - Added API fields update functions # -$version = '2.2.0-133'; -$build = '91213-0946'; +$version = '2.2.0-134'; +$build = '91228-1340'; $mel=1; # Mysql Error Log enabled = 1 -$mysql_log_count=273; +$mysql_log_count=276; $one_mysql_log=0; require("dbconnect.php"); @@ -472,48 +473,48 @@ else $auth=$row[0]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) - { - echo "Invalid Username/Password: |$user|$pass|\n"; - exit; - } - else - { - if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) { - echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; + echo "Invalid Username/Password: |$user|$pass|\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); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00003',$user,$server_ip,$session_name,$one_mysql_log);} - $row=mysql_fetch_row($rslt); - $SNauth=$row[0]; - if($SNauth==0) + if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) { - echo "Invalid session_name: |$session_name|$server_ip|\n"; + echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n"; exit; } - else + else { - # do nothing for now + $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); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00003',$user,$server_ip,$session_name,$one_mysql_log);} + $row=mysql_fetch_row($rslt); + $SNauth=$row[0]; + if($SNauth==0) + { + echo "Invalid session_name: |$session_name|$server_ip|\n"; + exit; + } + else + { + # do nothing for now + } } } } -} if ($format=='debug') -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "VICIDiaL Database Query Script"; -echo "\n"; -echo "\n"; -echo "\n"; -} + { + echo "\n"; + echo "\n"; + echo "\n"; + echo "VICIDiaL Database Query Script"; + echo "\n"; + echo "\n"; + echo "\n"; + } @@ -875,7 +876,102 @@ if ($users_to_parse > 0) +################################################################################ +### UpdateFields - sends current vicidial_list values for fields +################################################################################ +if ($ACTION == 'UpdateFields') + { + $stmt="UPDATE vicidial_live_agents set external_update_fields='0',external_update_fields_data='' where user='$user';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00276',$user,$server_ip,$session_name,$one_mysql_log);} + $stmt="SELECT lead_id from vicidial_live_agents where user='$user';"; + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00274',$user,$server_ip,$session_name,$one_mysql_log);} + $vla_records = mysql_num_rows($rslt); + if ($vla_records > 0) + { + $rowx=mysql_fetch_row($rslt); + if ($rowx[0] > 0) {$lead_id = $rowx[0];} + ##### grab the data from vicidial_list for the lead_id + $stmt="SELECT vendor_lead_code,source_id,gmt_offset_now,phone_code,phone_number,title,first_name,middle_initial,last_name,address1,address2,address3,city,state,province,postal_code,country_code,gender,date_of_birth,alt_phone,email,security_phrase,comments,rank,owner FROM vicidial_list where lead_id='$lead_id' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00275',$user,$server_ip,$session_name,$one_mysql_log);} + if ($DB) {echo "$stmt\n";} + $list_lead_ct = mysql_num_rows($rslt); + if ($list_lead_ct > 0) + { + $row=mysql_fetch_row($rslt); + $vendor_id = trim("$row[0]"); + $source_id = trim("$row[1]"); + $gmt_offset_now = trim("$row[2]"); + $phone_code = trim("$row[3]"); + $phone_number = trim("$row[4]"); + $title = trim("$row[5]"); + $first_name = trim("$row[6]"); + $middle_initial = trim("$row[7]"); + $last_name = trim("$row[8]"); + $address1 = trim("$row[9]"); + $address2 = trim("$row[10]"); + $address3 = trim("$row[11]"); + $city = trim("$row[12]"); + $state = trim("$row[13]"); + $province = trim("$row[14]"); + $postal_code = trim("$row[15]"); + $country_code = trim("$row[16]"); + $gender = trim("$row[17]"); + $date_of_birth = trim("$row[18]"); + $alt_phone = trim("$row[19]"); + $email = trim("$row[20]"); + $security = trim("$row[21]"); + $comments = stripslashes(trim("$row[22]")); + $rank = trim("$row[23]"); + $owner = trim("$row[24]"); + + $comments = eregi_replace("\r",'',$comments); + $comments = eregi_replace("\n",'!N',$comments); + + $LeaD_InfO = "GOOD\n"; + $LeaD_InfO .= $vendor_id . "\n"; + $LeaD_InfO .= $source_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 .= $rank . "\n"; + $LeaD_InfO .= $owner . "\n"; + $LeaD_InfO .= "\n"; + + echo $LeaD_InfO; + } + else + { + echo "ERROR: no lead info in system: $lead_id\n"; + } + } + else + { + echo "ERROR: no lead active for this agent\n"; + } + } ################################################################################ @@ -889,15 +985,14 @@ if ($ACTION == 'manDiaLnextCaLL') $row=''; $rowx=''; $channel_live=1; if ( (strlen($conf_exten)<1) || (strlen($campaign)<1) || (strlen($ext_context)<1) ) - { - $channel_live=0; - echo "HOPPER EMPTY\n"; - echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context is not valid\n"; - exit; - } + { + $channel_live=0; + echo "HOPPER EMPTY\n"; + echo "Conf Exten $conf_exten or campaign $campaign or ext_context $ext_context is not valid\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); @@ -1602,7 +1697,7 @@ if ($ACTION == 'manDiaLnextCaLL') # 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|$MqueryCID|\n"); + fwrite ($fp, "$NOW_TIME|$campaign|$lead_id|$phone_number|$user|M|$MqueryCID||$province\n"); fclose($fp); } @@ -3716,7 +3811,7 @@ if ($ACTION == 'VDADcheckINCOMING') $script_recording_delay = $row[0]; } - $stmt = "select group_name,group_color,web_form_address,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_xfer_group,ingroup_recording_override,ingroup_rec_filename,default_group_alias,web_form_address_two from vicidial_inbound_groups where group_id='$VDADchannel_group';"; + $stmt = "select group_name,group_color,web_form_address,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_xfer_group,ingroup_recording_override,ingroup_rec_filename,default_group_alias,web_form_address_two,timer_action,timer_action_message,timer_action_seconds from vicidial_inbound_groups where group_id='$VDADchannel_group';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00119',$user,$server_ip,$session_name,$one_mysql_log);} @@ -3739,9 +3834,11 @@ if ($ACTION == 'VDADcheckINCOMING') $VDCL_ingroup_rec_filename = $row[12]; $VDCL_default_group_alias = $row[13]; $VDCL_group_web_two = stripslashes($row[14]); + $VDCL_timer_action = $row[15]; + $VDCL_timer_action_message = $row[16]; + $VDCL_timer_action_seconds = $row[17]; - - $stmt = "select campaign_script,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_group_alias from vicidial_campaigns where campaign_id='$campaign';"; + $stmt = "select campaign_script,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_group_alias,timer_action,timer_action_message,timer_action_seconds from vicidial_campaigns where campaign_id='$campaign';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00181',$user,$server_ip,$session_name,$one_mysql_log);} @@ -3759,6 +3856,12 @@ if ($ACTION == 'VDADcheckINCOMING') {$VDCL_xferconf_b_number = $row[4];} if (strlen($VDCL_default_group_alias) < 1) {$VDCL_default_group_alias = $row[5];} + if (strlen($VDCL_timer_action) < 1) + {$VDCL_timer_action = $row[6];} + if (strlen($VDCL_timer_action_message) < 1) + {$VDCL_timer_action_message = $row[7];} + if (strlen($VDCL_timer_action_seconds) < 1) + {$VDCL_timer_action_seconds = $row[8];} if ( ( (ereg('NONE',$VDCL_ingroup_script)) and (strlen($VDCL_ingroup_script) < 5) ) or (strlen($VDCL_ingroup_script) < 1) ) { $VDCL_ingroup_script = $row[0]; @@ -3812,7 +3915,7 @@ if ($ACTION == 'VDADcheckINCOMING') } else { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_group_alias from vicidial_campaigns where campaign_id='$VDADchannel_group';"; + $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_group_alias,timer_action,timer_action_message,timer_action_seconds from vicidial_campaigns where campaign_id='$VDADchannel_group';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00121',$user,$server_ip,$session_name,$one_mysql_log);} @@ -3820,13 +3923,16 @@ if ($ACTION == 'VDADcheckINCOMING') 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]; - $VDCL_default_group_alias = $row[6]; + $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]; + $VDCL_default_group_alias = $row[6]; + $VDCL_timer_action = $row[7]; + $VDCL_timer_action_message = $row[8]; + $VDCL_timer_action_seconds = $row[9]; } $script_recording_delay=0; @@ -3870,8 +3976,8 @@ if ($ACTION == 'VDADcheckINCOMING') } ### if web form is set then send on 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|$VDCL_ingroup_recording_override|$VDCL_ingroup_rec_filename|$VDCL_default_group_alias|$VDCL_caller_id_number|$VDCL_group_web_vars|$VDCL_group_web_two|\n";} - else {echo "X|$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|$VDCL_ingroup_recording_override|$VDCL_ingroup_rec_filename|$VDCL_default_group_alias|$VDCL_caller_id_number|$VDCL_group_web_vars|$VDCL_group_web_two|\n";} + 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|$VDCL_ingroup_recording_override|$VDCL_ingroup_rec_filename|$VDCL_default_group_alias|$VDCL_caller_id_number|$VDCL_group_web_vars|$VDCL_group_web_two|$VDCL_timer_action|$VDCL_timer_action_message|$VDCL_timer_action_seconds|\n";} + else {echo "X|$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|$VDCL_ingroup_recording_override|$VDCL_ingroup_rec_filename|$VDCL_default_group_alias|$VDCL_caller_id_number|$VDCL_group_web_vars|$VDCL_group_web_two|$VDCL_timer_action|$VDCL_timer_action_message|$VDCL_timer_action_seconds|\n";} $stmt = "SELECT full_name from vicidial_users where user='$tsr';"; if ($DB) {echo "$stmt\n";} @@ -4007,7 +4113,7 @@ if ($ACTION == 'VDADcheckINCOMING') # 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|$callerid|$uniqueid\n"); + fwrite ($fp, "$NOW_TIME|$campaign|$lead_id|$phone_number|$user|$Ctype|$callerid|$uniqueid|$province\n"); fclose($fp); } @@ -4232,7 +4338,7 @@ if ($ACTION == 'updateDISPO') else { ### reset the API fields in vicidial_live_agents record - $stmt = "UPDATE vicidial_live_agents set lead_id=0,external_hangup=0,external_status='',last_state_change='$NOW_TIME' where user='$user' and server_ip='$server_ip';"; + $stmt = "UPDATE vicidial_live_agents set lead_id=0,external_hangup=0,external_status='',external_update_fields='0',external_update_fields_data='',external_launch_action_timer='-1',last_state_change='$NOW_TIME' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); if ($mel > 0) {$errno = mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00141',$user,$server_ip,$session_name,$one_mysql_log);} diff --git a/agc_2-X/trunk/www/agc/vicidial.php b/agc_2-X/trunk/www/agc/vicidial.php index 636f62eb..385e7898 100644 --- a/agc_2-X/trunk/www/agc/vicidial.php +++ b/agc_2-X/trunk/www/agc/vicidial.php @@ -266,10 +266,11 @@ # 91206-2020 - Fixed vicidial_agent_log logging bug on logout when not paused # 91211-1412 - Added User custom variables and CRM login popup # 91219-0657 - Set pause code automatically on ReQueue and INBOUND_MAN Dial-Next-Number +# 91228-1339 - Added API "fields update" functions and "timer action" functions # -$version = '2.2.0-244'; -$build = '91219-0657'; +$version = '2.2.0-245'; +$build = '91228-1339'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=64; $one_mysql_log=0; @@ -1098,7 +1099,7 @@ $VDloginDISPLAY=0; $HKstatusnames = substr("$HKstatusnames", 0, -1); ##### grab the 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,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,use_campaign_dnc,three_way_call_cid,dial_method,three_way_dial_prefix,web_form_target,vtiger_screen_login,agent_allow_group_alias,default_group_alias,quick_transfer_button,prepopulate_transfer_preset,view_calls_in_queue,view_calls_in_queue_launch,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,agent_select_territories,crm_popup_login,crm_login_address FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; + $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,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,use_campaign_dnc,three_way_call_cid,dial_method,three_way_dial_prefix,web_form_target,vtiger_screen_login,agent_allow_group_alias,default_group_alias,quick_transfer_button,prepopulate_transfer_preset,view_calls_in_queue,view_calls_in_queue_launch,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01013',$VD_login,$server_ip,$session_name,$one_mysql_log);} if ($DB) {echo "$stmt\n";} @@ -1161,6 +1162,9 @@ $VDloginDISPLAY=0; $agent_select_territories = $row[55]; $crm_popup_login = $row[56]; $crm_login_address = $row[57]; + $timer_action = $row[58]; + $timer_action_message = $row[59]; + $timer_action_seconds = $row[60]; if ($user_territories_active < 1) {$agent_select_territories = 0;} @@ -2626,6 +2630,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var VU_custom_five = ''; var crm_popup_login = ''; var crm_login_address = ''; + var update_fields=0; + var update_fields_data=''; + var campaign_timer_action = ''; + var campaign_timer_action_message = ''; + var campaign_timer_action_seconds = ''; + var timer_action=''; + var timer_action_message=''; + var timer_action_seconds=''; var DiaLControl_auto_HTML = "\"\"Resume\""; var DiaLControl_auto_HTML_ready = "\"\"Resume\""; var DiaLControl_auto_HTML_OFF = "\"\"Resume\""; @@ -3279,6 +3291,24 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var InGroupChangeBlend = check_time_array[12]; var InGroupChangeUser = check_time_array[13]; var InGroupChangeName = check_time_array[14]; + var APIFields_array = check_time_array[15].split("APIFields: "); + update_fields = APIFields_array[1]; + var APIFieldsData_array = check_time_array[16].split("APIFieldsData: "); + update_fields_data = APIFieldsData_array[1]; + var APITimerAction_array = check_time_array[17].split("APITimerAction: "); + api_timer_action = APITimerAction_array[1]; + var APITimerMessage_array = check_time_array[18].split("APITimerMessage: "); + api_timer_action_message = APITimerMessage_array[1]; + var APITimerSeconds_array = check_time_array[19].split("APITimerSeconds: "); + api_timer_action_seconds = APITimerSeconds_array[1]; + + if (api_timer_action.length > 2) + { + timer_action = api_timer_action; + timer_action_message = api_timer_action_message; + timer_action_seconds = api_timer_action_seconds; + } + if ( (APIHanguP==1) && (VD_live_customer_call==1) ) { hideDiv('CustomerGoneBox'); @@ -4591,6 +4621,346 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } +// ################################################################################ +// Update Agent screen with values from vicidial_list record + function UpdateFieldsData() + { + var fields_list = update_fields_data + ','; + update_fields=0; + update_fields_data=''; + var xmlhttp=false; + /*@cc_on @*/ + /*@if (@_jscript_version >= 5) + // JScript gives us Conditional compilation, we can cope with old IE versions. + // and security blocked creation of the objects. + try { + xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); + } catch (e) { + try { + xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); + } catch (E) { + xmlhttp = false; + } + } + @end @*/ + if (!xmlhttp && typeof XMLHttpRequest!='undefined') + { + xmlhttp = new XMLHttpRequest(); + } + if (xmlhttp) + { + UpdateFields_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=UpdateFields&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&stage=" + update_fields_data; + // alert(manual_dial_filter + "\n" +manDiaLnext_query); + xmlhttp.open('POST', 'vdc_db_query.php'); + xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); + xmlhttp.send(UpdateFields_query); + xmlhttp.onreadystatechange = function() + { + if (xmlhttp.readyState == 4 && xmlhttp.status == 200) + { + var UDfieldsResponse = null; + // alert(UpdateFields_query); + // alert(xmlhttp.responseText); + UDfieldsResponse = xmlhttp.responseText; + + var UDfieldsResponse_array=UDfieldsResponse.split("\n"); + + var UDresponse_status = UDfieldsResponse_array[0]; + if (UDresponse_status == 'GOOD') + { + var regUDvendor_lead_code = new RegExp("vendor_lead_code,","ig"); + if (fields_list.match(regUDvendor_lead_code)) + {document.vicidial_form.vendor_lead_code.value = UDfieldsResponse_array[1];} + var regUDsource_id = new RegExp("source_id,","ig"); + if (fields_list.match(regUDsource_id)) + {source_id = UDfieldsResponse_array[2];} + var regUDgmt_offset_now = new RegExp("gmt_offset_now,","ig"); + if (fields_list.match(regUDgmt_offset_now)) + {document.vicidial_form.gmt_offset_now.value = UDfieldsResponse_array[3];} + var regUDphone_code = new RegExp("phone_code,","ig"); + if (fields_list.match(regUDphone_code)) + {document.vicidial_form.phone_code.value = UDfieldsResponse_array[4];} + var regUDphone_number = new RegExp("phone_number,","ig"); + if (fields_list.match(regUDphone_number)) + { + if ( (disable_alter_custphone=='Y') || (disable_alter_custphone=='HIDE') ) + { + var tmp_pn = document.getElementById("phone_numberDISP"); + if (disable_alter_custphone=='Y') + { + tmp_pn.innerHTML = UDfieldsResponse_array[5]; + } + } + document.vicidial_form.phone_number.value = UDfieldsResponse_array[5]; + } + var regUDtitle = new RegExp("title,","ig"); + if (fields_list.match(regUDtitle)) + {document.vicidial_form.title.value = UDfieldsResponse_array[6];} + var regUDfirst_name = new RegExp("first_name,","ig"); + if (fields_list.match(regUDfirst_name)) + {document.vicidial_form.first_name.value = UDfieldsResponse_array[7];} + var regUDmiddle_initial = new RegExp("middle_initial,","ig"); + if (fields_list.match(regUDmiddle_initial)) + {document.vicidial_form.middle_initial.value = UDfieldsResponse_array[8];} + var regUDlast_name = new RegExp("last_name,","ig"); + if (fields_list.match(regUDlast_name)) + {document.vicidial_form.last_name.value = UDfieldsResponse_array[9];} + var regUDaddress1 = new RegExp("address1,","ig"); + if (fields_list.match(regUDaddress1)) + {document.vicidial_form.address1.value = UDfieldsResponse_array[10];} + var regUDaddress2 = new RegExp("address2,","ig"); + if (fields_list.match(regUDaddress2)) + {document.vicidial_form.address2.value = UDfieldsResponse_array[11];} + var regUDaddress3 = new RegExp("address3,","ig"); + if (fields_list.match(regUDaddress3)) + {document.vicidial_form.address3.value = UDfieldsResponse_array[12];} + var regUDcity = new RegExp("city,","ig"); + if (fields_list.match(regUDcity)) + {document.vicidial_form.city.value = UDfieldsResponse_array[13];} + var regUDstate = new RegExp("state,","ig"); + if (fields_list.match(regUDstate)) + {document.vicidial_form.state.value = UDfieldsResponse_array[14];} + var regUDprovince = new RegExp("province,","ig"); + if (fields_list.match(regUDprovince)) + {document.vicidial_form.province.value = UDfieldsResponse_array[15];} + var regUDpostal_code = new RegExp("postal_code,","ig"); + if (fields_list.match(regUDpostal_code)) + {document.vicidial_form.postal_code.value = UDfieldsResponse_array[16];} + var regUDcountry_code = new RegExp("country_code,","ig"); + if (fields_list.match(regUDcountry_code)) + {document.vicidial_form.country_code.value = UDfieldsResponse_array[17];} + var regUDgender = new RegExp("gender,","ig"); + if (fields_list.match(regUDgender)) + { + document.vicidial_form.gender.value = UDfieldsResponse_array[18]; + var gIndex = 0; + if (document.vicidial_form.gender.value == 'M') {var gIndex = 1;} + if (document.vicidial_form.gender.value == 'F') {var gIndex = 2;} + document.getElementById("gender_list").selectedIndex = gIndex; + var genderIndex = document.getElementById("gender_list").selectedIndex; + var genderValue = document.getElementById('gender_list').options[genderIndex].value; + document.vicidial_form.gender.value = genderValue; + } + var regUDdate_of_birth = new RegExp("date_of_birth,","ig"); + if (fields_list.match(regUDdate_of_birth)) + {document.vicidial_form.date_of_birth.value = UDfieldsResponse_array[19];} + var regUDalt_phone = new RegExp("alt_phone,","ig"); + if (fields_list.match(regUDalt_phone)) + {document.vicidial_form.alt_phone.value = UDfieldsResponse_array[20];} + var regUDemail = new RegExp("email,","ig"); + if (fields_list.match(regUDemail)) + {document.vicidial_form.email.value = UDfieldsResponse_array[21];} + var regUDsecurity_phrase = new RegExp("security_phrase,","ig"); + if (fields_list.match(regUDsecurity_phrase)) + {document.vicidial_form.security_phrase.value = UDfieldsResponse_array[22];} + var regUDcomments = new RegExp("comments,","ig"); + if (fields_list.match(regUDcomments)) + { + var REGcommentsNL = new RegExp("!N","g"); + UDfieldsResponse_array[23] = UDfieldsResponse_array[23].replace(REGcommentsNL, "\n"); + document.vicidial_form.comments.value = UDfieldsResponse_array[23]; + } + var regUDrank = new RegExp("rank,","ig"); + if (fields_list.match(regUDrank)) + {document.vicidial_form.rank.value = UDfieldsResponse_array[24];} + var regUDowner = new RegExp("owner,","ig"); + if (fields_list.match(regUDowner)) + {document.vicidial_form.owner.value = UDfieldsResponse_array[25];} + + + var regWFAcustom = new RegExp("^VAR","ig"); + if (VDIC_web_form_address.match(regWFAcustom)) + { + URLDecode(VDIC_web_form_address,'YES'); + TEMP_VDIC_web_form_address = decoded; + TEMP_VDIC_web_form_address = TEMP_VDIC_web_form_address.replace(regWFAcustom, ''); + } + else + { + web_form_vars = + "lead_id=" + document.vicidial_form.lead_id.value + + "&vendor_id=" + document.vicidial_form.vendor_lead_code.value + + "&list_id=" + document.vicidial_form.list_id.value + + "&gmt_offset_now=" + document.vicidial_form.gmt_offset_now.value + + "&phone_code=" + document.vicidial_form.phone_code.value + + "&phone_number=" + document.vicidial_form.phone_number.value + + "&title=" + document.vicidial_form.title.value + + "&first_name=" + document.vicidial_form.first_name.value + + "&middle_initial=" + document.vicidial_form.middle_initial.value + + "&last_name=" + document.vicidial_form.last_name.value + + "&address1=" + document.vicidial_form.address1.value + + "&address2=" + document.vicidial_form.address2.value + + "&address3=" + document.vicidial_form.address3.value + + "&city=" + document.vicidial_form.city.value + + "&state=" + document.vicidial_form.state.value + + "&province=" + document.vicidial_form.province.value + + "&postal_code=" + document.vicidial_form.postal_code.value + + "&country_code=" + document.vicidial_form.country_code.value + + "&gender=" + document.vicidial_form.gender.value + + "&date_of_birth=" + document.vicidial_form.date_of_birth.value + + "&alt_phone=" + document.vicidial_form.alt_phone.value + + "&email=" + document.vicidial_form.email.value + + "&security_phrase=" + document.vicidial_form.security_phrase.value + + "&comments=" + document.vicidial_form.comments.value + + "&user=" + user + + "&pass=" + pass + + "&campaign=" + campaign + + "&phone_login=" + phone_login + + "&original_phone_login=" + original_phone_login + + "&phone_pass=" + phone_pass + + "&fronter=" + fronter + + "&closer=" + user + + "&group=" + group + + "&channel_group=" + group + + "&SQLdate=" + SQLdate + + "&epoch=" + UnixTime + + "&uniqueid=" + document.vicidial_form.uniqueid.value + + "&customer_zap_channel=" + lastcustchannel + + "&customer_server_ip=" + lastcustserverip + + "&server_ip=" + server_ip + + "&SIPexten=" + extension + + "&session_id=" + session_id + + "&phone=" + document.vicidial_form.phone_number.value + + "&parked_by=" + document.vicidial_form.lead_id.value + + "&dispo=" + LeaDDispO + '' + + "&dialed_number=" + dialed_number + '' + + "&dialed_label=" + dialed_label + '' + + "&source_id=" + source_id + '' + + "&rank=" + document.vicidial_form.rank.value + '' + + "&owner=" + document.vicidial_form.owner.value + '' + + "&camp_script=" + campaign_script + '' + + "&in_script=" + CalL_ScripT_id + '' + + "&script_width=" + script_width + '' + + "&script_height=" + script_height + '' + + "&fullname=" + LOGfullname + '' + + "&recording_filename=" + recording_filename + '' + + "&recording_id=" + recording_id + '' + + "&user_custom_one=" + VU_custom_one + '' + + "&user_custom_two=" + VU_custom_two + '' + + "&user_custom_three=" + VU_custom_three + '' + + "&user_custom_four=" + VU_custom_four + '' + + "&user_custom_five=" + VU_custom_five + '' + + webform_session; + + var regWFspace = new RegExp(" ","ig"); + web_form_vars = web_form_vars.replace(regWF, ''); + var regWF = new RegExp("\\`|\\~|\\:|\\;|\\#|\\'|\\\"|\\{|\\}|\\(|\\)|\\*|\\^|\\%|\\$|\\!|\\%|\\r|\\t|\\n","ig"); + web_form_vars = web_form_vars.replace(regWFspace, '+'); + web_form_vars = web_form_vars.replace(regWF, ''); + + var regWFAvars = new RegExp("\\?","ig"); + if (VDIC_web_form_address.match(regWFAvars)) + {web_form_vars = '&' + web_form_vars} + else + {web_form_vars = '?' + web_form_vars} + + TEMP_VDIC_web_form_address = VDIC_web_form_address + "" + web_form_vars; + } + + if (VDIC_web_form_address_two.match(regWFAcustom)) + { + URLDecode(VDIC_web_form_address_two,'YES'); + TEMP_VDIC_web_form_address_two = decoded; + TEMP_VDIC_web_form_address_two = TEMP_VDIC_web_form_address_two.replace(regWFAcustom, ''); + } + else + { + web_form_vars_two = + "lead_id=" + document.vicidial_form.lead_id.value + + "&vendor_id=" + document.vicidial_form.vendor_lead_code.value + + "&list_id=" + document.vicidial_form.list_id.value + + "&gmt_offset_now=" + document.vicidial_form.gmt_offset_now.value + + "&phone_code=" + document.vicidial_form.phone_code.value + + "&phone_number=" + document.vicidial_form.phone_number.value + + "&title=" + document.vicidial_form.title.value + + "&first_name=" + document.vicidial_form.first_name.value + + "&middle_initial=" + document.vicidial_form.middle_initial.value + + "&last_name=" + document.vicidial_form.last_name.value + + "&address1=" + document.vicidial_form.address1.value + + "&address2=" + document.vicidial_form.address2.value + + "&address3=" + document.vicidial_form.address3.value + + "&city=" + document.vicidial_form.city.value + + "&state=" + document.vicidial_form.state.value + + "&province=" + document.vicidial_form.province.value + + "&postal_code=" + document.vicidial_form.postal_code.value + + "&country_code=" + document.vicidial_form.country_code.value + + "&gender=" + document.vicidial_form.gender.value + + "&date_of_birth=" + document.vicidial_form.date_of_birth.value + + "&alt_phone=" + document.vicidial_form.alt_phone.value + + "&email=" + document.vicidial_form.email.value + + "&security_phrase=" + document.vicidial_form.security_phrase.value + + "&comments=" + document.vicidial_form.comments.value + + "&user=" + user + + "&pass=" + pass + + "&campaign=" + campaign + + "&phone_login=" + phone_login + + "&original_phone_login=" + original_phone_login + + "&phone_pass=" + phone_pass + + "&fronter=" + fronter + + "&closer=" + user + + "&group=" + group + + "&channel_group=" + group + + "&SQLdate=" + SQLdate + + "&epoch=" + UnixTime + + "&uniqueid=" + document.vicidial_form.uniqueid.value + + "&customer_zap_channel=" + lastcustchannel + + "&customer_server_ip=" + lastcustserverip + + "&server_ip=" + server_ip + + "&SIPexten=" + extension + + "&session_id=" + session_id + + "&phone=" + document.vicidial_form.phone_number.value + + "&parked_by=" + document.vicidial_form.lead_id.value + + "&dispo=" + LeaDDispO + '' + + "&dialed_number=" + dialed_number + '' + + "&dialed_label=" + dialed_label + '' + + "&source_id=" + source_id + '' + + "&rank=" + document.vicidial_form.rank.value + '' + + "&owner=" + document.vicidial_form.owner.value + '' + + "&camp_script=" + campaign_script + '' + + "&in_script=" + CalL_ScripT_id + '' + + "&script_width=" + script_width + '' + + "&script_height=" + script_height + '' + + "&fullname=" + LOGfullname + '' + + "&recording_filename=" + recording_filename + '' + + "&recording_id=" + recording_id + '' + + "&user_custom_one=" + VU_custom_one + '' + + "&user_custom_two=" + VU_custom_two + '' + + "&user_custom_three=" + VU_custom_three + '' + + "&user_custom_four=" + VU_custom_four + '' + + "&user_custom_five=" + VU_custom_five + '' + + webform_session; + + var regWFspace = new RegExp(" ","ig"); + web_form_vars_two = web_form_vars_two.replace(regWF, ''); + var regWF = new RegExp("\\`|\\~|\\:|\\;|\\#|\\'|\\\"|\\{|\\}|\\(|\\)|\\*|\\^|\\%|\\$|\\!|\\%|\\r|\\t|\\n","ig"); + web_form_vars_two = web_form_vars_two.replace(regWFspace, '+'); + web_form_vars_two = web_form_vars_two.replace(regWF, ''); + + var regWFAvars = new RegExp("\\?","ig"); + if (VDIC_web_form_address_two.match(regWFAvars)) + {web_form_vars_two = '&' + web_form_vars_two} + else + {web_form_vars_two = '?' + web_form_vars_two} + + TEMP_VDIC_web_form_address_two = VDIC_web_form_address_two + "" + web_form_vars_two; + } + + document.getElementById("WebFormSpan").innerHTML = "\"Web\n"; + if (enable_second_webform > 0) + { + document.getElementById("WebFormSpanTwo").innerHTML = "\"Web\n"; + } + } + else + { + alert("Update Fields Error!: " + xmlhttp.responseText); + } + } + } + } + } + + // ################################################################################ // Send the Manual Dial Next Number request function ManualDialNext(mdnCBid,mdnBDleadid,mdnDiaLCodE,mdnPhonENumbeR,mdnStagE,mdVendorid,mdgroupalias) @@ -4766,6 +5136,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // CalL_ScripT_id = MDnextResponse_array[37]; script_recording_delay = MDnextResponse_array[38]; + timer_action = campaign_timer_action; + timer_action_message = campaign_timer_action_message; + timer_action_seconds = campaign_timer_action_seconds; lead_dial_number = document.vicidial_form.phone_number.value; var dispnum = document.vicidial_form.phone_number.value; @@ -5908,6 +6281,22 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.rank.value = check_VDIC_array[44]; document.vicidial_form.owner.value = check_VDIC_array[45]; script_recording_delay = check_VDIC_array[46]; + var call_timer_action = check_VDIC_array[47]; + + if ( (call_timer_action == 'NONE') || (call_timer_action.length < 2) ) + { + timer_action = campaign_timer_action; + timer_action_message = campaign_timer_action_message; + timer_action_seconds = campaign_timer_action_seconds; + } + else + { + var call_timer_action_message = check_VDIC_array[48]; + var call_timer_action_seconds = check_VDIC_array[49]; + timer_action = call_timer_action; + timer_action_message = call_timer_action_message; + timer_action_seconds = call_timer_action_seconds; + } var gIndex = 0; if (document.vicidial_form.gender.value == 'M') {var gIndex = 1;} @@ -8967,6 +9356,43 @@ else } +// ################################################################################ +// Finish the wrapup timer early + function TimerActionRun() + { + if ( (timer_action_message.length > 0) || (timer_action == 'MESSAGE_ONLY') ) + { + document.getElementById("TimerContentSpan").innerHTML = "TIMER NOTIFICATION: " + timer_action_seconds + " seconds

    " + timer_action_message + "
    "; + + showDiv('TimerSpan'); + } + + if (timer_action == 'WEBFORM') + { + WebFormRefresH('NO','YES'); + window.open(TEMP_VDIC_web_form_address, web_form_target, 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=450'); + } + + if (timer_action == 'WEBFORM2') + { + WebFormTwoRefresH('NO','YES'); + window.open(TEMP_VDIC_web_form_address_two, web_form_target, 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=450'); + } + + if (timer_action == 'D1_DIAL') + { + DtMf_PreSet_a_DiaL(); + } + + if (timer_action == 'D2_DIAL') + { + DtMf_PreSet_b_DiaL(); + } + + timer_action = 'NONE'; + } + + // ################################################################################ // Finish the wrapup timer early function WrapupFinish() @@ -9014,6 +9440,7 @@ else hideDiv('GroupAliasSelectBox'); hideDiv('AgentViewSpan'); hideDiv('AgentXferViewSpan'); + hideDiv('TimerSpan'); if (view_calls_in_queue_launch != '1') {hideDiv('callsinqueuedisplay');} if (agentonly_callbacks != '1') @@ -9216,6 +9643,14 @@ else XD_live_call_secondS++; document.vicidial_form.xferlength.value = XD_live_call_secondS; } + if ( (update_fields > 0) && (update_fields_data.length > 2) ) + { + UpdateFieldsData(); + } + if ( (timer_action != 'NONE') && (timer_action.length > 3) && (timer_action_seconds <= VD_live_call_secondS) ) + { + TimerActionRun(); + } if (HKdispo_display > 0) { if ( (HKdispo_display == 3) && (HKfinish==1) ) @@ -9850,7 +10285,7 @@ echo "\n";

     
    - + height=460>
    CALLBACKS FOR AGENT :
    Click on a callback below to call the customer back now. If you click on a record below to call it, it will be removed from the list.
    @@ -9861,7 +10296,7 @@ echo "\n";
    - + height=460>
    NEW MANUAL DIAL LEAD FOR :

    Enter information below for the new lead you wish to call.
    0) Go Back

    Finish and Disposition Call -
    @@ -10114,37 +10548,43 @@ if ($agent_display_dialable_leads > 0)

    Finish Wrapup and Move On -
    - + +
    +


    + Close Message +
    +
    + + height=500>
    Your session has been disabled
    LOGOUT

    Go Back
    - + height=500>
    There is a time synchronization problem with your system, please tell your system administrator


    Go Back
    - + height=500>

    LOGOUT
    - +
    - +
     
    - + height=47>
    Any changes made to the customer information below at this time will not be comitted, You must change customer information before you Hangup the call.
    - + height=460>
    DISPOSITION CALL :       Hangup Again       minimize
    End-of-call Disposition Selection
    @@ -10157,7 +10597,7 @@ if ($agent_display_dialable_leads > 0)
    - + height=460>
    SELECT A PAUSE CODE :
    Pause Code Selection @@ -10165,7 +10605,7 @@ if ($agent_display_dialable_leads > 0)
    - + height=460>
    SELECT A GROUP ALIAS :
    Group Alias Selection @@ -10173,10 +10613,10 @@ if ($agent_display_dialable_leads > 0)
    - + - + height=460>
    Select a CallBack Date :
    @@ -10229,7 +10669,7 @@ if ($agent_display_dialable_leads > 0)
    - + height=460>
    CLOSER INBOUND GROUP SELECTION
    Closer Inbound Group Selection
    @@ -10247,7 +10687,7 @@ if ($agent_display_dialable_leads > 0)
    - + height=460>
    TERRITORY SELECTION
    Territory Selection
    @@ -10257,7 +10697,7 @@ if ($agent_display_dialable_leads > 0)
    - + Channel Channel @@ -10302,7 +10742,7 @@ else - + diff --git a/agc_2-X/trunk/www/vicidial/admin.php b/agc_2-X/trunk/www/vicidial/admin.php index c129dff5..5d627f2e 100644 --- a/agc_2-X/trunk/www/vicidial/admin.php +++ b/agc_2-X/trunk/www/vicidial/admin.php @@ -1149,7 +1149,12 @@ if (isset($_GET["crm_popup_login"])) {$crm_popup_login=$_GET["crm_popup_login" elseif (isset($_POST["crm_popup_login"])) {$crm_popup_login=$_POST["crm_popup_login"];} if (isset($_GET["crm_login_address"])) {$crm_login_address=$_GET["crm_login_address"];} elseif (isset($_POST["crm_login_address"])) {$crm_login_address=$_POST["crm_login_address"];} - +if (isset($_GET["timer_action"])) {$timer_action=$_GET["timer_action"];} + elseif (isset($_POST["timer_action"])) {$timer_action=$_POST["timer_action"];} +if (isset($_GET["timer_action_message"])) {$timer_action_message=$_GET["timer_action_message"];} + elseif (isset($_POST["timer_action_message"])) {$timer_action_message=$_POST["timer_action_message"];} +if (isset($_GET["timer_action_seconds"])) {$timer_action_seconds=$_GET["timer_action_seconds"];} + elseif (isset($_POST["timer_action_seconds"])) {$timer_action_seconds=$_POST["timer_action_seconds"];} if (isset($script_id)) {$script_id= strtoupper($script_id);} if (isset($lead_filter_id)) {$lead_filter_id = strtoupper($lead_filter_id);} @@ -1349,6 +1354,7 @@ if ($non_latin < 1) $enable_second_webform = ereg_replace("[^0-9]","",$enable_second_webform); $campaign_cid_override = ereg_replace("[^0-9]","",$campaign_cid_override); $agent_choose_territories = ereg_replace("[^0-9]","",$agent_choose_territories); + $timer_action_seconds = ereg_replace("[^0-9]","",$timer_action_seconds); $drop_call_seconds = ereg_replace("[^-0-9]","",$drop_call_seconds); @@ -1610,6 +1616,7 @@ if ($non_latin < 1) $reset_time = ereg_replace("[^-_0-9a-zA-Z]","",$reset_time); $moh_id = ereg_replace("[^-_0-9a-zA-Z]","",$moh_id); $drop_inbound_group_override = ereg_replace("[^-_0-9a-zA-Z]","",$drop_inbound_group_override); + $timer_action = ereg_replace("[^-_0-9a-zA-Z]","",$timer_action); ### ALPHA-NUMERIC and underscore and dash and slash and dot $menu_prompt = ereg_replace("[^-\/\|\._0-9a-zA-Z]","",$menu_prompt); @@ -1686,6 +1693,7 @@ if ($non_latin < 1) $territory = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$territory); $tts_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$tts_name); $moh_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$moh_name); + $timer_action_message = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$timer_action_message); ### ALPHA-NUMERIC and underscore and dash and slash and at and dot $call_out_number_group = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$call_out_number_group); @@ -2017,11 +2025,12 @@ else # 91211-1359 - Added custom user fields and campaign CRM login fields # 91219-0719 - Changed some field backgrounds in the Campaign Modification screens # 91223-1031 - Added VIDPROMPT options for in-group routing in DIDs +# 91228-1837 - Added timer action settings to in-groups and campaigns # # 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.2.0-230'; -$build = '91223-1031'; +$admin_version = '2.2.0-231'; +$build = '91228-1837'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -3792,6 +3801,21 @@ if ($ADD==99999)
    PrePopulate Transfer Preset - This option will fill in the Number to Dial field in the Transfer Conference frame of the agent screen if defined. Default is N for disabled. +
    + +
    + Timer Action - This feature allows you to trigger actions after a certain amount of time. the D1 and D2 DIAL options will launch a call to the Transfer Conference Number presets and send them to the agent session, this is usually used for simple IVR validation AGI applications or just to play a pre-recorded message. WEBFORM will open the web form address. MESSAGE_ONLY will simply display the message that is in the field below. NONE will disable this feature and is the default. + +
    +
    +
    + Timer Action Message - This is the message that appears on the agent screen at the time the Timer Action is triggered. + +
    +
    +
    + Timer Action Seconds - This is the amount of time after the call is connected to the customer that the Timer Action is triggered. Default is -1 which is also inactive. +

    @@ -3912,7 +3936,7 @@ if ($ADD==99999)

    - Vtiger Search Category - If Vtiger integration is enabled in the system settings then this setting will define where the vtiger_search.php page will search for the phone number that was entered. There are 4 options that can be used in this field: LEAD- This option will search through the Vtiger leads only, ACCOUNT- This option will search through the Vtiger accounts and all contacts and sub-contacts for the phone number, VENDOR- This option will only search through the Vtiger vendors, ACCTID- This option works only for accounts and it will take the vicidial vendor_lead_code field and try to search for the Vtiger account ID. If unsuccessful it will try any other methods listed that you have selected. Multiple options can be used for each search, but on large databases this is not recommended. Default is LEAD. + Vtiger Search Category - If Vtiger integration is enabled in the system settings then this setting will define where the vtiger_search.php page will search for the phone number that was entered. There are 4 options that can be used in this field: LEAD- This option will search through the Vtiger leads only, ACCOUNT- This option will search through the Vtiger accounts and all contacts and sub-contacts for the phone number, VENDOR- This option will only search through the Vtiger vendors, ACCTID- This option works only for accounts and it will take the vicidial vendor_lead_code field and try to search for the Vtiger account ID. If unsuccessful it will try any other methods listed that you have selected. Multiple options can be used for each search, but on large databases this is not recommended. Default is LEAD. UNIFIED_CONTACT- This option will use the beta Vtiger 5.1.0 feature to search by phone number and bring up a search page in Vtiger.
    @@ -4128,6 +4152,21 @@ if ($ADD==99999)
    Xfer-Conf DTMF - These four fields allow for you to have two sets of Transfer Conference and DTMF presets. When the call or campaign is loaded, the vicidial.php script will show two buttons on the transfer-conference frame and auto-populate the number-to-dial and the send-dtmf fields when pressed. If you want to allow Consultative Transfers, a fronter to a closer, you can place CXFER as one of the number-to-dial presets and the proper dial string will be sent to do a Local Consultative Transfer, then the agent can just LEAVE-3WAY-CALL and move on to their next call. If you want to allow Blind transfers of customers to a VICIDIAL AGI script for logging or an IVR, then place AXFER in the number-to-dial field. You can also specify an custom extension after the AXFER or CXFER, for instance if you want to do Internal Consultative transfers instead of Local you would put CXFER90009 in the number-to-dial field. +
    +
    +
    + Timer Action - This feature allows you to trigger actions after a certain amount of time. the D1 and D2 DIAL options will launch a call to the Transfer Conference Number presets and send them to the agent session, this is usually used for simple IVR validation AGI applications or just to play a pre-recorded message. WEBFORM will open the web form address. MESSAGE_ONLY will simply display the message that is in the field below. NONE will disable this feature and is the default. This setting will override the Campaign settings. + +
    +
    +
    + Timer Action Message - This is the message that appears on the agent screen at the time the Timer Action is triggered. + +
    +
    +
    + Timer Action Seconds - This is the amount of time after the call is connected to the customer that the Timer Action is triggered. Default is -1 which is also inactive. +

    @@ -4435,7 +4474,7 @@ if ($ADD==99999)

    - In-Group Call Handle Method - If IN_GROUP is selected as the DID Route, then this is the call handling method used for these calls. CID will add a new lead record with every call using the CallerID as the phone number, CIDLOOKUP will attempt to lookup the phone number by the CallerID in the entire system, CIDLOOKUPRL will attampt to lookup the phone number by the CallerID in only one specified list, CIDLOOKUPRC will attampt to lookup the phone number by the CallerID in all of the lists that belong to the specified campaign, CLOSER is specified for VICIDIAL Closer calls, ANI will add a new lead record with every call using the ANI as the phone number, ANILOOKUP will attempt to lookup the phone number by the ANI in the entire system, ANILOOKUPRL will attampt to lookup the phone number by the ANI in only one specified list, XDIGITID will prompt the caller for an X digit code before the call will be put into the queue. Default is CID. VIDPROMPT will prompt the caller for their ID number and will create a new lead record with the CallerID as the phone number and the ID as the Vendor ID, VIDPROMPTLOOKUP will attempt to lookup the ID in the entire system, VIDPROMPTLOOKUPRL will attampt to lookup the vendor ID by the ID in only one specified list, VIDPROMPTLOOKUPRC will attampt to lookup the vendor ID by the ID in all of the lists that belong to the specified campaign. + In-Group Call Handle Method - If IN_GROUP is selected as the DID Route, then this is the call handling method used for these calls. CID will add a new lead record with every call using the CallerID as the phone number, CIDLOOKUP will attempt to lookup the phone number by the CallerID in the entire system, CIDLOOKUPRL will attempt to lookup the phone number by the CallerID in only one specified list, CIDLOOKUPRC will attempt to lookup the phone number by the CallerID in all of the lists that belong to the specified campaign, CLOSER is specified for VICIDIAL Closer calls, ANI will add a new lead record with every call using the ANI as the phone number, ANILOOKUP will attempt to lookup the phone number by the ANI in the entire system, ANILOOKUPRL will attempt to lookup the phone number by the ANI in only one specified list, XDIGITID will prompt the caller for an X digit code before the call will be put into the queue, VIDPROMPT will prompt the caller for their ID number and will create a new lead record with the CallerID as the phone number and the ID as the Vendor ID, VIDPROMPTLOOKUP will attempt to lookup the ID in the entire system, VIDPROMPTLOOKUPRL will attempt to lookup the vendor ID by the ID in only one specified list, VIDPROMPTLOOKUPRC will attempt to lookup the vendor ID by the ID in all of the lists that belong to the specified campaign. Default is CID.
    @@ -6510,7 +6549,11 @@ if ($ADD==11) echo "Script: $NWB#vicidial_campaigns-campaign_script$NWE\n"; - echo "Get Call Launch: $NWB#vicidial_campaigns-get_call_launch$NWE\n"; + + $eswHTML=''; + if ($SSenable_second_webform > 0) + {$eswHTML = '';} + echo "Get Call Launch: $NWB#vicidial_campaigns-get_call_launch$NWE\n"; echo "\n"; echo "\n"; } @@ -6848,7 +6891,10 @@ if ($ADD==1111) echo "Script: $NWB#vicidial_inbound_groups-ingroup_script$NWE\n"; - echo "Get Call Launch: $NWB#vicidial_inbound_groups-get_call_launch$NWE\n"; + $eswHTML=''; + if ($SSenable_second_webform > 0) + {$eswHTML = '';} + echo "Get Call Launch: $NWB#vicidial_inbound_groups-get_call_launch$NWE\n"; echo "\n"; echo "\n"; } @@ -8529,7 +8575,7 @@ if ($ADD==20) { echo "
    CAMPAIGN COPIED: $campaign_id copied from $source_campaign_id\n"; - $stmt="INSERT INTO vicidial_campaigns (campaign_name,campaign_id,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,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,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_fourth_digit,survey_third_audio_file,survey_fourth_audio_file,survey_third_status,survey_fourth_status,survey_third_exten,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,crm_popup_login,crm_login_address) SELECT \"$campaign_name\",\"$campaign_id\",\"N\",dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,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,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,\"DISABLED\",campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_fourth_digit,survey_third_audio_file,survey_fourth_audio_file,survey_third_status,survey_fourth_status,survey_third_exten,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,crm_popup_login,crm_login_address from vicidial_campaigns where campaign_id='$source_campaign_id';"; + $stmt="INSERT INTO vicidial_campaigns (campaign_name,campaign_id,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,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,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_fourth_digit,survey_third_audio_file,survey_fourth_audio_file,survey_third_status,survey_fourth_status,survey_third_exten,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds) SELECT \"$campaign_name\",\"$campaign_id\",\"N\",dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,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,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,\"DISABLED\",campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_fourth_digit,survey_third_audio_file,survey_fourth_audio_file,survey_third_status,survey_fourth_status,survey_third_exten,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds from vicidial_campaigns where campaign_id='$source_campaign_id';"; $rslt=mysql_query($stmt, $link); $stmtA="INSERT INTO vicidial_campaign_stats (campaign_id) values('$campaign_id');"; @@ -8988,7 +9034,7 @@ if ($ADD==2011) } else { - $stmt="INSERT INTO vicidial_inbound_groups (group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two) SELECT \"$group_id\",\"$group_name\",group_color,\"N\",web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two from vicidial_inbound_groups where group_id=\"$source_group_id\";"; + $stmt="INSERT INTO vicidial_inbound_groups (group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two,timer_action,timer_action_message,timer_action_seconds) SELECT \"$group_id\",\"$group_name\",group_color,\"N\",web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two,timer_action,timer_action_message,timer_action_seconds from vicidial_inbound_groups where group_id=\"$source_group_id\";"; $rslt=mysql_query($stmt, $link); echo "
    GROUP ADDED: $group_id\n"; @@ -11121,7 +11167,7 @@ if ($ADD==41) if ( (!ereg("DISABLED",$list_order_mix)) and ($hopper_level < 100) ) {$hopper_level='100';} - $stmtA="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',allow_closers='$allow_closers',hopper_level='$hopper_level', $adlSQL next_agent_call='$next_agent_call', local_call_time='$local_call_time', voicemail_ext='$voicemail_ext', dial_timeout='$dial_timeout', dial_prefix='$dial_prefix', campaign_cid='$campaign_cid', campaign_vdad_exten='$campaign_vdad_exten', web_form_address='" . mysql_real_escape_string($web_form_address) . "', park_ext='$park_ext', park_file_name='$park_file_name', campaign_rec_exten='$campaign_rec_exten', campaign_recording='$campaign_recording', campaign_rec_filename='$campaign_rec_filename', campaign_script='$script_id', get_call_launch='$get_call_launch', am_message_exten='$am_message_exten', amd_send_to_vmx='$amd_send_to_vmx', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number',xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',lead_filter_id='$lead_filter_id',alt_number_dialing='$alt_number_dialing',scheduled_callbacks='$scheduled_callbacks',drop_action='$drop_action',drop_call_seconds='$drop_call_seconds',safe_harbor_exten='$safe_harbor_exten',wrapup_seconds='$wrapup_seconds',wrapup_message='$wrapup_message',closer_campaigns='$groups_value',use_internal_dnc='$use_internal_dnc',allcalls_delay='$allcalls_delay',omit_phone_code='$omit_phone_code',dial_method='$dial_method',available_only_ratio_tally='$available_only_ratio_tally',adaptive_dropped_percentage='$adaptive_dropped_percentage',adaptive_maximum_level='$adaptive_maximum_level',adaptive_latest_server_time='$adaptive_latest_server_time',adaptive_intensity='$adaptive_intensity',adaptive_dl_diff_target='$adaptive_dl_diff_target',concurrent_transfers='$concurrent_transfers',auto_alt_dial='$auto_alt_dial',agent_pause_codes_active='$agent_pause_codes_active',campaign_description='$campaign_description',campaign_changedate='$SQLdate',campaign_stats_refresh='$campaign_stats_refresh',disable_alter_custdata='$disable_alter_custdata',no_hopper_leads_logins='$no_hopper_leads_logins',list_order_mix='$list_order_mix',campaign_allow_inbound='$campaign_allow_inbound',manual_dial_list_id='$manual_dial_list_id',default_xfer_group='$default_xfer_group',xfer_groups='$XFERgroups_value',queue_priority='$queue_priority',drop_inbound_group='$drop_inbound_group',disable_alter_custphone='$disable_alter_custphone',display_queue_count='$display_queue_count',manual_dial_filter='$manual_dial_filter',agent_clipboard_copy='$agent_clipboard_copy',agent_extended_alt_dial='$agent_extended_alt_dial',use_campaign_dnc='$use_campaign_dnc',three_way_call_cid='$three_way_call_cid',three_way_dial_prefix='$three_way_dial_prefix',web_form_target='$web_form_target',vtiger_search_category='$vtiger_search_category',vtiger_create_call_record='$vtiger_create_call_record',vtiger_create_lead_record='$vtiger_create_lead_record',vtiger_screen_login='$vtiger_screen_login',cpd_amd_action='$cpd_amd_action',agent_allow_group_alias='$agent_allow_group_alias',default_group_alias='$default_group_alias',vtiger_search_dead='$vtiger_search_dead',vtiger_status_call='$vtiger_status_call',drop_lockout_time='$drop_lockout_time',quick_transfer_button='$quick_transfer_button',prepopulate_transfer_preset='$prepopulate_transfer_preset',drop_rate_group='$drop_rate_group',view_calls_in_queue='$view_calls_in_queue',view_calls_in_queue_launch='$view_calls_in_queue_launch',grab_calls_in_queue='$grab_calls_in_queue',call_requeue_button='$call_requeue_button',pause_after_each_call='$pause_after_each_call',no_hopper_dialing='$no_hopper_dialing',agent_dial_owner_only='$agent_dial_owner_only',agent_display_dialable_leads='$agent_display_dialable_leads',web_form_address_two='" . mysql_real_escape_string($web_form_address_two) . "',waitforsilence_options='$waitforsilence_options',agent_select_territories='$agent_select_territories',crm_popup_login='$crm_popup_login',crm_login_address='" . mysql_real_escape_string($crm_login_address) . "' where campaign_id='$campaign_id';"; + $stmtA="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',allow_closers='$allow_closers',hopper_level='$hopper_level', $adlSQL next_agent_call='$next_agent_call', local_call_time='$local_call_time', voicemail_ext='$voicemail_ext', dial_timeout='$dial_timeout', dial_prefix='$dial_prefix', campaign_cid='$campaign_cid', campaign_vdad_exten='$campaign_vdad_exten', web_form_address='" . mysql_real_escape_string($web_form_address) . "', park_ext='$park_ext', park_file_name='$park_file_name', campaign_rec_exten='$campaign_rec_exten', campaign_recording='$campaign_recording', campaign_rec_filename='$campaign_rec_filename', campaign_script='$script_id', get_call_launch='$get_call_launch', am_message_exten='$am_message_exten', amd_send_to_vmx='$amd_send_to_vmx', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number',xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',lead_filter_id='$lead_filter_id',alt_number_dialing='$alt_number_dialing',scheduled_callbacks='$scheduled_callbacks',drop_action='$drop_action',drop_call_seconds='$drop_call_seconds',safe_harbor_exten='$safe_harbor_exten',wrapup_seconds='$wrapup_seconds',wrapup_message='$wrapup_message',closer_campaigns='$groups_value',use_internal_dnc='$use_internal_dnc',allcalls_delay='$allcalls_delay',omit_phone_code='$omit_phone_code',dial_method='$dial_method',available_only_ratio_tally='$available_only_ratio_tally',adaptive_dropped_percentage='$adaptive_dropped_percentage',adaptive_maximum_level='$adaptive_maximum_level',adaptive_latest_server_time='$adaptive_latest_server_time',adaptive_intensity='$adaptive_intensity',adaptive_dl_diff_target='$adaptive_dl_diff_target',concurrent_transfers='$concurrent_transfers',auto_alt_dial='$auto_alt_dial',agent_pause_codes_active='$agent_pause_codes_active',campaign_description='$campaign_description',campaign_changedate='$SQLdate',campaign_stats_refresh='$campaign_stats_refresh',disable_alter_custdata='$disable_alter_custdata',no_hopper_leads_logins='$no_hopper_leads_logins',list_order_mix='$list_order_mix',campaign_allow_inbound='$campaign_allow_inbound',manual_dial_list_id='$manual_dial_list_id',default_xfer_group='$default_xfer_group',xfer_groups='$XFERgroups_value',queue_priority='$queue_priority',drop_inbound_group='$drop_inbound_group',disable_alter_custphone='$disable_alter_custphone',display_queue_count='$display_queue_count',manual_dial_filter='$manual_dial_filter',agent_clipboard_copy='$agent_clipboard_copy',agent_extended_alt_dial='$agent_extended_alt_dial',use_campaign_dnc='$use_campaign_dnc',three_way_call_cid='$three_way_call_cid',three_way_dial_prefix='$three_way_dial_prefix',web_form_target='$web_form_target',vtiger_search_category='$vtiger_search_category',vtiger_create_call_record='$vtiger_create_call_record',vtiger_create_lead_record='$vtiger_create_lead_record',vtiger_screen_login='$vtiger_screen_login',cpd_amd_action='$cpd_amd_action',agent_allow_group_alias='$agent_allow_group_alias',default_group_alias='$default_group_alias',vtiger_search_dead='$vtiger_search_dead',vtiger_status_call='$vtiger_status_call',drop_lockout_time='$drop_lockout_time',quick_transfer_button='$quick_transfer_button',prepopulate_transfer_preset='$prepopulate_transfer_preset',drop_rate_group='$drop_rate_group',view_calls_in_queue='$view_calls_in_queue',view_calls_in_queue_launch='$view_calls_in_queue_launch',grab_calls_in_queue='$grab_calls_in_queue',call_requeue_button='$call_requeue_button',pause_after_each_call='$pause_after_each_call',no_hopper_dialing='$no_hopper_dialing',agent_dial_owner_only='$agent_dial_owner_only',agent_display_dialable_leads='$agent_display_dialable_leads',web_form_address_two='" . mysql_real_escape_string($web_form_address_two) . "',waitforsilence_options='$waitforsilence_options',agent_select_territories='$agent_select_territories',crm_popup_login='$crm_popup_login',crm_login_address='" . mysql_real_escape_string($crm_login_address) . "',timer_action='$timer_action',timer_action_message='$timer_action_message',timer_action_seconds='$timer_action_seconds' where campaign_id='$campaign_id';"; $rslt=mysql_query($stmtA, $link); if ($reset_hopper == 'Y') @@ -11985,7 +12031,7 @@ if ($ADD==4111) echo "
    GROUP MODIFIED: $group_id\n"; - $stmt="UPDATE vicidial_inbound_groups set group_name='$group_name', group_color='$group_color', active='$active', web_form_address='" . mysql_real_escape_string($web_form_address) . "', voicemail_ext='$voicemail_ext', next_agent_call='$next_agent_call', fronter_display='$fronter_display', ingroup_script='$script_id', get_call_launch='$get_call_launch', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number', xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',drop_action='$drop_action',drop_call_seconds='$drop_call_seconds',drop_exten='$drop_exten',call_time_id='$call_time_id',after_hours_action='$after_hours_action',after_hours_message_filename='$after_hours_message_filename',after_hours_exten='$after_hours_exten',after_hours_voicemail='$after_hours_voicemail',welcome_message_filename='$welcome_message_filename',moh_context='$moh_context',onhold_prompt_filename='$onhold_prompt_filename',prompt_interval='$prompt_interval',agent_alert_exten='$agent_alert_exten',agent_alert_delay='$agent_alert_delay',default_xfer_group='$default_xfer_group',queue_priority='$queue_priority',drop_inbound_group='$drop_inbound_group',ingroup_recording_override='$ingroup_recording_override',ingroup_rec_filename='$ingroup_rec_filename',afterhours_xfer_group='$afterhours_xfer_group',qc_enabled='$qc_enabled',qc_statuses='$QC_statuses',qc_shift_id='$qc_shift_id',qc_get_record_launch='$qc_get_record_launch',qc_show_recording='$qc_show_recording',qc_web_form_address='$qc_web_form_address',qc_script='$qc_script',play_place_in_line='$play_place_in_line',play_estimate_hold_time='$play_estimate_hold_time',hold_time_option='$hold_time_option',hold_time_option_seconds='$hold_time_option_seconds',hold_time_option_exten='$hold_time_option_exten',hold_time_option_voicemail='$hold_time_option_voicemail',hold_time_option_xfer_group='$hold_time_option_xfer_group',hold_time_option_callback_filename='$hold_time_option_callback_filename',hold_time_option_callback_list_id='$hold_time_option_callback_list_id',hold_recall_xfer_group='$hold_recall_xfer_group',no_delay_call_route='$no_delay_call_route',play_welcome_message='$play_welcome_message',answer_sec_pct_rt_stat_one='$answer_sec_pct_rt_stat_one',answer_sec_pct_rt_stat_two='$answer_sec_pct_rt_stat_two',default_group_alias='$default_group_alias',no_agent_no_queue='$no_agent_no_queue',no_agent_action='$no_agent_action',no_agent_action_value='$no_agent_action_value',web_form_address_two='" . mysql_real_escape_string($web_form_address_two) . "' where group_id='$group_id';"; + $stmt="UPDATE vicidial_inbound_groups set group_name='$group_name', group_color='$group_color', active='$active', web_form_address='" . mysql_real_escape_string($web_form_address) . "', voicemail_ext='$voicemail_ext', next_agent_call='$next_agent_call', fronter_display='$fronter_display', ingroup_script='$script_id', get_call_launch='$get_call_launch', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number', xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',drop_action='$drop_action',drop_call_seconds='$drop_call_seconds',drop_exten='$drop_exten',call_time_id='$call_time_id',after_hours_action='$after_hours_action',after_hours_message_filename='$after_hours_message_filename',after_hours_exten='$after_hours_exten',after_hours_voicemail='$after_hours_voicemail',welcome_message_filename='$welcome_message_filename',moh_context='$moh_context',onhold_prompt_filename='$onhold_prompt_filename',prompt_interval='$prompt_interval',agent_alert_exten='$agent_alert_exten',agent_alert_delay='$agent_alert_delay',default_xfer_group='$default_xfer_group',queue_priority='$queue_priority',drop_inbound_group='$drop_inbound_group',ingroup_recording_override='$ingroup_recording_override',ingroup_rec_filename='$ingroup_rec_filename',afterhours_xfer_group='$afterhours_xfer_group',qc_enabled='$qc_enabled',qc_statuses='$QC_statuses',qc_shift_id='$qc_shift_id',qc_get_record_launch='$qc_get_record_launch',qc_show_recording='$qc_show_recording',qc_web_form_address='$qc_web_form_address',qc_script='$qc_script',play_place_in_line='$play_place_in_line',play_estimate_hold_time='$play_estimate_hold_time',hold_time_option='$hold_time_option',hold_time_option_seconds='$hold_time_option_seconds',hold_time_option_exten='$hold_time_option_exten',hold_time_option_voicemail='$hold_time_option_voicemail',hold_time_option_xfer_group='$hold_time_option_xfer_group',hold_time_option_callback_filename='$hold_time_option_callback_filename',hold_time_option_callback_list_id='$hold_time_option_callback_list_id',hold_recall_xfer_group='$hold_recall_xfer_group',no_delay_call_route='$no_delay_call_route',play_welcome_message='$play_welcome_message',answer_sec_pct_rt_stat_one='$answer_sec_pct_rt_stat_one',answer_sec_pct_rt_stat_two='$answer_sec_pct_rt_stat_two',default_group_alias='$default_group_alias',no_agent_no_queue='$no_agent_no_queue',no_agent_action='$no_agent_action',no_agent_action_value='$no_agent_action_value',web_form_address_two='" . mysql_real_escape_string($web_form_address_two) . "',timer_action='$timer_action',timer_action_message='$timer_action_message',timer_action_seconds='$timer_action_seconds' where group_id='$group_id';"; $rslt=mysql_query($stmt, $link); ### LOG INSERTION Admin Log Table ### @@ -15775,7 +15821,7 @@ if ($ADD==31) $enable_vtiger_integration_LU = $row[0]; $vtiger_url_LU = $row[1]; - $stmt="SELECT campaign_id,campaign_name,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,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,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_third_audio_file,survey_third_status,survey_third_exten,survey_fourth_digit,survey_fourth_audio_file,survey_fourth_status,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,campaign_calldate,crm_popup_login,crm_login_address from vicidial_campaigns where campaign_id='$campaign_id';"; + $stmt="SELECT campaign_id,campaign_name,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,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,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_third_audio_file,survey_third_status,survey_third_exten,survey_fourth_digit,survey_fourth_audio_file,survey_fourth_status,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,campaign_calldate,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds from vicidial_campaigns where campaign_id='$campaign_id';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $campaign_name = $row[1]; @@ -15908,6 +15954,9 @@ if ($ADD==31) $campaign_calldate = $row[131]; $crm_popup_login = $row[132]; $crm_login_address = $row[133]; + $timer_action = $row[134]; + $timer_action_message = $row[135]; + $timer_action_seconds = $row[136]; if (ereg("DISABLED",$list_order_mix)) {$DEFlistDISABLE = ''; $DEFstatusDISABLED=0;} @@ -16524,7 +16573,10 @@ if ($ADD==31) {echo " LIST OVERRIDE ACTIVE";} echo "\n"; - echo "Get Call Launch: $NWB#vicidial_campaigns-get_call_launch$NWE\n"; + $eswHTML=''; + if ($SSenable_second_webform > 0) + {$eswHTML = '';} + echo "Get Call Launch: $NWB#vicidial_campaigns-get_call_launch$NWE\n"; echo "Answering Machine Message:
    audio chooser $NWB#vicidial_campaigns-am_message_exten$NWE\n"; $stmt="SELECT count(*) from vicidial_lists where campaign_id='$campaign_id' and am_message_exten_override != '' and active='Y';"; @@ -16554,6 +16606,12 @@ if ($ADD==31) echo "PrePopulate Transfer Preset: $NWB#vicidial_campaigns-prepopulate_transfer_preset$NWE\n"; + echo "Timer Action: $NWB#vicidial_campaigns-timer_action$NWE\n"; + + echo "Timer Action Message: $NWB#vicidial_campaigns-timer_action_message$NWE\n"; + + echo "Timer Action Seconds: $NWB#vicidial_campaigns-timer_action_seconds$NWE\n"; + if ($SSoutbound_autodial_active > 0) { echo "Alt Number Dialing: $NWB#vicidial_campaigns-alt_number_dialing$NWE\n"; @@ -16668,7 +16726,7 @@ if ($ADD==31) if ($SSenable_vtiger_integration > 0) { - echo "Vtiger Search Category: $NWB#vicidial_campaigns-vtiger_search_category$NWE\n"; + echo "Vtiger Search Category: $NWB#vicidial_campaigns-vtiger_search_category$NWE\n"; echo "Vtiger Search Dead Accounts: $NWB#vicidial_campaigns-vtiger_search_dead$NWE\n"; @@ -19076,7 +19134,7 @@ if ($ADD==3111) echo "\n"; - echo "\n"; + $eswHTML=''; + if ($SSenable_second_webform > 0) + {$eswHTML = '';} + echo "\n"; echo "\n"; @@ -19265,6 +19329,12 @@ if ($ADD==3111) echo "\n"; + echo "\n"; + + echo "\n"; + + echo "\n"; + echo "\n"; echo "\n"; @@ -21007,7 +21077,6 @@ if ($ADD==31111111111) echo "\n"; echo "\n"; echo "\n"; - echo "\n"; echo "\n"; echo "\n"; echo "\n"; diff --git a/agc_2-X/trunk/www/vicidial/vtiger_search.php b/agc_2-X/trunk/www/vicidial/vtiger_search.php index 14d37e68..854875bc 100644 --- a/agc_2-X/trunk/www/vicidial/vtiger_search.php +++ b/agc_2-X/trunk/www/vicidial/vtiger_search.php @@ -19,6 +19,7 @@ # 90111-1451 - Added logging of call as activity for account/lead # 90112-0336 - Added create call and create lead options # 90323-2104 - Added deleted account/lead check and reactivation from campaign option +# 91228-1751 - Added UNIFIED_CONTACT search option # header ("Content-type: text/html; charset=utf-8"); @@ -190,15 +191,38 @@ mysql_select_db("$vtiger_dbname", $linkV); # LEAD: # $stmt="SELECT count(*) from vtiger_leadaddress where phone='$phone' or mobile='$phone' or fax='$phone';"; -$lead_search=0; $account_search=0; $vendor_search=0; $acctid_search=0; +$lead_search=0; $account_search=0; $vendor_search=0; $acctid_search=0; $unified_contact=0; -if (ereg('ACCTID',$vtiger_search_category)) {$acctid_search=1;} -if (ereg('ACCOUNT',$vtiger_search_category)) {$account_search=1;} -if (ereg('VENDOR',$vtiger_search_category)) {$vendor_search=1;} -if (ereg('LEAD',$vtiger_search_category)) {$lead_search=1;} +if (ereg('ACCTID',$vtiger_search_category)) {$acctid_search=1;} +if (ereg('ACCOUNT',$vtiger_search_category)) {$account_search=1;} +if (ereg('VENDOR',$vtiger_search_category)) {$vendor_search=1;} +if (ereg('LEAD',$vtiger_search_category)) {$lead_search=1;} +if (ereg('UNIFIED_CONTACT',$vtiger_search_category)) {$unified_contact=1;} +########################################################################## +##### BEGIN - UNIFIED_CONTACT - Search using beta 5.1.0 unified search feature +########################################################################## +if ($unified_contact > 0) + { + $unified_contact_URL = "$vtiger_url/index.php?action=UnifiedSearch&module=Home&search_module=Contacts&query_string=$phone&_service=vicidial"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "
    \n"; + + echo "
    ";
    +	echo "Forwarding to Vtiger Unified Contact Search page...\n";
    +	echo "phone number:   $phone\n";
    +	echo "

    "; + exit; + } +########################################################################## +##### END - UNIFIED_CONTACT +########################################################################## + ##########################################################################
    \n"; echo ""; - $stmt="SELECT group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two from vicidial_inbound_groups where group_id='$group_id';"; + $stmt="SELECT group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two,timer_action,timer_action_message,timer_action_seconds from vicidial_inbound_groups where group_id='$group_id';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $group_name = $row[1]; @@ -19138,6 +19196,9 @@ if ($ADD==3111) $no_agent_action = $row[57]; $no_agent_action_value = $row[58]; $web_form_address_two = stripslashes($row[59]); + $timer_action = $row[60]; + $timer_action_message = $row[61]; + $timer_action_seconds = $row[62]; ##### get in-groups listings for dynamic pulldown $stmt="SELECT group_id,group_name from vicidial_inbound_groups where group_id NOT IN('AGENTDIRECT') order by group_id"; @@ -19255,7 +19316,10 @@ if ($ADD==3111) echo "$scripts_list"; echo "\n"; echo "$NWB#vicidial_inbound_groups-ingroup_script$NWE
    Get Call Launch: $NWB#vicidial_inbound_groups-get_call_launch$NWE
    Get Call Launch: $NWB#vicidial_inbound_groups-get_call_launch$NWE
    Transfer-Conf DTMF 1: $NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE
    Transfer-Conf Number 2: $NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE
    Timer Action: $NWB#vicidial_inbound_groups-timer_action$NWE
    Timer Action Message: $NWB#vicidial_inbound_groups-timer_action_message$NWE
    Timer Action Seconds: $NWB#vicidial_inbound_groups-timer_action_seconds$NWE
    Drop Call Seconds: $NWB#vicidial_inbound_groups-drop_call_seconds$NWE
    Drop Action: $NWB#vicidial_inbound_groups-drop_action$NWE
    Phone extension: $NWB#phones-extension$NWE (Agent Screen Phone Login)
    Dial Plan Number: (digits only)$NWB#phones-dialplan_number$NWE
    Voicemail Box: (digits only)$NWB#phones-voicemail_id$NWE
    Voicemail Box: $NWB#phones-delete_vm_after_email$NWE
    Outbound CallerID: (digits only)$NWB#phones-outbound_cid$NWE
    Phone IP address: (optional)$NWB#phones-phone_ip$NWE
    Computer IP address: (optional)$NWB#phones-computer_ip$NWE