From 6e58799bbcac81d10641a70619ad8e545f4ef575 Mon Sep 17 00:00:00 2001 From: mattf Date: Wed, 5 Oct 2011 03:37:24 +0000 Subject: [PATCH] Added new cm_lookup.agi script to allow for account lookups within a Call Menu without having to go into an in-group. Also new Call Menu option added to allow for vicidial_list field logging of responses inside of a call menu. git-svn-id: svn://192.168.202.10@1732 3d104415-ff17-0410-8863-d5cf3c621b8a --- UPGRADE | 5 + agi/cm.agi | 30 +- bin/ADMIN_keepalive_ALL.pl | 22 +- bin/AST_email_web_report.pl | 303 ++++++++++++------ docs/ASTERISK_CONF-GEN.txt | 133 ++++++-- extras/MySQL_AST_CREATE_tables.sql | 5 +- extras/upgrade_2.4.sql | 4 + .../TO_BE_TRANSLATED_2.4.txt | 3 + www/vicidial/admin.php | 23 +- 9 files changed, 384 insertions(+), 144 deletions(-) diff --git a/UPGRADE b/UPGRADE index ea2f9c21..d5bd61ab 100644 --- a/UPGRADE +++ b/UPGRADE @@ -722,6 +722,11 @@ OTHER CHANGES: 166. Added ability to set scheduled callbacks through the non-agent-api in the add_lead and update_lead functions. +167. Added new cm_lookup.agi script to allow for account lookups within a + Call Menu without having to go into an in-group. Also new Call Menu + option added to allow for vicidial_list field logging of responses + inside of a call menu. + diff --git a/agi/cm.agi b/agi/cm.agi index 66035589..857bcc47 100644 --- a/agi/cm.agi +++ b/agi/cm.agi @@ -9,15 +9,17 @@ # ; Below are the parameters needed for the script to be run properly # ; 1. the in-group to take settings from # ; 2. digit pressed +# ; 3. field(in vicidial_list) to update with DTMF pressed (only if lead_id populated) # ; # ;inbound calls check calltime: -#exten => 1,1,AGI(cm.agi,INBOUND-----1) +#exten => 1,1,AGI(cm.agi,INBOUND-----1-----province) #exten => 1,2,... # # Copyright (C) 2011 Matt Florell LICENSE: AGPLv2 # # changes: # 110525-2100 - First Build +# 111003-2150 - Added field to update # $script = 'cm.agi'; @@ -34,6 +36,8 @@ if ($sec < 10) {$sec = "0$sec";} $now_date_epoch = time(); $now_date = "$year-$mon-$mday $hour:$min:$sec"; +$vicidial_list_fields = '|vendor_lead_code|source_id|phone_code|title|first_name|middle_initial|last_name|address1|address2|address3|city|state|province|postal_code|country_code|alt_phone|email|security_phrase|comments|rank|owner|status|user|'; + # default path to astguiclient configuration file: $PATHconf = '/etc/astguiclient.conf'; @@ -138,6 +142,7 @@ if (length($ARGV[0])>1) $channel_group = $ARGV_vars[0]; $dtmf = $ARGV_vars[1]; + $field = $ARGV_vars[2]; } $|=1; @@ -164,6 +169,7 @@ while() } $outboundIVR=0; +$fieldUPDATE=0; if ($calleridname =~ /^V\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d/) { $callerid = $calleridname; @@ -181,6 +187,17 @@ if ($calleridname =~ /^V\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d/) } $sthA->finish(); } +elsif ($calleridname =~ /^Y\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d/) + { + $lead_id = substr($calleridname, 10, 10); + $lead_id = ($lead_id + 0); + $callerid = $calleridname; + + if ( (length($field)>2) && ($vicidial_list_fields =~ /\|$field\|/) ) + { + $fieldUPDATE=1; + } + } else { if ( ($callerid =~ /\".*\"/) && ( (!$calleridname) or ($calleridname =~ /unknown/) ) ) @@ -232,14 +249,21 @@ if ($channel =~ /Local/i) ### insert an IVR record to the vicidial_auto_calls table if ($outboundIVR > 0) { - $stmtA = "INSERT INTO vicidial_outbound_ivr_log (uniqueid,caller_code,event_date,campaign_id,lead_id,menu_id,menu_action) values('$uniqueid','$callerid','$now_date','$campaign_id','$lead_id','$context>$dtmf','$dtmf')"; + $stmtA = "INSERT INTO vicidial_outbound_ivr_log (uniqueid,caller_code,event_date,campaign_id,lead_id,menu_id,menu_action) values('$uniqueid','$callerid','$now_date','$campaign_id','$lead_id','$context>$dtmf','$dtmf');"; if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;} $affected_rowsL = $dbhA->do($stmtA); if ($AGILOG) {$agi_string = "-- VOIL insert: |$affected_rowsL|$uniqueid|$callerid|$campaign_id|$lead_id|$context|"; &agi_output;} } +elsif ($fieldUPDATE > 0) + { + $stmtA = "UPDATE vicidial_list SET $field='$dtmf' where lead_id='$lead_id';"; + if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;} + $affected_rowsL = $dbhA->do($stmtA); + if ($AGILOG) {$agi_string = "-- VL update: |$affected_rowsL|$field|$dtmf|$lead_id|$context|"; &agi_output;} + } else { - $stmtA = "INSERT INTO live_inbound_log (uniqueid,channel,server_ip,caller_id,extension,phone_ext,start_time,comment_a,comment_b,comment_d,comment_e) values('$uniqueid','$channel','$VARserver_ip','$callerid','$extension','$phone_number','$now_date','$channel_group','$dtmf','$context>$dtmf','$priority')"; + $stmtA = "INSERT INTO live_inbound_log (uniqueid,channel,server_ip,caller_id,extension,phone_ext,start_time,comment_a,comment_b,comment_d,comment_e) values('$uniqueid','$channel','$VARserver_ip','$callerid','$extension','$phone_number','$now_date','$channel_group','$dtmf','$context>$dtmf','$priority');"; if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;} $affected_rowsL = $dbhA->do($stmtA); if ($AGILOG) {$agi_string = "-- LIL insert: |$affected_rowsL|$uniqueid|$callerid|$extension|"; &agi_output;} diff --git a/bin/ADMIN_keepalive_ALL.pl b/bin/ADMIN_keepalive_ALL.pl index 630379bf..60a68c09 100644 --- a/bin/ADMIN_keepalive_ALL.pl +++ b/bin/ADMIN_keepalive_ALL.pl @@ -66,6 +66,7 @@ # 110829-1601 - Added multiple invalid option to Call Menus # 110911-1452 - Added resets for extension groups and areacode cid tables # 110922-2148 - Added reset for vicidial_did_ra_extensions +# 111004-2333 - Added Call Menu option for update of fields # $DB=0; # Debug flag @@ -1750,7 +1751,7 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r ##### BEGIN Generate the Call Menu entries ##### - $stmtA = "SELECT menu_id,menu_name,menu_prompt,menu_timeout,menu_timeout_prompt,menu_invalid_prompt,menu_repeat,menu_time_check,call_time_id,track_in_vdac,custom_dialplan_entry,tracking_group,dtmf_log FROM vicidial_call_menu order by menu_id;"; + $stmtA = "SELECT menu_id,menu_name,menu_prompt,menu_timeout,menu_timeout_prompt,menu_invalid_prompt,menu_repeat,menu_time_check,call_time_id,track_in_vdac,custom_dialplan_entry,tracking_group,dtmf_log,dtmf_field FROM vicidial_call_menu order by menu_id;"; # print "$stmtA\n"; $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; @@ -1772,6 +1773,7 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r $custom_dialplan_entry[$i]= $aryA[10]; $tracking_group[$i] = $aryA[11]; $dtmf_log[$i] = $aryA[12]; + $dtmf_field[$i] = $aryA[13]; if ($track_in_vdac[$i] > 0) {$track_in_vdac[$i] = 'YES'} @@ -1925,19 +1927,19 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r if ($option_route[$j] =~ /AGI/) { if ($dtmf_log[$i] > 0) - {$call_menu_line .= "exten => $option_value[$j],$PRI,AGI(cm.agi,$tracking_group[$i]-----$option_value[$j])\n"; $PRI++;} + {$call_menu_line .= "exten => $option_value[$j],$PRI,AGI(cm.agi,$tracking_group[$i]-----$option_value[$j]-----$dtmf_field[$i])\n"; $PRI++;} $call_menu_line .= "exten => $option_value[$j],$PRI,AGI($option_route_value[$j])\n"; } if ($option_route[$j] =~ /CALLMENU/) { if ($dtmf_log[$i] > 0) - {$call_menu_line .= "exten => $option_value[$j],$PRI,AGI(cm.agi,$tracking_group[$i]-----$option_value[$j])\n"; $PRI++;} + {$call_menu_line .= "exten => $option_value[$j],$PRI,AGI(cm.agi,$tracking_group[$i]-----$option_value[$j]-----$dtmf_field[$i])\n"; $PRI++;} $call_menu_line .= "exten => $option_value[$j],$PRI,Goto($option_route_value[$j],s,1)\n"; } if ($option_route[$j] =~ /DID/) { if ($dtmf_log[$i] > 0) - {$call_menu_line .= "exten => $option_value[$j],$PRI,AGI(cm.agi,$tracking_group[$i]-----$option_value[$j])\n"; $PRI++;} + {$call_menu_line .= "exten => $option_value[$j],$PRI,AGI(cm.agi,$tracking_group[$i]-----$option_value[$j]-----$dtmf_field[$i])\n"; $PRI++;} $call_menu_line .= "exten => $option_value[$j],$PRI,Goto(trunkinbound,$option_route_value[$j],1)\n"; } if ($option_route[$j] =~ /INGROUP/) @@ -1954,20 +1956,20 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r $IGvid_validate_digits = $IGoption_route_value_context[8]; if ($dtmf_log[$i] > 0) - {$call_menu_line .= "exten => $option_value[$j],$PRI,AGI(cm.agi,$tracking_group[$i]-----$option_value[$j])\n"; $PRI++;} + {$call_menu_line .= "exten => $option_value[$j],$PRI,AGI(cm.agi,$tracking_group[$i]-----$option_value[$j]-----$dtmf_field[$i])\n"; $PRI++;} $call_menu_line .= "exten => $option_value[$j],$PRI,AGI(agi-VDAD_ALL_inbound.agi,$IGhandle_method-----$IGsearch_method-----$option_route_value[$j]-----$menu_id[$i]--------------------$IGlist_id-----$IGphone_code-----$IGcampaign_id---------------$IGvid_enter_filename-----$IGvid_id_number_filename-----$IGvid_confirm_filename-----$IGvid_validate_digits)\n"; } if ($option_route[$j] =~ /EXTENSION/) { if ($dtmf_log[$i] > 0) - {$call_menu_line .= "exten => $option_value[$j],$PRI,AGI(cm.agi,$tracking_group[$i]-----$option_value[$j])\n"; $PRI++;} + {$call_menu_line .= "exten => $option_value[$j],$PRI,AGI(cm.agi,$tracking_group[$i]-----$option_value[$j]-----$dtmf_field[$i])\n"; $PRI++;} if (length($option_route_value_context[$j])>0) {$option_route_value_context[$j] = "$option_route_value_context[$j],";} $call_menu_line .= "exten => $option_value[$j],$PRI,Goto($option_route_value_context[$j]$option_route_value[$j],1)\n"; } if ($option_route[$j] =~ /VOICEMAIL/) { if ($dtmf_log[$i] > 0) - {$call_menu_line .= "exten => $option_value[$j],$PRI,AGI(cm.agi,$tracking_group[$i]-----$option_value[$j])\n"; $PRI++;} + {$call_menu_line .= "exten => $option_value[$j],$PRI,AGI(cm.agi,$tracking_group[$i]-----$option_value[$j]-----$dtmf_field[$i])\n"; $PRI++;} $call_menu_line .= "exten => $option_value[$j],$PRI,Goto(default,85026666666666$option_route_value[$j],1)\n"; } if ($option_route[$j] =~ /HANGUP/) @@ -1997,13 +1999,13 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r $call_menu_line .= "$hangup_prompt_ext"; if ($dtmf_log[$i] > 0) - {$call_menu_line .= "exten => $option_value[$j],$PRI,AGI(cm.agi,$tracking_group[$i]-----$option_value[$j])\n"; $PRI++;} + {$call_menu_line .= "exten => $option_value[$j],$PRI,AGI(cm.agi,$tracking_group[$i]-----$option_value[$j]-----$dtmf_field[$i])\n"; $PRI++;} $call_menu_line .= "exten => $option_value[$j],n,Hangup\n"; } else { if ($dtmf_log[$i] > 0) - {$call_menu_line .= "exten => $option_value[$j],$PRI,AGI(cm.agi,$tracking_group[$i]-----$option_value[$j])\n"; $PRI++;} + {$call_menu_line .= "exten => $option_value[$j],$PRI,AGI(cm.agi,$tracking_group[$i]-----$option_value[$j]-----$dtmf_field[$i])\n"; $PRI++;} $call_menu_line .= "exten => $option_value[$j],$PRI,Hangup\n"; } } @@ -2031,7 +2033,7 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r $DIALstring = "$a$S$b$S$c$S$d$S"; } if ($dtmf_log[$i] > 0) - {$call_menu_line .= "exten => $option_value[$j],$PRI,AGI(cm.agi,$tracking_group[$i]-----$option_value[$j])\n"; $PRI++;} + {$call_menu_line .= "exten => $option_value[$j],$PRI,AGI(cm.agi,$tracking_group[$i]-----$option_value[$j]-----$dtmf_field[$i])\n"; $PRI++;} $call_menu_line .= "exten => $option_value[$j],$PRI,Goto(default,$DIALstring$Pdialplan,1)\n"; } $sthA->finish(); diff --git a/bin/AST_email_web_report.pl b/bin/AST_email_web_report.pl index 483bef2d..8239bcf9 100644 --- a/bin/AST_email_web_report.pl +++ b/bin/AST_email_web_report.pl @@ -1,16 +1,19 @@ #!/usr/bin/perl # -# AST_email_web_report.pl version: 2.0.5 +# AST_email_web_report.pl version: 2.4 # # This script is designed to wget a web report and then email it as an attachment -# this script should be run from the web server +# this script should be run from a vicidial web server. # -# /usr/share/astguiclient/AST_VDlist_summary_export.pl --email-list=test@gmail.com --email-sender=test@test.com +# NOTE: you need to alter the URL to change the report that is run by this script # -# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 +# /usr/share/astguiclient/AST_email_web_report --email-list=test@gmail.com --email-sender=test@test.com +# +# Copyright (C) 2011 Matt Florell LICENSE: AGPLv2 # # CHANGES # 90225-1247 - First version +# 111004-1057 - Added ftp options # $txt = '.txt'; @@ -18,6 +21,42 @@ $html = '.html'; $US = '_'; $MT[0] = ''; + +$secX = time(); +$time = $secX; + ($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";} +$timestamp = "$year-$mon-$mday $hour:$min:$sec"; +$filedate = "$year$mon$mday"; +$ABIfiledate = "$mon-$mday-$year$us$hour$min$sec"; +$shipdate = "$year-$mon-$mday"; +$start_date = "$year$mon$mday"; +$datestamp = "$year/$mon/$mday $hour:$min"; + + +use Time::Local; + +### find epoch of 2AM today +$TWOAMsec = ( ($secX - ($sec + ($min * 60) + ($hour * 3600) ) ) + 7200); +### find epoch of 2AM yesterday +$TWOAMsecY = ($TWOAMsec - 86400); + +($Tsec,$Tmin,$Thour,$Tmday,$Tmon,$Tyear,$Twday,$Tyday,$Tisdst) = localtime($TWOAMsecY); +$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";} + + ### begin parsing run-time options ### if (length($ARGV[0])>1) { @@ -31,12 +70,17 @@ if (length($ARGV[0])>1) if ($args =~ /--help/i) { print "allowed run time options:\n"; - print " [-q] = quiet\n"; - print " [-t] = test\n"; + print " [--quiet] = quiet\n"; + print " [--test] = test\n"; print " [--debug] = debugging messages\n"; print " [--debugX] = Super debugging messages\n"; print " [--email-list=test@test.com:test2@test.com] = send email results to these addresses\n"; print " [--email-sender=vicidial@localhost] = sender for the email results\n"; + print " [--date=YYYY-MM-DD] = date override, can also use 'today' and 'yesterday'\n"; + print " [--ftp-server=XXXXXXXX] = FTP server to send file to\n"; + print " [--ftp-login=XXXXXXXX] = FTP user\n"; + print " [--ftp-pass=XXXXXXXX] = FTP pass\n"; + print " [--ftp-dir=XXXXXXXX] = remote FTP server directory to post files to\n"; print "\n"; exit; @@ -62,27 +106,105 @@ if (length($ARGV[0])>1) $T=1; $TEST=1; print "\n----- TESTING -----\n\n"; } + if ($args =~ /--ftp-server=/i) + { + @data_in = split(/--ftp-server=/,$args); + $VARREPORT_host = $data_in[1]; + $VARREPORT_host =~ s/ .*//gi; + $VARREPORT_host =~ s/:/,/gi; + print "\n----- FTP SERVER: $VARREPORT_host -----\n\n"; + } + else + {$VARREPORT_host = '';} + if ($args =~ /--ftp-login=/i) + { + @data_in = split(/--ftp-login=/,$args); + $VARREPORT_user = $data_in[1]; + $VARREPORT_user =~ s/ .*//gi; + $VARREPORT_user =~ s/:/,/gi; + print "\n----- FTP LOGIN: $VARREPORT_user -----\n\n"; + } + else + {$VARREPORT_user = '';} + if ($args =~ /--ftp-pass=/i) + { + @data_in = split(/--ftp-pass=/,$args); + $VARREPORT_pass = $data_in[1]; + $VARREPORT_pass =~ s/ .*//gi; + $VARREPORT_pass =~ s/:/,/gi; + print "\n----- FTP PASS: -----\n\n"; + } + else + {$VARREPORT_pass = '';} + if ($args =~ /--ftp-dir=/i) + { + @data_in = split(/--ftp-dir=/,$args); + $VARREPORT_dir = $data_in[1]; + $VARREPORT_dir =~ s/ .*//gi; + $VARREPORT_dir =~ s/:/,/gi; + print "\n----- FTP DIR: $VARREPORT_dir -----\n\n"; + } + else + {$VARREPORT_dir = '';} + if ($args =~ /--email-list=/i) { @data_in = split(/--email-list=/,$args); - $email_list = $data_in[1]; - $email_list =~ s/ .*//gi; - $email_list =~ s/:/,/gi; + $email_list = $data_in[1]; + $email_list =~ s/ .*//gi; + $email_list =~ s/:/,/gi; print "\n----- EMAIL NOTIFICATION: $email_list -----\n\n"; } else {$email_list = '';} - if ($args =~ /--email-sender=/i) { @data_in = split(/--email-sender=/,$args); - $email_sender = $data_in[1]; - $email_sender =~ s/ .*//gi; - $email_sender =~ s/:/,/gi; + $email_sender = $data_in[1]; + $email_sender =~ s/ .*//gi; + $email_sender =~ s/:/,/gi; print "\n----- EMAIL NOTIFICATION SENDER: $email_sender -----\n\n"; } else {$email_sender = 'vicidial@localhost';} + if ($args =~ /--date=/i) + { + @data_in = split(/--date=/,$args); + $shipdate = $data_in[1]; + $shipdate =~ s/ .*//gi; + if ($shipdate =~ /today/) + { + $shipdate="$year-$mon-$mday"; + $time = $TWOAMsec; + } + else + { + if ($shipdate =~ /yesterday/) + { + $shipdate="$Tyear-$Tmon-$Tmday"; + $year = $Tyear; + $mon = $Tmon; + $mday = $Tmday; + $time=$TWOAMsecY; + } + else + { + @cli_date = split("-",$shipdate); + $year = $cli_date[0]; + $mon = $cli_date[1]; + $mday = $cli_date[2]; + $cli_date[1] = ($cli_date[1] - 1); + $time = timelocal(0,0,2,$cli_date[2],$cli_date[1],$cli_date[0]); + } + } + $start_date = $shipdate; + $start_date =~ s/-//gi; + if (!$Q) {print "\n----- DATE OVERRIDE: $shipdate($start_date) -----\n\n";} + } + else + { + $time=$TWOAMsec; + } } } else @@ -91,27 +213,6 @@ else } ### end parsing run-time options ### - -$secX = time(); - ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); - $year = ($year + 1900); - $mon++; - -# # rerun override - Use this to override the day manually -# $year='2007'; -# $mon='5'; -# $mday='18'; - - 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";} - $timestamp = "$year-$mon-$mday $hour:$min:$sec"; - $filedate = "$year$mon$mday"; - $shipdate = "$year-$mon-$mday"; - $datestamp = "$year/$mon/$mday $hour:$min"; - # default path to astguiclient configuration file: $PATHconf = '/etc/astguiclient.conf'; @@ -147,62 +248,57 @@ foreach(@conf) {$VARDB_pass = $line; $VARDB_pass =~ s/.*=//gi;} if ( ($line =~ /^VARDB_port/) && ($CLIDB_port < 1) ) {$VARDB_port = $line; $VARDB_port =~ s/.*=//gi;} - if ( ($line =~ /^VARREPORT_host/) && ($CLIREPORT_host < 1) ) - {$VARREPORT_host = $line; $VARREPORT_host =~ s/.*=//gi;} - if ( ($line =~ /^VARREPORT_user/) && ($CLIREPORT_user < 1) ) - {$VARREPORT_user = $line; $VARREPORT_user =~ s/.*=//gi;} - if ( ($line =~ /^VARREPORT_pass/) && ($CLIREPORT_pass < 1) ) - {$VARREPORT_pass = $line; $VARREPORT_pass =~ s/.*=//gi;} +# if ( ($line =~ /^VARREPORT_host/) && ($CLIREPORT_host < 1) ) +# {$VARREPORT_host = $line; $VARREPORT_host =~ s/.*=//gi;} +# if ( ($line =~ /^VARREPORT_user/) && ($CLIREPORT_user < 1) ) +# {$VARREPORT_user = $line; $VARREPORT_user =~ s/.*=//gi;} +# if ( ($line =~ /^VARREPORT_pass/) && ($CLIREPORT_pass < 1) ) +# {$VARREPORT_pass = $line; $VARREPORT_pass =~ s/.*=//gi;} +# if ( ($line =~ /^VARREPORT_dir/) && ($CLIREPORT_dir < 1) ) +# {$VARREPORT_dir = $line; $VARREPORT_dir =~ s/.*=//gi;} if ( ($line =~ /^VARREPORT_port/) && ($CLIREPORT_port < 1) ) {$VARREPORT_port = $line; $VARREPORT_port =~ s/.*=//gi;} - if ( ($line =~ /^VARREPORT_dir/) && ($CLIREPORT_dir < 1) ) - {$VARREPORT_dir = $line; $VARREPORT_dir =~ s/.*=//gi;} $i++; } # Customized Variables $server_ip = $VARserver_ip; # Asterisk server IP -if ($output_format =~ /^pipe-standard$/) - {$DLT = '|'; $txt='.txt'; print "---- pipe-standard ----\n";} -if ($output_format =~ /^csv-standard$/) - {$DLT = "','"; $txt='.csv'; print "---- csv-standard ----\n";} -if ($output_format =~ /^tab-standard$/) - {$DLT = "\t"; $txt='.txt'; print "---- tab-standard ----\n";} -if ($output_format =~ /^pipe-triplep$/) - {$DLT = ''; $txt='.txt'; print "---- pipe-triplep ----\n";} -if ($output_format =~ /^pipe-vici$/) - {$DLT = '|'; $txt='.txt'; print "---- pipe-vici ----\n";} -if ($output_format =~ /^html-rec$/) - {$DLT = ' '; $txt='.html'; print "---- html-rec ----\n";} - if (!$Q) { print "\n\n\n\n\n\n\n\n\n\n\n\n-- AST_email_web_report.pl --\n\n"; - print "This program is designed to wget a web report and email it. \n"; + print "This program is designed to wget a web report and email or FTP it. \n"; print "\n"; } -$HTMLfile = "Outbound_Report_ALL_$shipdate$html"; +###################################################### +##### CHANGE REPORT NAME AND URL HERE!!!!!!!!! +###################################################### +#$HTMLfile = "Outbound_Report_ALL_$shipdate$html"; +$HTMLfile = "DISCH_SURVEY_$start_date$txt"; #$location = "http://6666:1234\@127.0.0.1/vicidial/fcstats.php?db_log=1\\&query_date=$shipdate\\&group=$group\\&shift=$shift\\&archive=1"; #$location = "http://6666:1234\@192.168.1.101/vicidial/AST_VDADstats.php?query_date=$shipdate\\&end_date=$shipdate\\&group[]=--ALL--\\&shift=ALL"; -$location = "http://8888:8888\@127.0.0.1/vicidial/AST_VDADstats.php?query_date=$shipdate\\&end_date=$shipdate\\&group[]=--ALL--\\&shift=ALL"; +#$location = "http://8888:8888\@127.0.0.1/vicidial/AST_VDADstats.php?query_date=$shipdate\\&end_date=$shipdate\\&group[]=--ALL--\\&shift=ALL"; -print "Running Report $ship_date\n$location\n"; -`/usr/bin/wget --output-document=/tmp/$HTMLfile $location `; +# Outbound IVR Export Report: +$location = "http://127.0.0.1/vicidial/call_report_export.php?query_date=$shipdate\\&end_date=$shipdate\\&list_id[]=--ALL--\\&status[]=--ALL--\\&campaign[]=RSIDESVY\\&run_export=1\\&ivr_export=YES\\&export_fields=EXTENDED\\&header_row=NO\\&rec_fields=NONE\\&custom_fields=NO\\&call_notes=NO"; + +###################################################### +###################################################### +### GRAB THE REPORT +if (!$Q) {print "Running Report $ship_date\n$location\n";} + +`/usr/bin/wget --auth-no-challenge --http-user=6666 --http-password=1234 --output-document=/tmp/$HTMLfile $location `; - - -###### EMAIL SECTION - +###### BEGIN EMAIL SECTION ##### if (length($email_list) > 3) { - print "Sending email: $email_list\n"; + if (!$Q) {print "Sending email: $email_list\n";} use MIME::QuotedPrint; use MIME::Base64; @@ -210,39 +306,62 @@ if (length($email_list) > 3) $mailsubject = "VICIDIAL Outbound Report $shipdate"; - %mail = ( To => "$email_list", - From => "$email_sender", - Subject => "$mailsubject", - ); - $boundary = "====" . time() . "===="; - $mail{'content-type'} = "multipart/mixed; boundary=\"$boundary\""; + %mail = ( To => "$email_list", + From => "$email_sender", + Subject => "$mailsubject", + ); + $boundary = "====" . time() . "===="; + $mail{'content-type'} = "multipart/mixed; boundary=\"$boundary\""; - $message = encode_qp( "VICIDIAL Outbound Report for $shipdate:\n\n Attachment: $HTMLfile" ); + $message = encode_qp( "VICIDIAL Outbound Report for $shipdate:\n\n Attachment: $HTMLfile" ); - $Zfile = "/tmp/$HTMLfile"; + $Zfile = "/tmp/$HTMLfile"; - open (F, $Zfile) or die "Cannot read $Zfile: $!"; - binmode F; undef $/; - $attachment = encode_base64(); - close F; + open (F, $Zfile) or die "Cannot read $Zfile: $!"; + binmode F; undef $/; + $attachment = encode_base64(); + close F; - $boundary = '--'.$boundary; - $mail{body} .= "$boundary\n"; - $mail{body} .= "Content-Type: text/plain; charset=\"iso-8859-1\"\n"; - $mail{body} .= "Content-Transfer-Encoding: quoted-printable\n\n"; - $mail{body} .= "$message\n"; - $mail{body} .= "$boundary\n"; - $mail{body} .= "Content-Type: application/octet-stream; name=\"$HTMLfile\"\n"; - $mail{body} .= "Content-Transfer-Encoding: base64\n"; - $mail{body} .= "Content-Disposition: attachment; filename=\"$HTMLfile\"\n\n"; - $mail{body} .= "$attachment\n"; - $mail{body} .= "$boundary"; - $mail{body} .= "--\n"; - - sendmail(%mail) or die $mail::Sendmail::error; - print "ok. log says:\n", $mail::sendmail::log; ### print mail log for status + $boundary = '--'.$boundary; + $mail{body} .= "$boundary\n"; + $mail{body} .= "Content-Type: text/plain; charset=\"iso-8859-1\"\n"; + $mail{body} .= "Content-Transfer-Encoding: quoted-printable\n\n"; + $mail{body} .= "$message\n"; + $mail{body} .= "$boundary\n"; + $mail{body} .= "Content-Type: application/octet-stream; name=\"$HTMLfile\"\n"; + $mail{body} .= "Content-Transfer-Encoding: base64\n"; + $mail{body} .= "Content-Disposition: attachment; filename=\"$HTMLfile\"\n\n"; + $mail{body} .= "$attachment\n"; + $mail{body} .= "$boundary"; + $mail{body} .= "--\n"; + sendmail(%mail) or die $mail::Sendmail::error; + if (!$Q) {print "ok. log says:\n", $mail::sendmail::log;} ### print mail log for status } +###### END EMAIL SECTION ##### + + +###### BEGIN FTP SECTION ##### + +# FTP overrides- +# $VARREPORT_host = '10.0.0.4'; +# $VARREPORT_port = '21'; +# $VARREPORT_user = 'cron'; +# $VARREPORT_pass = 'test'; +# $VARREPORT_dir = ''; + +if (length($VARREPORT_host) > 7) + { + use Net::FTP; + + if (!$Q) {print "Sending File Over FTP: $HTMLfile\n";} + $ftp = Net::FTP->new("$VARREPORT_host", Port => $VARREPORT_port); + $ftp->login("$VARREPORT_user","$VARREPORT_pass"); + $ftp->cwd("$VARREPORT_dir"); + $ftp->put("/tmp/$HTMLfile", "$HTMLfile"); + $ftp->quit; + } +###### END FTP SECTION ##### exit; diff --git a/docs/ASTERISK_CONF-GEN.txt b/docs/ASTERISK_CONF-GEN.txt index ecdd31b9..e7fe0e48 100644 --- a/docs/ASTERISK_CONF-GEN.txt +++ b/docs/ASTERISK_CONF-GEN.txt @@ -1,4 +1,4 @@ -ASTERISK CONF FILE GENERATION 2009-02-11 +ASTERISK CONF FILE GENERATION Started: 2009-02-11 Updated: 2011-10-04 This file details the process for how the system automatically generates Asterisk conf files purely from VICIDIAL settings. @@ -6,7 +6,7 @@ The conf files that are generated are: /etc/asterisk/extensions-vicidial.conf /etc/asterisk/iax-vicidial.conf /etc/asterisk/sip-vicidial.conf - /etc/asterisk/voicemail-vicidial.conf + /etc/asterisk/voicemail.conf /etc/asterisk/meetme-vicidial.conf /etc/asterisk/musiconhold-vicidial.conf @@ -40,9 +40,9 @@ The Menu ID is the unique identifier of the call menu and it is also used as the Call Menu Options: -0,1,2,3,4,5,6,7,8,9,*,#,A,B,C,D,TIMECHECK +0,1,2,3,4,5,6,7,8,9,*,#,A,B,C,D,TIMECHECK,TIMEOUT,INVALID,INVALID_2ND,INVALID_3RD -The options are the DTMF digits that a caller can select within this Call Menu, with the exception of the TIMECHECK option which is used when the call is taking place outside of the call_time as defined in the Call menu. +The options are the DTMF digits that a caller can select within this Call Menu, with the exception of the TIMECHECK, TIMEOUT and INVALID options which are used when the call is taking place outside of the call_time as defined in the Call menu, when the menu times out or when an invalid choice is made. Call Menu Routes: @@ -51,6 +51,10 @@ CALLMENU,HANGUP,DID,EXTENSION,PHONE,VOICEMAIL,AGI The option route is similar to the DID route since it defines what method to use to send the call to the option route value. The route value is dependant upon the route selected, for example if you selected DID as the route you would then need to select a value DID to send the call to. Or if you selected PHONE as the route, the route value would need to be a valid phone login as defined in the phones section of Administration. +Log Key Press - This option if enabled will log the DTMF key press by the caller in this Call Menu. Default is 0 for disabled. + +Log Field - If the Log Key Press option is enabled, this optional setting can allow the response to also be stored in this list field. vendor_lead_code, source_id, phone_code, title, first_name, middle_initial, last_name, address1, address2, address3, city, state, province, postal_code, country_code, alt_phone, email, security_phrase, comments, rank, owner, status, user. Default is NONE for disabled. + An example of a call menu: @@ -64,6 +68,11 @@ menu_repeat = 1 menu_time_check = 1 call_time_id = 9am-5pm track_in_vdac = 1 +custom_dialplan_entry = +tracking_group = CALLMENU +dtmf_log = 0 +dtmf_field = NONE + menu_id = test_menu option_value = 1 @@ -172,33 +181,95 @@ exten => h,1,DeadAGI(agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG--- +Example of an inbound IVR using Call Menus and updating existing customer records after querying for a vendor_lead_code with TTS confirmation of last name: -Database changes needed for Call Menus: -###### DO NOT RUN, FOR DOCUMENTATION PURPOSES ONLY! ###### +1. Make sure Admin -> System Settings options are set: + - Allow Custom Dialplan Entries = 1 + - Enable TTS Integration = 1 +2. Make sure Cepstral TTS is installed(with licenses) and create this TTS prompt in Admin -> Text To Speech + - TTS ID: lastname_oneyestwono + - TTS Name: Confirm last name one for yes two for no + - TTS Active: Y + - TTS Voice: Allison-8kHz + - TTS Text: Is this the members last name? --A--last_name--B-- Press one for yes, or two for no. -CREATE TABLE vicidial_call_menu ( -menu_id VARCHAR(50) PRIMARY KEY NOT NULL, -menu_name VARCHAR(100), -menu_prompt VARCHAR(100), -menu_timeout SMALLINT(2) UNSIGNED default '10', -menu_timeout_prompt VARCHAR(100) default 'NONE', -menu_invalid_prompt VARCHAR(100) default 'NONE', -menu_repeat TINYINT(1) UNSIGNED default '0', -menu_time_check ENUM('0','1') default '0', -call_time_id VARCHAR(20) default '', -track_in_vdac ENUM('0','1') default '1' -); +3. Create first Call Menu in Inbound -> Add A New Call Menu + - Menu ID: enter_your_id + - Menu Name: Enter a Member ID + - Menu Prompt: Audio Store> (remember, 8k/16bit/mono/pcm/wav files) + - Menu Timeout: 10 + - Menu Repeat: 1 + - Menu Timecheck: 0 + - Log Key Press: 0 + - Log Field: NONE + - Custom Dialplan Entry: + exten => _XXXXXXXX,1,AGI(cm_lookup.agi,vendor_lead_code---CAMPLISTSALL---TESTCAMP---lastname_oneyestwono) + +4. Create second Call Menu - + - Menu ID: enter_date + - Menu Name: Enter visit date mmdd + - Menu Prompt: + - Menu Timeout: 10 + - Menu Repeat: 1 + - Menu Timecheck: 0 + - Log Key Press: 1 + - Log Field: email + - Custom Dialplan Entry: + exten => _XXXX,1,AGI(cm.agi,CALLMENU-----${EXTEN}-----email) + exten => _XXXX,n,Goto(complete_visit,s,1) + +5. Create third Call Menu - + - Menu ID: complete_visit + - Menu Name: Was visit complete or not + - Menu Prompt: + - Menu Timeout: 10 + - Menu Repeat: 1 + - Menu Timecheck: 0 + - Log Key Press: 1 + - Log Field: province + +6. Create fourth Call Menu - + - Menu ID: incomplete_reason + - Menu Name: Reason visit was incomplete + - Log Key Press: 1 + - Log Field: security_phrase + +7. Create fifth Call Menu - + - Menu ID: followup_required + - Menu Name: Is a follow-up required + - Log Key Press: 1 + - Log Field: alt_phone + +8. Create sixth Call Menu - + - Menu ID: followup_action + - Menu Name: Follow-up action + - Log Key Press: 1 + - Log Field: owner + +9. Create seventh Call Menu - + - Menu ID: update_another_record + - Menu Name: Ask if you want to update another record + - Log Key Press: 0 + - Log Field: NONE + +10. Add the following options to these call menus that we have just created: + - enter_your_id + - Add a "A" option to go to CALLMENU "enter_date", matching IDs will move on + - Add a "B" option to go to CALLMENU "enter_your_id", no-match will repeat prompt + - enter_date + - Add a "INVALID" option to go to CALLMENU "enter_date" + - complete_visit + - Add a "1" option to go to CALLMENU "update_another_record" + - Add a "2" option to go to CALLMENU "incomplete_reason" + - incomplete_reason + - Add options "1-5" to go to CALLMENU "followup_required" + - followup_required + - Add a "1" option to go to CALLMENU "followup_action" + - Add a "2" option to go to CALLMENU "update_another_record" + - Add a "3" option to go to CALLMENU "update_another_record" + - incomplete_reason + - Add options "1-9" to go to CALLMENU "update_another_record" + - followup_required + - Add a "1" option to go to CALLMENU "enter_your_id" + - Add a "2" option to go to HANGUP with audio prompt "vm-goodbye" -CREATE TABLE vicidial_call_menu_options ( -menu_id VARCHAR(50) NOT NULL, -option_value VARCHAR(20) NOT NULL default '', -option_description VARCHAR(255) default '', -option_route VARCHAR(20), -option_route_value VARCHAR(100), -option_route_value_context VARCHAR(100), -index (menu_id), -unique index menuoption (menu_id, option_value) -); - -ALTER TABLE vicidial_inbound_dids MODIFY did_route ENUM('EXTEN','VOICEMAIL','AGENT','PHONE','IN_GROUP','CALLMENU') default 'EXTEN'; -ALTER TABLE vicidial_inbound_dids ADD menu_id VARCHAR(50) default ''; diff --git a/extras/MySQL_AST_CREATE_tables.sql b/extras/MySQL_AST_CREATE_tables.sql index 3cf4223e..cf16475e 100644 --- a/extras/MySQL_AST_CREATE_tables.sql +++ b/extras/MySQL_AST_CREATE_tables.sql @@ -1873,7 +1873,8 @@ call_time_id VARCHAR(20) default '', track_in_vdac ENUM('0','1') default '1', custom_dialplan_entry TEXT, tracking_group VARCHAR(20) default 'CALLMENU', -dtmf_log ENUM('0','1') default '0' +dtmf_log ENUM('0','1') default '0', +dtmf_field VARCHAR(50) default 'NONE' ); CREATE TABLE vicidial_call_menu_options ( @@ -2672,7 +2673,7 @@ CREATE TABLE vicidial_log_noanswer_archive LIKE vicidial_log_noanswer; CREATE TABLE vicidial_did_agent_log_archive LIKE vicidial_did_agent_log; CREATE UNIQUE INDEX vdala on vicidial_did_agent_log_archive (uniqueid,call_date,did_route); -UPDATE system_settings SET db_schema_version='1300',db_schema_update_date=NOW(); +UPDATE system_settings SET db_schema_version='1301',db_schema_update_date=NOW(); GRANT RELOAD ON *.* TO cron@'%'; GRANT RELOAD ON *.* TO cron@localhost; diff --git a/extras/upgrade_2.4.sql b/extras/upgrade_2.4.sql index efcb0998..98ba65e1 100644 --- a/extras/upgrade_2.4.sql +++ b/extras/upgrade_2.4.sql @@ -1079,3 +1079,7 @@ UPDATE system_settings SET db_schema_version='1299',db_schema_update_date=NOW() ALTER TABLE vicidial_campaigns MODIFY survey_recording ENUM('Y','N','Y_WITH_AMD') default 'N'; UPDATE system_settings SET db_schema_version='1300',db_schema_update_date=NOW() where db_schema_version < 1300; + +ALTER TABLE vicidial_call_menu ADD dtmf_field VARCHAR(50) default 'NONE'; + +UPDATE system_settings SET db_schema_version='1301',db_schema_update_date=NOW() where db_schema_version < 1301; diff --git a/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt b/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt index 92e8b425..99bfdd82 100644 --- a/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt +++ b/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt @@ -749,6 +749,9 @@ Drop Call Menu|| If Drop Action is set to CALLMENU, the call will be sent to this call menu if it reaches Drop Call Seconds|| Custom DID Fields - These five fields can be used for various purposes, mostly relating to custom programming and reports|| If set to Y_WITH_AMD even answering machine detected message calls will be recorded|| +Log Field|| +If the Log Key Press option is enabled, this optional setting can allow the response to also be stored in this list field|| +Default is NONE for disabled|| lead_report_export.php diff --git a/www/vicidial/admin.php b/www/vicidial/admin.php index 9a6e71bd..d126f68b 100644 --- a/www/vicidial/admin.php +++ b/www/vicidial/admin.php @@ -1653,6 +1653,8 @@ if (isset($_GET["drop_callmenu"])) {$drop_callmenu=$_GET["drop_callmenu"];} elseif (isset($_POST["drop_callmenu"])) {$drop_callmenu=$_POST["drop_callmenu"];} if (isset($_GET["after_hours_callmenu"])) {$after_hours_callmenu=$_GET["after_hours_callmenu"];} elseif (isset($_POST["after_hours_callmenu"])) {$after_hours_callmenu=$_POST["after_hours_callmenu"];} +if (isset($_GET["dtmf_field"])) {$dtmf_field=$_GET["dtmf_field"];} + elseif (isset($_POST["dtmf_field"])) {$dtmf_field=$_POST["dtmf_field"];} if (isset($script_id)) {$script_id= strtoupper($script_id);} @@ -2300,6 +2302,7 @@ if ($non_latin < 1) $drop_callmenu = ereg_replace("[^-_0-9a-zA-Z]","",$drop_callmenu); $after_hours_callmenu = ereg_replace("[^-_0-9a-zA-Z]","",$after_hours_callmenu); $survey_recording = ereg_replace("[^-_0-9a-zA-Z]","",$survey_recording); + $dtmf_field = ereg_replace("[^-_0-9a-zA-Z]","",$dtmf_field); ### ALPHA-NUMERIC and underscore and dash and slash and dot $menu_prompt = ereg_replace("[^-\/\|\._0-9a-zA-Z]","",$menu_prompt); @@ -2905,12 +2908,13 @@ else # 110922-1218 - Added new User admin permissions, Added DID Remote Agent extension override section # 110923-0834 - Added option for in-group action transfer cid, and CALLMENU as drop and after-hours action options # 110923-2043 - Added custom DID fields +# 111004-1539 - Added dtmf_field call menu option # # make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time -$admin_version = '2.4-338a'; -$build = '110923-2043'; +$admin_version = '2.4-339a'; +$build = '111004-1539'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -6159,6 +6163,11 @@ if ($ADD==99999)
Log Key Press - This option if enabled will log the DTMF key press by the caller in this Call Menu. Default is 0 for disabled. +
+ +
+ Log Field - If the Log Key Press option is enabled, this optional setting can allow the response to also be stored in this list field. vendor_lead_code, source_id, phone_code, title, first_name, middle_initial, last_name, address1, address2, address3, city, state, province, postal_code, country_code, alt_phone, email, security_phrase, comments, rank, owner, status, user. Default is NONE for disabled. +

