Added dccsv43 lead loading format

Added ability to use security_phrase as a custom CID field per lead

git-svn-id: svn://192.168.202.10@1344 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2010-02-21 17:06:32 +00:00
parent a5903e4d42
commit 831c5879e2
10 changed files with 190 additions and 60 deletions
+3
View File
@@ -45,6 +45,9 @@ OTHER CHANGES:
7. Added custom dialplan entries fields for System Settings and Servers
8. Added ability to use security_phrase field in the vicidial_list table as a
Custom CallerID, must enable in Campaign settings
+26 -14
View File
@@ -311,6 +311,7 @@ while($one_day_interval > 0)
@DBIPserver_trunks_allowed=@MT;
@DBIPqueue_priority=@MT;
@DBIPdial_method=@MT;
@DBIPuse_custom_cid=@MT;
$active_line_counter=0;
$user_counter=0;
@@ -505,7 +506,7 @@ while($one_day_interval > 0)
### grab the dial_level and multiply by active agents to get your goalcalls
$DBIPadlevel[$user_CIPct]=0;
$stmtA = "SELECT auto_dial_level,local_call_time,dial_timeout,dial_prefix,campaign_cid,active,campaign_vdad_exten,closer_campaigns,omit_phone_code,available_only_ratio_tally,auto_alt_dial,campaign_allow_inbound,queue_priority,dial_method FROM vicidial_campaigns where campaign_id='$DBIPcampaign[$user_CIPct]'";
$stmtA = "SELECT auto_dial_level,local_call_time,dial_timeout,dial_prefix,campaign_cid,active,campaign_vdad_exten,closer_campaigns,omit_phone_code,available_only_ratio_tally,auto_alt_dial,campaign_allow_inbound,queue_priority,dial_method,use_custom_cid FROM vicidial_campaigns where campaign_id='$DBIPcampaign[$user_CIPct]'";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -514,27 +515,29 @@ while($one_day_interval > 0)
while ($sthArows > $rec_count)
{
@aryA = $sthA->fetchrow_array;
$DBIPadlevel[$user_CIPct] = $aryA[0];
$DBIPcalltime[$user_CIPct] = $aryA[1];
$DBIPdialtimeout[$user_CIPct] = $aryA[2];
$DBIPdialprefix[$user_CIPct] = $aryA[3];
$DBIPcampaigncid[$user_CIPct] = $aryA[4];
$DBIPactive[$user_CIPct] = $aryA[5];
$DBIPvdadexten[$user_CIPct] = $aryA[6];
$DBIPclosercamp[$user_CIPct] = $aryA[7];
$omit_phone_code = $aryA[8];
$DBIPadlevel[$user_CIPct] = $aryA[0];
$DBIPcalltime[$user_CIPct] = $aryA[1];
$DBIPdialtimeout[$user_CIPct] = $aryA[2];
$DBIPdialprefix[$user_CIPct] = $aryA[3];
$DBIPcampaigncid[$user_CIPct] = $aryA[4];
$DBIPactive[$user_CIPct] = $aryA[5];
$DBIPvdadexten[$user_CIPct] = $aryA[6];
$DBIPclosercamp[$user_CIPct] = $aryA[7];
$omit_phone_code = $aryA[8];
if ($omit_phone_code =~ /Y/) {$DBIPomitcode[$user_CIPct] = 1;}
else {$DBIPomitcode[$user_CIPct] = 0;}
$available_only_ratio_tally = $aryA[9];
$available_only_ratio_tally = $aryA[9];
if ($available_only_ratio_tally =~ /Y/)
{
$DBIPcount[$user_CIPct] = $DBIPACTIVEcount[$user_CIPct];
$active_only=1;
}
$DBIPautoaltdial[$user_CIPct] = $aryA[10];
$DBIPautoaltdial[$user_CIPct] = $aryA[10];
$DBIPcampaign_allow_inbound[$user_CIPct] = $aryA[11];
$DBIPqueue_priority[$user_CIPct] = $aryA[12];
$DBIPdial_method[$user_CIPct] = $aryA[13];
$DBIPdial_method[$user_CIPct] = $aryA[13];
$DBIPuse_custom_cid[$user_CIPct] = $aryA[14];
$rec_count++;
}
$sthA->finish();
@@ -850,7 +853,7 @@ while($one_day_interval > 0)
print "hopper row updated to INCALL: |$UQaffected_rows|$lead_id|\n";
### Gather lead data
$stmtA = "SELECT list_id,gmt_offset_now,called_since_last_reset,phone_code,phone_number,address3,alt_phone,called_count FROM vicidial_list where lead_id='$lead_id';";
$stmtA = "SELECT list_id,gmt_offset_now,called_since_last_reset,phone_code,phone_number,address3,alt_phone,called_count,security_phrase FROM vicidial_list where lead_id='$lead_id';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -867,6 +870,7 @@ while($one_day_interval > 0)
$address3 = $aryA[5];
$alt_phone = $aryA[6];
$called_count = $aryA[7];
$security_phrase = $aryA[8];
$rec_countCUSTDATA++;
$rec_count++;
@@ -975,6 +979,14 @@ while($one_day_interval > 0)
if (length($DBIPcampaigncid[$user_CIPct]) > 6) {$CCID = "$DBIPcampaigncid[$user_CIPct]"; $CCID_on++;}
if (length($campaign_cid_override) > 6) {$CCID = "$campaign_cid_override"; $CCID_on++;}
if ($DBIPuse_custom_cid[$user_CIPct] =~ /Y/)
{
$temp_CID = $security_phrase;
$temp_CID =~ s/\D//gi;
if (length($temp_CID) > 6)
{$CCID = "$temp_CID"; $CCID_on++;}
}
if ($DBIPdialprefix[$user_CIPct] =~ /x/i) {$Local_out_prefix = '';}
if ($RECcount)
+12 -2
View File
@@ -238,6 +238,7 @@ while($one_day_interval > 0)
@DBIPserver_trunks_other=@MT;
@DBIPserver_trunks_allowed=@MT;
@DBIPqueue_priority=@MT;
@DBIPuse_custom_cid=@MT;
$active_line_counter=0;
$camp_counter=0;
@@ -316,7 +317,7 @@ while($one_day_interval > 0)
### grab the dial_level and multiply by active agents to get your goalcalls
$DBIPadlevel[$camp_CIPct]=0;
$stmtA = "SELECT dial_timeout,dial_prefix,campaign_cid,active,campaign_vdad_exten,omit_phone_code,auto_alt_dial,queue_priority FROM vicidial_campaigns where campaign_id='$DBfill_campaign[$camp_CIPct]';";
$stmtA = "SELECT dial_timeout,dial_prefix,campaign_cid,active,campaign_vdad_exten,omit_phone_code,auto_alt_dial,queue_priority,use_custom_cid FROM vicidial_campaigns where campaign_id='$DBfill_campaign[$camp_CIPct]';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -333,6 +334,7 @@ while($one_day_interval > 0)
$omit_phone_code = $aryA[5];
$DBIPautoaltdial[$camp_CIPct] = $aryA[6];
$DBIPqueue_priority[$camp_CIPct] = $aryA[7];
$DBIPuse_custom_cid[$camp_CIPct] = $aryA[8];
if ($omit_phone_code =~ /Y/) {$DBIPomitcode[$camp_CIPct] = 1;}
else {$DBIPomitcode[$camp_CIPct] = 0;}
@@ -610,7 +612,7 @@ while($one_day_interval > 0)
$UQaffected_rows = $dbhA->do($stmtA);
# print "hopper row updated to INCALL: |$UQaffected_rows|$lead_id|\n";
$stmtA = "SELECT list_id,gmt_offset_now,called_since_last_reset,phone_code,phone_number,address3,alt_phone,called_count FROM vicidial_list where lead_id='$lead_id';";
$stmtA = "SELECT list_id,gmt_offset_now,called_since_last_reset,phone_code,phone_number,address3,alt_phone,called_count,security_phrase FROM vicidial_list where lead_id='$lead_id';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -626,6 +628,7 @@ while($one_day_interval > 0)
$address3 = $aryA[5];
$alt_phone = $aryA[6];
$called_count = $aryA[7];
$security_phrase = $aryA[8];
$rec_countCUSTDATA++;
}
@@ -740,6 +743,13 @@ while($one_day_interval > 0)
if (length($DBIPcampaigncid[$camp_CIPct]) > 6) {$CCID = "$DBIPcampaigncid[$camp_CIPct]"; $CCID_on++;}
if (length($campaign_cid_override) > 6) {$CCID = "$campaign_cid_override"; $CCID_on++;}
if ($DBIPuse_custom_cid[$camp_CIPct] =~ /Y/)
{
$temp_CID = $security_phrase;
$temp_CID =~ s/\D//gi;
if (length($temp_CID) > 6)
{$CCID = "$temp_CID"; $CCID_on++;}
}
if ($DBIPdialprefix[$camp_CIPct] =~ /x/i) {$Local_out_prefix = '';}
if ($RECcount)
+42 -25
View File
@@ -42,6 +42,7 @@
# 91129-2202 - removed SELECT STAR and formatting fixes
# 100118-0527 - Added new Australian and New Zealand DST schemes (FSO-FSA and LSS-FSA)
# 100204-2333 - Added dccsv10 file format
# 100221-0939 - Added dccsv43 file format with custom cid lookup
#
$secX = time();
@@ -175,6 +176,8 @@ if (length($ARGV[0])>1)
print "dccsv10:\n";
print "VENDOR_ID,FIRST_NAME,LAST_NAME,PHONE_1,PHONE_2,PHONE_3,PHONE_4,PHONE_5,PHONE_6,PHONE_7\n";
print "\"100998\",\"ANGELA \",\"SMITH \",\"3145551212\",\"3145551213\",\"3145551214\",\"0\",\"3145551215\",\"3145551216\",\"0\",\n\n";
print "dccsv43:\n";
print "---format too confusing to list in the help screen---\n\n";
exit;
}
@@ -896,6 +899,7 @@ foreach(@FILES)
$ALTm_phone_number[$r] = $m[6];
$ALTm_phone_code[$r] = '1';
$r++; $map_count++;
$g++;
}
if (length($m[7]) > 9)
{
@@ -919,20 +923,17 @@ foreach(@FILES)
$format_set++;
}
# This is the format for the dccsv26 lead files
#"BFRAME","RECORD_TYPE","LAST_NAME","FIRST_NAME","4ADDR1","5ADDR2","6CITY","STATE","ZIP","9ZIP4","ADDR_STATUS","DATE_PLACED","DATE_ADDED","DOB","LAST_LETTER","LAST_LETTER_DATE","LAST_WORKED","NEXT_ACTION_DATE","CAPTURE_CODE","CUR_CATEGORY","TIMES_DIALED","LAST_DIALED","TOTAL_PAID","DATE_LAST_PAID","NMBR_CALLS","NMBR_CONTACTS","NMBR_TIMES_WRKD","NMBR_LETTERS","STATUS_CODE","STATUS_DATE","SCORE","TIMES_TO_SERVICER","1ST-PMT-DEFAULT","TIME_ZONE","ORIG_CREDITOR","BALANCE","HOME_PHONE","WORK_PHONE","OTHER_PHONE","ACCT_OTHTEL2","ACCT_OTHTEL3","ACCT_OTHTEL4","ACCT_OTHTEL5"
#"","RECORD_TYPE","2","3","4","5","6","7","8","9","10ADDR_STATUS","DATE_PLACED","DATE_ADDED","13","14LAST_LETTER","15LAST_LETTER_DATE","16LAST_WORKED","17NEXT_ACTION_DATE","18CAPTURE_CODE","19CUR_CATEGORY","20TIMES_DIALED","21LAST_DIALED","22TOTAL_PAID","23DATE_LAST_PAID","24NMBR_CALLS","25NMBR_CONTACTS","26NMBR_TIMES_WRKD","27NMBR_LETTERS","28STATUS_CODE","29STATUS_DATE","30SCORE","31TIMES_TO_SERVICER","321ST-PMT-DEFAULT","","34ORIG_CREDITOR","35BALANCE","","","","39","","",""
#"II ACCT/1103521789 ","P","STRAYER "," SHERYL K","7575 W 106TH ST APT 57 "," ","OVERLAND PARK ","KS","66212","0000","G","20091110","20091110","19661216","NOLTTR","00000000","20091214","20091219","1000","03","000","00000000","000000000.00 ","00000000","0004","0003","0004","000","ACTIVE","20091110","0648","00"," ","C","HSBC ","000000692.09 ","9139635053","0000000000","0000000000","0000000000","0000000000","0000000000","0000000000"
# This is the format for the dccsv43 lead files
#"BF_ID","RECORD_TYPE","LAST_NAME","FIRST_NAME","4ADDR1","5ADDR2","6CITY","STATE","ZIP","9ZIP4","ADDR_STATUS","DATE_PLACED","DATE_ADDED","DOB","LAST_LETTER","LAST_LETTER_DATE","LAST_WORKED","NEXT_ACTION_DATE","CAPTURE_CODE","CUR_CATEGORY","TIMES_DIALED","LAST_DIALED","TOTAL_PAID","DATE_LAST_PAID","NMBR_CALLS","NMBR_CONTACTS","NMBR_TIMES_WRKD","NMBR_LETTERS","STATUS_CODE","STATUS_DATE","SCORE","TIMES_TO_SERVICER","1ST-PMT-DEFAULT","TIME_ZONE","ORIG_CREDITOR","BALANCE","HOME_PHONE","WORK_PHONE","OTHER_PHONE","ACCT_OTHTEL2","ACCT_OTHTEL3","ACCT_OTHTEL4","ACCT_OTHTEL5"
#"II ACCT/1103566666 ","P","SMITH "," SAMMY","7838 W 109TH ST APT 12 "," ","OVERLAND PARK ","KS","66212","0000","G","20091110","20091110","19661216","NOLTTR","00000000","20091214","20091219","1000","03","000","00000000","000000000.00 ","00000000","0004","0003","0004","000","ACTIVE","20091110","0648","00"," ","C","HSBC ","000000692.09 ","9135551212","0000000000","0000000000","0000000000","0000000000","0000000000","0000000000"
if ( ($format =~ /dccsv26/) && ($format_set < 1) )
if ( ($format =~ /dccsv43/) && ($format_set < 1) )
{
$raw_number = $number;
chomp($number);
$number =~ s/,"0"//gi;
$number =~ s/,"0000000000"//gi;
$number =~ s/,\"0\"/,/gi;
$number =~ s/\t/\|/gi;
$number =~ s/\'|\t|\r|\n|\l//gi;
$number =~ s/\'|\t|\r|\n|\l//gi;
$number =~ s/\",,,,,,,\"/\|\|\|\|\|\|\|/gi;
$number =~ s/\",,,,,,\"/\|\|\|\|\|\|/gi;
$number =~ s/\",,,,,\"/\|\|\|\|\|/gi;
@@ -941,30 +942,32 @@ foreach(@FILES)
$number =~ s/\",,\"/\|\|/gi;
$number =~ s/\",\"/\|/gi;
$number =~ s/\"//gi;
$number =~ s/\|0000000000//gi;
@m=@MT;
@m = split(/\|/, $number);
if ($DBX) {print "RAW: $#m-----$number\n";}
$vendor_lead_code = $m[0]; chomp($vendor_lead_code);
$vendor_lead_code = $m[0]; chomp($vendor_lead_code); $vendor_lead_code =~ s/\s+$//gi;
$vendor_lead_code =~s/II ACCT\///gi;
$vendor_lead_code =~s/WDRF //gi;
while (length($vendor_lead_code) > 10) {chop($vendor_lead_code);}
$source_id = $m[0]; chomp($source_id);
$source_id = $m[0]; chomp($source_id); $source_id =~ s/\s+$//gi;
$list_id = '929';
$phone_code = '1';
$first_name = $m[3]; chomp($first_name); $first_name =~ s/\s+$//gi;
$first_name = $m[3]; chomp($first_name); $first_name =~ s/^\s+|\s+$//gi;
$middle_initial = '';
$last_name = $m[2]; chomp($last_name); $last_name =~ s/\s+$//gi;
$phone_number = $m[36];
$phone_number = $m[36]; $phone_number =~ s/\D//gi;
$USarea = substr($phone_number, 0, 3);
$title = '';
$address1 = $m[4];
$address2 = $m[5];
$address3 = '';
$city = $m[6];
$title = $m[25]; # number of contacts
$address1 = $m[4]; $address1 =~ s/\s+$//gi;
$address2 = $m[5]; $address2 =~ s/\s+$//gi;
$address3 = $m[18]; # capture code
$city = $m[6]; $city =~ s/\s+$//gi;
$state = $m[7];
$province = '';
$postal_code = "$m[8]$m[9]";
$country = $m[5];
$province = $m[35]; $province =~ s/\s+$//gi; # balance
$postal_code = $m[8];
$country = '';
$gender = '';
$date_of_birth = $m[13];
$dobYYYY = substr($date_of_birth, 0, 4);
@@ -972,14 +975,14 @@ foreach(@FILES)
$dobDD = substr($date_of_birth, 6, 2);
$date_of_birth = "$dobYYYY-$dobMM-$dobDD";
$alt_phone = $m[37]; chomp($alt_phone); $alt_phone =~ s/\D//gi;
$email = '';
$security_phrase = '';
$comments = '';
$email = $m[11]; # date placed
$security_phrase = ''; # looked-up geographic CID will go here
$comments = "$m[16]|$m[21]"; # last worked/dialed
$called_count = '0';
$status = 'NEW';
$insert_date = $pulldate0;
$rank = '';
$owner = '';
$rank = $m[26]; # number of times worked
$owner = $m[28]; # old status code
$multi_alt_phones = '';
$r=0;
@@ -989,6 +992,7 @@ foreach(@FILES)
$ALTm_phone_number[$r] = $m[38];
$ALTm_phone_code[$r] = '1';
$r++; $map_count++;
$g++;
}
if (length($m[39]) > 9)
{
@@ -1015,6 +1019,19 @@ foreach(@FILES)
$r++; $map_count++;
}
### look up the custom CID to use for this state
$stmtA = "select cid from vicidial_custom_cid where state='$state';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
if($DBX){print STDERR "\n$sthArows|$stmtA|\n";}
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$security_phrase = $aryA[0];
}
$sthA->finish();
$format_set++;
}
+15 -3
View File
@@ -671,7 +671,7 @@ manual_dial_filter VARCHAR(50) default 'NONE',
agent_clipboard_copy VARCHAR(50) default 'NONE',
agent_extended_alt_dial ENUM('Y','N') default 'N',
use_campaign_dnc ENUM('Y','N','AREACODE') default 'N',
three_way_call_cid ENUM('CAMPAIGN','CUSTOMER','AGENT_PHONE','AGENT_CHOOSE') default 'CAMPAIGN',
three_way_call_cid ENUM('CAMPAIGN','CUSTOMER','AGENT_PHONE','AGENT_CHOOSE','CUSTOM_CID') default 'CAMPAIGN',
three_way_dial_prefix VARCHAR(20) default '',
web_form_target VARCHAR(100) NOT NULL default 'vdcwebform',
vtiger_search_category VARCHAR(100) default 'LEAD',
@@ -716,7 +716,8 @@ start_call_url TEXT,
dispo_call_url TEXT,
xferconf_c_number VARCHAR(50) default '',
xferconf_d_number VARCHAR(50) default '',
xferconf_e_number VARCHAR(50) default ''
xferconf_e_number VARCHAR(50) default '',
use_custom_cid ENUM('Y','N') default 'N'
);
CREATE TABLE vicidial_lists (
@@ -960,6 +961,7 @@ comments VARCHAR(20),
sub_status VARCHAR(6),
dead_epoch INT(10) UNSIGNED,
dead_sec SMALLINT(5) UNSIGNED default '0',
processed ENUM('Y','N') default 'N',
index (lead_id),
index (user),
index (event_time)
@@ -1924,6 +1926,16 @@ call_notes TEXT
ALTER TABLE vicidial_call_notes AUTO_INCREMENT = 100;
CREATE INDEX lead_id on vicidial_call_notes (lead_id);
CREATE TABLE vicidial_custom_cid (
cid VARCHAR(18) NOT NULL,
state VARCHAR(20),
areacode VARCHAR(6),
country_code SMALLINT(5) UNSIGNED,
campaign_id VARCHAR(8) default '--ALL--',
index (state),
index (areacode)
);
ALTER TABLE vicidial_campaign_server_stats ENGINE=HEAP;
@@ -2063,7 +2075,7 @@ ALTER TABLE vicidial_agent_log_archive MODIFY agent_log_id INT(9) UNSIGNED NOT N
CREATE TABLE vicidial_carrier_log_archive LIKE vicidial_carrier_log;
UPDATE system_settings SET db_schema_version='1202',db_schema_update_date=NOW();
UPDATE system_settings SET db_schema_version='1203',db_schema_update_date=NOW();
GRANT RELOAD ON *.* TO cron@'%';
GRANT RELOAD ON *.* TO cron@localhost;
+18
View File
@@ -72,3 +72,21 @@ ALTER TABLE system_settings ADD custom_dialplan_entry TEXT;
ALTER TABLE servers ADD custom_dialplan_entry TEXT;
UPDATE system_settings SET db_schema_version='1202',db_schema_update_date=NOW();
ALTER TABLE vicidial_campaigns ADD use_custom_cid ENUM('Y','N') default 'N';
ALTER TABLE vicidial_campaigns MODIFY three_way_call_cid ENUM('CAMPAIGN','CUSTOMER','AGENT_PHONE','AGENT_CHOOSE','CUSTOM_CID') default 'CAMPAIGN';
CREATE TABLE vicidial_custom_cid (
cid VARCHAR(18) NOT NULL,
state VARCHAR(20),
areacode VARCHAR(6),
country_code SMALLINT(5) UNSIGNED,
campaign_id VARCHAR(8) default '--ALL--',
index (state),
index (areacode)
);
ALTER TABLE vicidial_agent_log ADD processed ENUM('Y','N') default 'N';
ALTER TABLE vicidial_agent_log_archive ADD processed ENUM('Y','N') default 'N';
UPDATE system_settings SET db_schema_version='1203',db_schema_update_date=NOW();
@@ -33,6 +33,9 @@ Custom Dialplan Entry||
This field allows you to enter in any dialplan elements that you want for the server, the lines will be added to the default context||
This field allows you to enter in any dialplan elements that you want for all of the asterisk servers, the lines will be added to the default context||
This option allows you to enter custom dialplan lines into Call Menus, Servers and System Settings. Default is 0 for inactive||
Custom CallerID||
When set to Y, this option allows you to use the security_phrase field in the vicidial_list table as the CallerID to send out when placing for each specific lead. If this field has no CID in it then the Campaign CallerID defined above will be used instead. This option will disable the list CallerID Override if there is a CID present in the security_phrase field. Default is N||
CUSTOM_CID will use the Custom CID that is defined in the security_phrase field of the vicidial_list table for the lead||
############################################################ CLIENT
+40 -3
View File
@@ -237,12 +237,13 @@
# 100207-1104 - Changed Pause Codes function to allow for multiple pause codes per pause period
# 100219-1437 - Added agent_dispo_log file option
# 100220-1041 - Added CALLLOGview and LEADINFOview functions
# 100221-1105 - Added custom CID use compatibility
#
$version = '2.4-144';
$build = '100220-1041';
$version = '2.4-145';
$build = '100221-1105';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=312;
$mysql_log_count=314;
$one_mysql_log=0;
require("dbconnect.php");
@@ -1815,6 +1816,24 @@ if ($ACTION == 'manDiaLnextCaLL')
}
}
if (strlen($campaign_cid_override) > 6) {$CCID = "$campaign_cid_override"; $CCID_on++;}
### check for custom cid use
$use_custom_cid=0;
$stmt = "SELECT count(*) FROM vicidial_campaigns where use_custom_cid='Y' and campaign_id='$campaign';";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00313',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$uccid_ct = mysql_num_rows($rslt);
if ($uccid_ct > 0)
{
$row=mysql_fetch_row($rslt);
$use_custom_cid = $row[0];
}
if ($use_custom_cid > 0)
{
$temp_CID = preg_replace("/\D/",'',$security);
if (strlen($temp_CID) > 6)
{$CCID = "$temp_CID"; $CCID_on++;}
}
if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';}
$PADlead_id = sprintf("%09s", $lead_id);
@@ -2236,6 +2255,24 @@ if ($ACTION == 'manDiaLonly')
}
}
if (strlen($campaign_cid_override) > 6) {$CCID = "$campaign_cid_override"; $CCID_on++;}
### check for custom cid use
$use_custom_cid=0;
$stmt = "SELECT count(*) FROM vicidial_campaigns where use_custom_cid='Y' and campaign_id='$campaign';";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00314',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$uccid_ct = mysql_num_rows($rslt);
if ($uccid_ct > 0)
{
$row=mysql_fetch_row($rslt);
$use_custom_cid = $row[0];
}
if ($use_custom_cid > 0)
{
$temp_CID = preg_replace("/\D/",'',$security);
if (strlen($temp_CID) > 6)
{$CCID = "$temp_CID"; $CCID_on++;}
}
$PADlead_id = sprintf("%09s", $lead_id);
while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);}
+9 -4
View File
@@ -277,10 +277,11 @@
# 100203-0639 - Fixed logging issues related to INBOUND_MAN dial method
# 100207-1103 - Changed Pause Codes function to allow for multiple pause codes per pause period
# 100220-1040 - Added Call Log View and Customer Info View and fixed HotKeys position
# 100221-1107 - Added Custom CID compatibility
#
$version = '2.4-255';
$build = '100220-1040';
$version = '2.4-256';
$build = '100221-1107';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=64;
$one_mysql_log=0;
@@ -1147,7 +1148,7 @@ else
$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,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number 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,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid 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";}
@@ -1218,6 +1219,7 @@ else
$xferconf_c_number = $row[63];
$xferconf_d_number = $row[64];
$xferconf_e_number = $row[65];
$use_custom_cid = $row[66];
if ($user_territories_active < 1)
{$agent_select_territories = 0;}
@@ -2596,6 +2598,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var dial_prefix = '<?php echo $dial_prefix ?>';
var three_way_dial_prefix = '<?php echo $three_way_dial_prefix ?>';
var campaign_cid = '<?php echo $campaign_cid ?>';
var use_custom_cid = '<?php echo $use_custom_cid ?>';
var campaign_vdad_exten = '<?php echo $campaign_vdad_exten ?>';
var campaign_leads_to_call = '<?php echo $campaign_leads_to_call ?>';
var epoch_sec = <?php echo $StarTtimE ?>;
@@ -3090,6 +3093,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{threeway_cid = outbound_cid;}
if (three_way_call_cid == 'CUSTOMER')
{threeway_cid = document.vicidial_form.phone_number.value;}
if (three_way_call_cid == 'CUSTOM_CID')
{threeway_cid = document.vicidial_form.security_phrase.value;}
if (three_way_call_cid == 'AGENT_CHOOSE')
{
threeway_cid = cid_choice;
@@ -5968,7 +5973,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
else
{var call_prefix = dial_prefix;}
manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&dial_method=" + dial_method + "&agent_log_id=" + agent_log_id;
manDiaLonly_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLonly&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_number=" + manDiaLonly_num + "&phone_code=" + document.vicidial_form.phone_code.value + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&omit_phone_code=" + omit_phone_code + "&usegroupalias=" + usegroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&dial_method=" + dial_method + "&agent_log_id=" + agent_log_id + "&security=" + document.vicidial_form.security_phrase.value;
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(manDiaLonly_query);
+22 -9
View File
File diff suppressed because one or more lines are too long