diff --git a/UPGRADE b/UPGRADE index 036ebf56..a073e8f6 100644 --- a/UPGRADE +++ b/UPGRADE @@ -241,8 +241,10 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom are added to the active voicemail server and there must be an active voicemail server defined in the system settings for these to work. -61. Changed WEBFORM links to work as window.open instead of traditional links - with 'target' tags which IE7 apparently has problems with +61. Added List override options for callerID, answering machine message and + drop inbound group to override campaign settings for leads within a + specific list + diff --git a/agi/VD_amd.agi b/agi/VD_amd.agi index 42d07cf7..b781467a 100644 --- a/agi/VD_amd.agi +++ b/agi/VD_amd.agi @@ -30,7 +30,8 @@ # 60815-1310 - added output options check from database # 71118-0252 - compatibility with Asterisk 1.4, added AA and AM statuses # 90916-1317 - Changed to audio file playback and TTS playback -# +# 90924-1533 - Added answering machine message list_id override option +# $script = 'VD_amd.agi'; @@ -370,6 +371,38 @@ else else {$sthA->finish();} } + + ### check for list_id override + if ($DB_amd_send_to_vmx =~ /Y/) + { + ### find list_id for this lead + $stmtA = "SELECT list_id from vicidial_list where lead_id = '$VD_lead_id';"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArowsL=$sthA->rows; + if ($sthArowsL > 0) + { + @aryA = $sthA->fetchrow_array; + $VD_list_id = $aryA[0]; + } + $sthA->finish(); + + $am_message_exten_override=''; + ### gather list_id overrides + $stmtA = "SELECT am_message_exten_override FROM vicidial_lists where list_id='$VD_list_id';"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArowsL=$sthA->rows; + if ($sthArowsL > 0) + { + @aryA = $sthA->fetchrow_array; + $am_message_exten_override = $aryA[0]; + if (length($am_message_exten_override) > 0) + {$DB_am_message_exten = $am_message_exten_override;} + } + $sthA->finish(); + } + if ($AGILOG) {$agi_string = "-- AMD campaign values: |$VD_campaign_id|$DB_am_message_exten|$DB_amd_send_to_vmx|"; &agi_output;} if ( ( ($DB_amd_send_to_vmx =~ /Y/) || ($force_playback =~ /YES/) ) && (length($DB_am_message_exten) > 0) ) diff --git a/agi/agi-VDAD_ALL_outbound.agi b/agi/agi-VDAD_ALL_outbound.agi index 3782fbb4..7b6cff3a 100644 --- a/agi/agi-VDAD_ALL_outbound.agi +++ b/agi/agi-VDAD_ALL_outbound.agi @@ -68,6 +68,7 @@ # 90721-1137 - Added rank and owner as vicidial_list fields # 90808-0307 - Added longest_wait_time as agent routing option # 90827-1535 - Added proper logging of list_id in vicidial_log table +# 90924-1605 - Added drop_inbound_group_override list_id option # $script = 'agi-VDAD_ALL_outbound.agi'; @@ -1821,7 +1822,25 @@ if ($drop_timer > $DROP_TIME) {$DROPexten = "$voicemail_dump_exten$VDADvoicemail_ext";} } if ($drop_action =~ /IN_GROUP/) - { # 90009*CL_uk3survy_*8301*10000123*universal*7275551212*1234*" + { + $drop_inbound_group_override=''; + if (length($xCLlist_id) > 1) + { + ### gather list_id overrides + $stmtA = "SELECT drop_inbound_group_override FROM vicidial_lists where list_id='$xCLlist_id';"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArowsL=$sthA->rows; + if ($sthArowsL > 0) + { + @aryA = $sthA->fetchrow_array; + $drop_inbound_group_override = $aryA[0]; + if (length($drop_inbound_group_override) > 0) + {$drop_inbound_group = $drop_inbound_group_override;} + } + $sthA->finish(); + } + # Example: 90009*CL_uk3survy_*8301*10000123*universal*7275551212*1234*" $S='*'; $DROPexten = "90009*$drop_inbound_group$S$S$CIDlead_id$S$S$VDADphone$S$fronter$S"; } diff --git a/bin/AST_VDauto_dial.pl b/bin/AST_VDauto_dial.pl index a3f008dc..84a63b15 100644 --- a/bin/AST_VDauto_dial.pl +++ b/bin/AST_VDauto_dial.pl @@ -83,6 +83,7 @@ # 90907-0919 - Added LAGGED pause code update for paused agents, reduced logging if no issues # 90909-0640 - Parked bug fix and code optimizations # 90917-1432 - Fixed issue on high-volume systems with lagged agents +# 90924-0914 - Added List callerid override option # @@ -792,23 +793,24 @@ while($one_day_interval > 0) $UQaffected_rows = $dbhA->do($stmtA); print "hopper row updated to INCALL: |$UQaffected_rows|$lead_id|\n"; - $stmtA = "SELECT * FROM vicidial_list where lead_id='$lead_id';"; + ### 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';"; $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; $sthArows=$sthA->rows; $rec_count=0; $rec_countCUSTDATA=0; - while ($sthArows > $rec_count) + if ($sthArows > 0) { @aryA = $sthA->fetchrow_array; - $list_id = "$aryA[7]"; - $gmt_offset_now = "$aryA[8]"; - $called_since_last_reset = "$aryA[9]"; - $phone_code = "$aryA[10]"; - $phone_number = "$aryA[11]"; - $address3 = "$aryA[18]"; - $alt_phone = "$aryA[26]"; - $called_count = "$aryA[30]"; + $list_id = $aryA[0]; + $gmt_offset_now = $aryA[1]; + $called_since_last_reset = $aryA[2]; + $phone_code = $aryA[3]; + $phone_number = $aryA[4]; + $address3 = $aryA[5]; + $alt_phone = $aryA[6]; + $called_count = $aryA[7]; $rec_countCUSTDATA++; $rec_count++; @@ -817,6 +819,19 @@ while($one_day_interval > 0) if ($rec_countCUSTDATA) { + $campaign_cid_override=''; + ### gather list_id overrides + $stmtA = "SELECT campaign_cid_override FROM vicidial_lists where list_id='$list_id';"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArowsL=$sthA->rows; + if ($sthArowsL > 0) + { + @aryA = $sthA->fetchrow_array; + $campaign_cid_override = $aryA[0]; + } + $sthA->finish(); + ### update called_count $called_count++; if ($called_since_last_reset =~ /^Y/) @@ -903,6 +918,7 @@ while($one_day_interval > 0) else {$VDAD_dial_exten = "$answer_transfer_agent";} 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 ($DBIPdialprefix[$user_CIPct] =~ /x/i) {$Local_out_prefix = '';} if ($RECcount) diff --git a/bin/AST_VDauto_dial_FILL.pl b/bin/AST_VDauto_dial_FILL.pl index 8f2344bd..e397b75d 100644 --- a/bin/AST_VDauto_dial_FILL.pl +++ b/bin/AST_VDauto_dial_FILL.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl # -# AST_VDauto_dial_FILL.pl version 2.0.5 *DBI-version* +# AST_VDauto_dial_FILL.pl version 2.2.0 *DBI-version* # # DESCRIPTION: # Places auto_dial calls on the VICIDIAL dialer system across all servers only @@ -26,54 +26,54 @@ # 81210-1938 - Fixed callerIDnumber bug # 90306-1844 - Added configurable calls-per-second option # 90729-0611 - Added vicidial_balance_rank option +# 90924-1519 - Added List callerid override option # - ### begin parsing run-time options ### if (length($ARGV[0])>1) -{ + { $i=0; while ($#ARGV >= $i) - { - $args = "$args $ARGV[$i]"; - $i++; - } + { + $args = "$args $ARGV[$i]"; + $i++; + } if ($args =~ /--help/i) - { - print "allowed run time options:\n [-t] = test\n [-debug] = verbose debug messages\n [--delay=XXX] = delay of XXX seconds per loop, default 2.5 seconds\n\n"; - } - else - { - if ($args =~ /--delay=/i) { - @data_in = split(/--delay=/,$args); + print "allowed run time options:\n [-t] = test\n [-debug] = verbose debug messages\n [--delay=XXX] = delay of XXX seconds per loop, default 2.5 seconds\n\n"; + } + else + { + if ($args =~ /--delay=/i) + { + @data_in = split(/--delay=/,$args); $loop_delay = $data_in[1]; print " LOOP DELAY OVERRIDE!!!!! = $loop_delay seconds\n\n"; $loop_delay = ($loop_delay * 1000); - } + } else - { - $loop_delay = '2500'; - } + { + $loop_delay = '2500'; + } if ($args =~ /-debug/i) - { - $DB=1; # Debug flag, set to 0 for no debug messages - print "\n-- DEBUG --\n\n"; - } + { + $DB=1; # Debug flag, set to 0 for no debug messages + print "\n-- DEBUG --\n\n"; + } if ($args =~ /-t/i) - { - $TEST=1; - $T=1; + { + $TEST=1; + $T=1; + } } } -} else -{ -print "no command line options set\n"; - $loop_delay = '2500'; - $DB=1; -} + { + print "no command line options set\n"; + $loop_delay = '2500'; + $DB=1; + } ### end parsing run-time options ### @@ -146,33 +146,33 @@ $sthArows=$sthA->rows; $rec_count=0; while ($sthArows > $rec_count) { - @aryA = $sthA->fetchrow_array; - $DBtelnet_host = "$aryA[0]"; - $DBtelnet_port = "$aryA[1]"; - $DBASTmgrUSERNAME = "$aryA[2]"; - $DBASTmgrSECRET = "$aryA[3]"; - $DBASTmgrUSERNAMEupdate = "$aryA[4]"; - $DBASTmgrUSERNAMElisten = "$aryA[5]"; - $DBASTmgrUSERNAMEsend = "$aryA[6]"; - $DBmax_vicidial_trunks = "$aryA[7]"; - $DBanswer_transfer_agent= "$aryA[8]"; - $DBSERVER_GMT = "$aryA[9]"; - $DBext_context = "$aryA[10]"; - $DBvd_server_logs = "$aryA[11]"; - if ($DBtelnet_host) {$telnet_host = $DBtelnet_host;} - if ($DBtelnet_port) {$telnet_port = $DBtelnet_port;} - if ($DBASTmgrUSERNAME) {$ASTmgrUSERNAME = $DBASTmgrUSERNAME;} - if ($DBASTmgrSECRET) {$ASTmgrSECRET = $DBASTmgrSECRET;} - if ($DBASTmgrUSERNAMEupdate) {$ASTmgrUSERNAMEupdate = $DBASTmgrUSERNAMEupdate;} - if ($DBASTmgrUSERNAMElisten) {$ASTmgrUSERNAMElisten = $DBASTmgrUSERNAMElisten;} - if ($DBASTmgrUSERNAMEsend) {$ASTmgrUSERNAMEsend = $DBASTmgrUSERNAMEsend;} - if ($DBmax_vicidial_trunks) {$max_vicidial_trunks = $DBmax_vicidial_trunks;} - if ($DBanswer_transfer_agent) {$answer_transfer_agent = $DBanswer_transfer_agent;} - if ($DBSERVER_GMT) {$SERVER_GMT = $DBSERVER_GMT;} - if ($DBext_context) {$ext_context = $DBext_context;} - if ($DBvd_server_logs =~ /Y/) {$SYSLOG = '1';} - else {$SYSLOG = '0';} - $rec_count++; + @aryA = $sthA->fetchrow_array; + $DBtelnet_host = "$aryA[0]"; + $DBtelnet_port = "$aryA[1]"; + $DBASTmgrUSERNAME = "$aryA[2]"; + $DBASTmgrSECRET = "$aryA[3]"; + $DBASTmgrUSERNAMEupdate = "$aryA[4]"; + $DBASTmgrUSERNAMElisten = "$aryA[5]"; + $DBASTmgrUSERNAMEsend = "$aryA[6]"; + $DBmax_vicidial_trunks = "$aryA[7]"; + $DBanswer_transfer_agent= "$aryA[8]"; + $DBSERVER_GMT = "$aryA[9]"; + $DBext_context = "$aryA[10]"; + $DBvd_server_logs = "$aryA[11]"; + if ($DBtelnet_host) {$telnet_host = $DBtelnet_host;} + if ($DBtelnet_port) {$telnet_port = $DBtelnet_port;} + if ($DBASTmgrUSERNAME) {$ASTmgrUSERNAME = $DBASTmgrUSERNAME;} + if ($DBASTmgrSECRET) {$ASTmgrSECRET = $DBASTmgrSECRET;} + if ($DBASTmgrUSERNAMEupdate) {$ASTmgrUSERNAMEupdate = $DBASTmgrUSERNAMEupdate;} + if ($DBASTmgrUSERNAMElisten) {$ASTmgrUSERNAMElisten = $DBASTmgrUSERNAMElisten;} + if ($DBASTmgrUSERNAMEsend) {$ASTmgrUSERNAMEsend = $DBASTmgrUSERNAMEsend;} + if ($DBmax_vicidial_trunks) {$max_vicidial_trunks = $DBmax_vicidial_trunks;} + if ($DBanswer_transfer_agent) {$answer_transfer_agent = $DBanswer_transfer_agent;} + if ($DBSERVER_GMT) {$SERVER_GMT = $DBSERVER_GMT;} + if ($DBext_context) {$ext_context = $DBext_context;} + if ($DBvd_server_logs =~ /Y/) {$SYSLOG = '1';} + else {$SYSLOG = '0';} + $rec_count++; } $sthA->finish(); @@ -181,13 +181,13 @@ $sthA->finish(); $one_day_interval = 12; # 1 month loops for one year while($one_day_interval > 0) -{ + { $endless_loop=5760000; # 30 days minutes at XXX seconds per loop $stat_count=1; while($endless_loop > 0) - { + { &get_time_now; $VDADLOGfile = "$PATHlogs/vdautodial_FILL.$year-$mon-$mday"; @@ -316,16 +316,16 @@ while($one_day_interval > 0) while ($sthArows > $rec_count) { @aryA = $sthA->fetchrow_array; - $DBIPdialtimeout[$camp_CIPct] = "$aryA[0]"; - $DBIPdialprefix[$camp_CIPct] = "$aryA[1]"; - $DBIPcampaigncid[$camp_CIPct] = "$aryA[2]"; - $DBIPactive[$camp_CIPct] = "$aryA[3]"; - $DBIPvdadexten[$camp_CIPct] = "$aryA[4]"; - $omit_phone_code = "$aryA[5]"; - if ($omit_phone_code =~ /Y/) {$DBIPomitcode[$camp_CIPct] = 1;} - else {$DBIPomitcode[$camp_CIPct] = 0;} - $DBIPautoaltdial[$camp_CIPct] = "$aryA[6]"; - $DBIPqueue_priority[$camp_CIPct] = "$aryA[7]"; + $DBIPdialtimeout[$camp_CIPct] = "$aryA[0]"; + $DBIPdialprefix[$camp_CIPct] = "$aryA[1]"; + $DBIPcampaigncid[$camp_CIPct] = "$aryA[2]"; + $DBIPactive[$camp_CIPct] = "$aryA[3]"; + $DBIPvdadexten[$camp_CIPct] = "$aryA[4]"; + $omit_phone_code = "$aryA[5]"; + if ($omit_phone_code =~ /Y/) {$DBIPomitcode[$camp_CIPct] = 1;} + else {$DBIPomitcode[$camp_CIPct] = 0;} + $DBIPautoaltdial[$camp_CIPct] = "$aryA[6]"; + $DBIPqueue_priority[$camp_CIPct] = "$aryA[7]"; $rec_count++; } @@ -574,29 +574,29 @@ while($one_day_interval > 0) { $stmtA = "UPDATE vicidial_hopper set status='QUEUE', user='VDAD_$DB_camp_server_server_ip[$server_CIPct]' where campaign_id='$DBfill_campaign[$camp_CIPct]' and status='READY' order by priority desc,hopper_id LIMIT $DB_camp_server_trunks_to_dial[$server_CIPct]"; print "|$stmtA|\n"; - $UDaffected_rows = $dbhA->do($stmtA); + $UDaffected_rows = $dbhA->do($stmtA); print "hopper rows updated to QUEUE: |$UDaffected_rows|\n"; - if ($UDaffected_rows) + if ($UDaffected_rows) { $lead_id=''; $phone_code=''; $phone_number=''; $called_count=''; - while ($call_CMPIPct < $UDaffected_rows) + while ($call_CMPIPct < $UDaffected_rows) { $stmtA = "SELECT lead_id,alt_dial FROM vicidial_hopper where campaign_id='$DBfill_campaign[$camp_CIPct]' and status='QUEUE' and user='VDAD_$DB_camp_server_server_ip[$server_CIPct]' order by priority desc,hopper_id LIMIT 1"; print "|$stmtA|\n"; - $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; - $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; - $sthArows=$sthA->rows; - $rec_count=0; - $rec_countCUSTDATA=0; - while ($sthArows > $rec_count) - { - @aryA = $sthA->fetchrow_array; - $lead_id = "$aryA[0]"; - $alt_dial = "$aryA[1]"; - $rec_count++; - } - $sthA->finish(); + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $rec_count=0; + $rec_countCUSTDATA=0; + while ($sthArows > $rec_count) + { + @aryA = $sthA->fetchrow_array; + $lead_id = "$aryA[0]"; + $alt_dial = "$aryA[1]"; + $rec_count++; + } + $sthA->finish(); if ($lead_id_call_list =~ /\|$lead_id\|/) { @@ -613,34 +613,47 @@ while($one_day_interval > 0) { $stmtA = "UPDATE vicidial_hopper set status='INCALL' where lead_id='$lead_id'"; print "|$stmtA|\n"; - $UQaffected_rows = $dbhA->do($stmtA); + $UQaffected_rows = $dbhA->do($stmtA); print "hopper row updated to INCALL: |$UQaffected_rows|$lead_id|\n"; - $stmtA = "SELECT * 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 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; $rec_count=0; - $rec_countCUSTDATA=0; - while ($sthArows > $rec_count) + $rec_countCUSTDATA=0; + if ($sthArows > 0) { @aryA = $sthA->fetchrow_array; - $list_id = "$aryA[7]"; - $gmt_offset_now = "$aryA[8]"; - $called_since_last_reset = "$aryA[9]"; - $phone_code = "$aryA[10]"; - $phone_number = "$aryA[11]"; - $address3 = "$aryA[18]"; - $alt_phone = "$aryA[26]"; - $called_count = "$aryA[30]"; + $list_id = $aryA[0]; + $gmt_offset_now = $aryA[1]; + $called_since_last_reset = $aryA[2]; + $phone_code = $aryA[3]; + $phone_number = $aryA[4]; + $address3 = $aryA[5]; + $alt_phone = $aryA[6]; + $called_count = $aryA[7]; - $rec_countCUSTDATA++; + $rec_countCUSTDATA++; $rec_count++; } $sthA->finish(); if ($rec_countCUSTDATA) { + $campaign_cid_override=''; + ### gather list_id overrides + $stmtA = "SELECT campaign_cid_override FROM vicidial_lists where list_id='$list_id';"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArowsL=$sthA->rows; + if ($sthArowsL > 0) + { + @aryA = $sthA->fetchrow_array; + $campaign_cid_override = $aryA[0]; + } + $sthA->finish(); + ### update called_count $called_count++; if ($called_since_last_reset =~ /^Y/) @@ -655,61 +668,61 @@ while($one_day_interval > 0) } else {$CSLR = 'Y';} - $LLCT_DATE_offset = ($LOCAL_GMT_OFF - $gmt_offset_now); - $LLCT_DATE_offset_epoch = ( $secX - ($LLCT_DATE_offset * 3600) ); - ($Lsec,$Lmin,$Lhour,$Lmday,$Lmon,$Lyear,$Lwday,$Lyday,$Lisdst) = localtime($LLCT_DATE_offset_epoch); - $Lyear = ($Lyear + 1900); - $Lmon++; - if ($Lmon < 10) {$Lmon = "0$Lmon";} - if ($Lmday < 10) {$Lmday = "0$Lmday";} - if ($Lhour < 10) {$Lhour = "0$Lhour";} - if ($Lmin < 10) {$Lmin = "0$Lmin";} - if ($Lsec < 10) {$Lsec = "0$Lsec";} - $LLCT_DATE = "$Lyear-$Lmon-$Lmday $Lhour:$Lmin:$Lsec"; + $LLCT_DATE_offset = ($LOCAL_GMT_OFF - $gmt_offset_now); + $LLCT_DATE_offset_epoch = ( $secX - ($LLCT_DATE_offset * 3600) ); + ($Lsec,$Lmin,$Lhour,$Lmday,$Lmon,$Lyear,$Lwday,$Lyday,$Lisdst) = localtime($LLCT_DATE_offset_epoch); + $Lyear = ($Lyear + 1900); + $Lmon++; + if ($Lmon < 10) {$Lmon = "0$Lmon";} + if ($Lmday < 10) {$Lmday = "0$Lmday";} + if ($Lhour < 10) {$Lhour = "0$Lhour";} + if ($Lmin < 10) {$Lmin = "0$Lmin";} + if ($Lsec < 10) {$Lsec = "0$Lsec";} + $LLCT_DATE = "$Lyear-$Lmon-$Lmday $Lhour:$Lmin:$Lsec"; - if ( ($alt_dial =~ /ALT|ADDR3|X/) && ($DBIPautoaltdial[$user_CIPct] =~ /ALT|ADDR|X/) ) - { - if ( ($alt_dial =~ /ALT/) && ($DBIPautoaltdial[$user_CIPct] =~ /ALT/) ) + if ( ($alt_dial =~ /ALT|ADDR3|X/) && ($DBIPautoaltdial[$user_CIPct] =~ /ALT|ADDR|X/) ) { - $alt_phone =~ s/\D//gi; - $phone_number = $alt_phone; - } - if ( ($alt_dial =~ /ADDR3/) && ($DBIPautoaltdial[$user_CIPct] =~ /ADDR3/) ) - { - $address3 =~ s/\D//gi; - $phone_number = $address3; - } - if ( ($alt_dial =~ /^X/) && ($DBIPautoaltdial[$user_CIPct] =~ /^X/) ) - { - if ($alt_dial =~ /LAST/) + if ( ($alt_dial =~ /ALT/) && ($DBIPautoaltdial[$user_CIPct] =~ /ALT/) ) { - $stmtA = "SELECT phone_code,phone_number FROM vicidial_list_alt_phones where lead_id='$lead_id' order by alt_phone_count desc limit 1;"; + $alt_phone =~ s/\D//gi; + $phone_number = $alt_phone; } - else + if ( ($alt_dial =~ /ADDR3/) && ($DBIPautoaltdial[$user_CIPct] =~ /ADDR3/) ) { - $Talt_dial = $alt_dial; - $Talt_dial =~ s/\D//gi; - $stmtA = "SELECT phone_code,phone_number FROM vicidial_list_alt_phones where lead_id='$lead_id' and alt_phone_count='$Talt_dial';"; + $address3 =~ s/\D//gi; + $phone_number = $address3; } - $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; - $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; - $sthArows=$sthA->rows; - if ($sthArows > 0) + if ( ($alt_dial =~ /^X/) && ($DBIPautoaltdial[$user_CIPct] =~ /^X/) ) { - @aryA = $sthA->fetchrow_array; - $phone_code = "$aryA[0]"; - $phone_number = "$aryA[1]"; - $phone_number =~ s/\D//gi; + if ($alt_dial =~ /LAST/) + { + $stmtA = "SELECT phone_code,phone_number FROM vicidial_list_alt_phones where lead_id='$lead_id' order by alt_phone_count desc limit 1;"; + } + else + { + $Talt_dial = $alt_dial; + $Talt_dial =~ s/\D//gi; + $stmtA = "SELECT phone_code,phone_number FROM vicidial_list_alt_phones where lead_id='$lead_id' and alt_phone_count='$Talt_dial';"; + } + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $phone_code = "$aryA[0]"; + $phone_number = "$aryA[1]"; + $phone_number =~ s/\D//gi; + } + $sthA->finish(); } - $sthA->finish(); - } - $stmtA = "UPDATE vicidial_list set called_since_last_reset='$CSLR',user='VDAD',last_local_call_time='$LLCT_DATE' where lead_id='$lead_id'"; - } - else - { - $stmtA = "UPDATE vicidial_list set called_since_last_reset='$CSLR', called_count='$called_count',user='VDAD',last_local_call_time='$LLCT_DATE' where lead_id='$lead_id'"; - } + $stmtA = "UPDATE vicidial_list set called_since_last_reset='$CSLR',user='VDAD',last_local_call_time='$LLCT_DATE' where lead_id='$lead_id'"; + } + else + { + $stmtA = "UPDATE vicidial_list set called_since_last_reset='$CSLR', called_count='$called_count',user='VDAD',last_local_call_time='$LLCT_DATE' where lead_id='$lead_id'"; + } $affected_rows = $dbhA->do($stmtA); $stmtA = "DELETE FROM vicidial_hopper where lead_id='$lead_id'"; @@ -720,14 +733,15 @@ while($one_day_interval > 0) $local_AMP = '@'; $Local_out_prefix = '9'; $Local_dial_timeout = '60'; - if ($DBIPdialtimeout[$camp_CIPct] > 4) {$Local_dial_timeout = $DBIPdialtimeout[$camp_CIPct];} + if ($DBIPdialtimeout[$camp_CIPct] > 4) {$Local_dial_timeout = $DBIPdialtimeout[$camp_CIPct];} $Local_dial_timeout = ($Local_dial_timeout * 1000); - if (length($DBIPdialprefix[$camp_CIPct]) > 0) {$Local_out_prefix = "$DBIPdialprefix[$camp_CIPct]";} - if (length($DBIPvdadexten[$camp_CIPct]) > 0) {$VDAD_dial_exten = "$DBIPvdadexten[$camp_CIPct]";} - else {$VDAD_dial_exten = "$answer_transfer_agent";} - - if (length($DBIPcampaigncid[$camp_CIPct]) > 6) {$CCID = "$DBIPcampaigncid[$camp_CIPct]"; $CCID_on++;} - if ($DBIPdialprefix[$camp_CIPct] =~ /x/i) {$Local_out_prefix = '';} + if (length($DBIPdialprefix[$camp_CIPct]) > 0) {$Local_out_prefix = "$DBIPdialprefix[$camp_CIPct]";} + if (length($DBIPvdadexten[$camp_CIPct]) > 0) {$VDAD_dial_exten = "$DBIPvdadexten[$camp_CIPct]";} + else {$VDAD_dial_exten = "$answer_transfer_agent";} + + 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 ($DBIPdialprefix[$camp_CIPct] =~ /x/i) {$Local_out_prefix = '';} if ($RECcount) { @@ -755,15 +769,15 @@ while($one_day_interval > 0) if ($CCID_on) {$CIDstring = "\"$VqueryCID\" <$CCID>";} else {$CIDstring = "$VqueryCID";} ### insert a NEW record to the vicidial_manager table to be processed - $stmtA = "INSERT INTO vicidial_manager values('','','$SQLdate','NEW','N','$DB_camp_server_server_ip[$server_CIPct]','','Originate','$VqueryCID','Exten: $VDAD_dial_exten','Context: $ext_context','Channel: $local_DEF$Ndialstring$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','')"; - $affected_rows = $dbhA->do($stmtA); + $stmtA = "INSERT INTO vicidial_manager values('','','$SQLdate','NEW','N','$DB_camp_server_server_ip[$server_CIPct]','','Originate','$VqueryCID','Exten: $VDAD_dial_exten','Context: $ext_context','Channel: $local_DEF$Ndialstring$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','')"; + $affected_rows = $dbhA->do($stmtA); - $event_string = "| number call dialed|$DBfill_campaign[$camp_CIPct]|$VqueryCID|$stmtA|$gmt_offset_now|$alt_dial|"; - &event_logger; + $event_string = "| number call dialed|$DBfill_campaign[$camp_CIPct]|$VqueryCID|$stmtA|$gmt_offset_now|$alt_dial|"; + &event_logger; - ### insert a SENT record to the vicidial_auto_calls table - $stmtA = "INSERT INTO vicidial_auto_calls (server_ip,campaign_id,status,lead_id,callerid,phone_code,phone_number,call_time,call_type,alt_dial,queue_priority) values('$DB_camp_server_server_ip[$server_CIPct]','$DBfill_campaign[$camp_CIPct]','SENT','$lead_id','$VqueryCID','$phone_code','$phone_number','$SQLdate','OUTBALANCE','$alt_dial','$DBIPqueue_priority[$camp_CIPct]')"; - $affected_rows = $dbhA->do($stmtA); + ### insert a SENT record to the vicidial_auto_calls table + $stmtA = "INSERT INTO vicidial_auto_calls (server_ip,campaign_id,status,lead_id,callerid,phone_code,phone_number,call_time,call_type,alt_dial,queue_priority) values('$DB_camp_server_server_ip[$server_CIPct]','$DBfill_campaign[$camp_CIPct]','SENT','$lead_id','$VqueryCID','$phone_code','$phone_number','$SQLdate','OUTBALANCE','$alt_dial','$DBIPqueue_priority[$camp_CIPct]')"; + $affected_rows = $dbhA->do($stmtA); ### sleep for 2.5 hundredths of a second to not flood the server with new calls # usleep(1*25*1000); @@ -866,11 +880,11 @@ while($one_day_interval > 0) $rec_count=0; while ($sthArows > $rec_count) { - @aryA = $sthA->fetchrow_array; - $DBvd_server_logs = "$aryA[0]"; - if ($DBvd_server_logs =~ /Y/) {$SYSLOG = '1';} - else {$SYSLOG = '0';} - $rec_count++; + @aryA = $sthA->fetchrow_array; + $DBvd_server_logs = "$aryA[0]"; + if ($DBvd_server_logs =~ /Y/) {$SYSLOG = '1';} + else {$SYSLOG = '0';} + $rec_count++; } $sthA->finish(); @@ -883,14 +897,14 @@ while($one_day_interval > 0) while ($sthArows > $rec_count) { @aryA = $sthA->fetchrow_array; - $DBmax_vicidial_trunks = "$aryA[0]"; - $DBanswer_transfer_agent= "$aryA[1]"; - $DBSERVER_GMT = "$aryA[2]"; - $DBext_context = "$aryA[3]"; - if ($DBmax_vicidial_trunks) {$max_vicidial_trunks = $DBmax_vicidial_trunks;} - if ($DBanswer_transfer_agent) {$answer_transfer_agent = $DBanswer_transfer_agent;} - if ($DBSERVER_GMT) {$SERVER_GMT = $DBSERVER_GMT;} - if ($DBext_context) {$ext_context = $DBext_context;} + $DBmax_vicidial_trunks = "$aryA[0]"; + $DBanswer_transfer_agent= "$aryA[1]"; + $DBSERVER_GMT = "$aryA[2]"; + $DBext_context = "$aryA[3]"; + if ($DBmax_vicidial_trunks) {$max_vicidial_trunks = $DBmax_vicidial_trunks;} + if ($DBanswer_transfer_agent) {$answer_transfer_agent = $DBanswer_transfer_agent;} + if ($DBSERVER_GMT) {$SERVER_GMT = $DBSERVER_GMT;} + if ($DBext_context) {$ext_context = $DBext_context;} $rec_count++; } $sthA->finish(); @@ -900,27 +914,27 @@ while($one_day_interval > 0) &get_time_now; } - $stat_count++; - } + $stat_count++; + } - if($DB){print "DONE... Exiting... Goodbye... See you later... Not really, initiating next loop...\n";} + if($DB){print "DONE... Exiting... Goodbye... See you later... Not really, initiating next loop...\n";} - $event_string='HANGING UP|'; - &event_logger; + $event_string='HANGING UP|'; + &event_logger; $one_day_interval--; -} + } - $event_string='CLOSING DB CONNECTION|'; - &event_logger; +$event_string='CLOSING DB CONNECTION|'; +&event_logger; - $dbhA->disconnect(); +$dbhA->disconnect(); - if($DB){print "DONE... Exiting... Goodbye... See you later... Really I mean it this time\n";} +if($DB){print "DONE... Exiting... Goodbye... See you later... Really I mean it this time\n";} exit; @@ -938,97 +952,96 @@ exit; sub get_time_now #get the current date and time and epoch for logging call lengths and datetimes -{ -$secX = time(); - ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($secX); - $LOCAL_GMT_OFF = $SERVER_GMT; - $LOCAL_GMT_OFF_STD = $SERVER_GMT; - if ($isdst) {$LOCAL_GMT_OFF++;} + { + $secX = time(); + ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($secX); + $LOCAL_GMT_OFF = $SERVER_GMT; + $LOCAL_GMT_OFF_STD = $SERVER_GMT; + if ($isdst) {$LOCAL_GMT_OFF++;} -$GMT_now = ($secX - ($LOCAL_GMT_OFF * 3600)); - ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($GMT_now); + $GMT_now = ($secX - ($LOCAL_GMT_OFF * 3600)); + ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($GMT_now); + if ($hour < 10) {$hour = "0$hour";} + if ($min < 10) {$min = "0$min";} + + if ($DB) {print "TIME DEBUG: $LOCAL_GMT_OFF_STD|$LOCAL_GMT_OFF|$isdst| GMT: $hour:$min\n";} + + ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); + $year = ($year + 1900); + $mon++; + if ($mon < 10) {$mon = "0$mon";} + if ($mday < 10) {$mday = "0$mday";} if ($hour < 10) {$hour = "0$hour";} if ($min < 10) {$min = "0$min";} + if ($sec < 10) {$sec = "0$sec";} - if ($DB) {print "TIME DEBUG: $LOCAL_GMT_OFF_STD|$LOCAL_GMT_OFF|$isdst| GMT: $hour:$min\n";} + $now_date_epoch = time(); + $now_date = "$year-$mon-$mday $hour:$min:$sec"; + $file_date = "$year-$mon-$mday"; + $CIDdate = "$mon$mday$hour$min$sec"; + $tsSQLdate = "$year$mon$mday$hour$min$sec"; + $SQLdate = "$year-$mon-$mday $hour:$min:$sec"; -($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); -$year = ($year + 1900); -$mon++; -if ($mon < 10) {$mon = "0$mon";} -if ($mday < 10) {$mday = "0$mday";} -if ($hour < 10) {$hour = "0$hour";} -if ($min < 10) {$min = "0$min";} -if ($sec < 10) {$sec = "0$sec";} + $BDtarget = ($secX - 10); + ($Bsec,$Bmin,$Bhour,$Bmday,$Bmon,$Byear,$Bwday,$Byday,$Bisdst) = localtime($BDtarget); + $Byear = ($Byear + 1900); + $Bmon++; + if ($Bmon < 10) {$Bmon = "0$Bmon";} + if ($Bmday < 10) {$Bmday = "0$Bmday";} + if ($Bhour < 10) {$Bhour = "0$Bhour";} + if ($Bmin < 10) {$Bmin = "0$Bmin";} + if ($Bsec < 10) {$Bsec = "0$Bsec";} + $BDtsSQLdate = "$Byear$Bmon$Bmday$Bhour$Bmin$Bsec"; -$now_date_epoch = time(); -$now_date = "$year-$mon-$mday $hour:$min:$sec"; -$file_date = "$year-$mon-$mday"; - $CIDdate = "$mon$mday$hour$min$sec"; - $tsSQLdate = "$year$mon$mday$hour$min$sec"; - $SQLdate = "$year-$mon-$mday $hour:$min:$sec"; + $PDtarget = ($secX - 30); + ($Psec,$Pmin,$Phour,$Pmday,$Pmon,$Pyear,$Pwday,$Pyday,$Pisdst) = localtime($PDtarget); + $Pyear = ($Pyear + 1900); + $Pmon++; + if ($Pmon < 10) {$Pmon = "0$Pmon";} + if ($Pmday < 10) {$Pmday = "0$Pmday";} + if ($Phour < 10) {$Phour = "0$Phour";} + if ($Pmin < 10) {$Pmin = "0$Pmin";} + if ($Psec < 10) {$Psec = "0$Psec";} + $PDtsSQLdate = "$Pyear$Pmon$Pmday$Phour$Pmin$Psec"; + $halfminSQLdate = "$Pyear-$Pmon-$Pmday $Phour:$Pmin:$Psec"; -$BDtarget = ($secX - 10); -($Bsec,$Bmin,$Bhour,$Bmday,$Bmon,$Byear,$Bwday,$Byday,$Bisdst) = localtime($BDtarget); -$Byear = ($Byear + 1900); -$Bmon++; -if ($Bmon < 10) {$Bmon = "0$Bmon";} -if ($Bmday < 10) {$Bmday = "0$Bmday";} -if ($Bhour < 10) {$Bhour = "0$Bhour";} -if ($Bmin < 10) {$Bmin = "0$Bmin";} -if ($Bsec < 10) {$Bsec = "0$Bsec";} - $BDtsSQLdate = "$Byear$Bmon$Bmday$Bhour$Bmin$Bsec"; + $XDtarget = ($secX - 120); + ($Xsec,$Xmin,$Xhour,$Xmday,$Xmon,$Xyear,$Xwday,$Xyday,$Xisdst) = localtime($XDtarget); + $Xyear = ($Xyear + 1900); + $Xmon++; + if ($Xmon < 10) {$Xmon = "0$Xmon";} + if ($Xmday < 10) {$Xmday = "0$Xmday";} + if ($Xhour < 10) {$Xhour = "0$Xhour";} + if ($Xmin < 10) {$Xmin = "0$Xmin";} + if ($Xsec < 10) {$Xsec = "0$Xsec";} + $XDSQLdate = "$Xyear-$Xmon-$Xmday $Xhour:$Xmin:$Xsec"; -$PDtarget = ($secX - 30); -($Psec,$Pmin,$Phour,$Pmday,$Pmon,$Pyear,$Pwday,$Pyday,$Pisdst) = localtime($PDtarget); -$Pyear = ($Pyear + 1900); -$Pmon++; -if ($Pmon < 10) {$Pmon = "0$Pmon";} -if ($Pmday < 10) {$Pmday = "0$Pmday";} -if ($Phour < 10) {$Phour = "0$Phour";} -if ($Pmin < 10) {$Pmin = "0$Pmin";} -if ($Psec < 10) {$Psec = "0$Psec";} - $PDtsSQLdate = "$Pyear$Pmon$Pmday$Phour$Pmin$Psec"; - $halfminSQLdate = "$Pyear-$Pmon-$Pmday $Phour:$Pmin:$Psec"; - -$XDtarget = ($secX - 120); -($Xsec,$Xmin,$Xhour,$Xmday,$Xmon,$Xyear,$Xwday,$Xyday,$Xisdst) = localtime($XDtarget); -$Xyear = ($Xyear + 1900); -$Xmon++; -if ($Xmon < 10) {$Xmon = "0$Xmon";} -if ($Xmday < 10) {$Xmday = "0$Xmday";} -if ($Xhour < 10) {$Xhour = "0$Xhour";} -if ($Xmin < 10) {$Xmin = "0$Xmin";} -if ($Xsec < 10) {$Xsec = "0$Xsec";} - $XDSQLdate = "$Xyear-$Xmon-$Xmday $Xhour:$Xmin:$Xsec"; - -$TDtarget = ($secX - 600); -($Tsec,$Tmin,$Thour,$Tmday,$Tmon,$Tyear,$Twday,$Tyday,$Tisdst) = localtime($TDtarget); -$Tyear = ($Tyear + 1900); -$Tmon++; -if ($Tmon < 10) {$Tmon = "0$Tmon";} -if ($Tmday < 10) {$Tmday = "0$Tmday";} -if ($Thour < 10) {$Thour = "0$Thour";} -if ($Tmin < 10) {$Tmin = "0$Tmin";} -if ($Tsec < 10) {$Tsec = "0$Tsec";} - $TDSQLdate = "$Tyear-$Tmon-$Tmday $Thour:$Tmin:$Tsec"; - -} + $TDtarget = ($secX - 600); + ($Tsec,$Tmin,$Thour,$Tmday,$Tmon,$Tyear,$Twday,$Tyday,$Tisdst) = localtime($TDtarget); + $Tyear = ($Tyear + 1900); + $Tmon++; + if ($Tmon < 10) {$Tmon = "0$Tmon";} + if ($Tmday < 10) {$Tmday = "0$Tmday";} + if ($Thour < 10) {$Thour = "0$Thour";} + if ($Tmin < 10) {$Tmin = "0$Tmin";} + if ($Tsec < 10) {$Tsec = "0$Tsec";} + $TDSQLdate = "$Tyear-$Tmon-$Tmday $Thour:$Tmin:$Tsec"; + } sub event_logger -{ -if ($DB) {print "$now_date|$event_string|\n";} -if ($SYSLOG) { - ### open the log file for writing ### - open(Lout, ">>$VDADLOGfile") - || die "Can't open $VDADLOGfile: $!\n"; - print Lout "$now_date|$event_string|\n"; - close(Lout); + if ($DB) {print "$now_date|$event_string|\n";} + if ($SYSLOG) + { + ### open the log file for writing ### + open(Lout, ">>$VDADLOGfile") + || die "Can't open $VDADLOGfile: $!\n"; + print Lout "$now_date|$event_string|\n"; + close(Lout); + } + $event_string=''; } -$event_string=''; -} diff --git a/bin/AST_VDsales_export.pl b/bin/AST_VDsales_export.pl index 7d9bb8b8..22d1f9be 100644 --- a/bin/AST_VDsales_export.pl +++ b/bin/AST_VDsales_export.pl @@ -1067,7 +1067,7 @@ sub select_format_loop $sthB->finish(); } ##### UNCOMMENT IF USING LIST ID NAME FOR DID_NAME - # $stmtB = "select list_name from vicidial_lists where list_id='$list_id' limit 1;"; + # $stmtB = "select list_name,campaign_cid_override from vicidial_lists where list_id='$list_id' limit 1;"; # if ($DBX > 0) {print "$stmtB\n";} # $sthB = $dbhB->prepare($stmtB) or die "preparing: ",$dbhB->errstr; # $sthB->execute or die "executing: $stmtB ", $dbhB->errstr; @@ -1075,7 +1075,8 @@ sub select_format_loop # if ($sthBrows > 0) # { # @aryB = $sthB->fetchrow_array; - # $did_name = "$aryB[0]"; + # $did_name = $aryB[0]; + # $did_pattern = $aryB[1]; # $sthB->finish(); # } } diff --git a/extras/MySQL_AST_CREATE_tables.sql b/extras/MySQL_AST_CREATE_tables.sql index c9c99a0d..7a394aab 100644 --- a/extras/MySQL_AST_CREATE_tables.sql +++ b/extras/MySQL_AST_CREATE_tables.sql @@ -687,7 +687,10 @@ list_description VARCHAR(255), list_changedate DATETIME, list_lastcalldate DATETIME, reset_time VARCHAR(100) default '', -agent_script_override VARCHAR(10) default '' +agent_script_override VARCHAR(10) default '', +campaign_cid_override VARCHAR(20) default '', +am_message_exten_override VARCHAR(100) default '', +drop_inbound_group_override VARCHAR(20) default '' ); CREATE TABLE vicidial_statuses ( @@ -1931,7 +1934,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='1174',db_schema_update_date=NOW(); +UPDATE system_settings SET db_schema_version='1175',db_schema_update_date=NOW(); GRANT RELOAD ON *.* TO cron@'%'; GRANT RELOAD ON *.* TO cron@localhost; diff --git a/extras/upgrade_2.2.0.sql b/extras/upgrade_2.2.0.sql index f299b712..545976e1 100644 --- a/extras/upgrade_2.2.0.sql +++ b/extras/upgrade_2.2.0.sql @@ -560,3 +560,9 @@ email VARCHAR(100) ); UPDATE system_settings SET db_schema_version='1174',db_schema_update_date=NOW(); + +ALTER TABLE vicidial_lists ADD campaign_cid_override VARCHAR(20) default ''; +ALTER TABLE vicidial_lists ADD am_message_exten_override VARCHAR(100) default ''; +ALTER TABLE vicidial_lists ADD drop_inbound_group_override VARCHAR(20) default ''; + +UPDATE system_settings SET db_schema_version='1175',db_schema_update_date=NOW(); diff --git a/translations/raw_translation_files/TO_BE_TRANSLATED_2.2.0.txt b/translations/raw_translation_files/TO_BE_TRANSLATED_2.2.0.txt index fc2bb933..c7122bfc 100644 --- a/translations/raw_translation_files/TO_BE_TRANSLATED_2.2.0.txt +++ b/translations/raw_translation_files/TO_BE_TRANSLATED_2.2.0.txt @@ -330,6 +330,12 @@ Click here to delete voicemail box|| DELETE THIS VOICEMAIL BOX|| Click here to see Admin chages to this voicemail box|| The following fields must have data|| +Campaign CID Override|| +If this field is set, this will override the campaign CallerID that is set for calls that are placed to leads in this list. Default is not set|| +Answering Machine Message Override|| +If this field is set, this will override the Answering Machine Message set in the campaign for customers in this list. Default is not set|| +Drop Inbound Group Override|| +If this field is set, this in-group will be used for outbound calls within this list that drop from the outbound campaign instead of the drop in-group set in the campaign detail screen. Default is not set|| add-file: user_territories.php diff --git a/www/agc/manager_send.php b/www/agc/manager_send.php index 7e3ae2c5..03f0fd5e 100644 --- a/www/agc/manager_send.php +++ b/www/agc/manager_send.php @@ -90,12 +90,13 @@ # 90511-1019 - Added restriction not allowing dialing into agent sessions from manual dial # 90913-1410 - Fixed minor logging bug # 90916-1830 - Added nodeletevdac +# 90924-1555 - Added am_message_exten_override for list_id option # -$version = '2.2.0-42'; -$build = '90916-1630'; +$version = '2.2.0-43'; +$build = '90924-1555'; $mel=1; # Mysql Error Log enabled = 1 -$mysql_log_count=83; +$mysql_log_count=85; $one_mysql_log=0; require("dbconnect.php"); @@ -730,6 +731,39 @@ if ($ACTION=="RedirectVD") $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02024',$user,$server_ip,$session_name,$one_mysql_log);} } + else + { + if (strlen($lead_id) > 1) + { + $list_id=''; + $stmt = "SELECT list_id FROM vicidial_list where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02084',$user,$server_ip,$session_name,$one_mysql_log);} + if ($DB) {echo "$stmt\n";} + $lio_ct = mysql_num_rows($rslt); + if ($lio_ct > 0) + { + $row=mysql_fetch_row($rslt); + $list_id = $row[0]; + + if (strlen($list_id) > 1) + { + $stmt = "SELECT am_message_exten_override FROM vicidial_lists where list_id='$list_id';"; + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02085',$user,$server_ip,$session_name,$one_mysql_log);} + if ($DB) {echo "$stmt\n";} + $lio_ct = mysql_num_rows($rslt); + if ($lio_ct > 0) + { + $row=mysql_fetch_row($rslt); + $am_message_exten_override = $row[0]; + if (strlen($am_message_exten_override) > 0) {$exten = "$am_message_exten_override";} + } + } + } + } + + } $ACTION="Redirect"; } } diff --git a/www/agc/vdc_db_query.php b/www/agc/vdc_db_query.php index 0801d1f6..6018446a 100644 --- a/www/agc/vdc_db_query.php +++ b/www/agc/vdc_db_query.php @@ -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','AlertControl','AGENTSview','CALLSINQUEUEview','CALLSINQUEUEgrab','DiaLableLeaDsCounT') +# - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','updateLEAD','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT','PauseCodeSubmit','LogiNCamPaigns','alt_phone_change','AlertControl','AGENTSview','CALLSINQUEUEview','CALLSINQUEUEgrab','DiaLableLeaDsCounT') # - $stage - ('start','finish','lookup','new') # - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -') # - $conf_exten - ('8600011',...) @@ -213,12 +213,13 @@ # 90908-1037 - Added DEAD call logging # 90916-1839 - Added nodeletevdac # 90917-2246 - Fixed auto-alt-dial DNC check bug +# 90924-1544 - Added List callerid override option # -$version = '2.2.0-123'; -$build = '90917-2246'; +$version = '2.2.0-124'; +$build = '90924-1544'; $mel=1; # Mysql Error Log enabled = 1 -$mysql_log_count=244; +$mysql_log_count=252; $one_mysql_log=0; require("dbconnect.php"); @@ -1578,6 +1579,22 @@ if ($ACTION == 'manDiaLnextCaLL') $Local_dial_timeout = ($Local_dial_timeout * 1000); if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++;} + $campaign_cid_override=''; + ### check if there is a list_id override + if (strlen($list_id) > 1) + { + $stmt = "SELECT campaign_cid_override FROM vicidial_lists where list_id='$list_id';"; + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00245',$user,$server_ip,$session_name,$one_mysql_log);} + if ($DB) {echo "$stmt\n";} + $lio_ct = mysql_num_rows($rslt); + if ($lio_ct > 0) + { + $row=mysql_fetch_row($rslt); + $campaign_cid_override = $row[0]; + } + } + if (strlen($campaign_cid_override) > 6) {$CCID = "$campaign_cid_override"; $CCID_on++;} if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';} $PADlead_id = sprintf("%09s", $lead_id); @@ -1869,6 +1886,37 @@ if ($ACTION == 'manDiaLonly') if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++;} if (eregi("x",$dial_prefix)) {$Local_out_prefix = '';} + $campaign_cid_override=''; + ### check if there is a list_id override + if (strlen($lead_id) > 1) + { + $list_id=''; + $stmt = "SELECT list_id FROM vicidial_list where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00246',$user,$server_ip,$session_name,$one_mysql_log);} + if ($DB) {echo "$stmt\n";} + $lio_ct = mysql_num_rows($rslt); + if ($lio_ct > 0) + { + $row=mysql_fetch_row($rslt); + $list_id = $row[0]; + + if (strlen($list_id) > 1) + { + $stmt = "SELECT campaign_cid_override FROM vicidial_lists where list_id='$list_id';"; + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00247',$user,$server_ip,$session_name,$one_mysql_log);} + if ($DB) {echo "$stmt\n";} + $lio_ct = mysql_num_rows($rslt); + if ($lio_ct > 0) + { + $row=mysql_fetch_row($rslt); + $campaign_cid_override = $row[0]; + } + } + } + } + if (strlen($campaign_cid_override) > 6) {$CCID = "$campaign_cid_override"; $CCID_on++;} $PADlead_id = sprintf("%09s", $lead_id); while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);} @@ -3313,7 +3361,7 @@ if ($ACTION == 'VDADcheckINCOMING') $stmt = "SELECT alt_phone_count from vicidial_list_alt_phones where lead_id='$lead_id' and phone_number = '$dialed_number' order by alt_phone_count limit 1;"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00248',$user,$server_ip,$session_name,$one_mysql_log);} $VDAP_cid_ct = mysql_num_rows($rslt); if ($VDACP_cid_ct > 0) { @@ -3323,7 +3371,7 @@ if ($ACTION == 'VDADcheckINCOMING') $stmt = "SELECT count(*) from vicidial_list_alt_phones where lead_id='$lead_id';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00249',$user,$server_ip,$session_name,$one_mysql_log);} $VDAPct_cid_ct = mysql_num_rows($rslt); if ($VDACPct_cid_ct > 0) { @@ -4012,7 +4060,7 @@ if ($ACTION == 'updateDISPO') $stmt = "SELECT alt_phone_count from vicidial_list_alt_phones where lead_id='$lead_id' and phone_number = '$dialed_number' order by alt_phone_count limit 1;"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00250',$user,$server_ip,$session_name,$one_mysql_log);} $VDAP_cid_ct = mysql_num_rows($rslt); if ($VDACP_cid_ct > 0) { @@ -4022,7 +4070,7 @@ if ($ACTION == 'updateDISPO') $stmt = "SELECT count(*) from vicidial_list_alt_phones where lead_id='$lead_id';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00251',$user,$server_ip,$session_name,$one_mysql_log);} $VDAPct_cid_ct = mysql_num_rows($rslt); if ($VDACPct_cid_ct > 0) { @@ -5504,7 +5552,7 @@ if ($ACTION == 'DiaLableLeaDsCounT') $stmt = "select dialable_leads from vicidial_campaign_stats where campaign_id='$campaign';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00252',$user,$server_ip,$session_name,$one_mysql_log);} if ($rslt) {$dialable_count = mysql_num_rows($rslt);} if ($dialable_count > 0) { diff --git a/www/agc/vicidial.php b/www/agc/vicidial.php index 405430be..2ab61926 100644 --- a/www/agc/vicidial.php +++ b/www/agc/vicidial.php @@ -256,10 +256,11 @@ # 90917-1325 - Fixed script loading bug with customer webform at the same time # 90920-2108 - Changed web forms to use window.open instead of traditional links(IE7 compatibility issue) # 90923-1310 - Rolled back last change +# 90928-1955 - Added lead update before closer transfer # -$version = '2.2.0-233'; -$build = '90923-1310'; +$version = '2.2.0-234'; +$build = '90928-1955'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=61; $one_mysql_log=0; @@ -282,43 +283,43 @@ if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} elseif (isset($_POST["relogin"])) {$relogin=$_POST["relogin"];} if (isset($_GET["MGR_override"])) {$MGR_override=$_GET["MGR_override"];} elseif (isset($_POST["MGR_override"])) {$MGR_override=$_POST["MGR_override"];} - if (!isset($phone_login)) - { - if (isset($_GET["pl"])) {$phone_login=$_GET["pl"];} - elseif (isset($_POST["pl"])) {$phone_login=$_POST["pl"];} - } - if (!isset($phone_pass)) - { - if (isset($_GET["pp"])) {$phone_pass=$_GET["pp"];} - elseif (isset($_POST["pp"])) {$phone_pass=$_POST["pp"];} - } - if (isset($VD_campaign)) - { - $VD_campaign = strtoupper($VD_campaign); - $VD_campaign = eregi_replace(" ",'',$VD_campaign); - } - if (!isset($flag_channels)) - { - $flag_channels=0; - $flag_string=''; - } +if (!isset($phone_login)) + { + if (isset($_GET["pl"])) {$phone_login=$_GET["pl"];} + elseif (isset($_POST["pl"])) {$phone_login=$_POST["pl"];} + } +if (!isset($phone_pass)) + { + if (isset($_GET["pp"])) {$phone_pass=$_GET["pp"];} + elseif (isset($_POST["pp"])) {$phone_pass=$_POST["pp"];} + } +if (isset($VD_campaign)) + { + $VD_campaign = strtoupper($VD_campaign); + $VD_campaign = eregi_replace(" ",'',$VD_campaign); + } +if (!isset($flag_channels)) + { + $flag_channels=0; + $flag_string=''; + } ### security strip all non-alphanumeric characters out of the variables ### - $DB=ereg_replace("[^0-9a-z]","",$DB); - $phone_login=ereg_replace("[^\,0-9a-zA-Z]","",$phone_login); - $phone_pass=ereg_replace("[^0-9a-zA-Z]","",$phone_pass); - $VD_login=ereg_replace("[^-_0-9a-zA-Z]","",$VD_login); - $VD_pass=ereg_replace("[^-_0-9a-zA-Z]","",$VD_pass); - $VD_campaign = ereg_replace("[^-_0-9a-zA-Z]","",$VD_campaign); +$DB=ereg_replace("[^0-9a-z]","",$DB); +$phone_login=ereg_replace("[^\,0-9a-zA-Z]","",$phone_login); +$phone_pass=ereg_replace("[^0-9a-zA-Z]","",$phone_pass); +$VD_login=ereg_replace("[^-_0-9a-zA-Z]","",$VD_login); +$VD_pass=ereg_replace("[^-_0-9a-zA-Z]","",$VD_pass); +$VD_campaign = ereg_replace("[^-_0-9a-zA-Z]","",$VD_campaign); $forever_stop=0; if ($force_logout) -{ + { echo "You have now logged out. Thank you\n"; exit; -} + } $isdst = date("I"); $StarTtimE = date("U"); @@ -327,10 +328,10 @@ $tsNOW_TIME = date("YmdHis"); $FILE_TIME = date("Ymd-His"); $loginDATE = date("Ymd"); $CIDdate = date("ymdHis"); - $month_old = mktime(11, 0, 0, date("m"), date("d")-2, date("Y")); - $past_month_date = date("Y-m-d H:i:s",$month_old); - $minutes_old = mktime(date("H"), date("i")-2, date("s"), date("m"), date("d"), date("Y")); - $past_minutes_date = date("Y-m-d H:i:s",$minutes_old); +$month_old = mktime(11, 0, 0, date("m"), date("d")-2, date("Y")); +$past_month_date = date("Y-m-d H:i:s",$month_old); +$minutes_old = mktime(date("H"), date("i")-2, date("s"), date("m"), date("d"), date("Y")); +$past_minutes_date = date("Y-m-d H:i:s",$minutes_old); $random = (rand(1000000, 9999999) + 10000000); @@ -3629,6 +3630,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (taskvar == 'XfeRLOCAL') { + CustomerData_update(); + var XfeRSelecT = document.getElementById("XfeRGrouP"); var queryCID = "XLvdcW" + epoch_sec + user_abb; // "90009*$group**$lead_id**$phone_number*$user*$agent_only*"; diff --git a/www/vicidial/admin.php b/www/vicidial/admin.php index fe241612..40db54de 100644 --- a/www/vicidial/admin.php +++ b/www/vicidial/admin.php @@ -1121,7 +1121,12 @@ if (isset($_GET["web_form_address_two"])) {$web_form_address_two=$_GET["web_fo elseif (isset($_POST["web_form_address_two"])) {$web_form_address_two=$_POST["web_form_address_two"];} if (isset($_GET["waitforsilence_options"])) {$waitforsilence_options=$_GET["waitforsilence_options"];} elseif (isset($_POST["waitforsilence_options"])) {$waitforsilence_options=$_POST["waitforsilence_options"];} - +if (isset($_GET["campaign_cid_override"])) {$campaign_cid_override=$_GET["campaign_cid_override"];} + elseif (isset($_POST["campaign_cid_override"])) {$campaign_cid_override=$_POST["campaign_cid_override"];} +if (isset($_GET["am_message_exten_override"])) {$am_message_exten_override=$_GET["am_message_exten_override"];} + elseif (isset($_POST["am_message_exten_override"])) {$am_message_exten_override=$_POST["am_message_exten_override"];} +if (isset($_GET["drop_inbound_group_override"])) {$drop_inbound_group_override=$_GET["drop_inbound_group_override"];} + elseif (isset($_POST["drop_inbound_group_override"])) {$drop_inbound_group_override=$_POST["drop_inbound_group_override"];} if (isset($script_id)) {$script_id= strtoupper($script_id);} if (isset($lead_filter_id)) {$lead_filter_id = strtoupper($lead_filter_id);} @@ -1320,6 +1325,8 @@ if ($non_latin < 1) $vicidial_balance_rank = ereg_replace("[^0-9]","",$vicidial_balance_rank); $rank = ereg_replace("[^0-9]","",$rank); $enable_second_webform = ereg_replace("[^0-9]","",$enable_second_webform); + $campaign_cid_override = ereg_replace("[^0-9]","",$campaign_cid_override); + $am_message_exten_override = ereg_replace("[^0-9]","",$am_message_exten_override); $drop_call_seconds = ereg_replace("[^-0-9]","",$drop_call_seconds); @@ -1577,6 +1584,7 @@ if ($non_latin < 1) $agent_dial_owner_only = ereg_replace("[^-_0-9a-zA-Z]","",$agent_dial_owner_only); $reset_time = ereg_replace("[^-_0-9a-zA-Z]","",$reset_time); $moh_id = ereg_replace("[^-_0-9a-zA-Z]","",$moh_id); + $drop_inbound_group_override = ereg_replace("[^-_0-9a-zA-Z]","",$drop_inbound_group_override); ### ALPHA-NUMERIC and underscore and dash and slash and dot $menu_prompt = ereg_replace("[^-\/\|\._0-9a-zA-Z]","",$menu_prompt); @@ -1960,11 +1968,12 @@ else # 90916-1105 - Added second web form to ingroups and campaigns and added audio choose for answering machine message and waitforsilence_options # 90917-1108 - Added Extra Voicemail boxes config in Admin section # 90919-2251 - Removed all "SELECT *" instances in the code, code cleanup to conform to standard +# 90924-1645 - Added list_id overrides for cid, am_message and drop in-group # # make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time -$admin_version = '2.2.0-218'; -$build = '90919-2251'; +$admin_version = '2.2.0-219'; +$build = '90924-1645'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -3948,6 +3957,20 @@ if ($ADD==99999)
Agent Script Override - If this field is set, this will be the script that the agent sees on their screen instead of the campaign script when the lead is from this list. Default is not set. +
+ +
+ Campaign CID Override - If this field is set, this will override the campaign CallerID that is set for calls that are placed to leads in this list. Default is not set. + +
+
+
+ Answering Machine Message Override - If this field is set, this will override the Answering Machine Message set in the campaign for customers in this list. Default is not set. +
+
+
+ Drop Inbound Group Override - If this field is set, this in-group will be used for outbound calls within this list that drop from the outbound campaign instead of the drop in-group set in the campaign detail screen. Default is not set. +
@@ -11723,7 +11746,7 @@ if ($ADD==411) echo "
LIST MODIFIED: $list_id\n"; - $stmt="UPDATE vicidial_lists set list_name='$list_name',campaign_id='$campaign_id',active='$active',list_description='$list_description',list_changedate='$SQLdate',reset_time='$reset_time',agent_script_override='$agent_script_override' where list_id='$list_id';"; + $stmt="UPDATE vicidial_lists set list_name='$list_name',campaign_id='$campaign_id',active='$active',list_description='$list_description',list_changedate='$SQLdate',reset_time='$reset_time',agent_script_override='$agent_script_override',campaign_cid_override='$campaign_cid_override',am_message_exten_override='$am_message_exten_override',drop_inbound_group_override='$drop_inbound_group_override' where list_id='$list_id';"; $rslt=mysql_query($stmt, $link); ### LOG INSERTION Admin Log Table ### @@ -16137,7 +16160,13 @@ if ($ADD==31) echo "Omit Phone Code: $NWB#vicidial_campaigns-omit_phone_code$NWE\n"; - echo "Campaign CallerID: $NWB#vicidial_campaigns-campaign_cid$NWE\n"; + echo "Campaign CallerID: $NWB#vicidial_campaigns-campaign_cid$NWE\n"; + $stmt="SELECT count(*) from vicidial_lists where campaign_id='$campaign_id' and campaign_cid_override != '' and active='Y';"; + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + if ($rowx[0] > 0) + {echo " LIST OVERRIDE ACTIVE";} + echo "\n"; if ($SSoutbound_autodial_active > 0) { @@ -16154,11 +16183,23 @@ if ($ADD==31) echo "
Script: $NWB#vicidial_campaigns-campaign_script$NWE\n"; + echo "$NWB#vicidial_campaigns-campaign_script$NWE\n"; + $stmt="SELECT count(*) from vicidial_lists where campaign_id='$campaign_id' and agent_script_override != '' and active='Y';"; + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + if ($rowx[0] > 0) + {echo " LIST OVERRIDE ACTIVE";} + echo "\n"; echo "Get Call Launch: $NWB#vicidial_campaigns-get_call_launch$NWE\n"; - echo "Answering Machine Message: audio chooser $NWB#vicidial_campaigns-am_message_exten$NWE\n"; + echo "Answering Machine Message: audio chooser $NWB#vicidial_campaigns-am_message_exten$NWE\n"; + $stmt="SELECT count(*) from vicidial_lists where campaign_id='$campaign_id' and am_message_exten_override != '' and active='Y';"; + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + if ($rowx[0] > 0) + {echo " LIST OVERRIDE ACTIVE";} + echo "\n"; echo "WaitForSilence Options: $NWB#vicidial_campaigns-waitforsilence_options$NWE\n"; @@ -16198,7 +16239,13 @@ if ($ADD==31) echo "Drop Transfer Group: $NWB#vicidial_campaigns-drop_inbound_group$NWE\n"; + echo "$NWB#vicidial_campaigns-drop_inbound_group$NWE\n"; + $stmt="SELECT count(*) from vicidial_lists where campaign_id='$campaign_id' and drop_inbound_group_override != '' and active='Y';"; + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + if ($rowx[0] > 0) + {echo " LIST OVERRIDE ACTIVE";} + echo "\n"; } echo "Wrap Up Seconds: $NWB#vicidial_campaigns-wrapup_seconds$NWE\n"; @@ -18137,9 +18184,10 @@ if ($ADD==311) echo "
\n"; echo ""; - $stmt="SELECT list_id,list_name,campaign_id,active,list_description,list_changedate,list_lastcalldate,reset_time,agent_script_override from vicidial_lists where list_id='$list_id';"; + $stmt="SELECT list_id,list_name,campaign_id,active,list_description,list_changedate,list_lastcalldate,reset_time,agent_script_override,campaign_cid_override,am_message_exten_override,drop_inbound_group_override from vicidial_lists where list_id='$list_id';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); + $list_name = $row[1]; $campaign_id = $row[2]; $active = $row[3]; $list_description = $row[4]; @@ -18147,6 +18195,9 @@ if ($ADD==311) $list_lastcalldate = $row[6]; $reset_time = $row[7]; $agent_script_override = $row[8]; + $campaign_cid_override = $row[9]; + $am_message_exten_override = $row[10]; + $drop_inbound_group_override = $row[11]; # grab names of global statuses and statuses in the selected campaign $stmt="SELECT status,status_name,selectable,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable from vicidial_statuses order by status"; @@ -18188,14 +18239,38 @@ if ($ADD==311) $o++; } + ##### get in-groups listings for dynamic drop in-group pulldown + $stmt="SELECT group_id,group_name from vicidial_inbound_groups order by group_id"; + $rslt=mysql_query($stmt, $link); + $Dgroups_to_print = mysql_num_rows($rslt); + $Dgroups_menu=''; + $Dgroups_selected=0; + $o=0; + while ($Dgroups_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $Dgroups_menu .= "\n"; + $o++; + } + if ($Dgroups_selected < 1) + {$Dgroups_menu .= "\n";} + else + {$Dgroups_menu .= "\n";} - echo "
MODIFY A LISTS RECORD: $row[0]
\n"; + + echo "
MODIFY A LISTS RECORD: $list_id\n"; echo "\n"; - echo "\n"; - echo "\n"; + echo "\n"; + echo "\n"; echo "
\n"; - echo "\n"; - echo "\n"; + echo "\n"; + echo "\n"; echo "\n"; echo "\n"; + echo "\n"; + + echo "\n"; + + echo "\n"; + echo "\n"; echo "
List ID: $row[0]$NWB#vicidial_lists-list_id$NWE
List Name: $NWB#vicidial_lists-list_name$NWE
List ID: $list_id$NWB#vicidial_lists-list_id$NWE
List Name: $NWB#vicidial_lists-list_name$NWE
List Description: $NWB#vicidial_lists-list_description$NWE
Campaign: $NWB#vicidial_lists-agent_script_override$NWE
Campaign CID Override: $NWB#vicidial_lists-campaign_cid_override$NWE
Answering Machine Message Override: audio chooser $NWB#vicidial_lists-am_message_exten_override$NWE
Drop Inbound Group Override: $NWB#vicidial_lists-drop_inbound_group_override$NWE
\n";