@@ -11836,7 +11845,7 @@ if ($ADD==2611) } else { - $stmt="INSERT INTO vicidial_call_menu (menu_id,menu_name,menu_prompt,menu_timeout,menu_timeout_prompt,menu_invalid_prompt,menu_repeat,menu_time_check,call_time_id,track_in_vdac,custom_dialplan_entry,tracking_group,dtmf_log) SELECT \"$menu_id\",\"$menu_name\",menu_prompt,menu_timeout,menu_timeout_prompt,menu_invalid_prompt,menu_repeat,menu_time_check,call_time_id,track_in_vdac,custom_dialplan_entry,tracking_group,dtmf_log from vicidial_call_menu where menu_id=\"$source_menu\";"; + $stmt="INSERT INTO vicidial_call_menu (menu_id,menu_name,menu_prompt,menu_timeout,menu_timeout_prompt,menu_invalid_prompt,menu_repeat,menu_time_check,call_time_id,track_in_vdac,custom_dialplan_entry,tracking_group,dtmf_log,dtmf_field) SELECT \"$menu_id\",\"$menu_name\",menu_prompt,menu_timeout,menu_timeout_prompt,menu_invalid_prompt,menu_repeat,menu_time_check,call_time_id,track_in_vdac,custom_dialplan_entry,tracking_group,dtmf_log,dtmf_field from vicidial_call_menu where menu_id=\"$source_menu\";"; $rslt=mysql_query($stmt, $link); $stmtA="INSERT INTO vicidial_call_menu_options (menu_id,option_value,option_description,option_route,option_route_value,option_route_value_context) SELECT \"$menu_id\",option_value,option_description,option_route,option_route_value,option_route_value_context from vicidial_call_menu_options where menu_id='$source_menu';"; @@ -15135,7 +15144,7 @@ if ($ADD==4511) { echo "
CALL MENU MODIFIED: $menu_id\n"; - $stmt="UPDATE vicidial_call_menu set menu_name='$menu_name',menu_prompt='$menu_prompt',menu_timeout='$menu_timeout',menu_timeout_prompt='$menu_timeout_prompt',menu_invalid_prompt='$menu_invalid_prompt',menu_repeat='$menu_repeat',menu_time_check='$menu_time_check',call_time_id='$call_time_id',track_in_vdac='$track_in_vdac',custom_dialplan_entry='$custom_dialplan_entry',tracking_group='$tracking_group',dtmf_log='$dtmf_log' where menu_id='$menu_id';"; + $stmt="UPDATE vicidial_call_menu set menu_name='$menu_name',menu_prompt='$menu_prompt',menu_timeout='$menu_timeout',menu_timeout_prompt='$menu_timeout_prompt',menu_invalid_prompt='$menu_invalid_prompt',menu_repeat='$menu_repeat',menu_time_check='$menu_time_check',call_time_id='$call_time_id',track_in_vdac='$track_in_vdac',custom_dialplan_entry='$custom_dialplan_entry',tracking_group='$tracking_group',dtmf_log='$dtmf_log',dtmf_field='$dtmf_field' where menu_id='$menu_id';"; $rslt=mysql_query($stmt, $link); $h=0; @@ -25220,7 +25229,7 @@ if ($ADD==3511) echo "\n"; + echo "$NWB#vicidial_call_menu-dtmf_log$NWE     Log Field: \n"; + echo "$NWB#vicidial_call_menu-dtmf_field$NWE\n"; echo "\n"; echo "\n";
\n"; echo ""; - $stmt="SELECT menu_name,menu_prompt,menu_timeout,menu_timeout_prompt,menu_invalid_prompt,menu_repeat,menu_time_check,call_time_id,track_in_vdac,custom_dialplan_entry,tracking_group,dtmf_log from vicidial_call_menu where menu_id='$menu_id';"; + $stmt="SELECT menu_name,menu_prompt,menu_timeout,menu_timeout_prompt,menu_invalid_prompt,menu_repeat,menu_time_check,call_time_id,track_in_vdac,custom_dialplan_entry,tracking_group,dtmf_log,dtmf_field from vicidial_call_menu where menu_id='$menu_id';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $menu_name = $row[0]; @@ -25235,6 +25244,7 @@ if ($ADD==3511) $custom_dialplan_entry= $row[9]; $tracking_group = $row[10]; $dtmf_log = $row[11]; + $dtmf_field = $row[12]; echo "
MODIFY A CALL MENU RECORD: $menu_id
\n"; @@ -25288,7 +25298,8 @@ if ($ADD==3511) { echo "\n"; } - echo "$NWB#vicidial_call_menu-dtmf_log$NWE
Call Menu Options: