diff --git a/agc_2-X/trunk/UPGRADE b/agc_2-X/trunk/UPGRADE index a28aebc9..a235b784 100644 --- a/agc_2-X/trunk/UPGRADE +++ b/agc_2-X/trunk/UPGRADE @@ -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 + diff --git a/agc_2-X/trunk/bin/AST_VDauto_dial.pl b/agc_2-X/trunk/bin/AST_VDauto_dial.pl index cd10af28..8eecc13e 100644 --- a/agc_2-X/trunk/bin/AST_VDauto_dial.pl +++ b/agc_2-X/trunk/bin/AST_VDauto_dial.pl @@ -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) diff --git a/agc_2-X/trunk/bin/AST_VDauto_dial_FILL.pl b/agc_2-X/trunk/bin/AST_VDauto_dial_FILL.pl index 7fb7c218..0e2ebc9a 100644 --- a/agc_2-X/trunk/bin/AST_VDauto_dial_FILL.pl +++ b/agc_2-X/trunk/bin/AST_VDauto_dial_FILL.pl @@ -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) diff --git a/agc_2-X/trunk/bin/VICIDIAL_IN_new_leads_file.pl b/agc_2-X/trunk/bin/VICIDIAL_IN_new_leads_file.pl index e76a8fea..5e10d559 100644 --- a/agc_2-X/trunk/bin/VICIDIAL_IN_new_leads_file.pl +++ b/agc_2-X/trunk/bin/VICIDIAL_IN_new_leads_file.pl @@ -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++; } diff --git a/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql b/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql index 4520a0a9..367acbea 100644 --- a/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql +++ b/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql @@ -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; diff --git a/agc_2-X/trunk/extras/upgrade_2.4.sql b/agc_2-X/trunk/extras/upgrade_2.4.sql index eb604161..04ff7c8b 100644 --- a/agc_2-X/trunk/extras/upgrade_2.4.sql +++ b/agc_2-X/trunk/extras/upgrade_2.4.sql @@ -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(); diff --git a/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt b/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt index 407f07d9..496e408f 100644 --- a/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt +++ b/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt @@ -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 diff --git a/agc_2-X/trunk/www/agc/vdc_db_query.php b/agc_2-X/trunk/www/agc/vdc_db_query.php index 61352ded..7168bad9 100644 --- a/agc_2-X/trunk/www/agc/vdc_db_query.php +++ b/agc_2-X/trunk/www/agc/vdc_db_query.php @@ -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);} diff --git a/agc_2-X/trunk/www/agc/vicidial.php b/agc_2-X/trunk/www/agc/vicidial.php index 55aeacda..e64674ff 100644 --- a/agc_2-X/trunk/www/agc/vicidial.php +++ b/agc_2-X/trunk/www/agc/vicidial.php @@ -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 = ''; var three_way_dial_prefix = ''; var campaign_cid = ''; + var use_custom_cid = ''; var campaign_vdad_exten = ''; var campaign_leads_to_call = ''; var epoch_sec = ; @@ -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); diff --git a/agc_2-X/trunk/www/vicidial/admin.php b/agc_2-X/trunk/www/vicidial/admin.php index 7ff0b300..3f37585d 100644 --- a/agc_2-X/trunk/www/vicidial/admin.php +++ b/agc_2-X/trunk/www/vicidial/admin.php @@ -1189,6 +1189,9 @@ if (isset($_GET["agent_call_log_view"])) {$agent_call_log_view=$_GET["agent_ca elseif (isset($_POST["agent_call_log_view"])) {$agent_call_log_view=$_POST["agent_call_log_view"];} if (isset($_GET["agent_call_log_view_override"])) {$agent_call_log_view_override=$_GET["agent_call_log_view_override"];} elseif (isset($_POST["agent_call_log_view_override"])) {$agent_call_log_view_override=$_POST["agent_call_log_view_override"];} +if (isset($_GET["use_custom_cid"])) {$use_custom_cid=$_GET["use_custom_cid"];} + elseif (isset($_POST["use_custom_cid"])) {$use_custom_cid=$_POST["use_custom_cid"];} + if (isset($script_id)) {$script_id= strtoupper($script_id);} if (isset($lead_filter_id)) {$lead_filter_id = strtoupper($lead_filter_id);} @@ -1461,6 +1464,7 @@ if ($non_latin < 1) $ignore_list_script_override = ereg_replace("[^NY]","",$ignore_list_script_override); $is_webphone = ereg_replace("[^NY]","",$is_webphone); $use_external_server_ip = ereg_replace("[^NY]","",$use_external_server_ip); + $use_custom_cid = ereg_replace("[^NY]","",$use_custom_cid); $qc_enabled = ereg_replace("[^0-9NY]","",$qc_enabled); $active = ereg_replace("[^0-9NY]","",$active); @@ -2085,11 +2089,12 @@ else # 100127-1546 - Added ignore_list_script_override option for ingroups # 100219-1309 - Added agent dispo log system settings option and user call_log options # 100220-1411 - Added system settings and servers custom_dialplan_entry +# 100221-0924 - Added Custom CallerID capability in Campaign settings # # 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.4-240'; -$build = '100220-1411'; +$admin_version = '2.4-241'; +$build = '100221-0924'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -3825,6 +3830,11 @@ if ($ADD==99999)
Campaign CallerID - This field allows for the sending of a custom callerid number on the outbound calls. This is the number that would show up on the callerid of the person you are calling. The default is UNKNOWN. If you are using T1 or E1s to dial out this option is only available if you are using PRIs - ISDN T1s or E1s - that have the custom callerid feature turned on, this will not work with Robbed-bit service -RBS- circuits. This will also work through most VOIP -SIP or IAX trunks- providers that allow dynamic outbound callerID. The custom callerID only applies to calls placed for the VICIDIAL campaign directly, any 3rd party calls or transfers will not send the custom callerID. NOTE: Sometimes putting UNKNOWN or PRIVATE in the field will yield the sending of your default callerID number by your carrier with the calls. You may want to test this and put 0000000000 in the callerid field instead if you do not want to send you CallerID. +
+ +
+ 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. +

@@ -3953,7 +3963,7 @@ if ($ADD==99999)

- 3-Way Call Outbound CallerID - This defines what is sent out as the outbound callerID number from 3-way calls placed by the agent, CAMPAIGN uses the custom campaign callerID, CUSTOMER uses the number of the customer that is active on the agents screen and AGENT_PHONE uses the callerID for the phone that the agent is logged into. AGENT_CHOOSE allows the agent to choose which callerID to use for 3-way calls from a list of choices. + 3-Way Call Outbound CallerID - This defines what is sent out as the outbound callerID number from 3-way calls placed by the agent, CAMPAIGN uses the custom campaign callerID, CUSTOMER uses the number of the customer that is active on the agents screen and AGENT_PHONE uses the callerID for the phone that the agent is logged into. AGENT_CHOOSE allows the agent to choose which callerID to use for 3-way calls from a list of choices. CUSTOM_CID will use the Custom CID that is defined in the security_phrase field of the vicidial_list table for the lead.
@@ -8795,7 +8805,7 @@ if ($ADD==20) { echo "
CAMPAIGN COPIED: $campaign_id copied from $source_campaign_id\n"; - $stmt="INSERT INTO vicidial_campaigns (campaign_name,campaign_id,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_fourth_digit,survey_third_audio_file,survey_fourth_audio_file,survey_third_status,survey_fourth_status,survey_third_exten,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number) SELECT \"$campaign_name\",\"$campaign_id\",\"N\",dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,\"DISABLED\",campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_fourth_digit,survey_third_audio_file,survey_fourth_audio_file,survey_third_status,survey_fourth_status,survey_third_exten,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number from vicidial_campaigns where campaign_id='$source_campaign_id';"; + $stmt="INSERT INTO vicidial_campaigns (campaign_name,campaign_id,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_fourth_digit,survey_third_audio_file,survey_fourth_audio_file,survey_third_status,survey_fourth_status,survey_third_exten,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid) SELECT \"$campaign_name\",\"$campaign_id\",\"N\",dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,\"DISABLED\",campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_fourth_digit,survey_third_audio_file,survey_fourth_audio_file,survey_third_status,survey_fourth_status,survey_third_exten,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid 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');"; @@ -11426,7 +11436,7 @@ if ($ADD==41) if ( (!ereg("DISABLED",$list_order_mix)) and ($hopper_level < 100) ) {$hopper_level='100';} - $stmtA="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',allow_closers='$allow_closers',hopper_level='$hopper_level', $adlSQL next_agent_call='$next_agent_call', local_call_time='$local_call_time', voicemail_ext='$voicemail_ext', dial_timeout='$dial_timeout', dial_prefix='$dial_prefix', campaign_cid='$campaign_cid', campaign_vdad_exten='$campaign_vdad_exten', web_form_address='" . mysql_real_escape_string($web_form_address) . "', park_ext='$park_ext', park_file_name='$park_file_name', campaign_rec_exten='$campaign_rec_exten', campaign_recording='$campaign_recording', campaign_rec_filename='$campaign_rec_filename', campaign_script='$script_id', get_call_launch='$get_call_launch', am_message_exten='$am_message_exten', amd_send_to_vmx='$amd_send_to_vmx', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number',xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',lead_filter_id='$lead_filter_id',alt_number_dialing='$alt_number_dialing',scheduled_callbacks='$scheduled_callbacks',drop_action='$drop_action',drop_call_seconds='$drop_call_seconds',safe_harbor_exten='$safe_harbor_exten',wrapup_seconds='$wrapup_seconds',wrapup_message='$wrapup_message',closer_campaigns='$groups_value',use_internal_dnc='$use_internal_dnc',allcalls_delay='$allcalls_delay',omit_phone_code='$omit_phone_code',dial_method='$dial_method',available_only_ratio_tally='$available_only_ratio_tally',adaptive_dropped_percentage='$adaptive_dropped_percentage',adaptive_maximum_level='$adaptive_maximum_level',adaptive_latest_server_time='$adaptive_latest_server_time',adaptive_intensity='$adaptive_intensity',adaptive_dl_diff_target='$adaptive_dl_diff_target',concurrent_transfers='$concurrent_transfers',auto_alt_dial='$auto_alt_dial',agent_pause_codes_active='$agent_pause_codes_active',campaign_description='$campaign_description',campaign_changedate='$SQLdate',campaign_stats_refresh='$campaign_stats_refresh',disable_alter_custdata='$disable_alter_custdata',no_hopper_leads_logins='$no_hopper_leads_logins',list_order_mix='$list_order_mix',campaign_allow_inbound='$campaign_allow_inbound',manual_dial_list_id='$manual_dial_list_id',default_xfer_group='$default_xfer_group',xfer_groups='$XFERgroups_value',queue_priority='$queue_priority',drop_inbound_group='$drop_inbound_group',disable_alter_custphone='$disable_alter_custphone',display_queue_count='$display_queue_count',manual_dial_filter='$manual_dial_filter',agent_clipboard_copy='$agent_clipboard_copy',agent_extended_alt_dial='$agent_extended_alt_dial',use_campaign_dnc='$use_campaign_dnc',three_way_call_cid='$three_way_call_cid',three_way_dial_prefix='$three_way_dial_prefix',web_form_target='$web_form_target',vtiger_search_category='$vtiger_search_category',vtiger_create_call_record='$vtiger_create_call_record',vtiger_create_lead_record='$vtiger_create_lead_record',vtiger_screen_login='$vtiger_screen_login',cpd_amd_action='$cpd_amd_action',agent_allow_group_alias='$agent_allow_group_alias',default_group_alias='$default_group_alias',vtiger_search_dead='$vtiger_search_dead',vtiger_status_call='$vtiger_status_call',drop_lockout_time='$drop_lockout_time',quick_transfer_button='$quick_transfer_button',prepopulate_transfer_preset='$prepopulate_transfer_preset',drop_rate_group='$drop_rate_group',view_calls_in_queue='$view_calls_in_queue',view_calls_in_queue_launch='$view_calls_in_queue_launch',grab_calls_in_queue='$grab_calls_in_queue',call_requeue_button='$call_requeue_button',pause_after_each_call='$pause_after_each_call',no_hopper_dialing='$no_hopper_dialing',agent_dial_owner_only='$agent_dial_owner_only',agent_display_dialable_leads='$agent_display_dialable_leads',web_form_address_two='" . mysql_real_escape_string($web_form_address_two) . "',waitforsilence_options='$waitforsilence_options',agent_select_territories='$agent_select_territories',crm_popup_login='$crm_popup_login',crm_login_address='" . mysql_real_escape_string($crm_login_address) . "',timer_action='$timer_action',timer_action_message='$timer_action_message',timer_action_seconds='$timer_action_seconds',start_call_url='" . mysql_real_escape_string($start_call_url) . "',dispo_call_url='" . mysql_real_escape_string($dispo_call_url) . "',xferconf_c_number='$xferconf_c_number',xferconf_d_number='$xferconf_d_number',xferconf_e_number='$xferconf_e_number' where campaign_id='$campaign_id';"; + $stmtA="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',allow_closers='$allow_closers',hopper_level='$hopper_level', $adlSQL next_agent_call='$next_agent_call', local_call_time='$local_call_time', voicemail_ext='$voicemail_ext', dial_timeout='$dial_timeout', dial_prefix='$dial_prefix', campaign_cid='$campaign_cid', campaign_vdad_exten='$campaign_vdad_exten', web_form_address='" . mysql_real_escape_string($web_form_address) . "', park_ext='$park_ext', park_file_name='$park_file_name', campaign_rec_exten='$campaign_rec_exten', campaign_recording='$campaign_recording', campaign_rec_filename='$campaign_rec_filename', campaign_script='$script_id', get_call_launch='$get_call_launch', am_message_exten='$am_message_exten', amd_send_to_vmx='$amd_send_to_vmx', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number',xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',lead_filter_id='$lead_filter_id',alt_number_dialing='$alt_number_dialing',scheduled_callbacks='$scheduled_callbacks',drop_action='$drop_action',drop_call_seconds='$drop_call_seconds',safe_harbor_exten='$safe_harbor_exten',wrapup_seconds='$wrapup_seconds',wrapup_message='$wrapup_message',closer_campaigns='$groups_value',use_internal_dnc='$use_internal_dnc',allcalls_delay='$allcalls_delay',omit_phone_code='$omit_phone_code',dial_method='$dial_method',available_only_ratio_tally='$available_only_ratio_tally',adaptive_dropped_percentage='$adaptive_dropped_percentage',adaptive_maximum_level='$adaptive_maximum_level',adaptive_latest_server_time='$adaptive_latest_server_time',adaptive_intensity='$adaptive_intensity',adaptive_dl_diff_target='$adaptive_dl_diff_target',concurrent_transfers='$concurrent_transfers',auto_alt_dial='$auto_alt_dial',agent_pause_codes_active='$agent_pause_codes_active',campaign_description='$campaign_description',campaign_changedate='$SQLdate',campaign_stats_refresh='$campaign_stats_refresh',disable_alter_custdata='$disable_alter_custdata',no_hopper_leads_logins='$no_hopper_leads_logins',list_order_mix='$list_order_mix',campaign_allow_inbound='$campaign_allow_inbound',manual_dial_list_id='$manual_dial_list_id',default_xfer_group='$default_xfer_group',xfer_groups='$XFERgroups_value',queue_priority='$queue_priority',drop_inbound_group='$drop_inbound_group',disable_alter_custphone='$disable_alter_custphone',display_queue_count='$display_queue_count',manual_dial_filter='$manual_dial_filter',agent_clipboard_copy='$agent_clipboard_copy',agent_extended_alt_dial='$agent_extended_alt_dial',use_campaign_dnc='$use_campaign_dnc',three_way_call_cid='$three_way_call_cid',three_way_dial_prefix='$three_way_dial_prefix',web_form_target='$web_form_target',vtiger_search_category='$vtiger_search_category',vtiger_create_call_record='$vtiger_create_call_record',vtiger_create_lead_record='$vtiger_create_lead_record',vtiger_screen_login='$vtiger_screen_login',cpd_amd_action='$cpd_amd_action',agent_allow_group_alias='$agent_allow_group_alias',default_group_alias='$default_group_alias',vtiger_search_dead='$vtiger_search_dead',vtiger_status_call='$vtiger_status_call',drop_lockout_time='$drop_lockout_time',quick_transfer_button='$quick_transfer_button',prepopulate_transfer_preset='$prepopulate_transfer_preset',drop_rate_group='$drop_rate_group',view_calls_in_queue='$view_calls_in_queue',view_calls_in_queue_launch='$view_calls_in_queue_launch',grab_calls_in_queue='$grab_calls_in_queue',call_requeue_button='$call_requeue_button',pause_after_each_call='$pause_after_each_call',no_hopper_dialing='$no_hopper_dialing',agent_dial_owner_only='$agent_dial_owner_only',agent_display_dialable_leads='$agent_display_dialable_leads',web_form_address_two='" . mysql_real_escape_string($web_form_address_two) . "',waitforsilence_options='$waitforsilence_options',agent_select_territories='$agent_select_territories',crm_popup_login='$crm_popup_login',crm_login_address='" . mysql_real_escape_string($crm_login_address) . "',timer_action='$timer_action',timer_action_message='$timer_action_message',timer_action_seconds='$timer_action_seconds',start_call_url='" . mysql_real_escape_string($start_call_url) . "',dispo_call_url='" . mysql_real_escape_string($dispo_call_url) . "',xferconf_c_number='$xferconf_c_number',xferconf_d_number='$xferconf_d_number',xferconf_e_number='$xferconf_e_number',use_custom_cid='$use_custom_cid' where campaign_id='$campaign_id';"; $rslt=mysql_query($stmtA, $link); if ($reset_hopper == 'Y') @@ -13449,7 +13459,7 @@ if ($ADD==4111111111111) { echo "
CONFERENCE MODIFIED: $conf_exten\n"; - $stmt="UPDATE conferences set conf_exten='$conf_exten',server_ip='$server_ip',extension='$extension' where conf_exten='$old_conf_exten';"; + $stmt="UPDATE conferences set conf_exten='$conf_exten',server_ip='$server_ip',extension='$extension' where conf_exten='$old_conf_exten' and server_ip='$server_ip';"; $rslt=mysql_query($stmt, $link); } } @@ -13486,7 +13496,7 @@ if ($ADD==41111111111111) { echo "
VICIDIAL CONFERENCE MODIFIED: $conf_exten\n"; - $stmt="UPDATE vicidial_conferences set conf_exten='$conf_exten',server_ip='$server_ip',extension='$extension' where conf_exten='$old_conf_exten';"; + $stmt="UPDATE vicidial_conferences set conf_exten='$conf_exten',extension='$extension' where conf_exten='$old_conf_exten' and server_ip='$server_ip';"; $rslt=mysql_query($stmt, $link); } @@ -16084,7 +16094,7 @@ if ($ADD==31) $enable_vtiger_integration_LU = $row[0]; $vtiger_url_LU = $row[1]; - $stmt="SELECT campaign_id,campaign_name,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_third_audio_file,survey_third_status,survey_third_exten,survey_fourth_digit,survey_fourth_audio_file,survey_fourth_status,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,campaign_calldate,crm_popup_login,crm_login_address,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='$campaign_id';"; + $stmt="SELECT campaign_id,campaign_name,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_third_audio_file,survey_third_status,survey_third_exten,survey_fourth_digit,survey_fourth_audio_file,survey_fourth_status,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,campaign_calldate,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid from vicidial_campaigns where campaign_id='$campaign_id';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $campaign_name = $row[1]; @@ -16225,6 +16235,7 @@ if ($ADD==31) $xferconf_c_number = $row[139]; $xferconf_d_number = $row[140]; $xferconf_e_number = $row[141]; + $use_custom_cid = $row[142]; if (ereg("DISABLED",$list_order_mix)) {$DEFlistDISABLE = ''; $DEFstatusDISABLED=0;} @@ -16818,6 +16829,8 @@ if ($ADD==31) {echo " LIST OVERRIDE ACTIVE";} echo "\n"; + echo "Custom CallerID: $NWB#vicidial_campaigns-use_custom_cid$NWE\n"; + if ($SSoutbound_autodial_active > 0) { echo "Campaign VDAD exten: $NWB#vicidial_campaigns-campaign_vdad_exten$NWE\n"; @@ -16964,7 +16977,7 @@ if ($ADD==31) { echo "Agent Screen Extended Alt Dial: $NWB#vicidial_campaigns-agent_extended_alt_dial$NWE\n"; } - echo "3-Way Call Outbound CallerID: $NWB#vicidial_campaigns-three_way_call_cid$NWE\n"; + echo "3-Way Call Outbound CallerID: $NWB#vicidial_campaigns-three_way_call_cid$NWE\n"; echo "3-Way Call Dial Prefix: $NWB#vicidial_campaigns-three_way_dial_prefix$NWE\n";