diff --git a/agc_2-X/trunk/UPGRADE b/agc_2-X/trunk/UPGRADE index c53669c0..8709afd7 100644 --- a/agc_2-X/trunk/UPGRADE +++ b/agc_2-X/trunk/UPGRADE @@ -91,6 +91,11 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom UK telemarketing regulations that state you may not auto-dial a customer back within 72 hours of an abandon. +25. Changed In-Group and Call Menu prompts to allow for multiple audio files per + prompt by separating them by pipes |. Also, changed the Agent Alert + Extention to a Filename in In-Groups + + diff --git a/agc_2-X/trunk/agi/agi-VDAD_ALL_inbound.agi b/agc_2-X/trunk/agi/agi-VDAD_ALL_inbound.agi index cee55feb..2ed6d7c2 100644 --- a/agc_2-X/trunk/agi/agi-VDAD_ALL_inbound.agi +++ b/agc_2-X/trunk/agi/agi-VDAD_ALL_inbound.agi @@ -1,6 +1,6 @@ #!/usr/bin/perl # -# agi-VDAD_ALL_inbound.agi version 2.0.5 *DBI-version* +# agi-VDAD_ALL_inbound.agi version 2.2.0 *DBI-version* # # runs when a call comes in from an inbound call. This script will # send the calls out to the closers that are logged in. @@ -93,6 +93,7 @@ # 90103-0311 - Added sip-silences before transfers to fix rare MoH issues # 90115-0601 - Added AGENTDIRECT functionality # 90607-1717 - Fix for AGENTDIRECT bug under certain configurations +# 90623-0724 - Changed prompts to multi-file prompts, changed agent alert exten to a prompt # $script = 'agi-VDAD_ALL_inbound.agi'; @@ -769,7 +770,21 @@ if ( ($hm < $ct_default_start) || ($hm > $ct_default_stop) ) { $AGI->stream_file('sip-silence'); $AGI->stream_file('sip-silence'); - $AGI->stream_file("$after_hours_message_filename"); + if ($after_hours_message_filename =~ /\|/) + { + @after_hours_message_filename_array = split(/\|/,$after_hours_message_filename); + $w=0; + foreach(@after_hours_message_filename_array) + { + if (length($after_hours_message_filename_array[$w])>0) + { + $AGI->stream_file("$after_hours_message_filename_array[$w]"); + } + $w++; + } + } + else + {$AGI->stream_file("$after_hours_message_filename");} sleep(1); ### insert a NEW record to the vicidial_manager table to hangup the channel @@ -792,7 +807,21 @@ if ( ($hm < $ct_default_start) || ($hm > $ct_default_stop) ) ##### PLAY WELCOME MESSAGE ##### if ( ($welcome_message_filename !~ /---NONE---/) && ( ($play_welcome_message =~ /ALWAYS/) || ( ($no_delay_call_route =~ /N/) && ($play_welcome_message =~ /YES_UNLESS_NODELAY/) ) ) ) { - $AGI->stream_file("$welcome_message_filename"); + if ($welcome_message_filename =~ /\|/) + { + @welcome_message_filename_array = split(/\|/,$welcome_message_filename); + $w=0; + foreach(@welcome_message_filename_array) + { + if (length($welcome_message_filename_array[$w])>0) + { + $AGI->stream_file("$welcome_message_filename_array[$w]"); + } + $w++; + } + } + else + {$AGI->stream_file("$welcome_message_filename");} } if ($play_welcome_message =~ /IF_WAIT_ONLY/) {$if_wait_play_welcome=1;} @@ -1234,10 +1263,12 @@ if ( ($agent_search_method =~ /^SO|^LO/) && ($skipLOSO < 1) ) ### if agent alert exten is not disabled, then trigger the alert and wait if ( ($agent_alert_exten !~ /X/i) && ($no_delay_call_route !~ /Y/i) ) { + if ($agent_alert_exten =~ /^8304$/) + {$agent_alert_exten = 'ding';} $VHqueryCID = "VH$CIDdate$VDADconf_exten"; ### insert a NEW record to the vicidial_manager table to play the alert message to the agent - $stmtA = "INSERT INTO vicidial_manager values('','','$SQLdate','NEW','N','$VARserver_ip','','Originate','$VHqueryCID','Exten: $agent_alert_exten','Context: $ext_context','Channel: Local/$dtmf_silent_prefix$VDADconf_exten$at$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: 10','','','','')"; + $stmtA = "INSERT INTO vicidial_manager values('','','$SQLdate','NEW','N','$VARserver_ip','','Originate','$VHqueryCID','Exten: 83047777777777','Context: vicidial-auto','Channel: Local/$dtmf_silent_prefix$VDADconf_exten$at$ext_context','Priority: 1','Callerid: $agent_alert_exten','Timeout: 10','','','','')"; $affected_rows = $dbhA->do($stmtA); $dbhP=$dbhA; $mysql_count='02048'; $MEL_aff_rows=$affected_rows; &mysql_error_logging; if ($AGILOG) {$agi_string = "-- VDCL agent alert: |$VHqueryCID|7$VDADconf_exten|$channel|insert to vicidial_manager"; &agi_output;} @@ -1566,10 +1597,12 @@ if ($agent_search_method =~ /^LO|^LB/) ### if agent alert exten is not disabled, then trigger the alert and wait if ( ($agent_alert_exten !~ /X/i) && ($no_delay_call_route !~ /Y/i) ) { + if ($agent_alert_exten =~ /^8304$/) + {$agent_alert_exten = 'ding';} $VHqueryCID = "VH$CIDdate$VDADconf_exten"; ### insert a NEW record to the vicidial_manager table to play the alert message to the agent - $stmtA = "INSERT INTO vicidial_manager values('','','$SQLdate','NEW','N','$VARserver_ip','','Originate','$VHqueryCID','Exten: $agent_alert_exten','Context: $ext_context','Channel: Local/$alertVDADremDIALstr$at$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: 10','','','','')"; + $stmtA = "INSERT INTO vicidial_manager values('','','$SQLdate','NEW','N','$VARserver_ip','','Originate','$VHqueryCID','Exten: 83047777777777','Context: vicidial-auto','Channel: Local/$alertVDADremDIALstr$at$ext_context','Priority: 1','Callerid: $agent_alert_exten','Timeout: 10','','','','')"; $affected_rows = $dbhA->do($stmtA); $dbhP=$dbhA; $mysql_count='02068'; $MEL_aff_rows=$affected_rows; &mysql_error_logging; if ($AGILOG) {$agi_string = "-- VDCL agent alert: |$VHqueryCID|$alertVDADremDIALstr|$channel|insert to vicidial_manager"; &agi_output;} @@ -1812,7 +1845,21 @@ if ($if_wait_play_welcome > 0) $AGI->stream_file('sip-silence'); # stop music-on-hold process $AGI->stream_file('sip-silence'); # stop music-on-hold process - $AGI->stream_file("$welcome_message_filename"); + if ($welcome_message_filename =~ /\|/) + { + @welcome_message_filename_array = split(/\|/,$welcome_message_filename); + $w=0; + foreach(@welcome_message_filename_array) + { + if (length($welcome_message_filename_array[$w])>0) + { + $AGI->stream_file("$welcome_message_filename_array[$w]"); + } + $w++; + } + } + else + {$AGI->stream_file("$welcome_message_filename");} } @@ -1837,7 +1884,21 @@ if ( ($hold_message_counter > $prompt_interval) && ($prompt_interval > 0) ) $AGI->stream_file('sip-silence'); # stop music-on-hold process $AGI->stream_file('sip-silence'); # stop music-on-hold process - $AGI->stream_file("$onhold_prompt_filename"); # this prompt must be less than 10 seconds long + if ($onhold_prompt_filename =~ /\|/) + { + @onhold_prompt_filename_array = split(/\|/,$onhold_prompt_filename); + $w=0; + foreach(@onhold_prompt_filename_array) + { + if (length($onhold_prompt_filename_array[$w])>0) + { + $AGI->stream_file("$onhold_prompt_filename_array[$w]"); + } + $w++; + } + } + else + {$AGI->stream_file("$onhold_prompt_filename");} # this prompt must be less than 10 seconds long $hold_message_counter = 0; $start_moh=1; $moh_delay=1; @@ -2117,7 +2178,21 @@ if ($hold_time_option =~ /CALLERID_CALLBACK/) $AGI->stream_file('sip-silence'); # stop music-on-hold process $AGI->stream_file('sip-silence'); # stop music-on-hold process - $AGI->stream_file("$hold_time_option_callback_filename"); + if ($hold_time_option_callback_filename =~ /\|/) + { + @hold_time_option_callback_filename_array = split(/\|/,$hold_time_option_callback_filename); + $w=0; + foreach(@hold_time_option_callback_filename_array) + { + if (length($hold_time_option_callback_filename_array[$w])>0) + { + $AGI->stream_file("$hold_time_option_callback_filename_array[$w]"); + } + $w++; + } + } + else + {$AGI->stream_file("$hold_time_option_callback_filename");} # this prompt must be less than 10 seconds long } else { diff --git a/agc_2-X/trunk/bin/ADMIN_keepalive_ALL.pl b/agc_2-X/trunk/bin/ADMIN_keepalive_ALL.pl index ee1452b4..4326ecf6 100644 --- a/agc_2-X/trunk/bin/ADMIN_keepalive_ALL.pl +++ b/agc_2-X/trunk/bin/ADMIN_keepalive_ALL.pl @@ -27,6 +27,7 @@ # 90617-0821 - Added phone ring timeout and call menu custom dialplan entry # 90621-0823 - Added phones conf file secret field use # 90621-1425 - Added tracking group for call menus +# 90622-2146 - Added 83047777777777 for dynamic agent alert extension # $DB=0; # Debug flag @@ -691,6 +692,15 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r $Vext .= "exten => 8310,4,Hangup\n"; + $Vext .= "\n; agent alert extension\n"; + $Vext .= "exten => 83047777777777,1,Answer\n"; + if ($asterisk_version =~ /^1.2/) + {$Vext .= "exten => 83047777777777,2,Playback(\${CALLERIDNAME})\n";} + else + {$Vext .= "exten => 83047777777777,2,Playback(\${CALLERID(name)})\n";} + $Vext .= "exten => 83047777777777,3,Hangup\n"; + + ##### Get the IAX carriers for this server_ip ##### $stmtA = "SELECT carrier_id,carrier_name,registration_string,template_id,account_entry,globals_string,dialplan_entry FROM vicidial_server_carriers where server_ip='$server_ip' and active='Y' and protocol='IAX2' order by carrier_id;"; $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; diff --git a/agc_2-X/trunk/bin/AST_VDsales_export.pl b/agc_2-X/trunk/bin/AST_VDsales_export.pl index 30df4a6d..a0aad1ec 100644 --- a/agc_2-X/trunk/bin/AST_VDsales_export.pl +++ b/agc_2-X/trunk/bin/AST_VDsales_export.pl @@ -610,11 +610,11 @@ if ($ftp_transfer > 0) if ($ftp_audio_transfer > 0) { use Net::FTP; - if (!$Q) {print "Sending File Over FTP: $outfile\n";} - opendir(FILE, "$tempdir/"); @FILES = readdir(FILE); + if (!$Q) {print "Sending Audio Over FTP: $$#FILES\n";} + $i=0; foreach(@FILES) { diff --git a/agc_2-X/trunk/bin/Vtiger_IN_notes_activities_file.pl b/agc_2-X/trunk/bin/Vtiger_IN_notes_activities_file.pl index 74edb2be..7697a3be 100644 --- a/agc_2-X/trunk/bin/Vtiger_IN_notes_activities_file.pl +++ b/agc_2-X/trunk/bin/Vtiger_IN_notes_activities_file.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl # -# Vtiger_IN_notes_activities_file.pl version 2.2.0 *DBI-version* +# Vtiger_IN_notes_activities_file.pl version 2.2.0 # # DESCRIPTION: # script lets you insert notes and activities into the vtiger system from a @@ -14,6 +14,7 @@ # # CHANGES # 90327-1148 - First build +# 90623-0605 - Added duplicate check # $secX = time(); @@ -104,6 +105,7 @@ if (length($ARGV[0])>1) print " [-q] = quiet\n"; print " [-t] = test\n"; print " [--debug] = debug output\n"; + print " [--duplicate-check] = check whether the record exists before attempting to insert it\n"; print " [--format=notes] = select whether you are importing notes or activities\n"; print " [--ftp-pull] = grabs lead files from a remote FTP server, uses REPORTS FTP login information\n"; print " [--ftp-dir=leads_in] = remote FTP server directory to grab files from, should have a DONE sub-directory\n"; @@ -193,6 +195,11 @@ if (length($ARGV[0])>1) else {$email_sender = 'vicidial@localhost';} + if ($args =~ /--duplicate-check/i) + { + $dup_check=1; + print "\n----- DUPLICATE CHECK -----\n\n"; + } } } else @@ -454,78 +461,153 @@ foreach(@FILES) $user='6666'; - #Get logged in user ID - $stmtB="SELECT id from vtiger_users where user_name='$user';"; - if($DBX){print STDERR "\n|$stmtA|\n";} - $sthB = $dbhB->prepare($stmtB) or die "preparing: ",$dbhB->errstr; - $sthB->execute or die "executing: $stmtB ", $dbhB->errstr; - $sthBrows=$sthB->rows; - if ($sthBrows > 0) + ##### BEGIN Duplicate Check ##### + $duplicate=0; + if ($dup_check) { - @aryB = $sthB->fetchrow_array; - $user_id = $aryB[0]; + if ($format =~ /activities/) + { + $first_duplicate=0; + # Check for duplicate activities entry + $stmtB="SELECT count(*) from vtiger_activity where subject='Old Call: $status' and activitytype='Call' and date_start='$date' and time_start='$time' and time_end='$end_time';"; + if($DBX){print STDERR "\n|$stmtA|\n";} + $sthB = $dbhB->prepare($stmtB) or die "preparing: ",$dbhB->errstr; + $sthB->execute or die "executing: $stmtB ", $dbhB->errstr; + $sthBrows=$sthB->rows; + if ($sthBrows > 0) + { + @aryB = $sthB->fetchrow_array; + $first_duplicate = $aryB[0]; + } + $sthB->finish(); + + if ($first_duplicate > 0) + { + $stmtB="SELECT count(*) from vtiger_seactivityrel vs, vtiger_activity va where vs.crmid='$vendor_id' and vs.activityid=va.activityid and subject='Old Call: $status' and activitytype='Call' and date_start='$date' and time_start='$time' and time_end='$end_time';"; + if($DBX){print STDERR "\n|$stmtA|\n";} + $sthB = $dbhB->prepare($stmtB) or die "preparing: ",$dbhB->errstr; + $sthB->execute or die "executing: $stmtB ", $dbhB->errstr; + $sthBrows=$sthB->rows; + if ($sthBrows > 0) + { + @aryB = $sthB->fetchrow_array; + $duplicate = $aryB[0]; + } + $sthB->finish(); + } + } + else # notes dup check + { + $first_duplicate=0; + # Check for duplicate activities entry + $stmtB="SELECT count(*) from vtiger_crmentity where setype='Notes' and description='Old Notes: $status' and createdtime='$date $time';"; + if($DBX){print STDERR "\n|$stmtA|\n";} + $sthB = $dbhB->prepare($stmtB) or die "preparing: ",$dbhB->errstr; + $sthB->execute or die "executing: $stmtB ", $dbhB->errstr; + $sthBrows=$sthB->rows; + if ($sthBrows > 0) + { + @aryB = $sthB->fetchrow_array; + $first_duplicate = $aryB[0]; + } + $sthB->finish(); + + if ($first_duplicate > 0) + { + $stmtB="SELECT count(*) from vtiger_senotesrel vn, vtiger_crmentity vc where vn.crmid='$vendor_id' and vn.notesid=vc.crmid and subject='Old Call: $status' and activitytype='Call' and date_start='$date' and time_start='$time' and time_end='$end_time';"; + if($DBX){print STDERR "\n|$stmtA|\n";} + $sthB = $dbhB->prepare($stmtB) or die "preparing: ",$dbhB->errstr; + $sthB->execute or die "executing: $stmtB ", $dbhB->errstr; + $sthBrows=$sthB->rows; + if ($sthBrows > 0) + { + @aryB = $sthB->fetchrow_array; + $duplicate = $aryB[0]; + } + $sthB->finish(); + } + } } - $sthB->finish(); - - # Get current ID from vtiger_crmentity_seq - $stmtB="SELECT id from vtiger_crmentity_seq;"; - if($DBX){print STDERR "\n|$stmtB|\n";} - $sthB = $dbhB->prepare($stmtB) or die "preparing: ",$dbhB->errstr; - $sthB->execute or die "executing: $stmtB ", $dbhB->errstr; - $sthBrows=$sthB->rows; - if ($sthBrows > 0) + ##### END Duplicate Check ##### + + if ($duplicate < 1) { - @aryB = $sthB->fetchrow_array; - $crm_id = ($aryB[0] + 1); - } - $sthB->finish(); + #Get logged in user ID + $stmtB="SELECT id from vtiger_users where user_name='$user';"; + if($DBX){print STDERR "\n|$stmtA|\n";} + $sthB = $dbhB->prepare($stmtB) or die "preparing: ",$dbhB->errstr; + $sthB->execute or die "executing: $stmtB ", $dbhB->errstr; + $sthBrows=$sthB->rows; + if ($sthBrows > 0) + { + @aryB = $sthB->fetchrow_array; + $user_id = $aryB[0]; + } + $sthB->finish(); + + # Get current ID from vtiger_crmentity_seq + $stmtB="SELECT id from vtiger_crmentity_seq;"; + if($DBX){print STDERR "\n|$stmtB|\n";} + $sthB = $dbhB->prepare($stmtB) or die "preparing: ",$dbhB->errstr; + $sthB->execute or die "executing: $stmtB ", $dbhB->errstr; + $sthBrows=$sthB->rows; + if ($sthBrows > 0) + { + @aryB = $sthB->fetchrow_array; + $crm_id = ($aryB[0] + 1); + } + $sthB->finish(); - ### update the crm ID ### - $stmtB = "UPDATE vtiger_crmentity_seq SET id = '$crm_id';"; - if (!$T) {$affected_rows = $dbhB->do($stmtB); } # or die "Couldn't execute query: |$stmtB|\n"; - if($DB){print STDERR "\n|$affected_rows|$stmtB|\n";} - - if ($format =~ /activities/) - { - ### insert record into vtiger_salesmanactivityrel table ### - $stmtB = "INSERT INTO vtiger_salesmanactivityrel SET smid='$user_id',activityid='$crm_id';"; + ### update the crm ID ### + $stmtB = "UPDATE vtiger_crmentity_seq SET id = '$crm_id';"; if (!$T) {$affected_rows = $dbhB->do($stmtB); } # or die "Couldn't execute query: |$stmtB|\n"; if($DB){print STDERR "\n|$affected_rows|$stmtB|\n";} - ### insert record into vtiger_seactivityrel table ### - $stmtB = "INSERT INTO vtiger_seactivityrel SET crmid='$vendor_id',activityid='$crm_id';"; - if (!$T) {$affected_rows = $dbhB->do($stmtB); } # or die "Couldn't execute query: |$stmtB|\n"; - if($DB){print STDERR "\n|$affected_rows|$stmtB|\n";} + if ($format =~ /activities/) + { + ### insert record into vtiger_salesmanactivityrel table ### + $stmtB = "INSERT INTO vtiger_salesmanactivityrel SET smid='$user_id',activityid='$crm_id';"; + if (!$T) {$affected_rows = $dbhB->do($stmtB); } # or die "Couldn't execute query: |$stmtB|\n"; + if($DB){print STDERR "\n|$affected_rows|$stmtB|\n";} - ### insert record into crmentity table ### - $stmtB = "INSERT INTO vtiger_crmentity SET crmid='$crm_id',smcreatorid='$user_id',smownerid='$user_id',modifiedby='$user_id',setype='Calendar',description='Old Call: $status',createdtime='$date $time',modifiedtime='$date $time', viewedtime='$date $time';"; - if (!$T) {$affected_rows = $dbhB->do($stmtB); } # or die "Couldn't execute query: |$stmtB|\n"; - if($DB){print STDERR "\n|$affected_rows|$stmtB|\n";} + ### insert record into vtiger_seactivityrel table ### + $stmtB = "INSERT INTO vtiger_seactivityrel SET crmid='$vendor_id',activityid='$crm_id';"; + if (!$T) {$affected_rows = $dbhB->do($stmtB); } # or die "Couldn't execute query: |$stmtB|\n"; + if($DB){print STDERR "\n|$affected_rows|$stmtB|\n";} - ### insert record into vtiger_activity table ### - $stmtB = "INSERT INTO vtiger_activity SET activityid='$crm_id',subject='Old Call: $status',activitytype='Call',date_start='$date',due_date='$date',time_start='$time',time_end='$end_time',sendnotification='0',duration_hours='0',duration_minutes='$session_length',status='',eventstatus='Held',priority='Medium',location='VICIDIAL User $user',notime='0',visibility='Public',recurringtype='--None--';"; - if (!$T) {$affected_rows = $dbhB->do($stmtB); } # or die "Couldn't execute query: |$stmtB|\n"; - if($DB){print STDERR "\n|$affected_rows|$stmtB|\n";} + ### insert record into crmentity table ### + $stmtB = "INSERT INTO vtiger_crmentity SET crmid='$crm_id',smcreatorid='$user_id',smownerid='$user_id',modifiedby='$user_id',setype='Calendar',description='Old Call: $status',createdtime='$date $time',modifiedtime='$date $time', viewedtime='$date $time';"; + if (!$T) {$affected_rows = $dbhB->do($stmtB); } # or die "Couldn't execute query: |$stmtB|\n"; + if($DB){print STDERR "\n|$affected_rows|$stmtB|\n";} + + ### insert record into vtiger_activity table ### + $stmtB = "INSERT INTO vtiger_activity SET activityid='$crm_id',subject='Old Call: $status',activitytype='Call',date_start='$date',due_date='$date',time_start='$time',time_end='$end_time',sendnotification='0',duration_hours='0',duration_minutes='$session_length',status='',eventstatus='Held',priority='Medium',location='VICIDIAL User $user',notime='0',visibility='Public',recurringtype='--None--';"; + if (!$T) {$affected_rows = $dbhB->do($stmtB); } # or die "Couldn't execute query: |$stmtB|\n"; + if($DB){print STDERR "\n|$affected_rows|$stmtB|\n";} + } + else + { + ### insert record into crmentity table ### + $stmtB = "INSERT INTO vtiger_crmentity SET crmid='$crm_id',smcreatorid='$user_id',smownerid='$user_id',modifiedby='$user_id',setype='Notes',description='Old Notes: $status',createdtime='$date $time',modifiedtime='$date $time', viewedtime='$date $time';"; + if (!$T) {$affected_rows = $dbhB->do($stmtB); } # or die "Couldn't execute query: |$stmtB|\n"; + if($DB){print STDERR "\n|$affected_rows|$stmtB|\n";} + + ### insert record into vtiger_notes table ### + $stmtB = "INSERT INTO vtiger_notes SET notesid='$crm_id',title='Old Notes: $status',notecontent='$notes';"; + if (!$T) {$affected_rows = $dbhB->do($stmtB); } # or die "Couldn't execute query: |$stmtB|\n"; + if($DB){print STDERR "\n|$affected_rows|$stmtB|\n";} + + ### insert record into vtiger_senotesrel table ### + $stmtB = "INSERT INTO vtiger_senotesrel SET crmid='$vendor_id',notesid='$crm_id';"; + if (!$T) {$affected_rows = $dbhB->do($stmtB); } # or die "Couldn't execute query: |$stmtB|\n"; + if($DB){print STDERR "\n|$affected_rows|$stmtB|\n";} + } + $b++; } else { - ### insert record into crmentity table ### - $stmtB = "INSERT INTO vtiger_crmentity SET crmid='$crm_id',smcreatorid='$user_id',smownerid='$user_id',modifiedby='$user_id',setype='Notes',description='Old Notes: $status',createdtime='$date $time',modifiedtime='$date $time', viewedtime='$date $time';"; - if (!$T) {$affected_rows = $dbhB->do($stmtB); } # or die "Couldn't execute query: |$stmtB|\n"; - if($DB){print STDERR "\n|$affected_rows|$stmtB|\n";} - - ### insert record into vtiger_notes table ### - $stmtB = "INSERT INTO vtiger_notes SET notesid='$crm_id',title='Old Notes: $status',notecontent='$notes';"; - if (!$T) {$affected_rows = $dbhB->do($stmtB); } # or die "Couldn't execute query: |$stmtB|\n"; - if($DB){print STDERR "\n|$affected_rows|$stmtB|\n";} - - ### insert record into vtiger_senotesrel table ### - $stmtB = "INSERT INTO vtiger_senotesrel SET crmid='$vendor_id',notesid='$crm_id';"; - if (!$T) {$affected_rows = $dbhB->do($stmtB); } # or die "Couldn't execute query: |$stmtB|\n"; - if($DB){print STDERR "\n|$affected_rows|$stmtB|\n";} + print "BAD duplicate: $web1|$revenue|$status|$date $time|$a\n"; $h++; } - - $b++; } } else @@ -544,7 +626,7 @@ foreach(@FILES) if ($a =~ /700$/i) {print STDERR "| $a\r";} if ($a =~ /800$/i) {print STDERR "+ $a\r";} if ($a =~ /900$/i) {print STDERR "0 $a\r";} - if ($a =~ /000$/i) {print "$a|$b|$c|$d|$e|$f|$g|$phone_number|\n";} + if ($a =~ /000$/i) {print "$a|$b|$c|$d|$e|$f|$g|$h|$phone_number|\n";} } @@ -562,6 +644,7 @@ foreach(@FILES) $Falert .= "ERROR: $e\n"; $Falert .= "NOT FOUND: $f\n"; $Falert .= "MULTI-ALT-PHONE: $g\n"; + $Falert .= "DUPLICATE: $h\n"; print "$Falert"; print Sout "$Falert"; diff --git a/agc_2-X/trunk/extras/upgrade_2.2.0.sql b/agc_2-X/trunk/extras/upgrade_2.2.0.sql index 73886390..dae8913c 100644 --- a/agc_2-X/trunk/extras/upgrade_2.2.0.sql +++ b/agc_2-X/trunk/extras/upgrade_2.2.0.sql @@ -201,3 +201,15 @@ UPDATE system_settings SET db_schema_version='1154'; ALTER TABLE vicidial_call_menu ADD tracking_group VARCHAR(20) default 'CALLMENU'; UPDATE system_settings SET db_schema_version='1155'; + + + + + +ALTER TABLE vicidial_inbound_groups MODIFY after_hours_message_filename VARCHAR(255) default 'vm-goodbye'; +ALTER TABLE vicidial_inbound_groups MODIFY welcome_message_filename VARCHAR(255) default '---NONE---'; +ALTER TABLE vicidial_inbound_groups MODIFY onhold_prompt_filename VARCHAR(255) default 'generic_hold'; +ALTER TABLE vicidial_inbound_groups MODIFY hold_time_option_callback_filename VARCHAR(255) default 'vm-hangup'; +ALTER TABLE vicidial_inbound_groups MODIFY agent_alert_exten VARCHAR(100) default 'ding'; + +UPDATE system_settings SET db_schema_version='1155'; diff --git a/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.2.0.txt b/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.2.0.txt index 5396e0f3..83e81b47 100644 --- a/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.2.0.txt +++ b/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.2.0.txt @@ -177,6 +177,9 @@ Conf File Secret|| This is the secret, or password, for the phone in the iax or sip auto-generated conf file for this phone. Limit is 20 characters alphanumeric dash and underscore accepted. Default is test|| Tracking Group|| This is the ID that you can use to track calls to this Call Menu when looking at the IVR Report. The list includes CALLMENU as the default as well as all of the In-Groups|| +Agent Alert Filename|| +The audio file to play to an agent to announce that a call is coming to the agent. To not use this function set this to X. Default is ding|| +This field as with the other audio fields in In-Groups, with the exception of the Agent Alert Filename, can have multiple audio files played if you put a pipe-separated list of audio files into the field|| add-file: user_territories.php diff --git a/agc_2-X/trunk/www/vicidial/admin.php b/agc_2-X/trunk/www/vicidial/admin.php index 9e703166..9ad3e2e7 100644 --- a/agc_2-X/trunk/www/vicidial/admin.php +++ b/agc_2-X/trunk/www/vicidial/admin.php @@ -1420,7 +1420,6 @@ if ($non_latin < 1) $category = ereg_replace("[^-_0-9a-zA-Z]","",$category); $vsc_id = ereg_replace("[^-_0-9a-zA-Z]","",$vsc_id); $moh_context = ereg_replace("[^-_0-9a-zA-Z]","",$moh_context); - $agent_alert_exten = ereg_replace("[^-_0-9a-zA-Z]","",$agent_alert_exten); $source_campaign_id = ereg_replace("[^-_0-9a-zA-Z]","",$source_campaign_id); $source_user_id = ereg_replace("[^-_0-9a-zA-Z]","",$source_user_id); $source_group_id = ereg_replace("[^-_0-9a-zA-Z]","",$source_group_id); @@ -1451,7 +1450,6 @@ if ($non_latin < 1) $call_handle_method = ereg_replace("[^-_0-9a-zA-Z]","",$call_handle_method); $agent_search_method = ereg_replace("[^-_0-9a-zA-Z]","",$agent_search_method); $hold_time_option_voicemail = ereg_replace("[^-_0-9a-zA-Z]","",$hold_time_option_voicemail); - $hold_time_option_callback_filename = ereg_replace("[^-_0-9a-zA-Z]","",$hold_time_option_callback_filename); $exten_context = ereg_replace("[^-_0-9a-zA-Z]","",$exten_context); $three_way_call_cid = ereg_replace("[^-_0-9a-zA-Z]","",$three_way_call_cid); $web_form_target = ereg_replace("[^-_0-9a-zA-Z]","",$web_form_target); @@ -1479,6 +1477,11 @@ if ($non_latin < 1) $menu_prompt = ereg_replace("[^-\/\|\._0-9a-zA-Z]","",$menu_prompt); $menu_timeout_prompt = ereg_replace("[^-\/\|\._0-9a-zA-Z]","",$menu_timeout_prompt); $menu_invalid_prompt = ereg_replace("[^-\/\|\._0-9a-zA-Z]","",$menu_invalid_prompt); + $after_hours_message_filename = ereg_replace("[^-\/\|\._0-9a-zA-Z]","",$after_hours_message_filename); + $welcome_message_filename = ereg_replace("[^-\/\|\._0-9a-zA-Z]","",$welcome_message_filename); + $onhold_prompt_filename = ereg_replace("[^-\/\|\._0-9a-zA-Z]","",$onhold_prompt_filename); + $hold_time_option_callback_filename = ereg_replace("[^-\/\|\._0-9a-zA-Z]","",$hold_time_option_callback_filename); + $agent_alert_exten = ereg_replace("[^-\/\._0-9a-zA-Z]","",$agent_alert_exten); ### ALPHA-NUMERIC and underscore and dash and comma $logins_list = ereg_replace("[^-\,\_0-9a-zA-Z]","",$logins_list); @@ -1552,9 +1555,6 @@ if ($non_latin < 1) $queuemetrics_dbname = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$queuemetrics_dbname); $queuemetrics_login = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$queuemetrics_login); $queuemetrics_pass = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$queuemetrics_pass); - $after_hours_message_filename = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$after_hours_message_filename); - $welcome_message_filename = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$welcome_message_filename); - $onhold_prompt_filename = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$onhold_prompt_filename); $email = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$email); $vtiger_dbname = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$vtiger_dbname); $vtiger_login = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$vtiger_login); @@ -3836,7 +3836,7 @@ if ($SSqc_features_active > 0)

