added click-to-dial to Vtiger integration

added agent alert option to vicidial.php
some bug fixes and doc updates

git-svn-id: svn://192.168.202.10@1038 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2009-01-27 08:03:01 +00:00
parent 505eb99ad0
commit 4f3c7d2074
18 changed files with 1987 additions and 111 deletions
+5 -1
View File
@@ -218,7 +218,8 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom
on Asterisk IVRs
49. Updated Vtiger integration to version 5.0.4 and allow searching by
leads/accounts/vendors. Also added user synchronization with vicidial_users
leads/accounts/vendors. Also added user synchronization with vicidial_users.
Also added click-to-dial from Vtiger sending call to vicidial agent screen
50. Added notification of time synchronization problems in the vicidial.php page
@@ -228,6 +229,9 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom
specific agents using the AGENTDIRECT transfer group with LOCAL CLOSER button
and putting the agent to send the call to in the Number To Dial field.
52. Added agent alert option to agent screen. sends browser alert prompt when
a call is send to the agent screen.
+1 -1
View File
@@ -668,9 +668,9 @@ if ($output_format =~ /^fixed-as400$/)
if ($status =~ /^DROP$/) {$status = 'N';}
if ($status =~ /^SALE$/) {$status = 'AP';}
if ($status =~ /^A6$/) {$status = 'A6';}
if ($status =~ /^DC$/) {$status = 'D';}
if ($status =~ /^DNC$/) {$status = 'DC';}
if ($status =~ /^DNCL$/) {$status = 'DC';}
if ($status =~ /^DC$/) {$status = 'D';}
if ($status =~ /^DIED$/) {$status = 'DD';}
if ($status =~ /^COMP$/) {$status = 'DD';}
if ($status =~ /^DEC$/) {$status = 'DD';}
+8 -8
View File
@@ -31,17 +31,17 @@ Required variables for API calls:
Example URL strings for API calls:
http://server/agc/api.php?function=version
http://server/agc/api.php?user=6666&pass=1234&agent_user=1000&function=external_hangup&value=1
http://server/agc/api.php?user=6666&pass=1234&agent_user=1000&function=external_status&value=A
http://server/agc/api.php?user=6666&pass=1234&agent_user=1000&function=external_pause&value=PAUSE
http://server/agc/api.php?user=6666&pass=1234&agent_user=1000&function=external_pause&value=RESUME
http://server/agc/api.php?user=6666&pass=1234&agent_user=1000&function=external_dial&value=7275551212&phone_code=1&search=YES
http://server/agc/api.php?source=test&user=6666&pass=1234&agent_user=1000&function=external_hangup&value=1
http://server/agc/api.php?source=test&user=6666&pass=1234&agent_user=1000&function=external_status&value=A
http://server/agc/api.php?source=test&user=6666&pass=1234&agent_user=1000&function=external_pause&value=PAUSE
http://server/agc/api.php?source=test&user=6666&pass=1234&agent_user=1000&function=external_pause&value=RESUME
http://server/agc/api.php?source=test&user=6666&pass=1234&agent_user=1000&function=external_dial&value=7275551212&phone_code=1&search=YES&preview=NO&focus=YES
To hangup the call, disposition it and then pause the agent, do the following in order:
http://server/agc/api.php?user=6666&pass=1234&agent_user=1000&function=external_pause&value=PAUSE
http://server/agc/api.php?user=6666&pass=1234&agent_user=1000&function=external_hangup&value=1
http://server/agc/api.php?user=6666&pass=1234&agent_user=1000&function=external_status&value=A
http://server/agc/api.php?source=test&user=6666&pass=1234&agent_user=1000&function=external_pause&value=PAUSE
http://server/agc/api.php?source=test&user=6666&pass=1234&agent_user=1000&function=external_hangup&value=1
http://server/agc/api.php?source=test&user=6666&pass=1234&agent_user=1000&function=external_status&value=A
+26 -17
View File
@@ -6,12 +6,14 @@ This document goes over the features and needed changes made to VICIDIAL to enab
QueueMetrics is a closed-source, commercial product written by Loway Research in Italy. The writers of VICIDIAL do not support or warranty QueueMetrics or it's functionality with VICIDIAL in any way.
This feature was added to the package at the request of several users of VICIDIAL and was achieved with some help from the makers of QueueMetrics(although all VICIDIAL code changes were done entirely by Matt Florell).
This feature was added to the package at the request of several users of VICIDIAL and was achieved with some help from the creators of QueueMetrics(although all VICIDIAL code changes were done entirely by Matt Florell).
This feature is functional on outbound manual dialing, auto dialing and inbound call handling as of 2008-06-30(SVN trunk 2.0.5).
as of 2008-10-30, several validation and correction functions were added to the AST_cleanup_agent_log.pl script that is supposed to run every hour. These functions should clean up any queue_log errors that appear and cause QueueMetrics to display incorrect call totals.
Another very important issue to note is that just like with VICIDIAL on multi-server systems, if QueueMetrics data is being generated on a multi-server system the data will be corrupted if all of the servers are not on the same time. I strongly recommend getting ntp working properly on all servers in a VICIDIAL or QueueMetrics server cluster.
Here is a short summary of the needed steps to install QueueMetrics on your system:
@@ -93,21 +95,24 @@ GRANT ALL PRIVILEGES ON queuemetrics.* TO qm@'%' IDENTIFIED BY 'qm';
Second, the queue_log table:
mysql> describe queue_log;
+-----------+------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------+------------------+------+-----+---------+-------+
| partition | char(20) | NO | MUL | | |
| time_id | int(11) unsigned | NO | MUL | 0 | |
| call_id | char(30) | NO | MUL | | |
| queue | char(30) | NO | | | |
| agent | char(30) | NO | | | |
| verb | char(30) | NO | | | |
| data1 | char(30) | NO | | | |
| data2 | char(30) | NO | | | |
| data3 | char(30) | NO | | | |
| data4 | char(30) | NO | | | |
| serverid | varchar(10) | NO | | 0 | |
+-----------+------------------+------+-----+---------+-------+
+------------------+------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------------+------------------+------+-----+---------+-------+
| partition | char(20) | NO | MUL | NULL | |
| time_id | int(11) unsigned | NO | MUL | 0 | |
| call_id | char(30) | NO | MUL | NULL | |
| queue | char(30) | NO | | NULL | |
| agent | char(30) | NO | | NULL | |
| verb | char(30) | NO | | NULL | |
| data1 | char(30) | NO | | NULL | |
| data2 | char(30) | NO | | NULL | |
| data3 | char(30) | NO | | NULL | |
| data4 | char(30) | NO | | NULL | |
| serverid | varchar(10) | NO | | 0 | |
| fileid | int(10) unsigned | NO | | NULL | |
| recordid | int(10) unsigned | NO | | NULL | |
| unique_row_count | int(11) | NO | | NULL | |
+------------------+------------------+------+-----+---------+-------+
Use the following query to create a queue_log table in your asterisk database
to gather queue_log entries without doing a full QueueMetrics install:
@@ -124,10 +129,14 @@ data2 VARCHAR(30) NOT NULL,
data3 VARCHAR(30) NOT NULL,
data4 VARCHAR(30) NOT NULL,
serverid VARCHAR(10) NOT NULL default '0',
fileid INT(10) UNSIGNED,
recordid INT(10) UNSIGNED,
unique_row_count INT(10) UNSIGNED NOT NULL,
index(time_id)
index(time_id),
index(call_id)
);
partition: set to "P01" for the first partition, should match up with configuration.properties presets
time_id: epoch, unixtime (seconds since 1970-01-01 00:00:00) [1170345603]
+4 -4
View File
@@ -40,7 +40,7 @@ vi /etc/my.cnf
# add this line below 'skip-locking'
skip-name-resolve
# comment out the line 'log-bin=mysql-bin'
max_connections = 200
perl -MCPAN -e shell
install MD5
@@ -510,9 +510,9 @@ rm -f /usr/lib/asterisk/modules/res_speech.so
mkdir /usr/src/asterisk-1.4
cd /usr/src/asterisk-1.4
wget http://ftp.digium.com/pub/asterisk/releases/asterisk-1.4.21.2.tar.gz
wget http://ftp.digium.com/pub/zaptel/releases/zaptel-1.4.12.1.tar.gz
wget http://ftp.digium.com/pub/libpri/releases/libpri-1.4.7.tar.gz
wget http://downloads.digium.com/pub/asterisk/releases/asterisk-1.4.21.2.tar.gz
wget http://downloads.digium.com/pub/zaptel/releases/zaptel-1.4.12.1.tar.gz
wget http://downloads.digium.com/pub/libpri/releases/libpri-1.4.7.tar.gz
gunzip asterisk-1.4.21.2.tar.gz
tar xvf asterisk-1.4.21.2.tar
gunzip zaptel-1.4.12.1.tar.gz
+22 -6
View File
@@ -6,10 +6,11 @@ Current integration features:
- vicidial.php WEBFORM search for lead/account/vendor
- user synchronization of VICIDIAL users to Vtiger user database
- added activity event option(call logging in Vtiger) when going from VICIDIAL to Vtiger
- added ability to click-to-dial a phone number from a record in Vtiger screen to the vicidial.php screen
There has been a basic vtiger integration option available in VICIDIAL since the 1.X release versions through the vtiger_search.php web script(when used as a web form in the campaign) that will search through the leads for the dialed phone number in vicidial.php and if it is not in the vtiger system as a lead then it will be put in as a new contact.
There has been a basic vtiger integration option available in VICIDIAL since the 1.X release versions through the vtiger_search.php web script(when used as a web form in the campaign) that will search through the leads for the dialed phone number in vicidial.php and if it is not in the vtiger system as a lead then it will be put in as a new lead.
More in-depth integration with Vtiger is a bit complicated due to the fact that it has 312 database tables(and you though VICIDIAL had a lot at 70). Attempts at using the built-in 5.0.4 API structure were unsuccessful because of inaccurate documentation and the inability to use the modules easily outside of the vtiger directory tree without major reworking of the vtiger code, so we decided to have VICIDIAL work directly with the database instead. Unfortunately, working only with the database doesn't get you the whole way with Vtiger. For user synchronization you need to make sure that the patch(vtiger_user_file_504.patch) is applied to Vtiger(see instructions below). This patch is used to create blank user profile files so Vtiger will load properly with synchronized users from VICIDIAL. Vtiger doesn't check to see if these user profile files exist before trying to use them, so all this patch does is check if the files exist for each user, and if they do not, it will create them with a simple placeholder.
More in-depth integration with Vtiger is a bit complicated due to the fact that it has 312 database tables(and you though VICIDIAL had a lot with about 70). Attempts at using the built-in 5.0.4 API structure were unsuccessful because of inaccurate documentation and the inability to use the modules easily outside of the vtiger directory tree without major reworking of the vtiger code, so we decided to have VICIDIAL work directly with the database instead. Unfortunately, working only with the database doesn't get you the whole way with Vtiger. For user synchronization you need to make sure that the patch(Vtiger504_vicidial.patch) is applied to Vtiger(see instructions below). This patch is used to create blank user profile files so Vtiger will load properly with synchronized users from VICIDIAL. Vtiger doesn't check to see if these user profile files exist before trying to use them, so one thing this patch does is check if the files exist for each user, and if they do not, it will create them with a simple placeholder. Another purpose of this patch is to allow for click-to-dial phone numbers in Vtiger, so that the numbers will be dialed as manual dial calls in a VICIDIAL agent screen. For this to work you must have applied the patch and the agent needs to be logged into vicidial.php(there is also a VICIDIAL Campaign Detail option to automatically login to Vtiger when an agent logs into vicidial.php) then when the agent clicks on any phone number with a "VCcall:" lable bext to it, a call will be placed in their vicidial.php agent screen and the Vtiger window will be closed so that they can open it up again with the vicidial.php WEB FORM button in VICIDIAL.
as of 2008-12-31, several user synchronization features have been added to allow for the creation of vtiger users from the vicidial_users user database. The vtiger_search.php script has also been updated to work with the current vtiger release 5.0.4. To enable the Vtiger integration features you will need to go to the Admin -> System Settings section of the admin.php Administration web page to set Vtiger Integration to enabled and configure the connection details for the Vtiger database.
@@ -19,7 +20,8 @@ There are options in the VICIDIAL Modify Campaign Detail screen that you can cho
VENDOR- This option will only search through the Vtiger vendors
LEAD- This option will search through the Vtiger leads only
Multiple search options can be used for each campaign, but on large databases this is not recommended. Default is LEAD. The order that you see the searching options above is the order in which they will be searched if you have selected multiple searching methods. If an account does not exist and you have LEAD selected as a search method, then(if the create lead option is enabled) it will insert the lead with that phone number and you will be taken to the edit screen for that lead when you go to the vtiger_search web page. There is also an option to log the call as an event in Vtiger that will associate with the Lead or Account that the agent screen is sent to. Vtiger recommends on standard equipment a limit of 50,000 account records, but many users report no issues with 100,000 or more account records in their Vtiger systems.
NOTE: For this to work, you must have the vtiger_search.php set as your webform page, i.e.(http://10.10.10.15/vicidial/vtiger_search.php)
Multiple search options can be used for each campaign(in the VICIDIAL Campaign Detail screen), but on large databases this is not recommended. Default is LEAD. The order that you see the searching options above is the order in which they will be searched if you have selected multiple searching methods. If an account does not exist and you have LEAD selected as a search method, then(if the create lead option is enabled) it will insert the lead with that phone number and you will be taken to the edit screen for that lead when you go to the vtiger_search web page. There is also an option to log the call as an event in Vtiger that will associate with the Lead or Account that the agent screen is sent to. Vtiger recommends on standard equipment a limit of 50,000 account records, but many users report no issues with 100,000 or more account records in their Vtiger systems.
Here are the SQL queries used by the vtiger_search.php script to find records in the vtiger system:
@@ -67,9 +69,9 @@ ls -l
* database name: vtigercrm504
* change default admin(vtadmin) and standarduser(vtuser) passwords
* click to install vtiger, then follow the on-screen instructions
# patch vtiger to fix issue with user synchronization:
wget http://www.eflo.net/files/vtiger_user_file_504.patch
patch -p1 < ./vtiger_user_file_504.patch
# patch vtiger to fix issue with user synchronization and add click-to-dial:
wget http://www.eflo.net/files/Vtiger504_vicidial.patch
patch -p1 < ./Vtiger504_vicidial.patch
@@ -278,3 +280,17 @@ duration_minutes: 5
recurringtype: --None--
Files edited within Vtiger to allow for click-to-dial and user integration:
./include/utils/ListViewUtils.php
./Smarty/templates/DetailViewFields.tpl
./Smarty/templates/DetailViewUI.tpl
./include/js/general.js
./include/js/dtlviewajax.js
./vtigerservice.php
./include/utils/UserInfoUtil.php
Click-to-dial:
uitype = '11' for phone fields
@@ -478,7 +478,8 @@ alter_custphone_override ENUM('NOT_ACTIVE','ALLOW_ALTER') default 'NOT_ACTIVE',
vdc_agent_api_access ENUM('0','1') default '0',
modify_inbound_dids ENUM('1','0') default '0',
delete_inbound_dids ENUM('1','0') default '0',
active ENUM('Y','N') default 'Y'
active ENUM('Y','N') default 'Y',
alert_enabled ENUM('1','0') default '0'
);
@@ -607,7 +608,8 @@ three_way_dial_prefix VARCHAR(20) default '',
web_form_target VARCHAR(100) NOT NULL default 'vdcwebform',
vtiger_search_category VARCHAR(100) default 'LEAD',
vtiger_create_call_record ENUM('Y','N') default 'Y',
vtiger_create_lead_record ENUM('Y','N') default 'Y'
vtiger_create_lead_record ENUM('Y','N') default 'Y',
vtiger_screen_login ENUM('Y','N') default 'Y'
);
CREATE TABLE vicidial_lists (
@@ -1357,7 +1359,7 @@ INSERT INTO vicidial_inbound_groups(group_id,group_name,group_color,active,queue
INSERT INTO vicidial_lists SET list_id='999',list_name='Default inbound list',campaign_id='TESTCAMP',active='N';
INSERT INTO vicidial_lists SET list_id='998',list_name='Default Manual list',campaign_id='TESTCAMP',active='N';
INSERT INTO system_settings (version,install_date) values('2.0.X', CURDATE());
INSERT INTO system_settings (version,install_date) values('2.0.5b0.5', CURDATE());
INSERT INTO vicidial_status_categories (vsc_id,vsc_name) values('UNDEFINED','Default Category');
@@ -1424,7 +1426,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='1125';
UPDATE system_settings SET db_schema_version='1126';
GRANT RELOAD ON *.* TO cron@'%';
GRANT RELOAD ON *.* TO cron@localhost;
@@ -0,0 +1,250 @@
--- ./Smarty/templates/DetailViewFields.tpl 2009-01-26 11:01:37.000000000 -0500
+++ ./Smarty/templates/DetailViewFields.tpl 2009-01-26 15:03:13.000000000 -0500
@@ -13,28 +13,34 @@
-->*}
<!-- This file is used to display the fields based on the ui type in detailview -->
- {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'} <!--TextBox-->
- <td width=25% class="dvtCellInfo" align="left">&nbsp;
- {if $keyid eq '55' || $keyid eq '255'}<!--SalutationSymbol-->
- {if $keyaccess eq $APP.LBL_NOT_ACCESSIBLE}
- <font color='red'>{$APP.LBL_NOT_ACCESSIBLE}</font>
- {else}
- {$keysalut}
- {/if}
- {*elseif $keyid eq '71' || $keyid eq '72'} <!--CurrencySymbol-->
+ {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'} <!--TextBox-->
+ <td width=25% class="dvtCellInfo" align="left">&nbsp;
+ {if $keyid eq '55' || $keyid eq '255'}<!--SalutationSymbol-->
+ {if $keyaccess eq $APP.LBL_NOT_ACCESSIBLE}
+ <font color='red'>{$APP.LBL_NOT_ACCESSIBLE}</font>
+ {else}
+ {$keysalut}
+ {/if}
+ {*elseif $keyid eq '71' || $keyid eq '72'} <!--CurrencySymbol-->
{$keycursymb*}
{/if}
<span id ="dtlview_{$label}">{$keyval}</span>
</td>
{elseif $keyid eq '13'} <!--Email-->
<td width=25% class="dvtCellInfo" align="left">
- {if $smarty.session.internal_mailer eq 1}
+ {if $smarty.session.internal_mailer eq 1}
<a href="javascript:InternalMailer({$ID},{$keyfldid},'{$keyfldname}','{$MODULE}','record_id');">{$keyval}</a>
{else}
<a href="mailto:{$keyval}" target="_blank" >{$keyval}</a>
{/if}
</span>
- </td>
+ </td>
+ {elseif $keyid eq '11'} <!--VICIDIALcall-->
+ <td width=25% class="dvtCellInfo" align="left">
+ <span id ="dtlview_{$label}">
+ VCcall: <a href="javascript:VICIDIALcall({$ID},'{$keyfldname}','{$keyval}');">{$keyval}</a>
+ </span>
+ </td>
{elseif $keyid eq '15' || $keyid eq '16' || $keyid eq '111'} <!--ComboBox-->
<td width=25% class="dvtCellInfo" align="left">&nbsp;
{foreach item=arr from=$keyoptions}
--- ./Smarty/templates/DetailViewUI.tpl 2009-01-26 11:03:34.000000000 -0500
+++ ./Smarty/templates/DetailViewUI.tpl 2009-01-26 15:03:44.000000000 -0500
@@ -13,7 +13,7 @@
-->*}
<!-- This file is used to display the fields based on the ui type in detailview -->
- {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'} <!--TextBox-->
+ {if $keyid eq '1' || $keyid eq 2 || $keyid eq '7' || $keyid eq '9' || $keyid eq '55' || $keyid eq '71' || $keyid eq '72' || $keyid eq '103' || $keyid eq '255'} <!--TextBox-->
<td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}" onmouseover="hndMouseOver({$keyid},'{$label}');" onmouseout="fnhide('crmspanid');">
{if $keyid eq '55' || $keyid eq '255'}<!--SalutationSymbol-->
{if $keyaccess eq $APP.LBL_NOT_ACCESSIBLE}
@@ -46,6 +46,17 @@
</div>
<div id="internal_mailer_{$keyfldname}" style="display: none;">{$keyfldid}####{$smarty.session.internal_mailer}</div>
</td>
+ {elseif $keyid eq '11'} <!--VICIDIALcall-->
+ <td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}" onmouseover="hndMouseOver({$keyid},'{$label}');" onmouseout="fnhide('crmspanid');">
+ VCcall: <span id="dtlview_{$label}">
+ <a href="javascript:VICIDIALcall({$ID},'{$keyfldname}','{$keyval}');">{$keyval}</a>
+ </span>
+ <div id="editarea_{$label}" style="display:none;">
+ <input class="detailedViewTextBox" onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'" type="text" id="txtbox_{$label}" name="{$keyfldname}" maxlength='100' value="{$keyval}"></input>
+ <br><input name="button_{$label}" type="button" class="crmbutton small save" value="{$APP.LBL_SAVE_LABEL}" onclick="dtlViewAjaxSave('{$label}','{$MODULE}',{$keyid},'{$keytblname}','{$keyfldname}','{$ID}');fnhide('crmspanid');"/> {$APP.LBL_OR}
+ <a href="javascript:;" onclick="hndCancel('dtlview_{$label}','editarea_{$label}','{$label}')" class="link">{$APP.LBL_CANCEL_BUTTON_LABEL}</a>
+ </div>
+ </td>
<!-- uitype 111 added for noneditable existing picklist values - ahmed -->
{elseif $keyid eq '15' || $keyid eq '16' || $keyid eq '111'} <!--ComboBox-->
{foreach item=arr from=$keyoptions}
--- ./vtigerservice.php 2009-01-26 20:13:22.000000000 -0500
+++ ./vtigerservice.php 2009-01-26 22:16:02.000000000 -0500
@@ -42,6 +42,58 @@
}
else
{
+ 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";
+
+ 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'];
+ $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";
+ $replyP = file("$URLbase$VCapiURL$VCpauseQuery");
+// sleep(1);
+ $replyC = file("$URLbase$VCapiURL$VCcallQuery");
+ echo "$replyP[0]|$replyC[0]\n";
+// echo "$URLbase$VCapiURL$VCcallQuery\n";
+ }
+ else
+ {
echo "<h1>vtigerCRM Soap Services</h1>";
echo "<li>vtigerCRM Outlook Plugin EndPoint URL -- Click <a href='vtigerservice.php?service=outlook'>here</a></li>";
echo "<li>vtigerCRM Word Plugin EndPoint URL -- Click <a href='vtigerservice.php?service=wordplugin'>here</a></li>";
@@ -49,6 +101,7 @@
echo "<li>vtigerCRM Customer Portal EndPoint URL -- Click <a href='vtigerservice.php?service=customerportal'>here</a></li>";
echo "<li>vtigerCRM WebForm EndPoint URL -- Click <a href='vtigerservice.php?service=webforms'>here</a></li>";
echo "<li>vtigerCRM FireFox Extension EndPoint URL -- Click <a href='vtigerservice.php?service=firefox'>here</a></li>";
+ }
}
--- ./include/js/dtlviewajax.js 2009-01-26 13:59:25.000000000 -0500
+++ ./include/js/dtlviewajax.js 2009-01-26 15:02:33.000000000 -0500
@@ -293,6 +293,9 @@
if(secEmail)
secEmail.value = tagValue;
}
+ }else if(uitype == '11')
+ {
+ getObj(dtlView).innerHTML = "<a href=\"javascript:VICIDIALcall("+crmId+",'"+fieldName+"','"+tagValue+"');\">"+tagValue+"&nbsp;</a>";
}else if(uitype == '17')
{
getObj(dtlView).innerHTML = "<a href=\"http://"+ tagValue+"\" target=\"_blank\">"+tagValue+"&nbsp;</a>";
--- ./include/js/general.js 2009-01-26 14:14:11.000000000 -0500
+++ ./include/js/general.js 2009-01-26 21:26:31.000000000 -0500
@@ -1768,6 +1768,54 @@
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 VCcallQuery = "VCcall=1&phone=" + phone;
+ 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);
+ }
+ else
+ {
+ self.close();
+ }
+ }
+ }
+ delete xmlhttp;
+ }
+}
function fnHide_Event(obj){
document.getElementById(obj).style.visibility = 'hidden';
}
--- ./include/utils/ListViewUtils.php 2009-01-26 10:42:14.000000000 -0500
+++ ./include/utils/ListViewUtils.php 2009-01-26 18:54:39.000000000 -0500
@@ -1291,6 +1291,11 @@
$value = '<a href="mailto:'.$field_val.'">'.$temp_val.'</a>';
}
+ // VICIDIAL agent screen phone number click to dial
+ elseif($uitype == 11)
+ {
+ $value = "VCcall: <a href=\"javascript:VICIDIALcall($entity_id,'$fieldname','$temp_val','$current_user->user_name');\">$temp_val</a>";
+ }
elseif($uitype == 56)
{
if($temp_val == 1)
--- ./include/utils/UserInfoUtil.php 2008-12-31 21:39:39.000000000 -0500
+++ ./include/utils/UserInfoUtil.php 2009-01-01 01:20:17.000000000 -0500
@@ -1175,6 +1175,18 @@
global $adb;
global $current_user;
global $seclog;
+ if (!file_exists('user_privileges/user_privileges_'.$current_user->id.'.php'))
+ {
+ $up = fopen('user_privileges/user_privileges_'.$current_user->id.'.php',"a");
+ fwrite($up, '<? $placeholder=0; ?>');
+ fclose($up);
+ }
+ if (!file_exists('user_privileges/sharing_privileges_'.$current_user->id.'.php'))
+ {
+ $sp = fopen('user_privileges/sharing_privileges_'.$current_user->id.'.php',"a");
+ fwrite($sp, '<? $placeholder=0; ?>');
+ fclose($sp);
+ }
require('user_privileges/user_privileges_'.$current_user->id.'.php');
require('user_privileges/sharing_privileges_'.$current_user->id.'.php');
$permission = "no";
File diff suppressed because it is too large Load Diff
+6
View File
@@ -640,3 +640,9 @@ index(api_date)
);
UPDATE system_settings SET db_schema_version='1125';
ALTER TABLE vicidial_campaigns ADD vtiger_screen_login ENUM('Y','N') default 'Y';
ALTER TABLE vicidial_users ADD alert_enabled ENUM('1','0') default '0';
UPDATE system_settings SET db_schema_version='1126';
@@ -1,21 +0,0 @@
--- ./include/utils/UserInfoUtil.php 2008-12-31 21:39:39.000000000 -0500
+++ ./include/utils/UserInfoUtil.php 2009-01-01 01:20:17.000000000 -0500
@@ -1175,6 +1175,18 @@
global $adb;
global $current_user;
global $seclog;
+ if (!file_exists('user_privileges/user_privileges_'.$current_user->id.'.php'))
+ {
+ $up = fopen('user_privileges/user_privileges_'.$current_user->id.'.php',"a");
+ fwrite($up, '<? $placeholder=0; ?>');
+ fclose($up);
+ }
+ if (!file_exists('user_privileges/sharing_privileges_'.$current_user->id.'.php'))
+ {
+ $sp = fopen('user_privileges/sharing_privileges_'.$current_user->id.'.php',"a");
+ fwrite($sp, '<? $placeholder=0; ?>');
+ fclose($sp);
+ }
require('user_privileges/user_privileges_'.$current_user->id.'.php');
require('user_privileges/sharing_privileges_'.$current_user->id.'.php');
$permission = "no";
@@ -373,7 +373,10 @@ Vtiger Create Call Record -<\/B> If Vtiger integration is enabled in the system
Vtiger Create Call Record:||
Vtiger Create Lead Record -<\/B> If Vtiger integration is enabled in the system settings and Vtiger Search Category includes LEAD then this setting will define whether a new Vtiger lead record is created when the agent goes to the vtiger_search page and no record is found to have the call phone number. Default is Y||
Vtiger Create Lead Record:||
Vtiger Screen Login -<\/B> If Vtiger integration is enabled in the system settings then this setting will define whether the user is logged into the Vtiger interface automatically when they login to VICIDIAL. Default is Y||
Vtiger Screen Login:||
Alert Enabled -<\/B> This field shows whether the agent has web browser alerts enabled for when calls come into their vicidial.php session. Default is 0 for NO||
Alert Enabled:||
############################################################ CLIENT
+2
View File
@@ -366,6 +366,8 @@ if ($function == 'external_pause')
################################################################################
if ($function == 'external_dial')
{
$value = ereg_replace("[^0-9]","",$value);
if ( (strlen($value)<2) || (strlen($agent_user)<2) || (strlen($search)<2) || (strlen($preview)<2) || (strlen($focus)<2) )
{
$result = 'ERROR';
+52 -20
View File
@@ -13,7 +13,7 @@
# - $pass
# optional variables:
# - $format - ('text','debug')
# - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT','PauseCodeSubmit','LogiNCamPaigns','alt_phone_change')
# - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT','PauseCodeSubmit','LogiNCamPaigns','alt_phone_change','AlertControl')
# - $stage - ('start','finish','lookup','new')
# - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -')
# - $conf_exten - ('8600011',...)
@@ -181,12 +181,13 @@
# 81126-1522 - Fixed callback comments bug
# 81211-0420 - Fixed Manual dial agent_log bug
# 90120-1718 - Added external pause and dial option
# 90126-1759 - Fixed QM section that wasn't qualified and added agent alert option
#
$version = '2.0.5-98';
$build = '90120-1718';
$version = '2.0.5-99';
$build = '90126-1759';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=184;
$mysql_log_count=185;
$one_mysql_log=0;
require("dbconnect.php");
@@ -1124,6 +1125,34 @@ if ($ACTION == 'alt_phone_change')
}
################################################################################
### AlertControl - change the agent alert setting in vicidial_users
###
################################################################################
if ($ACTION == 'AlertControl')
{
if (strlen($stage)<1)
{
$channel_live=0;
echo "AGENT ALERT SETTING NOT CHANGED\n";
echo "$stage is not valid\n";
exit;
}
else
{
if (ereg('ON',$stage)) {$stage = '1';}
else {$stage = '0';}
$stmt = "UPDATE vicidial_users set alert_enabled='$stage' where user='$user' and pass='$pass';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'000185',$user,$server_ip,$session_name,$one_mysql_log);}
echo "AGENT ALERT SETTING CHANGED $stage\n";
}
}
################################################################################
### manDiaLskip - for manual VICIDiaL dialing this skips the lead that was
### previewed in the step above and puts it back in orig status
@@ -2052,25 +2081,28 @@ if ($stage == "end")
$affected_rows = mysql_affected_rows($link);
}
if ( (strlen($QL_term) > 0) and ($leaving_threeway > 0) )
if ($enable_queuemetrics_logging > 0)
{
$stmt="SELECT count(*) from queue_log where call_id='$MDnextCID' and verb='COMPLETEAGENT' and queue='$VDcampaign_id';";
$rslt=mysql_query($stmt, $linkB);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$linkB,$mel,$stmt,'00093',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$VAC_cc_ct = mysql_num_rows($rslt);
if ($VAC_cc_ct > 0)
if ( (strlen($QL_term) > 0) and ($leaving_threeway > 0) )
{
$row=mysql_fetch_row($rslt);
$agent_complete = $row[0];
}
if ($agent_complete < 1)
{
$stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='$MDnextCID',queue='$VDcampaign_id',agent='Agent/$user',verb='COMPLETEAGENT',data1='$CLstage',data2='$length_in_sec',data3='1',serverid='$queuemetrics_log_id';";
if ($DB) {echo "$stmt\n";}
$stmt="SELECT count(*) from queue_log where call_id='$MDnextCID' and verb='COMPLETEAGENT' and queue='$VDcampaign_id';";
$rslt=mysql_query($stmt, $linkB);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$linkB,$mel,$stmt,'00094',$user,$server_ip,$session_name,$one_mysql_log);}
$affected_rows = mysql_affected_rows($linkB);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$linkB,$mel,$stmt,'00093',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$VAC_cc_ct = mysql_num_rows($rslt);
if ($VAC_cc_ct > 0)
{
$row=mysql_fetch_row($rslt);
$agent_complete = $row[0];
}
if ($agent_complete < 1)
{
$stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='$MDnextCID',queue='$VDcampaign_id',agent='Agent/$user',verb='COMPLETEAGENT',data1='$CLstage',data2='$length_in_sec',data3='1',serverid='$queuemetrics_log_id';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $linkB);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$linkB,$mel,$stmt,'00094',$user,$server_ip,$session_name,$one_mysql_log);}
$affected_rows = mysql_affected_rows($linkB);
}
}
}
}
+98 -13
View File
@@ -214,10 +214,11 @@
# 90102-1402 - Added time sync check notification
# 90115-0619 - Added ability to send Local Closer to AGENTDIRECT agent_only
# 90120-1719 - Added API pause/resume and number dial functionality
# 90126-2302 - Added Vtiger login option and agent alert option
#
$version = '2.0.5-193';
$build = '90120-1719';
$version = '2.0.5-194';
$build = '90126-2302';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=53;
$one_mysql_log=0;
@@ -292,7 +293,7 @@ $random = (rand(1000000, 9999999) + 10000000);
#############################################
##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT use_non_latin,vdc_header_date_format,vdc_customer_date_format,vdc_header_phone_format,webroot_writable,timeclock_end_of_day FROM system_settings;";
$stmt = "SELECT use_non_latin,vdc_header_date_format,vdc_customer_date_format,vdc_header_phone_format,webroot_writable,timeclock_end_of_day,vtiger_url,enable_vtiger_integration FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01001',$VD_login,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
@@ -307,6 +308,8 @@ while ($i < $qm_conf_ct)
$vdc_header_phone_format = $row[3];
$WeBRooTWritablE = $row[4];
$timeclock_end_of_day = $row[5];
$vtiger_url = $row[6];
$enable_vtiger_integration = $row[7];
$i++;
}
@@ -341,6 +344,7 @@ $hangup_all_non_reserved= '1'; # set to 1 to force hangup all non-reserved chann
$LogouTKicKAlL = '1'; # set to 1 to hangup all calls in session upon agent logout
$PhoneSComPIP = '1'; # set to 1 to log computer IP to phone if blank, set to 2 to force log each login
$DefaulTAlTDiaL = '0'; # set to 1 to enable ALT DIAL by default if enabled for the campaign
$AgentAlert_allowed = '1'; # set to 1 to allow Agent alert option
$TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen
@@ -702,7 +706,7 @@ $VDloginDISPLAY=0;
$login=strtoupper($VD_login);
$password=strtoupper($VD_pass);
##### grab the full name of the agent
$stmt="SELECT full_name,user_level,hotkeys_active,agent_choose_ingroups,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,closer_default_blended,user_group,vicidial_recording_override,alter_custphone_override from vicidial_users where user='$VD_login' and pass='$VD_pass'";
$stmt="SELECT full_name,user_level,hotkeys_active,agent_choose_ingroups,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,closer_default_blended,user_group,vicidial_recording_override,alter_custphone_override,alert_enabled from vicidial_users where user='$VD_login' and pass='$VD_pass'";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01007',$VD_login,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
@@ -719,7 +723,10 @@ $VDloginDISPLAY=0;
$VU_user_group=$row[10];
$VU_vicidial_recording_override=$row[11];
$VU_alter_custphone_override=$row[12];
$VU_alert_enabled=$row[13];
if ($VU_alert_enabled > 0) {$VU_alert_enabled = 'ON';}
else {$VU_alert_enabled = 'OFF';}
### BEGIN - CHECK TO SEE IF AGENT IS LOGGED IN TO TIMECLOCK, IF NOT, OUTPUT ERROR
$stmt="SELECT forced_timeclock_login from vicidial_user_groups where user_group='$VU_user_group';";
@@ -885,7 +892,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 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 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";}
@@ -932,6 +939,7 @@ $VDloginDISPLAY=0;
$dial_method = $row[39];
$three_way_dial_prefix = $row[40];
$web_form_target = $row[41];
$vtiger_screen_login = $row[42];
if ( (!ereg('DISABLED',$VU_vicidial_recording_override)) and ($VU_vicidial_recording > 0) )
{
@@ -2153,6 +2161,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var TEMP_VDIC_web_form_address = '';
var APIPausE_ID = '99999';
var APIDiaL_ID = '99999';
var VtigeRLogiNScripT = '<? echo $vtiger_screen_login ?>';
var VtigeRurl = '<? echo $vtiger_url ?>';
var VtigeREnableD = '<? echo $enable_vtiger_integration ?>';
var alert_enabled = '<? echo $VU_alert_enabled ?>'
var DiaLControl_auto_HTML = "<IMG SRC=\"./images/vdc_LB_pause_OFF.gif\" border=0 alt=\" Pause \"><a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADready');\"><IMG SRC=\"./images/vdc_LB_resume.gif\" border=0 alt=\"Resume\"></a>";
var DiaLControl_auto_HTML_ready = "<a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADpause');\"><IMG SRC=\"./images/vdc_LB_pause.gif\" border=0 alt=\" Pause \"></a><IMG SRC=\"./images/vdc_LB_resume_OFF.gif\" border=0 alt=\"Resume\">";
var DiaLControl_auto_HTML_OFF = "<IMG SRC=\"./images/vdc_LB_pause_OFF.gif\" border=0 alt=\" Pause \"><IMG SRC=\"./images/vdc_LB_resume_OFF.gif\" border=0 alt=\"Resume\">";
@@ -2315,6 +2327,60 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
// ################################################################################
// Send alert control command for agent
function alert_control(taskalert)
{
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)
{
alert_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=AlertControl&format=text&stage=" + taskalert;
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(alert_query);
xmlhttp.onreadystatechange = function()
{
if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
{
Nactiveext = null;
Nactiveext = xmlhttp.responseText;
// alert(xmlhttp.responseText);
}
}
delete xmlhttp;
}
if (taskalert=='ON')
{
alert_enabled = 'ON';
document.getElementById("AgentAlertSpan").innerHTML = "<a href=\"#\" onclick=\"alert_control('OFF');return false;\">Alert is ON</a>";
}
else
{
alert_enabled = 'OFF';
document.getElementById("AgentAlertSpan").innerHTML = "<a href=\"#\" onclick=\"alert_control('ON');return false;\">Alert is OFF</a>";
}
}
// ################################################################################
// park customer and place 3way call
function xfer_park_dial()
@@ -2711,7 +2777,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
// set to pause on next dispo
document.vicidial_form.DispoSelectStop.checked=true;
alert("Setting dispo to PAUSE");
// alert("Setting dispo to PAUSE");
}
else
{
@@ -2754,7 +2820,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
else
{document.vicidial_form.LeadLookuP.checked=false;}
if (APIDiaL_array_detail[4] == 'YES') // focus on vicidial agent screen
{window.focus();}
{window.focus(); alert("Placing call to:" + APIDiaL_array_detail[1] + " " + APIDiaL_array_detail[0]);}
if (APIDiaL_array_detail[3] == 'YES') // call preview
{NeWManuaLDiaLCalLSubmiT('PREVIEW');}
else
@@ -3999,7 +4065,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
if (VDIC_web_form_address.match(regWFAcustom))
{
URLDecode(VDIC_web_form_address,'YES');
var TEMP_VDIC_web_form_address = decoded;
TEMP_VDIC_web_form_address = decoded;
TEMP_VDIC_web_form_address = TEMP_VDIC_web_form_address.replace(regWFAcustom, '');
}
else
@@ -4066,7 +4132,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
else
{web_form_vars = '?' + web_form_vars}
var TEMP_VDIC_web_form_address = VDIC_web_form_address + "" + web_form_vars;
TEMP_VDIC_web_form_address = VDIC_web_form_address + "" + web_form_vars;
}
document.getElementById("WebFormSpan").innerHTML = "<a href=\"" + TEMP_VDIC_web_form_address + "\" target=\"" + web_form_target + "\" onMouseOver=\"WebFormRefresH();\"><IMG SRC=\"./images/vdc_LB_webform.gif\" border=0 alt=\"Web Form\"></a>\n";
@@ -4851,7 +4917,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
if (VDIC_web_form_address.match(regWFAcustom))
{
URLDecode(VDIC_web_form_address,'YES');
var TEMP_VDIC_web_form_address = decoded;
TEMP_VDIC_web_form_address = decoded;
TEMP_VDIC_web_form_address = TEMP_VDIC_web_form_address.replace(regWFAcustom, '');
}
else
@@ -4918,7 +4984,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
else
{web_form_vars = '?' + web_form_vars}
var TEMP_VDIC_web_form_address = VDIC_web_form_address + "" + web_form_vars;
TEMP_VDIC_web_form_address = VDIC_web_form_address + "" + web_form_vars;
}
@@ -4957,6 +5023,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
window.clipboardData.setData('Text', tmp_clip.value)
}
if (alert_enabled=='ON')
{
alert(" Incoming: " + status_display_number + "\n Group- " + VDIC_data_VDIG[1] + " &nbsp; " + VDIC_fronter);
}
}
else
{
@@ -4991,7 +5061,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
if (VDIC_web_form_address.match(regWFAcustom))
{
URLDecode(VDIC_web_form_address,'YES');
var TEMP_VDIC_web_form_address = decoded;
TEMP_VDIC_web_form_address = decoded;
TEMP_VDIC_web_form_address = TEMP_VDIC_web_form_address.replace(regWFAcustom, '');
}
else
@@ -5058,7 +5128,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
else
{web_form_vars = '?' + web_form_vars}
var TEMP_VDIC_web_form_address = VDIC_web_form_address + "" + web_form_vars;
TEMP_VDIC_web_form_address = VDIC_web_form_address + "" + web_form_vars;
}
@@ -5651,6 +5721,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
WebFormRefresH('NO','YES');
document.getElementById("WebFormSpan").innerHTML = "<IMG SRC=\"./images/vdc_LB_webform_OFF.gif\" border=0 alt=\"Web Form\">";
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');
DispoSelect_submit();
@@ -6886,6 +6958,11 @@ else
document.getElementById("DiaLControl").innerHTML = DiaLControl_manual_HTML;
}
}
if ( (VtigeRLogiNScripT == 'Y') && (VtigeREnableD > 0) )
{
document.getElementById("ScriptContents").innerHTML = "<iframe src=\"" + VtigeRurl + "?index.php?module=Users&action=Authenticate&return_module=Users&return_action=Login&user_name=" + user + "&user_password=" + pass + "&login_theme=softed&login_language=en_us\" style=\"width:580;height:290;background-color:transparent;\" scrolling=\"auto\" frameborder=\"0\" allowtransparency=\"true\" id=\"popupFrame\" name=\"popupFrame\" width=\"460\" height=\"290\" STYLE=\"z-index:17\"> </iframe> ";
}
VICIDiaL_closer_login_checked = 1;
}
else
@@ -7888,6 +7965,14 @@ Your Status: <span id="AgentStatusStatus"></span> <BR>Calls Dialing: <span id="A
</td></tr>
<tr><td colspan=3><span id="outboundcallsspan"></span></td></tr>
<tr><td colspan=3><font class="body_small"><span id="AgentAlertSpan">
<?
if ( (ereg('ON',$VU_alert_enabled)) and ($AgentAlert_allowed > 0) )
{echo "<a href=\"#\" onclick=\"alert_control('OFF');return false;\">Alert is ON</a>";}
else
{echo "<a href=\"#\" onclick=\"alert_control('ON');return false;\">Alert is OFF</a>";}
?>
</span></td></tr>
<tr><td colspan=3>
<font class="body_small">
<span style="position:absolute;left:0px;top:700px;z-index:66;" id="debugbottomspan"></span>
+26 -6
View File
@@ -879,6 +879,8 @@ if (isset($_GET["vtiger_create_call_record"])) {$vtiger_create_call_record=$_G
elseif (isset($_POST["vtiger_create_call_record"])) {$vtiger_create_call_record=$_POST["vtiger_create_call_record"];}
if (isset($_GET["vtiger_create_lead_record"])) {$vtiger_create_lead_record=$_GET["vtiger_create_lead_record"];}
elseif (isset($_POST["vtiger_create_lead_record"])) {$vtiger_create_lead_record=$_POST["vtiger_create_lead_record"];}
if (isset($_GET["vtiger_screen_login"])) {$vtiger_screen_login=$_GET["vtiger_screen_login"];}
elseif (isset($_POST["vtiger_screen_login"])) {$vtiger_screen_login=$_POST["vtiger_screen_login"];}
if (isset($script_id)) {$script_id= strtoupper($script_id);}
if (isset($lead_filter_id)) {$lead_filter_id = strtoupper($lead_filter_id);}
@@ -1248,6 +1250,7 @@ $recording_web_link = ereg_replace("[^-\_0-9a-zA-Z]","",$recording_web_link);
$vtiger_search_category = ereg_replace("[^-\_0-9a-zA-Z]","",$vtiger_search_category);
$vtiger_create_call_record = ereg_replace("[^-\_0-9a-zA-Z]","",$vtiger_create_call_record);
$vtiger_create_lead_record = ereg_replace("[^-\_0-9a-zA-Z]","",$vtiger_create_lead_record);
$vtiger_screen_login = ereg_replace("[^-\_0-9a-zA-Z]","",$vtiger_screen_login);
### ALPHA-NUMERIC and underscore and dash and comma
$logins_list = ereg_replace("[^-\,\_0-9a-zA-Z]","",$logins_list);
@@ -1521,11 +1524,12 @@ $survey_camp_record_dir = ereg_replace(";","",$survey_camp_record_dir);
# 90101-1216 - Added options for user synchronization with vtiger
# 90112-0335 - Added vtiger_create_lead_record and vtiger_create_lead_record options
# 90115-0502 - Activated AGENT DID routing option
# 90126-2256 - Added vtiger_screen_login campaign option and user agent alert option
#
# make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time
$admin_version = '2.0.5-158';
$build = '90115-0502';
$admin_version = '2.0.5-159';
$build = '90126-2256';
$STARTtime = date("U");
$SQLdate = date("Y-m-d H:i:s");
@@ -2454,6 +2458,11 @@ echo "<TABLE WIDTH=98% BGCOLOR=#E6E6E6 cellpadding=2 cellspacing=0><TR><TD ALIGN
<BR>
<B>VICIDIAL Recording Override -</B> This option will override whatever the option is in the campaign for recording. DISABLED will not override the campaign recording setting. NEVER will disable recording on the client. ONDEMAND is the default and allows the agent to start and stop recording as needed. ALLCALLS will start recording on the client whenever a call is sent to an agent. ALLFORCE will start recording on the client whenever a call is sent to an agent giving the agent no option to stop recording. For ALLCALLS and ALLFORCE there is an option to use the Recording Delay to cut down on very short recordings and recude system load.
<BR>
<A NAME="vicidial_users-alert_enabled">
<BR>
<B>Alert Enabled -</B> This field shows whether the agent has web browser alerts enabled for when calls come into their vicidial.php session. Default is 0 for NO.
<BR>
<A NAME="vicidial_users-vicidial_users-campaign_ranks">
<BR>
@@ -3124,6 +3133,11 @@ echo "<TABLE WIDTH=98% BGCOLOR=#E6E6E6 cellpadding=2 cellspacing=0><TR><TD ALIGN
<BR>
<B>Vtiger Create Lead Record -</B> If Vtiger integration is enabled in the system settings and Vtiger Search Category includes LEAD then this setting will define whether a new Vtiger lead record is created when the agent goes to the vtiger_search page and no record is found to have the call phone number. Default is Y.
<BR>
<A NAME="vicidial_campaigns-vtiger_screen_login">
<BR>
<B>Vtiger Screen Login -</B> If Vtiger integration is enabled in the system settings then this setting will define whether the user is logged into the Vtiger interface automatically when they login to VICIDIAL. Default is Y.
@@ -6396,7 +6410,7 @@ if ($ADD=="2A")
$rslt=mysql_query($stmt, $link);
}
$stmt="INSERT INTO vicidial_users (user,pass,full_name,user_level,user_group,phone_login,phone_pass,delete_users,delete_user_groups,delete_lists,delete_campaigns,delete_ingroups,delete_remote_agents,load_leads,campaign_detail,ast_admin_access,ast_delete_phones,delete_scripts,modify_leads,hotkeys_active,change_agent_campaign,agent_choose_ingroups,closer_campaigns,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,delete_filters,alter_agent_interface_options,closer_default_blended,delete_call_times,modify_call_times,modify_users,modify_campaigns,modify_lists,modify_scripts,modify_filters,modify_ingroups,modify_usergroups,modify_remoteagents,modify_servers,view_reports,vicidial_recording_override,alter_custdata_override,qc_enabled,qc_user_level,qc_pass,qc_finish,qc_commit,add_timeclock_log,modify_timeclock_log,delete_timeclock_log,alter_custphone_override,vdc_agent_api_access,modify_inbound_dids,delete_inbound_dids,active) SELECT \"$user\",\"$pass\",\"$full_name\",user_level,user_group,phone_login,phone_pass,delete_users,delete_user_groups,delete_lists,delete_campaigns,delete_ingroups,delete_remote_agents,load_leads,campaign_detail,ast_admin_access,ast_delete_phones,delete_scripts,modify_leads,hotkeys_active,change_agent_campaign,agent_choose_ingroups,closer_campaigns,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,delete_filters,alter_agent_interface_options,closer_default_blended,delete_call_times,modify_call_times,modify_users,modify_campaigns,modify_lists,modify_scripts,modify_filters,modify_ingroups,modify_usergroups,modify_remoteagents,modify_servers,view_reports,vicidial_recording_override,alter_custdata_override,qc_enabled,qc_user_level,qc_pass,qc_finish,qc_commit,add_timeclock_log,modify_timeclock_log,delete_timeclock_log,alter_custphone_override,vdc_agent_api_access,modify_inbound_dids,delete_inbound_dids,active from vicidial_users where user=\"$source_user_id\";";
$stmt="INSERT INTO vicidial_users (user,pass,full_name,user_level,user_group,phone_login,phone_pass,delete_users,delete_user_groups,delete_lists,delete_campaigns,delete_ingroups,delete_remote_agents,load_leads,campaign_detail,ast_admin_access,ast_delete_phones,delete_scripts,modify_leads,hotkeys_active,change_agent_campaign,agent_choose_ingroups,closer_campaigns,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,delete_filters,alter_agent_interface_options,closer_default_blended,delete_call_times,modify_call_times,modify_users,modify_campaigns,modify_lists,modify_scripts,modify_filters,modify_ingroups,modify_usergroups,modify_remoteagents,modify_servers,view_reports,vicidial_recording_override,alter_custdata_override,qc_enabled,qc_user_level,qc_pass,qc_finish,qc_commit,add_timeclock_log,modify_timeclock_log,delete_timeclock_log,alter_custphone_override,vdc_agent_api_access,modify_inbound_dids,delete_inbound_dids,active,alert_enabled) SELECT \"$user\",\"$pass\",\"$full_name\",user_level,user_group,phone_login,phone_pass,delete_users,delete_user_groups,delete_lists,delete_campaigns,delete_ingroups,delete_remote_agents,load_leads,campaign_detail,ast_admin_access,ast_delete_phones,delete_scripts,modify_leads,hotkeys_active,change_agent_campaign,agent_choose_ingroups,closer_campaigns,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,delete_filters,alter_agent_interface_options,closer_default_blended,delete_call_times,modify_call_times,modify_users,modify_campaigns,modify_lists,modify_scripts,modify_filters,modify_ingroups,modify_usergroups,modify_remoteagents,modify_servers,view_reports,vicidial_recording_override,alter_custdata_override,qc_enabled,qc_user_level,qc_pass,qc_finish,qc_commit,add_timeclock_log,modify_timeclock_log,delete_timeclock_log,alter_custphone_override,vdc_agent_api_access,modify_inbound_dids,delete_inbound_dids,active,alert_enabled from vicidial_users where user=\"$source_user_id\";";
$rslt=mysql_query($stmt, $link);
$stmtA="INSERT INTO vicidial_inbound_group_agents (user,group_id,group_rank,group_weight,calls_today) SELECT \"$user\",group_id,group_rank,group_weight,\"0\" from vicidial_inbound_group_agents where user=\"$source_user_id\";";
@@ -6612,7 +6626,7 @@ if ($ADD==20)
{
echo "<br><B>CAMPAIGN COPIED: $campaign_id copied from $source_campaign_id</B>\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) 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 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) 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 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');";
@@ -8333,7 +8347,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' 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' where campaign_id='$campaign_id';";
$rslt=mysql_query($stmtA, $link);
if ($reset_hopper == 'Y')
@@ -11512,7 +11526,7 @@ if ($ADD==3)
$modify_inbound_dids = $row[56];
$delete_inbound_dids = $row[57];
$active = $row[58];
$alert_enabled = $row[59];
if ( ($user_level >= $LOGuser_level) and ($LOGuser_level < 9) )
{
@@ -11577,6 +11591,8 @@ if ($ADD==3)
echo "<tr bgcolor=#B6D3FC><td align=right>VICIDIAL Recording Override: </td><td align=left><select size=1 name=vicidial_recording_override><option>DISABLED</option><option>NEVER</option><option>ONDEMAND</option><option>ALLCALLS</option><option>ALLFORCE</option><option SELECTED>$vicidial_recording_override</option></select>$NWB#vicidial_users-vicidial_recording_override$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Agent Alter Customer Data Override: </td><td align=left><select size=1 name=alter_custdata_override><option>NOT_ACTIVE</option><option>ALLOW_ALTER</option><option SELECTED>$alter_custdata_override</option></select>$NWB#vicidial_users-alter_custdata_override$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Agent Alter Customer Phone Override: </td><td align=left><select size=1 name=alter_custphone_override><option>NOT_ACTIVE</option><option>ALLOW_ALTER</option><option SELECTED>$alter_custphone_override</option></select>$NWB#vicidial_users-alter_custphone_override$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Alert Enabled: </td><td align=left>$alert_enabled $NWB#vicidial_users-alert_enabled$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2>Campaign Ranks: $NWB#vicidial_users-campaign_ranks$NWE<BR>\n";
echo "<table border=0>\n";
echo "$RANKcampaigns_list";
@@ -11795,6 +11811,7 @@ if ($ADD==31)
$vtiger_search_category = $row[99];
$vtiger_create_call_record = $row[100];
$vtiger_create_lead_record = $row[101];
$vtiger_screen_login = $row[102];
if (ereg("DISABLED",$list_order_mix))
{$DEFlistDISABLE = ''; $DEFstatusDISABLED=0;}
@@ -12237,12 +12254,15 @@ if ($ADD==31)
echo "<tr bgcolor=#B6D3FC><td align=right>Vtiger Create Call Record: </td><td align=left><select size=1 name=vtiger_create_call_record><option>Y</option><option>N</option><option SELECTED>$vtiger_create_call_record</option></select>$NWB#vicidial_campaigns-vtiger_create_call_record$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Vtiger Create Lead Record: </td><td align=left><select size=1 name=vtiger_create_lead_record><option>Y</option><option>N</option><option SELECTED>$vtiger_create_lead_record</option></select>$NWB#vicidial_campaigns-vtiger_create_lead_record$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Vtiger Screen Login: </td><td align=left><select size=1 name=vtiger_screen_login><option>Y</option><option>N</option><option SELECTED>$vtiger_screen_login</option></select>$NWB#vicidial_campaigns-vtiger_screen_login$NWE</td></tr>\n";
}
else
{
echo "<input type=hidden name=vtiger_search_category value=\"$vtiger_search_category\">\n";
echo "<input type=hidden name=vtiger_create_call_record value=\"$vtiger_create_call_record\">\n";
echo "<input type=hidden name=vtiger_create_lead_record value=\"$vtiger_create_lead_record\">\n";
echo "<input type=hidden name=vtiger_screen_login value=\"$vtiger_screen_login\">\n";
}
if ($campaign_allow_inbound == 'Y')
@@ -1,7 +1,7 @@
<?
# admin_search_lead.php
#
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# AST GUI database administration search for lead info
# admin_modify_lead.php
@@ -15,6 +15,7 @@
# - Added required user/pass to gain access to this page
# - Changed results to multi-record
# 80710-0023 - Added searching by list, user, status
# 90121-0500 - Added filter for phone to remove non-digits
#
require("dbconnect.php");
@@ -43,6 +44,7 @@ if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];}
$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER);
$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW);
$phone = ereg_replace("[^0-9]","",$phone);
$STARTtime = date("U");
$TODAY = date("Y-m-d");
@@ -108,7 +110,7 @@ $browser = getenv("HTTP_USER_AGENT");
</head>
<body bgcolor=white>
<?
echo "<a href=\"./admin.php?ADD=100\">VICIDIAL ADMIN</a>: Lead search<BR>\n";
echo "<a href=\"./admin.php?ADD=100\">VICIDIAL ADMIN</a>: Lead search: $vendor_id $phone $lead_id $status $list_id $user<BR>\n";
if ( (!$vendor_id) and (!$phone) and (!$lead_id) and ( (strlen($status)<1) and (strlen($list_id)<1) and (strlen($user)<1) ))
+6 -6
View File
@@ -283,7 +283,7 @@ if ($acctid_search > 0)
}
echo "<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=$account_URL\">\n";
echo "</head>\n";
echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0 onLoad=\"document.forms[0].search_phone.focus(); setTimeout('document.forms[0].phone.focus()', 1000); self.focus()\">\n";
echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0\">\n";
echo "<CENTER><FONT FACE=\"Courier\" COLOR=BLACK SIZE=3>\n";
echo "<PRE>";
@@ -444,7 +444,7 @@ if ($account_search > 0)
}
echo "<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=$account_URL\">\n";
echo "</head>\n";
echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0 onLoad=\"document.forms[0].search_phone.focus(); setTimeout('document.forms[0].phone.focus()', 1000); self.focus()\">\n";
echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0\">\n";
echo "<CENTER><FONT FACE=\"Courier\" COLOR=BLACK SIZE=3>\n";
echo "<PRE>";
@@ -491,7 +491,7 @@ if ($vendor_search > 0)
$account_URL = "$vtiger_url/index.php?module=Vendors&action=DetailView&record=$vendorid&parenttab=Inventory";
echo "<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=$account_URL\">\n";
echo "</head>\n";
echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0 onLoad=\"document.forms[0].search_phone.focus(); setTimeout('document.forms[0].phone.focus()', 1000); self.focus()\">\n";
echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0\">\n";
echo "<CENTER><FONT FACE=\"Courier\" COLOR=BLACK SIZE=3>\n";
echo "<PRE>";
@@ -527,7 +527,7 @@ if ($lead_search > 0)
if (ereg('Y',$vtiger_create_lead_record))
{
echo "</head>\n";
echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0 onLoad=\"document.forms[0].search_phone.focus(); setTimeout('document.forms[0].phone.focus()', 1000); self.focus()\">\n";
echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0\">\n";
echo "<CENTER><FONT FACE=\"Courier\" COLOR=BLACK SIZE=3>\n";
echo "$phone not found, creating account...\n";
@@ -656,7 +656,7 @@ if ($lead_search > 0)
echo "<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=$account_URL\">\n";
echo "</head>\n";
echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0 onLoad=\"document.forms[0].search_phone.focus(); setTimeout('document.forms[0].phone.focus()', 1000); self.focus()\">\n";
echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0\">\n";
echo "<CENTER><FONT FACE=\"Courier\" COLOR=BLACK SIZE=3>\n";
echo "<PRE>";
@@ -740,7 +740,7 @@ if ($lead_search > 0)
}
echo "<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=$account_URL\">\n";
echo "</head>\n";
echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0 onLoad=\"document.forms[0].search_phone.focus(); setTimeout('document.forms[0].phone.focus()', 1000); self.focus()\">\n";
echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0\">\n";
echo "<CENTER><FONT FACE=\"Courier\" COLOR=BLACK SIZE=3>\n";
echo "<PRE>";