-Welcome Message Filename - The audio file located on the server to be played when the call comes in. If set to ---NONE--- then no message will be played. Default is ---NONE--- +Welcome Message Filename - The audio file located on the server to be played when the call comes in. If set to ---NONE--- then no message will be played. Default is ---NONE---. This field as with the other audio fields in In-Groups, with the exception of the Agent Alert Filename, can have multiple audio files played if you put a pipe-separated list of audio files into the field.
@@ -3906,7 +3906,7 @@ if ($SSqc_features_active > 0)

-Agent Alert Extension - The extension to send into the agent session to announce that a call is coming to the agent. This extension should have a Playback of an audio file. To not use this function set this to X. Default is X. +Agent Alert Filename - The audio file to play to an agent to announce that a call is coming to the agent. To not use this function set this to X. Default is ding.
@@ -17489,7 +17489,7 @@ if ($ADD==3111) echo "After Hours Action: $NWB#vicidial_inbound_groups-after_hours_action$NWE\n"; - echo "After Hours Message Filename: audio chooser $NWB#vicidial_inbound_groups-after_hours_message_filename$NWE\n"; + echo "After Hours Message Filename: audio chooser $NWB#vicidial_inbound_groups-after_hours_message_filename$NWE\n"; echo "After Hours Extension: $NWB#vicidial_inbound_groups-after_hours_exten$NWE\n"; @@ -17499,13 +17499,13 @@ if ($ADD==3111) echo "$Agroups_menu"; echo "$NWB#vicidial_inbound_groups-afterhours_xfer_group$NWE\n"; - echo "Welcome Message Filename: audio chooser $NWB#vicidial_inbound_groups-welcome_message_filename$NWE\n"; + echo "Welcome Message Filename: audio chooser $NWB#vicidial_inbound_groups-welcome_message_filename$NWE\n"; echo "Play Welcome Message: $NWB#vicidial_inbound_groups-play_welcome_message$NWE\n"; echo "Music On Hold Context: $NWB#vicidial_inbound_groups-moh_context$NWE\n"; - echo "On Hold Prompt Filename: audio chooser $NWB#vicidial_inbound_groups-onhold_prompt_filename$NWE\n"; + echo "On Hold Prompt Filename: audio chooser $NWB#vicidial_inbound_groups-onhold_prompt_filename$NWE\n"; echo "On Hold Prompt Interval: $NWB#vicidial_inbound_groups-prompt_interval$NWE\n"; @@ -17525,11 +17525,11 @@ if ($ADD==3111) echo "$Tgroups_menu"; echo "$NWB#vicidial_inbound_groups-hold_time_option_xfer_group$NWE\n"; - echo "Hold Time Option Callback Filename: audio chooser $NWB#vicidial_inbound_groups-hold_time_option_callback_filename$NWE\n"; + echo "Hold Time Option Callback Filename: audio chooser $NWB#vicidial_inbound_groups-hold_time_option_callback_filename$NWE\n"; echo "Hold Time Option Callback List ID: $NWB#vicidial_inbound_groups-hold_time_option_callback_list_id$NWE\n"; - echo "Agent Alert Extension: $NWB#vicidial_inbound_groups-agent_alert_exten$NWE\n"; + echo "Agent Alert Extension: audio chooser $NWB#vicidial_inbound_groups-agent_alert_exten$NWE\n"; echo "Agent Alert Delay: $NWB#vicidial_inbound_groups-agent_alert_delay$NWE\n"; diff --git a/agc_2-X/trunk/www/vicidial/admin_header.php b/agc_2-X/trunk/www/vicidial/admin_header.php index 6980db94..859be66d 100644 --- a/agc_2-X/trunk/www/vicidial/admin_header.php +++ b/agc_2-X/trunk/www/vicidial/admin_header.php @@ -383,10 +383,10 @@ else { var audiolistURL = "./non_agent_api.php"; var audiolistQuery = "source=admin&function=sounds_list&user=" + user + "&pass=" + pass + "&format=selectframe&stage=" + stage + "&comments=" + fieldname; - var Iframe_content = ''; + var Iframe_content = ''; document.getElementById("audio_chooser_span").style.position = "absolute"; - document.getElementById("audio_chooser_span").style.left = "300px"; + document.getElementById("audio_chooser_span").style.left = "250px"; document.getElementById("audio_chooser_span").style.top = vposition + "px"; document.getElementById("audio_chooser_span").style.visibility = 'visible'; document.getElementById("audio_chooser_span").innerHTML = Iframe_content; diff --git a/agc_2-X/trunk/www/vicidial/non_agent_api.php b/agc_2-X/trunk/www/vicidial/non_agent_api.php index edab6265..7f3921e3 100644 --- a/agc_2-X/trunk/www/vicidial/non_agent_api.php +++ b/agc_2-X/trunk/www/vicidial/non_agent_api.php @@ -409,8 +409,8 @@ if ($function == 'sounds_list') echo "\n"; echo "close frame\n"; - echo "
\n"; - echo "\n"; + echo "
\n"; + echo "
\n"; echo "\n"; echo "\n"; echo "\n";
#FILENAMEDATE