diff --git a/UPGRADE b/UPGRADE index 1fa24813..1156ad76 100644 --- a/UPGRADE +++ b/UPGRADE @@ -162,6 +162,23 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom 37. Rewrote Leave-3way function for external calling to work more reliably on high load systems. +38. Added several new features to inbound call handling including: + - announce place in line + - announce estimated hold time + - welcome message options + - options for call routing when estimated hold time is too high + +39. Added DID call routing to allow for basic routing of calls to phones, + extensions, voicemail and VICIDIAL inbound groups without editing the + extensions.conf dialplan. + *requires initial adding one line to dialplan of inbound context: + exten => _X.,1,AGI(agi-DID_route.agi) + *as well as a few more lines in your VICIDIAL default context: + ; DID forwarded calls + exten => _99909*.,1,Answer + exten => _99909*.,2,AGI(agi-VDAD_ALL_inbound.agi) + exten => _99909*.,3,Hangup + diff --git a/agi/VDL_CID_lookup.agi b/agi/VDL_CID_lookup.agi new file mode 100644 index 00000000..af753e08 --- /dev/null +++ b/agi/VDL_CID_lookup.agi @@ -0,0 +1,266 @@ +#!/usr/bin/perl +# +# VDL_CID_lookup.agi version 0.1 *DBI-version* +# +# runs after a call goes through AMD in extensions.conf to send the call on to +# it's proper destination +# +# You need to put lines similar to those below in your extensions.conf file: +# +# ; VICIDIAL_auto_dialer transfer script AMD with Load Balanced: +# exten => 8369,1,Ringing +# exten => 8369,2,Wait(1) +# exten => 8369,3,Answer +# exten => 8369,4,AGI(VDL_CID_lookup.agi) +# exten => 8369,5,AGI(agi-VDAD_ALL_inbound.agi,CID-----LB-----IN_TEST-----7275551212-----Closer-----park----------999-----1) +# exten => 8369,6,Hangup +# exten => 8369,7,AGI(call_logCID.agi,${EXTEN}-----${CALLERID}-----${CALLERIDNUM}-----${CALLERIDNAME}) +# exten => 8369,8,AGI(agi-VDADinbound_NI_DNC_CIDlookup.agi) +# exten => 8369,9,Hangup +# +# +# Copyright (C) 2008 Matt Florell LICENSE: GPLv2 +# +# changes: +# 80930-0226 - first build +# + +$script = 'VDL_CID_lookup.agi'; + +($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) {$Fhour = "0$hour";} +if ($min < 10) {$min = "0$min";} +if ($sec < 10) {$sec = "0$sec";} + +$now_date_epoch = time(); +$now_date = "$year-$mon-$mday $hour:$min:$sec"; + +# default path to astguiclient configuration file: +$PATHconf = '/etc/astguiclient.conf'; + +open(conf, "$PATHconf") || die "can't open $PATHconf: $!\n"; +@conf = ; +close(conf); +$i=0; +foreach(@conf) + { + $line = $conf[$i]; + $line =~ s/ |>|\n|\r|\t|\#.*|;.*//gi; + if ( ($line =~ /^PATHhome/) && ($CLIhome < 1) ) + {$PATHhome = $line; $PATHhome =~ s/.*=//gi;} + if ( ($line =~ /^PATHlogs/) && ($CLIlogs < 1) ) + {$PATHlogs = $line; $PATHlogs =~ s/.*=//gi;} + if ( ($line =~ /^PATHagi/) && ($CLIagi < 1) ) + {$PATHagi = $line; $PATHagi =~ s/.*=//gi;} + if ( ($line =~ /^PATHweb/) && ($CLIweb < 1) ) + {$PATHweb = $line; $PATHweb =~ s/.*=//gi;} + if ( ($line =~ /^PATHsounds/) && ($CLIsounds < 1) ) + {$PATHsounds = $line; $PATHsounds =~ s/.*=//gi;} + if ( ($line =~ /^PATHmonitor/) && ($CLImonitor < 1) ) + {$PATHmonitor = $line; $PATHmonitor =~ s/.*=//gi;} + if ( ($line =~ /^VARserver_ip/) && ($CLIserver_ip < 1) ) + {$VARserver_ip = $line; $VARserver_ip =~ s/.*=//gi;} + if ( ($line =~ /^VARDB_server/) && ($CLIDB_server < 1) ) + {$VARDB_server = $line; $VARDB_server =~ s/.*=//gi;} + if ( ($line =~ /^VARDB_database/) && ($CLIDB_database < 1) ) + {$VARDB_database = $line; $VARDB_database =~ s/.*=//gi;} + if ( ($line =~ /^VARDB_user/) && ($CLIDB_user < 1) ) + {$VARDB_user = $line; $VARDB_user =~ s/.*=//gi;} + if ( ($line =~ /^VARDB_pass/) && ($CLIDB_pass < 1) ) + {$VARDB_pass = $line; $VARDB_pass =~ s/.*=//gi;} + if ( ($line =~ /^VARDB_port/) && ($CLIDB_port < 1) ) + {$VARDB_port = $line; $VARDB_port =~ s/.*=//gi;} + $i++; + } + +if (!$VARDB_port) {$VARDB_port='3306';} +if (!$AGILOGfile) {$AGILOGfile = "$PATHlogs/agiout.$year-$mon-$mday";} + +use DBI; +use Asterisk::AGI; +$AGI = new Asterisk::AGI; + + +$dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VARDB_user", "$VARDB_pass") + or die "Couldn't connect to database: " . DBI->errstr; + +### Grab Server values from the database +$stmtA = "SELECT agi_output FROM servers where server_ip = '$VARserver_ip';"; +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +$sthArows=$sthA->rows; +$rec_count=0; +while ($sthArows > $rec_count) + { + $AGILOG = '0'; + @aryA = $sthA->fetchrow_array; + $DBagi_output = "$aryA[0]"; + if ($DBagi_output =~ /STDERR/) {$AGILOG = '1';} + if ($DBagi_output =~ /FILE/) {$AGILOG = '2';} + if ($DBagi_output =~ /BOTH/) {$AGILOG = '3';} + $rec_count++; + } +$sthA->finish(); + + +### begin parsing run-time options ### +if (length($ARGV[0])>1) +{ + if ($AGILOG) {$agi_string = "Perl Environment Dump:"; &agi_output;} + $i=0; + while ($#ARGV >= $i) + { + $args = "$args $ARGV[$i]"; + if ($AGILOG) {$agi_string = "$i|$ARGV[$i]"; &agi_output;} + $i++; + } + + if ($args =~ /--help/i) + { + print "allowed run time options:\n [-q] = quiet\n [-t] = test\n [-debug] = verbose debug messages\n\n"; + } + else + { + if ($args =~ /-V/i) + { + $V=1; + } + if ($args =~ /-debug/i) + { + $DG=1; + } + if ($args =~ /-dbAVS/i) + { + $DGA=1; + } + if ($args =~ /-q/i) + { + $q=1; + $Q=1; + } + if ($args =~ /-t/i) + { + $TEST=1; + $T=1; + } + } +} + + +$|=1; +while() +{ + chomp; + last unless length($_); + if ($AGILOG) + { + if (/^agi_(\w+)\:\s+(.*)$/) + { + $AGI{$1} = $2; + } + } + + if (/^agi_uniqueid\:\s+(.*)$/) {$unique_id = $1; $uniqueid = $unique_id;} + if (/^agi_priority\:\s+(.*)$/) {$priority = $1;} + if (/^agi_channel\:\s+(.*)$/) {$channel = $1;} + if (/^agi_extension\:\s+(.*)$/) {$extension = $1;} + if (/^agi_type\:\s+(.*)$/) {$type = $1;} + if (/^agi_callerid\:\s+(.*)$/) {$callerid = $1; $calleridnum = $callerid;} + if (/^agi_calleridname\:\s+(.*)$/) {$calleridname = $1;} +} + +if ( (length($callerid)>20) && ($callerid =~ /\"\S\S\S\S\S\S\S\S\S\S\S\S\S\S\S\S\S\S/) ) + { + $callerid =~ s/^\"//gi; + $callerid =~ s/\".*$//gi; + } +if ( ( +(length($calleridname)>5) && ( (!$callerid) or ($callerid =~ /unknown|private|00000000/i) or ($callerid =~ /5551212/) ) +) or ( (length($calleridname)>17) && ($calleridname =~ /\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d/) ) ) + { + $callerid = $calleridname; + } + + +if ($AGILOG) {$agi_string = "AGI Environment Dump:"; &agi_output;} + +foreach $i (sort keys %AGI) +{ + if ($AGILOG) {$agi_string = " -- $i = $AGI{$i}"; &agi_output;} +} + +if ($AGILOG) {$agi_string = "AGI Variables: |$unique_id|$channel|$extension|$type|$callerid|BUS: $business_hours|"; &agi_output;} + +$callerid =~ s/\"//gi; + + + +### find out if phone number exists in the vicidial_list table +$stmtA = "SELECT count(*) FROM vicidial_list where phone_number = '$callerid' and list_id NOT IN('99999');"; +$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; + $VDL_count = "$aryA[0]"; + } +$sthA->finish(); + +if ($VDL_count < 1) + { + $priority = ($priority + 3); + if ($AGILOG) {$agi_string = "-- cid_lookup finish: |$priority|$callerid"; &agi_output;} + print "SET PRIORITY $priority\n"; + checkresult($result); + } + +$dbhA->disconnect(); + +exit; + + + + + + +sub checkresult { + my ($res) = @_; + my $retval; + $tests++; + chomp $res; + if ($res =~ /^200/) { + $res =~ /result=(-?\d+)/; + if (!length($1)) { + # print STDERR "FAIL ($res)\n"; + $fail++; + } else { + # print STDERR "PASS ($1)\n"; + $pass++; + } + } else { + # print STDERR "FAIL (unexpected result '$res')\n"; + $fail++; + } +} + + +sub agi_output +{ +if ($AGILOG >=2) + { + ### open the log file for writing ### + open(Lout, ">>$AGILOGfile") + || die "Can't open $AGILOGfile: $!\n"; + print Lout "$now_date|$script|$agi_string\n"; + close(Lout); + } + ### send to STDERR writing ### +if ( ($AGILOG == '1') || ($AGILOG == '3') ) + {print STDERR "$now_date|$script|$agi_string\n";} +$agi_string=''; +} diff --git a/agi/agi-DID_route.agi b/agi/agi-DID_route.agi new file mode 100644 index 00000000..0f0c1fc0 --- /dev/null +++ b/agi/agi-DID_route.agi @@ -0,0 +1,370 @@ +#!/usr/bin/perl +# +# agi-DID_route.agi version 2.0.5 +# +# runs when a call comes into an inbound context on a trunk. This script will +# send the calls to various places depending on the settings for each DID. +# +# +# You need to put a line similar to this below in your extensions.conf file: +# ;inbound DID catch-all: +#exten => _X.,1,AGI(agi-DID_route.agi) +# +# Copyright (C) 2008 Matt Florell LICENSE: AGPLv2 +# +# changes: +# 81007-0324 - First Build +# + +$script = 'agi-DID_route.agi'; +$dtmf_silent_prefix = '7'; +$at='@'; +$S='*'; + + +($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) {$Fhour = "0$hour";} +if ($min < 10) {$min = "0$min";} +if ($sec < 10) {$sec = "0$sec";} + +$hm = "$hour$min"; +$hm = ($hm + 0); + +$now_date_epoch = time(); +$now_date = "$year-$mon-$mday $hour:$min:$sec"; +$CLInow_date = "$year-$mon-$mday\\ $hour:$min:$sec"; +$start_time=$now_date; + $CIDdate = "$mon$mday$hour$min$sec"; + $tsSQLdate = "$year$mon$mday$hour$min$sec"; + $SQLdate = "$year-$mon-$mday $hour:$min:$sec"; + $SQLdateBEGIN = $SQLdate; + +# default path to astguiclient configuration file: +$PATHconf = '/etc/astguiclient.conf'; + +open(conf, "$PATHconf") || die "can't open $PATHconf: $!\n"; +@conf = ; +close(conf); +$i=0; +foreach(@conf) + { + $line = $conf[$i]; + $line =~ s/ |>|\n|\r|\t|\#.*|;.*//gi; + if ( ($line =~ /^PATHhome/) && ($CLIhome < 1) ) + {$PATHhome = $line; $PATHhome =~ s/.*=//gi;} + if ( ($line =~ /^PATHlogs/) && ($CLIlogs < 1) ) + {$PATHlogs = $line; $PATHlogs =~ s/.*=//gi;} + if ( ($line =~ /^PATHagi/) && ($CLIagi < 1) ) + {$PATHagi = $line; $PATHagi =~ s/.*=//gi;} + if ( ($line =~ /^PATHweb/) && ($CLIweb < 1) ) + {$PATHweb = $line; $PATHweb =~ s/.*=//gi;} + if ( ($line =~ /^PATHsounds/) && ($CLIsounds < 1) ) + {$PATHsounds = $line; $PATHsounds =~ s/.*=//gi;} + if ( ($line =~ /^PATHmonitor/) && ($CLImonitor < 1) ) + {$PATHmonitor = $line; $PATHmonitor =~ s/.*=//gi;} + if ( ($line =~ /^VARserver_ip/) && ($CLIserver_ip < 1) ) + {$VARserver_ip = $line; $VARserver_ip =~ s/.*=//gi;} + if ( ($line =~ /^VARDB_server/) && ($CLIDB_server < 1) ) + {$VARDB_server = $line; $VARDB_server =~ s/.*=//gi;} + if ( ($line =~ /^VARDB_database/) && ($CLIDB_database < 1) ) + {$VARDB_database = $line; $VARDB_database =~ s/.*=//gi;} + if ( ($line =~ /^VARDB_user/) && ($CLIDB_user < 1) ) + {$VARDB_user = $line; $VARDB_user =~ s/.*=//gi;} + if ( ($line =~ /^VARDB_pass/) && ($CLIDB_pass < 1) ) + {$VARDB_pass = $line; $VARDB_pass =~ s/.*=//gi;} + if ( ($line =~ /^VARDB_port/) && ($CLIDB_port < 1) ) + {$VARDB_port = $line; $VARDB_port =~ s/.*=//gi;} + $i++; + } + +if (!$VARDB_port) {$VARDB_port='3306';} +if (!$AGILOGfile) {$AGILOGfile = "$PATHlogs/agiout.$year-$mon-$mday";} +if (!$DIDLOGfile) {$DIDLOGfile = "$PATHlogs/didin.$year-$mon-$mday";} + +use DBI; +use Time::HiRes ('gettimeofday','usleep','sleep'); # necessary to have perl sleep command of less than one second +use Asterisk::AGI; +$AGI = new Asterisk::AGI; + +$dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VARDB_user", "$VARDB_pass") + or die "Couldn't connect to database: " . DBI->errstr; + +### Grab Server values from the database +$stmtA = "SELECT agi_output,local_gmt FROM servers where server_ip = '$VARserver_ip';"; +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +$sthArows=$sthA->rows; +$rec_count=0; +while ($sthArows > $rec_count) + { + $AGILOG = '0'; + @aryA = $sthA->fetchrow_array; + $DBagi_output = "$aryA[0]"; + $local_gmt = "$aryA[0]"; + if ($DBagi_output =~ /STDERR/) {$AGILOG = '1';} + if ($DBagi_output =~ /FILE/) {$AGILOG = '2';} + if ($DBagi_output =~ /BOTH/) {$AGILOG = '3';} + $rec_count++; + } +$sthA->finish(); + +$|=1; +while() +{ + chomp; + last unless length($_); + if ($AGILOG) + { + if (/^agi_(\w+)\:\s+(.*)$/) + { + $AGI{$1} = $2; + } + } + + if (/^agi_uniqueid\:\s+(.*)$/) {$unique_id = $1; $uniqueid = $unique_id;} + if (/^agi_channel\:\s+(.*)$/) {$channel = $1;} + if (/^agi_extension\:\s+(.*)$/) {$extension = $1;} + if (/^agi_type\:\s+(.*)$/) {$type = $1;} + if (/^agi_callerid\:\s+(.*)$/) {$callerid = $1;} + if (/^agi_calleridname\:\s+(.*)$/) {$calleridname = $1;} +} + + +if ( ($callerid =~ /\".*\"/) && ( (!$calleridname) or ($calleridname =~ /unknown/) ) ) + { + $calleridname = $callerid; + $calleridname =~ s/\<\d\d\d\d\d\d\d\d\d\d\>//gi; + $calleridname =~ s/\"|\" //gi; + } + + $callerid =~ s/\D//gi; + $calleridname =~ s/unknown//gi; +if ( (!$callerid) or ($callerid =~ /unknown/) ) + {$callerid = $calleridname;} + + +### Grab DID values from the database +$stmtA = "SELECT did_id,did_pattern,did_description,did_active,did_route,extension,exten_context,voicemail_ext,phone,server_ip,user,user_unavailable_action,user_route_settings_ingroup FROM vicidial_inbound_dids where did_pattern = '$extension';"; +$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; + $did_id = $aryA[0]; + $did_pattern = $aryA[1]; + $did_description = $aryA[2]; + $did_active = $aryA[3]; + $did_route = $aryA[4]; + $did_extension = $aryA[5]; + $exten_context = $aryA[6]; + $voicemail_ext = $aryA[7]; + $phone = $aryA[8]; + $did_server_ip = $aryA[9]; + $user = $aryA[10]; + $user_unavailable_action = $aryA[11]; + $user_route_settings_ingroup = $aryA[12]; + } +$sthA->finish(); + +if ($AGILOG) {$did_string = "$SQLdate|$uniqueid|$channel|$extension|$callerid|$calleridname|$did_id|$did_route|"; &did_output;} + +if ($sthArows < 1) + { + ### nothing found, so exit script + exit; + } + +### Grab Server values from the database +$cbc=0; +$stmtA = "SELECT voicemail_dump_exten,ext_context,answer_transfer_agent,local_gmt,asterisk_version,max_vicidial_trunks FROM servers where server_ip = '$VARserver_ip';"; +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +$sthArows=$sthA->rows; +while ($sthArows > $cbc) + { + @aryA = $sthA->fetchrow_array; + + $DBvoicemail_dump_exten = "$aryA[0]"; + $DBext_context = "$aryA[1]"; + $DBanswer_transfer_agent = "$aryA[2]"; + $DBSERVER_GMT = "$aryA[3]"; + $DBasterisk_version = "$aryA[4]"; + $DBmax_vicidial_trunks = "$aryA[5]"; + if ($DBvoicemail_dump_exten) {$voicemail_dump_exten = $DBvoicemail_dump_exten;} + if ($DBext_context) {$ext_context = $DBext_context;} + if ($DBanswer_transfer_agent) {$answer_transfer_agent = $DBanswer_transfer_agent;} + if ($DBSERVER_GMT) {$SERVER_GMT = $DBSERVER_GMT;} + if ($DBasterisk_version) {$AST_ver = $DBasterisk_version;} + if ($DBmax_vicidial_trunks) {$max_vicidial_trunks = $DBmax_vicidial_trunks;} + $cbc++; + } +$sthA->finish(); + + + + + +### Route call to a VICIDIAL-defined phone +if ($did_route =~ /PHONE/) + { + $stmtA = "SELECT dialplan_number,voicemail_id,protocol,ext_context FROM phones where server_ip = '$did_server_ip' and extension='$phone';"; + $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; + $dialplan_number = "$aryA[0]"; + $voicemail_id = "$aryA[1]"; + $protocol = "$aryA[2]"; + $ext_context = "$aryA[3]"; + } + $sthA->finish(); + + if ($protocol =~ /EXTERNAL/) + { + ### format the remote server dialstring to get the call to the overflow agent meetme room + if( $did_server_ip =~ m/(\S+)\.(\S+)\.(\S+)\.(\S+)/ ) + { + $a = leading_zero($1); + $b = leading_zero($2); + $c = leading_zero($3); + $d = leading_zero($4); + $ServerString = "$a$S$b$S$c$S$d$S"; + } + + $did_extension = "$ServerString$dialplan_number"; + $did_route = 'EXTEN'; + } + else + { + #$AGI->exec("Dial", "$protocol/$phone|30"); + print "EXEC Dial \"$protocol/$phone|30\"\n"; + checkresult($result); + if ($AGILOG) {$agi_string = "Done dialing $protocol/$phone |$result|$pass|$fail|$stmtA|"; &agi_output;} + + exit; + } + } + + +### Route call to a voicemail box on the system +if ($did_route =~ /VOICEMAIL/) + { + ### format the remote server dialstring to get the call to the overflow agent meetme room + if( $did_server_ip =~ m/(\S+)\.(\S+)\.(\S+)\.(\S+)/ ) + { + $a = leading_zero($1); + $b = leading_zero($2); + $c = leading_zero($3); + $d = leading_zero($4); + $ServerString = "$a$S$b$S$c$S$d$S"; + } + $did_extension = "$ServerString$voicemail_dump_exten$voicemail_ext"; + $did_route = 'EXTEN'; + } + + +### Route call to a VICIDIAL Inbound Group +if ($did_route =~ /IN_GROUP/) + { + $did_extension = "99909$S$did_id$S"; + $exten_context = $ext_context; + $did_route = 'EXTEN'; + } + + +### Route call to an extension on the system +if ($did_route =~ /EXTEN/) + { + $XFERexten = "$did_extension"; + if ($AGILOG) {$agi_string = "exiting the DID app, transferring call to $XFERexten @ $exten_context"; &agi_output;} + print "SET CONTEXT $exten_context\n"; + checkresult($result); + print "SET EXTENSION $XFERexten\n"; + checkresult($result); + print "SET PRIORITY 1\n"; + checkresult($result); + + exit; + } + + + + +### Route call to a logged-in VICIDIAL agent +if ($did_route =~ /AGENT/) + { + # THIS FEATURE NOT YET DONE + exit; + } + + + + + +######### SUBROUTINES ################# + +sub checkresult +{ + $pass=0; $fail=0; + my ($res) = @_; + my $retval; + $tests++; + chomp $res; + if ($res =~ /^200/) { + $res =~ /result=(-?\d+)/; + if (!length($1)) { + # print STDERR "FAIL ($res)\n"; + $fail++; + } else { + # print STDERR "PASS ($1)\n"; + $pass++; + } + } else { + # print STDERR "FAIL (unexpected result '$res')\n"; + $fail++; + } +} + +sub leading_zero($) +{ + $_ = $_[0]; + s/^(\d)$/0$1/; + s/^(\d\d)$/0$1/; + return $_; +} # End of the leading_zero() routine. + +sub agi_output +{ +if ($AGILOG >=2) + { + ### open the log file for writing ### + open(Lout, ">>$AGILOGfile") + || die "Can't open $AGILOGfile: $!\n"; + print Lout "$now_date|$script|$agi_string\n"; + close(Lout); + } + ### send to STDERR writing ### +if ( ($AGILOG == '1') || ($AGILOG == '3') ) + {print STDERR "$now_date|$script|$agi_string\n";} +$agi_string=''; +} + +sub did_output +{ +if ($AGILOG >=2) + { + ### open the log file for writing ### + open(Dout, ">>$DIDLOGfile") + || die "Can't open $DIDLOGfile: $!\n"; + print Dout "$did_string\n"; + close(Dout); + } +$did_string=''; +} diff --git a/agi/agi-VDAD_ALL_inbound.agi b/agi/agi-VDAD_ALL_inbound.agi index a6991b99..a1518279 100644 --- a/agi/agi-VDAD_ALL_inbound.agi +++ b/agi/agi-VDAD_ALL_inbound.agi @@ -46,6 +46,18 @@ #exten => 1234,n,AGI(agi-VDAD_ALL_inbound.agi,CID-----LB-----INB-----7274515134-----Closer-----park----------999-----1-----OUTB) #exten => 1234,n,Hangup # +#; inbound VICIDIAL transfer calls [can arrive through PRI T1 crossover, IAX or SIP channel] +#exten => _90009.,1,Answer ; Answer the line +#exten => _90009.,2,AGI(agi-VDAD_ALL_inbound.agi,CLOSER-----LB-----CL_TESTCAMP-----7275551212-----Closer-----park----------999-----1) +#exten => _90009.,3,Hangup +#exten => _990009.,1,Answer ; Answer the line +#exten => _990009.,2,AGI(agi-VDAD_ALL_inbound.agi,CLOSER-----LB-----CL_TESTCAMP-----7275551212-----Closer-----park----------999-----1) +#exten => _990009.,3,Hangup +#; DID forwarded calls +#exten => _99909*.,1,Answer +#exten => _99909*.,2,AGI(agi-VDAD_ALL_inbound.agi) +#exten => _99909*.,3,Hangup +# # Copyright (C) 2008 Matt Florell LICENSE: AGPLv2 # # changes: @@ -69,6 +81,8 @@ # 80525-1040 - added ability to convert IVR status inbound calls to LIVE in-group calls # 80630-2232 - added queue_log logging of inbound calls # 80821-0133 - fixed non-play issue with hold message +# 80918-0505 - Added place in line and estimated time on hold +# 81002-1120 - Added processing for DID forwarded calls # $script = 'agi-VDAD_ALL_inbound.agi'; @@ -245,6 +259,33 @@ if ( (!$callerid) or ($callerid =~ /unknown/) ) +##### special processing for DID forwarded calls "99909*1*" +if ($extension =~ /^999\d\d\*/) + { + @EXT_vars = split(/\*/, $extension); + + $referring_extension = $EXT_vars[0]; # initial extension sent + $did_id = $EXT_vars[1]; # the DID ID to grab settings from + + ### Grab DID values from the database + $stmtA = "SELECT call_handle_method,agent_search_method,group_id,did_pattern,list_id,phone_code,campaign_id FROM vicidial_inbound_dids where did_id = '$did_id';"; + $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; + $call_handle_method = $aryA[0]; + $agent_search_method = $aryA[1]; + $channel_group = $aryA[2]; + $inbound_number = $aryA[3]; + $list_id = $aryA[4]; + $phone_code = $aryA[5]; + $Scampaign_id = $aryA[6]; + } + $sthA->finish(); + } + if ($call_handle_method =~ /^CLOSER/) { ### allow for internal PRI/IAX/SIP transfer data string "90009*CL_uk3survy_*8301*10000123*universal*7275551212*1234*" @@ -378,9 +419,11 @@ while ($sthArows > $cbc) } $sthA->finish(); + + ### Grab inbound groups values from the database $cbc=0; -$stmtA = "SELECT call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,drop_call_seconds,drop_action,drop_exten,next_agent_call,voicemail_ext,queue_priority,drop_inbound_group,afterhours_xfer_group FROM vicidial_inbound_groups where group_id = '$channel_group';"; +$stmtA = "SELECT call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,drop_call_seconds,drop_action,drop_exten,next_agent_call,voicemail_ext,queue_priority,drop_inbound_group,afterhours_xfer_group,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message FROM vicidial_inbound_groups where group_id = '$channel_group';"; $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; $sthArows=$sthA->rows; @@ -409,6 +452,21 @@ while ($sthArows > $cbc) $queue_priority = "$aryA[16]"; $drop_inbound_group = "$aryA[17]"; $afterhours_xfer_group = "$aryA[18]"; + $play_place_in_line = "$aryA[19]"; + $play_estimate_hold_time = "$aryA[20]"; + $hold_time_option = "$aryA[21]"; + $hold_time_option_seconds = "$aryA[22]"; + $hold_time_option_exten = "$aryA[23]"; + $hold_time_option_voicemail = "$aryA[24]"; + $hold_time_option_xfer_group = "$aryA[25]"; + $hold_time_option_callback_filename = "$aryA[26]"; + $hold_time_option_callback_list_id = "$aryA[27]"; + $hold_recall_xfer_group = "$aryA[28]"; + $no_delay_call_route = "$aryA[29]"; + if ($hold_time_option =~ /DROP_ACTION/) + {$hold_time_option = $drop_action;} + $play_welcome_message = "$aryA[30]"; + $cbc++; } $sthA->finish(); @@ -477,7 +535,7 @@ if ($call_handle_method =~ /LOOKUP/) } $cbc=0; - $stmtA= "SELECT lead_id from vicidial_list where phone_number='$phone_number' $listSQL order by modify_date limit 1;"; + $stmtA= "SELECT lead_id from vicidial_list where phone_number='$phone_number' $listSQL order by last_local_call_time limit 1;"; if ($AGILOG) {$agi_string = "VDAD vicidial_list search |$phone_number|$stmtA|"; &agi_output;} $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; @@ -584,10 +642,12 @@ if ( ($hm < $ct_default_start) || ($hm > $ct_default_stop) ) } if (length($DROPexten)>0) { ### if DROP extension is defined then send the dropped call there instead of hangup + if ($no_delay_call_route =~ /N/) + { + $AGI->stream_file('ding'); # stop music-on-hold process - $AGI->stream_file('ding'); # stop music-on-hold process - - sleep(1); + sleep(1); + } if ($AGILOG) {$agi_string = "exiting the VDAD app after hours, transferring call to $DROPexten"; &agi_output;} print "SET CONTEXT $ext_context\n"; @@ -651,11 +711,14 @@ if ( ($hm < $ct_default_start) || ($hm > $ct_default_stop) ) ##### PLAY WELCOME MESSAGE ##### -if ($welcome_message_filename !~ /---NONE---/) +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 ($play_welcome_message =~ /IF_WAIT_ONLY/) + {$if_wait_play_welcome=1;} +else + {$if_wait_play_welcome=0;} $vci=0; @@ -809,6 +872,7 @@ if ($sthArows > 0) $sthA->finish(); if ($AGILOG) {$agi_string = "-- VDCL : |$insert_lead_id|$insert_xfer_id|$insert_close_id|insert to vicidial_closer_log"; &agi_output;} +$wait_in_queue=1; $drop_timer=0; $drop_seconds=0; $hold_message_counter=($prompt_interval - 10); @@ -817,7 +881,7 @@ $hold_tone_counter=0; ############################################ ### Loop to try to send call to an agent ### -while ($drop_timer <= $DROP_TIME) +while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) ) { $channel_status = $AGI->channel_status("$channel"); if ($channel_status < 1) @@ -1026,18 +1090,18 @@ if ($agent_search_method =~ /^SO|^LO/) } if ($call_handle_method =~ /CLOSER|DIGITID$/) - { + { $stmtA = "UPDATE vicidial_xfer_log set closer='$VDADuser' where lead_id = '$insert_lead_id' order by call_date desc limit 1;"; $affected_rows = $dbhA->do($stmtA); if ($AGILOG) {$agi_string = "-- VDXL XFER vicidial_xfer_log update: |$affected_rows|$insert_lead_id|$VDADuser\n|$stmtA|"; &agi_output;} - } + } $stmtA = "UPDATE vicidial_closer_log set user='$VDADuser' where lead_id='$insert_lead_id' order by call_date desc limit 1;"; $affected_rows = $dbhA->do($stmtA); if ($AGILOG) {$agi_string = "-- closer log : |$affected_rows|$insert_lead_id|$insert_close_id|\n|$stmtA|"; &agi_output;} ### if agent alert exten is not disabled, then trigger the alert and wait - if ($agent_alert_exten !~ /X/i) + if ( ($agent_alert_exten !~ /X/i) && ($no_delay_call_route !~ /Y/i) ) { $VHqueryCID = "VH$CIDdate$VDADconf_exten"; @@ -1051,7 +1115,10 @@ if ($agent_search_method =~ /^SO|^LO/) if ($AGILOG) {$agi_string = "exiting VDAD app, transferring call to $VDADconf_exten"; &agi_output;} - $AGI->stream_file('ding'); # stop music-on-hold process + if ($no_delay_call_route =~ /N/) + { + $AGI->stream_file('ding'); # stop music-on-hold process + } ### update calls_today for vicidial_live_inbound_agents ### $stmtA = "SELECT calls_today from vicidial_inbound_group_agents WHERE user='$VDADuser' and group_id='$channel_group';"; @@ -1078,7 +1145,8 @@ if ($agent_search_method =~ /^SO|^LO/) &trigger_transfer_process; - usleep(1*500*1000); + if ($no_delay_call_route !~ /Y/i) + {usleep(1*500*1000);} print "SET CONTEXT $ext_context\n"; checkresult($result); @@ -1323,7 +1391,7 @@ if ($agent_search_method =~ /^LO|^LB/) $VDADremDIALstr .= "$VDADconf_exten"; ### if agent alert exten is not disabled, then trigger the alert and wait - if ($agent_alert_exten !~ /X/i) + if ( ($agent_alert_exten !~ /X/i) && ($no_delay_call_route !~ /Y/i) ) { $VHqueryCID = "VH$CIDdate$VDADconf_exten"; @@ -1337,7 +1405,10 @@ if ($agent_search_method =~ /^LO|^LB/) if ($AGILOG) {$agi_string = "exiting VDAD app, transferring call to $VDADremDIALstr"; &agi_output;} - $AGI->stream_file('ding'); # stop music-on-hold process + if ($no_delay_call_route =~ /N/) + { + $AGI->stream_file('ding'); # stop music-on-hold process + } ### update calls_today for vicidial_live_inbound_agents ### $stmtA = "SELECT calls_today from vicidial_inbound_group_agents WHERE user='$VDADuser' and group_id='$channel_group';"; @@ -1364,7 +1435,8 @@ if ($agent_search_method =~ /^LO|^LB/) &trigger_transfer_process; - usleep(1*500*1000); + if ($no_delay_call_route !~ /Y/i) + {usleep(1*500*1000);} print "SET CONTEXT $ext_context\n"; checkresult($result); @@ -1424,7 +1496,97 @@ if ($agent_search_method =~ /^LO|^LB/) } } -if ($hold_message_counter > $prompt_interval) + +if ($hold_recall_xfer_group !~ /NONE/) + { + $now_date_epoch = time(); + $FDtarget = ($now_date_epoch - 86400); + ($Fsec,$Fmin,$Fhour,$Fmday,$Fmon,$Fyear,$Fwday,$Fyday,$Fisdst) = localtime($FDtarget); + $Fyear = ($Fyear + 1900); + $Fmon++; + if ($Fmon < 10) {$Fmon = "0$Fmon";} + if ($Fmday < 10) {$Fmday = "0$Fmday";} + if ($Fhour < 10) {$Fhour = "0$Fhour";} + if ($Fmin < 10) {$Fmin = "0$Fmin";} + if ($Fsec < 10) {$Fsec = "0$Fsec";} + $hrxgSQLdate = "$Fyear-$Fmon-$Fmday $Fhour:$Fmin:$Fsec"; + + $stmtA = "SELECT count(*) FROM vicidial_closer_log where call_date > \"$hrxgSQLdate\" and phone_number='$phone_number';"; + if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;} + $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; + $hrxg_count = "$aryA[0]"; + } + $sthA->finish(); + + if ($hrxg_count > 1) + { + $S='*'; + $DROPexten = "90009*$hold_recall_xfer_group$S$S$insert_lead_id$S$S$phone_number$S$fronter$S"; + + if ($no_delay_call_route =~ /N/) + { + $AGI->stream_file('ding'); # stop music-on-hold process + sleep(1); + } + + if ($AGILOG) {$agi_string = "exiting the VDAD app, transferring call to $DROPexten"; &agi_output;} + print "SET CONTEXT $ext_context\n"; + checkresult($result); + print "SET EXTENSION $DROPexten\n"; + checkresult($result); + print "SET PRIORITY 1\n"; + checkresult($result); + + $stmtA = "DELETE FROM vicidial_auto_calls where callerid='$callerid' and server_ip='$VARserver_ip' order by call_time desc limit 1;"; + $affected_rows = $dbhA->do($stmtA); + if ($AGILOG) {$agi_string = "-- VDCL vac record deleted: |$affected_rows| $VDADcampaign|"; &agi_output;} + + $stmtA = "UPDATE vicidial_closer_log set status='HXFER',end_epoch='$now_date_epoch',length_in_sec='$drop_seconds',queue_seconds='$drop_seconds',term_reason='HOLDRECALLXFER' where lead_id = '$insert_lead_id' order by start_epoch desc limit 1;"; + $affected_rows = $dbhA->do($stmtA); + if ($AGILOG) {$agi_string = "-- VDCL vcl update: |$affected_rows|$insert_lead_id|\n|$stmtA|"; &agi_output;} + + $stmtA = "UPDATE vicidial_list set status='HXFER' where lead_id = '$insert_lead_id';"; + $affected_rows = $dbhA->do($stmtA); + if ($AGILOG) {$agi_string = "-- VDCL vl update: |$affected_rows|$insert_lead_id|\n|$stmtA|"; &agi_output;} + + $dbhA->disconnect(); + + exit; + } + } + +if ($if_wait_play_welcome > 0) + { + $if_wait_play_welcome=0; + + $now_date_epoch = time(); + $FDtarget = ($now_date_epoch + 20); + ($Fsec,$Fmin,$Fhour,$Fmday,$Fmon,$Fyear,$Fwday,$Fyday,$Fisdst) = localtime($FDtarget); + $Fyear = ($Fyear + 1900); + $Fmon++; + if ($Fmon < 10) {$Fmon = "0$Fmon";} + if ($Fmday < 10) {$Fmday = "0$Fmday";} + if ($Fhour < 10) {$Fhour = "0$Fhour";} + if ($Fmin < 10) {$Fmin = "0$Fmin";} + if ($Fsec < 10) {$Fsec = "0$Fsec";} + $FDtsSQLdate = "$Fyear$Fmon$Fmday$Fhour$Fmin$Fsec"; + + $stmtA = "UPDATE vicidial_auto_calls set last_update_time='$FDtsSQLdate' where callerid='$callerid' order by call_time desc limit 1;"; + $affected_rows = $dbhA->do($stmtA); + if ($AGILOG) {$agi_string = "-- VDAC posttime record: |$affected_rows|$FDtsSQLdate|$callerid|"; &agi_output;} + + $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 ( ($hold_message_counter > $prompt_interval) && ($prompt_interval > 0) ) { $now_date_epoch = time(); $FDtarget = ($now_date_epoch + 10); @@ -1447,7 +1609,11 @@ if ($hold_message_counter > $prompt_interval) $AGI->stream_file("$onhold_prompt_filename"); # this prompt must be less than 10 seconds long $hold_message_counter = 0; $start_moh=1; - if ($drop_timer > 3) {$drop_timer = ($drop_timer + 5);} # add propmt play time to total queue time + $moh_delay=1; + if ($play_place_in_line =~ /Y/i) {$start_place_in_line=1; $moh_delay=2;} + if ($play_estimate_hold_time =~ /Y/i) {$start_hold_estimate=1; $moh_delay=2;} + if ($hold_time_option !~ /NONE/) {$start_hold_estimate=1; $moh_delay=2;}; + if ($drop_timer > 3) {$drop_timer = ($drop_timer + 5);} # add prompt play time to total queue time } else {$hold_message_counter++;} if ($hold_tone_counter > 3) @@ -1455,25 +1621,282 @@ if ($hold_tone_counter > 3) $hold_tone_counter = 0; } else {$hold_tone_counter++;} + +##### play the place in line of the caller if option is set +if ( ($start_place_in_line > 0) && ($moh_delay == '1') ) + { + $now_date_epoch = time(); + $FDtarget = ($now_date_epoch + 5); + ($Fsec,$Fmin,$Fhour,$Fmday,$Fmon,$Fyear,$Fwday,$Fyday,$Fisdst) = localtime($FDtarget); + $Fyear = ($Fyear + 1900); + $Fmon++; + if ($Fmon < 10) {$Fmon = "0$Fmon";} + if ($Fmday < 10) {$Fmday = "0$Fmday";} + if ($Fhour < 10) {$Fhour = "0$Fhour";} + if ($Fmin < 10) {$Fmin = "0$Fmin";} + if ($Fsec < 10) {$Fsec = "0$Fsec";} + $FDtsSQLdate = "$Fyear$Fmon$Fmday$Fhour$Fmin$Fsec"; -if ($drop_timer < 3) - { - ### sleep for 23 hundredths of a second - usleep(1*230*1000); - $drop_timer = ($drop_timer + 0.25); - } -else - { - if ($start_moh > 0) + $stmtA = "UPDATE vicidial_auto_calls set last_update_time='$FDtsSQLdate' where callerid='$callerid' order by call_time desc limit 1;"; + $affected_rows = $dbhA->do($stmtA); + if ($AGILOG) {$agi_string = "-- VDAC posttime record: |$affected_rows|$FDtsSQLdate|$callerid|"; &agi_output;} + + $place=0; + if ($rec_countWAIT > 0) {$place = $rec_countWAIT;} + if ($rec_countWAITrem > 0) {$place = $rec_countWAITrem;} + $place++; + if ($AGILOG) {$agi_string = "-- PLACE IN LINE: |$campaign_id|$place|"; &agi_output;} + + $AGI->stream_file('sip-silence'); # stop music-on-hold process + $AGI->stream_file('sip-silence'); # stop music-on-hold process + if ($place > 1) { - $start_moh=0; - print "SET MUSIC ON $moh_context\n"; + $AGI->stream_file('queue-thereare'); # you are currently caller number + $AGI->say_number("$place"); + if ($drop_timer > 3) {$drop_timer = ($drop_timer + 2);} # add prompt play time to total queue time + } + else + { + $AGI->stream_file('queue-youarenext'); # your call is now first in line + if ($drop_timer > 3) {$drop_timer = ($drop_timer + 5);} # add prompt play time to total queue time + } + + $start_place_in_line=0; + } + +##### calculate hold time estimate if needed +$holdtime_estimate=1; $holdtime_estimate_sec=0; $livetime_estimate_sec=0; # Make hold time estimate available to other sections +if ( ($start_hold_estimate > 0) && ($moh_delay == '1') ) + { + $now_date_epoch = time(); + $FDtarget = ($now_date_epoch + 5); + ($Fsec,$Fmin,$Fhour,$Fmday,$Fmon,$Fyear,$Fwday,$Fyday,$Fisdst) = localtime($FDtarget); + $Fyear = ($Fyear + 1900); + $Fmon++; + if ($Fmon < 10) {$Fmon = "0$Fmon";} + if ($Fmday < 10) {$Fmday = "0$Fmday";} + if ($Fhour < 10) {$Fhour = "0$Fhour";} + if ($Fmin < 10) {$Fmin = "0$Fmin";} + if ($Fsec < 10) {$Fsec = "0$Fsec";} + $FDtsSQLdate = "$Fyear$Fmon$Fmday$Fhour$Fmin$Fsec"; + + $stmtA = "UPDATE vicidial_auto_calls set last_update_time='$FDtsSQLdate' where callerid='$callerid' order by call_time desc limit 1;"; + $affected_rows = $dbhA->do($stmtA); + if ($AGILOG) {$agi_string = "-- VDAC posttime record: |$affected_rows|$FDtsSQLdate|$callerid|"; &agi_output;} + + $stmtA = "SELECT queue_seconds FROM vicidial_closer_log where campaign_id = '$channel_group' order by call_date desc limit 5;"; + if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $r=0; + $agi_string="\n"; + while ($sthArows > $r) + { + @aryA = $sthA->fetchrow_array; + $holdtime_estimate_sec = ($holdtime_estimate_sec + $aryA[0]); + $r++; + } + $sthA->finish(); + $holdtime_estimate_sec = int( ($holdtime_estimate_sec / $r) + 1); + + $stmtA = "SELECT stage FROM vicidial_auto_calls where status = 'LIVE' and campaign_id = '$channel_group' and call_time <= \"$SQLdateBEGIN\";"; + if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $s=0; $t=0; + $agi_string="\n"; + while ($sthArows > $s) + { + @aryA = $sthA->fetchrow_array; + $stage_wait_sec = $aryA[0]; + $stage_wait_sec =~ s/LIVE-|CLOSE-//gi; + if ($stage_wait_sec >= $holdtime_estimate_sec) + { + $livetime_estimate_sec = ($livetime_estimate_sec + $stage_wait_sec); + $t++; + } + $s++; + } + $sthA->finish(); + + if ( ($livetime_estimate_sec > 0) && ($t > 0) ) + { + $livetime_estimate_sec = int( ($livetime_estimate_sec / $t) + 1); + $avgtime_estimate_sec = int( ($livetime_estimate_sec + $holdtime_estimate_sec) / 2); + } + else + {$avgtime_estimate_sec = $holdtime_estimate_sec;} + + $holdtime_estimate_sec_diff = ($avgtime_estimate_sec - $drop_timer); + if ($holdtime_estimate_sec_diff < 10) {$holdtime_estimate_sec_diff=10;} + $holdtime_estimate = int($holdtime_estimate_sec_diff / 60); + $holdtime_estimate_sec_rem = ( $holdtime_estimate_sec_diff - ($holdtime_estimate * 60) ); + if ($AGILOG) {$agi_string = "-- HOLD ESTIMATE: |$campaign_id|$holdtime_estimate|$holdtime_estimate_sec_rem|$holdtime_estimate_sec_diff| |$holdtime_estimate_sec|$livetime_estimate_sec|$avgtime_estimate_sec|"; &agi_output;} + +##### play the hold time estimate to the caller if option is set + if ($play_estimate_hold_time =~ /Y/i) + { + $AGI->stream_file('sip-silence'); # stop music-on-hold process + $AGI->stream_file('sip-silence'); # stop music-on-hold process + + if ($pretend_every_call_is_next > 0) + { + $AGI->stream_file('queue-youarenext'); # you are next in line + } + else + { + $AGI->stream_file('queue-holdtime'); # the estimated hold time is currently + if ($holdtime_estimate > 0) + { + $AGI->say_number("$holdtime_estimate"); + $AGI->stream_file('queue-minutes'); # minutes + } + if ($holdtime_estimate < 2) + { + my $roundto = 5; # sensible values 5, 10, 15, ( 20, 30) + my $rounded_time = $holdtime_estimate_sec_diff - ( $holdtime_estimate_sec_diff % $roundto ) + $roundto; + $AGI->say_number("$rounded_time"); + $AGI->stream_file('queue-seconds'); # seconds + } + } + } + if ($drop_timer > 3) {$drop_timer = ($drop_timer + 3);} # add prompt play time to total queue time + + $start_hold_estimate=0; + } + +##### check if hold_time_option is set to leave Queue +if ( ($hold_time_option !~ /NONE/ ) && ( $holdtime_estimate_sec_diff > $hold_time_option_second ) && ($wait_in_queue < 2) ) +{ +$wait_in_queue=0; # exits wait loop +$DROPexten = ''; +if ($hold_time_option =~ /EXTENSION/) + { + if (length($hold_time_option_exten)>0) + {$DROPexten = "$hold_time_option_exten";} + } +if ($hold_time_option =~ /VOICEMAIL/) + { + if (length($hold_time_option_voicemail)>0) + {$DROPexten = "$voicemail_dump_exten$hold_time_option_voicemail";} + } +if ($hold_time_option =~ /IN_GROUP/) + { # 90009*CL_uk3survy_*8301*10000123*universal*7275551212*1234*" + $S='*'; + $DROPexten = "90009*$hold_time_option_xfer_group$S$S$insert_lead_id$S$S$phone_number$S$fronter$S"; + } +if ($hold_time_option =~ /CALLERID_CALLBACK/) + { + if (length($hold_time_option_exten)>0) + {$DROPexten = "$hold_time_option_exten";} + # if callerid is not valid do not execute + if ( ( length($phone_number) > 6 ) && ( $phone_number > 0) ) + { + ### insert a record into the vicidial_list table + $stmtA = "INSERT INTO vicidial_list (entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,called_since_last_reset,phone_code,phone_number,security_phrase,called_count,gmt_offset_now,comments) values('$SQLdate','$tsSQLdate','INBND','$fronter','$inbound_number','VDCL','$hold_time_option_callback_list_id','N','$phone_code','$phone_number','$channel_group','1','$local_gmt','$VLcomments');"; + $affected_rows = $dbhA->do($stmtA); + $cbc=0; + $stmtB = "select LAST_INSERT_ID() LIMIT 1;"; + $sthA = $dbhA->prepare($stmtB) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + while ($sthArows > $cbc) + { + @aryA = $sthA->fetchrow_array; + $insert_lead_id = "$aryA[0]"; + $cbc++; + } + $sthA->finish(); + + if ($AGILOG) {$agi_string = "VDAD vicidial_list insert |$insert_lead_id|$stmtA|"; &agi_output;} + + $DROPexten = "8300"; + + $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"); + } + else + { + $wait_in_queue = 2; #continue waiting + } + + } + +if ($AGILOG) {$agi_string = "-- VDCL HOLD TIME OPT: |$hold_time_option|$DROPexten|$wait_in_queue|"; &agi_output;} + +if ($wait_in_queue < 1) + { + ### use STDOUT to send call to proper DROP location + $VHqueryCID = "VH$CIDdate$VDADconf_exten"; + + if (length($DROPexten)>0) + { ### if DROP extension is defined then send the dropped call there instead of hangup + + if ($no_delay_call_route =~ /N/) + { + $AGI->stream_file('ding'); # stop music-on-hold process + sleep(1); + } + + if ($AGILOG) {$agi_string = "exiting the VDAD app, transferring call to $DROPexten"; &agi_output;} + print "SET CONTEXT $ext_context\n"; + checkresult($result); + print "SET EXTENSION $DROPexten\n"; + checkresult($result); + print "SET PRIORITY 1\n"; checkresult($result); } - ### sleep for 99 hundredths of a second - usleep(1*990*1000); - $drop_timer++; + + $stmtA = "DELETE FROM vicidial_auto_calls where callerid='$callerid' and server_ip='$VARserver_ip' order by call_time desc limit 1;"; + $affected_rows = $dbhA->do($stmtA); + if ($AGILOG) {$agi_string = "-- VDCL vac record deleted: |$affected_rows| $VDADcampaign|"; &agi_output;} + + $stmtA = "UPDATE vicidial_closer_log set status='HOLDTO',end_epoch='$now_date_epoch',length_in_sec='$drop_seconds',queue_seconds='$drop_seconds',term_reason='HOLDTIME' where lead_id = '$insert_lead_id' order by start_epoch desc limit 1;"; + $affected_rows = $dbhA->do($stmtA); + if ($AGILOG) {$agi_string = "-- VDCL vcl update: |$affected_rows|$insert_lead_id|\n|$stmtA|"; &agi_output;} + + $stmtA = "UPDATE vicidial_list set status='HOLDTO' where lead_id = '$insert_lead_id';"; + $affected_rows = $dbhA->do($stmtA); + if ($AGILOG) {$agi_string = "-- VDCL vl update: |$affected_rows|$insert_lead_id|\n|$stmtA|"; &agi_output;} + + $dbhA->disconnect(); + + exit; + } +} + + + +##### wait before looking again for an agent to take the call +if ($wait_in_queue > 0) + { + if ($drop_timer < 3) + { + ### sleep for 23 hundredths of a second + usleep(1*230*1000); + $drop_timer = ($drop_timer + 0.25); + if ($moh_delay > 0) + {$moh_delay = ($moh_delay - 1);} + } + else + { + if ( ($start_moh > 0) && ($moh_delay < 1) ) + { + $start_moh=0; + print "SET MUSIC ON $moh_context\n"; + checkresult($result); + } + if ($moh_delay > 0) + {$moh_delay = ($moh_delay - 1);} + ### sleep for 99 hundredths of a second + usleep(1*990*1000); + + $drop_timer++; + } } $stmtA = "UPDATE vicidial_auto_calls set stage='LIVE-$drop_timer' where callerid='$callerid';"; @@ -1488,16 +1911,8 @@ if ($affected_rows < 1) } - - - - - - - - - - +############################################ +### End of Loop to try to send call to an agent ### if ($drop_timer > $DROP_TIME) @@ -1561,9 +1976,11 @@ if ($AGILOG) {$agi_string = "-- VDCL DROP: |$drop_action|$DROPexten|"; &agi if (length($DROPexten)>0) { ### if DROP extension is defined then send the dropped call there instead of hangup + if ($no_delay_call_route =~ /N/) + { $AGI->stream_file('ding'); # stop music-on-hold process - sleep(1); + } if ($AGILOG) {$agi_string = "exiting the VDAD app, transferring call to $DROPexten"; &agi_output;} print "SET CONTEXT $ext_context\n"; diff --git a/bin/ADMIN_adjust_GMTnow_on_leads.pl b/bin/ADMIN_adjust_GMTnow_on_leads.pl index b37e9202..bd3bd4ab 100644 --- a/bin/ADMIN_adjust_GMTnow_on_leads.pl +++ b/bin/ADMIN_adjust_GMTnow_on_leads.pl @@ -13,13 +13,15 @@ # CHANGES # 50810-1540 - Added database server variable definitions lookup # 60615-1717 - Added definition GMT lookup from database not flat text file -# 60717-1045 - changed to DBI by Marin Blu -# 60717-1531 - changed to use /etc/astguiclient.conf for configuration -# 61108-1320 - added new DST schemes for USA/Canada change and changes in other countries -# 61110-1204 - added new DST scheme for Brazil -# 61128-1034 - added postal code GMT lookup option -# 61219-1106 - fixed updating for NULL gmt_offset records -# 70823-1633 - added ability to restrict by list_id +# 60717-1045 - Changed to DBI by Marin Blu +# 60717-1531 - Changed to use /etc/astguiclient.conf for configuration +# 61108-1320 - Added new DST schemes for USA/Canada change and changes in other countries +# 61110-1204 - Added new DST scheme for Brazil +# 61128-1034 - Added postal code GMT lookup option +# 61219-1106 - Fixed updating for NULL gmt_offset records +# 70823-1633 - Added ability to restrict by list_id +# 80917-2202 - Added FSO-FSA for Eastern Australia (not active) +# Added LSS-FSA for New Zealand (not active) # $MT[0]=''; @@ -374,6 +376,14 @@ foreach (@phone_codes) if ($AUST_DST) {$area_GMT++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /FSO-FSA/) ) + { + if ($DBX) {print " First Sunday October to First Sunday April\n";} + &AUSE_dstcalc; + if ($DBX) {print " DST: $AUSE_DST\n";} + if ($AUSE_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($area_GMT_method =~ /FSO-TSM/) ) { if ($DBX) {print " First Sunday October to Third Sunday March\n";} @@ -382,6 +392,14 @@ foreach (@phone_codes) if ($NZL_DST) {$area_GMT++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /LSS-FSA/) ) + { + if ($DBX) {print " Last Sunday September to First Sunday April\n";} + &NZLN_dstcalc; + if ($DBX) {print " DST: $NZLN_DST\n";} + if ($NZLN_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($area_GMT_method =~ /TSO-LSF/) ) { if ($DBX) {print " Third Sunday October to Last Sunday February\n";} @@ -535,6 +553,14 @@ foreach (@phone_codes) if ($AUST_DST) {$area_GMT++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /FSO-FSA/) ) + { + if ($DBX) {print " First Sunday October to First Sunday April\n";} + &AUSE_dstcalc; + if ($DBX) {print " DST: $AUSE_DST\n";} + if ($AUSE_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($area_GMT_method =~ /FSO-TSM/) ) { if ($DBX) {print " First Sunday October to Third Sunday March\n";} @@ -543,6 +569,14 @@ foreach (@phone_codes) if ($NZL_DST) {$area_GMT++;} $AC_processed++; } + if ( (!$AC_processed) && ($area_GMT_method =~ /LSS-FSA/) ) + { + if ($DBX) {print " Last Sunday September to First Sunday April\n";} + &NZLN_dstcalc; + if ($DBX) {print " DST: $NZLN_DST\n";} + if ($NZLN_DST) {$area_GMT++;} + $AC_processed++; + } if ( (!$AC_processed) && ($area_GMT_method =~ /TSO-LSF/) ) { if ($DBX) {print " Third Sunday October to Last Sunday February\n";} @@ -851,7 +885,7 @@ sub GBR_dstcalc { sub AUS_dstcalc { #********************************************************************** -# LSO-LSM +# LSO-LSM - Australia, for 2008-9 Western Australia only # This is returns 1 if Daylight Savings Time is in effect and 0 if # Standard time is in effect. # Based on last Sunday in October and last Sunday in March at 1 am. @@ -986,6 +1020,72 @@ sub AUST_dstcalc { +sub AUSE_dstcalc { +#********************************************************************** +# FSO-FSA +# 2008+ EASTERN AUSTRALIA ONLY +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on first Sunday in October and first Sunday in April at 1 am. +#********************************************************************** + + $AUSE_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 10) { + $AUSE_DST=1; return 1; + } elsif ($mm >= 5 && $mm <= 9) { + $AUSE_DST=0; return 0; + } elsif ($mm == 4) { + if ($dd > 7) { + $AUSE_DST=0; return 0; + } elsif ($dd >= ($dow+0)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $AUSE_DST=1; return 1; + } else { + $AUSE_DST=0; return 0; + } + } else { + if ($dow == 0 && $ns < 3600) { + $AUSE_DST=1; return 1; + } else { + $AUSE_DST=0; return 0; + } + } + } else { + $AUSE_DST=0; return 0; + } + } elsif ($mm == 10) { + if ($dd >= 8) { + $AUSE_DST=1; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (7200+$timezone*3600)) { + $AUSE_DST=0; return 0; + } else { + $AUSE_DST=1; return 1; + } + } else { + if ($dow == 0 && $ns < 3600) { + $AUSE_DST=0; return 0; + } else { + $AUSE_DST=1; return 1; + } + } + } else { + $AUSE_DST=0; return 0; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + sub NZL_dstcalc { #********************************************************************** # FSO-TSM @@ -1052,6 +1152,75 @@ sub NZL_dstcalc { +sub NZLN_dstcalc { +#********************************************************************** +# LSS-FSA +# 2007+ NEW ZEALAND +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on last Sunday in September and first Sunday in April at 1 am. +#********************************************************************** + + $NZLN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 9) { + $NZLN_DST=1; return 1; + } elsif ($mm >= 5 && $mm <= 9) { + $NZLN_DST=0; return 0; + } elsif ($mm == 4) { + if ($dd > 7) { + $NZLN_DST=0; return 0; + } elsif ($dd >= ($dow+0)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $NZLN_DST=1; return 1; + } else { + $NZLN_DST=0; return 0; + } + } else { + if ($dow == 0 && $ns < 3600) { + $NZLN_DST=1; return 1; + } else { + $NZLN_DST=0; return 0; + } + } + } else { + $NZLN_DST=0; return 0; + } + } elsif ($mm == 9) { + if ($dd < 25) { + $NZLN_DST=0; return 0; + } elsif ($dd < ($dow+25)) { + $NZLN_DST=0; return 0; + } elsif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZLN_DST=0; return 0; + } else { + $NZLN_DST=1; return 1; + } + } else { # local time calculations + if ($ns < 3600) { + $NZLN_DST=0; return 0; + } else { + $NZLN_DST=1; return 1; + } + } + } else { + $NZLN_DST=1; return 1; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + + sub BZL_dstcalc { #********************************************************************** # TSO-LSF diff --git a/docs/BASE_INSTALL.txt b/docs/BASE_INSTALL.txt index e8bf18ea..3ba6f6bd 100644 --- a/docs/BASE_INSTALL.txt +++ b/docs/BASE_INSTALL.txt @@ -33,13 +33,13 @@ mkdir /usr/src/asterisk cd /usr/src/asterisk wget http://ftp.digium.com/pub/asterisk/releases/asterisk-1.2.30.2.tar.gz wget http://ftp.digium.com/pub/zaptel/releases/zaptel-1.2.27.tar.gz -wget http://ftp.digium.com/pub/libpri/releases/libpri-1.2.7.tar.gz +wget http://ftp.digium.com/pub/libpri/releases/libpri-1.2.8.tar.gz gunzip asterisk-1.2.30.2.tar.gz tar xvf asterisk-1.2.30.2.tar gunzip zaptel-1.2.27.tar.gz tar xvf zaptel-1.2.27.tar -gunzip libpri-1.2.7.tar.gz -tar xvf libpri-1.2.7.tar +gunzip libpri-1.2.8.tar.gz +tar xvf libpri-1.2.8.tar cd ./zaptel-1.2.27 wget http://downloads.vicidial.com/packages/newt-0.51.6.tar.gz gunzip newt-0.51.6.tar.gz @@ -54,7 +54,7 @@ make clean make zttool make make install -cd ../libpri-1.2.7 +cd ../libpri-1.2.8 make clean make make install diff --git a/docs/Inbound_VDAC_IVR.txt b/docs/Inbound_VDAC_IVR.txt index bba5e344..c01b65eb 100644 --- a/docs/Inbound_VDAC_IVR.txt +++ b/docs/Inbound_VDAC_IVR.txt @@ -13,7 +13,7 @@ The example below shows how to do a very simple IVR before sending to a queue as The "test_in_menu" audio file would have something like the following script: "Hello, thank you for calling ACME Service Inc. For English press one, para el -español, prensa dos, pour le Français, presse trois, für Deutschen Presse vier." +español, prensa dos, pour le Français, presse trois, für Deutsche Presse vier." diff --git a/docs/LOAD_BALANCING.txt b/docs/LOAD_BALANCING.txt index c0197287..383e14b1 100644 --- a/docs/LOAD_BALANCING.txt +++ b/docs/LOAD_BALANCING.txt @@ -96,20 +96,20 @@ NOTE: at the bottom of this document are conf examples for a 3 server load balan exten => _8600XXX*.,1,AGI(agi-VDADfixCXFER.agi) exten => _78600XXX*.,1,AGI(agi-VDADfixCXFER.agi) -5. For BOTH servers the VDAD extens need to be setup there as well for the Load-Balance and Load-Balance-Overflow AGI scripts, as well as setting up the closer and inbound extens if needed: +5. For BOTH servers the VDAD extens need to be setup there as well for the Load-Balance and Load-Balance-Overflow AGI scripts, as well as setting up the closer and inbound extens if needed(these should already be part of the default extensions.conf): ; VICIDIAL_auto_dialer transfer script Load Balance Overflow: - exten => 8367,1,AGI(call_log.agi,${EXTEN}) - exten => 8367,2,AGI(agi-VDAD_LO_transfer.agi,${EXTEN}) - exten => 8367,3,AGI(agi-VDAD_LO_transfer.agi,${EXTEN}) - exten => 8367,4,AGI(agi-VDAD_LO_transfer.agi,${EXTEN}) + exten => 8367,1,Playback(sip-silence) + exten => 8367,2,AGI(agi://127.0.0.1:4577/call_log) + exten => 8367,3,AGI(agi-VDAD_ALL_outbound.agi,NORMAL-----LO) + exten => 8367,4,AGI(agi-VDAD_ALL_outbound.agi,NORMAL-----LO) exten => 8367,5,Hangup ; VICIDIAL_auto_dialer transfer script Load Balanced: - exten => 8368,1,AGI(call_log.agi,${EXTEN}) - exten => 8368,2,AGI(agi-VDAD_LB_transfer.agi,${EXTEN}) - exten => 8368,3,AGI(agi-VDAD_LB_transfer.agi,${EXTEN}) - exten => 8368,4,AGI(agi-VDAD_LB_transfer.agi,${EXTEN}) + exten => 8368,1,Playback(sip-silence) + exten => 8368,2,AGI(agi://127.0.0.1:4577/call_log) + exten => 8368,3,AGI(agi-VDAD_ALL_outbound.agi,NORMAL-----LB) + exten => 8368,4,AGI(agi-VDAD_ALL_outbound.agi,NORMAL-----LB) exten => 8368,5,Hangup diff --git a/docs/REQUIRED_APPS_INSTALL.txt b/docs/REQUIRED_APPS_INSTALL.txt index 15dab516..a989992f 100644 --- a/docs/REQUIRED_APPS_INSTALL.txt +++ b/docs/REQUIRED_APPS_INSTALL.txt @@ -13,10 +13,10 @@ make make install cd /usr/local/ -wget http://mirror.trouble-free.net/mysql_mirror/Downloads/MySQL-5.0/mysql-5.0.45.tar.gz -gunzip mysql-5.0.45.tar.gz -tar xvf mysql-5.0.45.tar -cd mysql-5.0.45 +wget http://mirror.trouble-free.net/mysql_mirror/Downloads/MySQL-5.0/mysql-5.0.67.tar.gz +gunzip mysql-5.0.67.tar.gz +tar xvf mysql-5.0.67.tar +cd mysql-5.0.67 groupadd mysql useradd -g mysql mysql ./configure --prefix=/usr/local/mysql --enable-shared=yes --with-readline --enable-thread-safe-client --enable-large-files --enable-assembler --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --with-big-tables @@ -24,9 +24,9 @@ make make install PATH=$PATH:$HOME/bin:/usr/local/mysql/bin/ export PATH -cp /usr/local/mysql-5.0.45/libmysql/.libs/libmysqlclient.so /usr/lib/ -cp /usr/local/mysql-5.0.45/libmysql/.libs/libmysqlclient.so.15 /usr/lib/ -cd /usr/local/mysql-5.0.45 +cp /usr/local/mysql-5.0.67/libmysql/.libs/libmysqlclient.so /usr/lib/ +cp /usr/local/mysql-5.0.67/libmysql/.libs/libmysqlclient.so.15 /usr/lib/ +cd /usr/local/mysql-5.0.67 scripts/mysql_install_db chown -R root /usr/local/mysql chown -R mysql /usr/local/mysql/var @@ -104,12 +104,12 @@ make install cd /usr/local -wget http://www.daveltd.com/src/util/ttyload/ttyload-0.4.4.tar.gz -gunzip ttyload-0.4.4.tar.gz -tar xvf ttyload-0.4.4.tar -cd ttyload-0.4.4 +wget http://www.daveltd.com/src/util/ttyload/ttyload-0.5.tar.gz +gunzip ttyload-0.5.tar.gz +tar xvf ttyload-0.5.tar +cd ttyload-0.5 make -ln -s /usr/local/ttyload-0.4.4/ttyload /usr/bin/ttyload +ln -s /usr/local/ttyload-0.5/ttyload /usr/bin/ttyload cd /usr/local @@ -150,30 +150,30 @@ cd zlib-1.2.3 make make install cd /usr/local -wget http://ftp.openssh.zone-h.org/pub/OpenBSD/OpenSSH/portable/openssh-5.0p1.tar.gz -gunzip openssh-5.0p1.tar.gz -tar xvf openssh-5.0p1.tar -cd openssh-5.0p1 +wget http://ftp.openssh.zone-h.org/pub/OpenBSD/OpenSSH/portable/openssh-5.1p1.tar.gz +gunzip openssh-5.1p1.tar.gz +tar xvf openssh-5.1p1.tar +cd openssh-5.1p1 ./configure make make install cd /usr/local -wget http://www.openssl.org/source/openssl-0.9.8g.tar.gz -gunzip openssl-0.9.8g.tar.gz -tar xvf openssl-0.9.8g.tar -cd openssl-0.9.8g +wget http://www.openssl.org/source/openssl-0.9.8i.tar.gz +gunzip openssl-0.9.8i.tar.gz +tar xvf openssl-0.9.8i.tar +cd openssl-0.9.8i ./config make make install cd /usr/local -wget http://subversion.tigris.org/downloads/subversion-1.3.2.tar.gz -gunzip subversion-1.3.2.tar.gz -tar xvf subversion-1.3.2.tar -cd subversion-1.3.2 +wget http://subversion.tigris.org/downloads/subversion-1.5.2.tar.gz +gunzip subversion-1.5.2.tar.gz +tar xvf subversion-1.5.2.tar +cd subversion-1.5.2 ./configure make make install @@ -190,13 +190,13 @@ make install cd /usr/local -wget http://mirror.candidhosting.com/pub/apache/httpd/httpd-2.2.8.tar.gz -gunzip httpd-2.2.8.tar.gz -tar xvf httpd-2.2.8.tar +wget http://mirror.candidhosting.com/pub/apache/httpd/httpd-2.2.9.tar.gz +gunzip httpd-2.2.9.tar.gz +tar xvf httpd-2.2.9.tar wget http://us2.php.net/distributions/php-5.2.6.tar.gz gunzip php-5.2.6.tar.gz tar xvf php-5.2.6.tar -cd httpd-2.2.8 +cd httpd-2.2.9 make clean ./configure --prefix=/usr/local/apache2 --enable-ssl --enable-setenvif --enable-so --with-apxs2 --enable-dav --enable-maintainer-mode make @@ -232,14 +232,14 @@ vi /usr/local/apache2/conf/httpd.conf "CustomLog /dev/null common" to enable web browsing of Recordings on Asterisk server, add this: - Alias /RECORDINGS/ "/var/spool/asterisk/monitorDONE/" + Alias /RECORDINGS/ "/var/spool/asterisk/monitorDONE/" - - Options Indexes MultiViews - AllowOverride None - Order allow,deny - Allow from all - + + Options Indexes MultiViews + AllowOverride None + Order allow,deny + Allow from all + OPTIONAL: USE ONLY FOR STANDALONE apache/php SERVER ONLY: @@ -339,13 +339,13 @@ mkdir /usr/src/asterisk cd /usr/src/asterisk wget http://ftp.digium.com/pub/asterisk/releases/asterisk-1.2.30.2.tar.gz wget http://ftp.digium.com/pub/zaptel/releases/zaptel-1.2.27.tar.gz -wget http://ftp.digium.com/pub/libpri/releases/libpri-1.2.7.tar.gz +wget http://ftp.digium.com/pub/libpri/releases/libpri-1.2.8.tar.gz gunzip asterisk-1.2.30.2.tar.gz tar xvf asterisk-1.2.30.2.tar gunzip zaptel-1.2.27.tar.gz tar xvf zaptel-1.2.27.tar -gunzip libpri-1.2.7.tar.gz -tar xvf libpri-1.2.7.tar +gunzip libpri-1.2.8.tar.gz +tar xvf libpri-1.2.8.tar cd ./zaptel-1.2.27 wget http://downloads.vicidial.com/packages/newt-0.51.6.tar.gz gunzip newt-0.51.6.tar.gz @@ -360,7 +360,7 @@ make clean make zttool make make install -cd ../libpri-1.2.7 +cd ../libpri-1.2.8 make clean make make install @@ -432,13 +432,13 @@ mkdir ../orig-mp3 mv -f *.mp3 ../orig-mp3/ mkdir ../quiet-mp3 cd ../quiet-mp3 -sox -r 44100 -w -s -c 1 ../mohmp3/fpm-sunshine.raw -r 8000 -c 1 -v 0.25 fpm-sunshine.wav +sox -r 44100 -w -s -c 1 ../mohmp3/fpm-sunshine.raw -r 8000 -c 1 fpm-sunshine.wav vol 0.25 sox fpm-sunshine.wav -t gsm -r 8000 -b -c 1 fpm-sunshine.gsm sox fpm-sunshine.wav -t ul -r 8000 -b -c 1 fpm-sunshine.pcm -sox -r 44100 -w -s -c 1 ../mohmp3/fpm-calm-river.raw -r 8000 -c 1 -v 0.25 fpm-calm-river.wav +sox -r 44100 -w -s -c 1 ../mohmp3/fpm-calm-river.raw -r 8000 -c 1 fpm-calm-river.wav vol 0.25 sox fpm-calm-river.wav -t gsm -r 8000 -b -c 1 fpm-calm-river.gsm sox fpm-calm-river.wav -t ul -r 8000 -b -c 1 fpm-calm-river.pcm -sox -r 44100 -w -s -c 1 ../mohmp3/fpm-world-mix.raw -r 8000 -c 1 -v 0.25 fpm-world-mix.wav +sox -r 44100 -w -s -c 1 ../mohmp3/fpm-world-mix.raw -r 8000 -c 1 fpm-world-mix.wav vol 0.25 sox fpm-world-mix.wav -t gsm -r 8000 -b -c 1 fpm-world-mix.gsm sox fpm-world-mix.wav -t ul -r 8000 -b -c 1 fpm-world-mix.pcm rm -f ../mohmp3/*.raw @@ -506,24 +506,24 @@ rm -f /usr/lib/asterisk/modules/res_speech.so mkdir /usr/src/asterisk-1.4 cd /usr/src/asterisk-1.4 -wget http://ftp.digium.com/pub/asterisk/releases/asterisk-1.4.21.1.tar.gz -wget http://ftp.digium.com/pub/zaptel/releases/zaptel-1.4.11.tar.gz -wget http://ftp.digium.com/pub/libpri/releases/libpri-1.4.4.tar.gz -gunzip asterisk-1.4.21.1.tar.gz -tar xvf asterisk-1.4.21.1.tar -gunzip zaptel-1.4.11.tar.gz -tar xvf zaptel-1.4.11.tar -gunzip libpri-1.4.4.tar.gz -tar xvf libpri-1.4.4.tar -cd ./zaptel-1.4.11 +wget http://ftp.digium.com/pub/asterisk/releases/asterisk-1.4.22.tar.gz +wget http://ftp.digium.com/pub/zaptel/releases/zaptel-1.4.12.1.tar.gz +wget http://ftp.digium.com/pub/libpri/releases/libpri-1.4.7.tar.gz +gunzip asterisk-1.4.22.tar.gz +tar xvf asterisk-1.4.22.tar +gunzip zaptel-1.4.12.1.tar.gz +tar xvf zaptel-1.4.12.1.tar +gunzip libpri-1.4.7.tar.gz +tar xvf libpri-1.4.7.tar +cd ./zaptel-1.4.12.1 ./configure make make install -cd ../libpri-1.4.4 +cd ../libpri-1.4.7 make clean make make install -cd ../asterisk-1.4.21.1 +cd ../asterisk-1.4.22 wget http://www.eflo.net/files/enter.h wget http://www.eflo.net/files/leave.h mv -f enter.h apps/enter.h diff --git a/docs/SCRATCH_INSTALL.txt b/docs/SCRATCH_INSTALL.txt index 0fa13015..9c96c5c9 100644 --- a/docs/SCRATCH_INSTALL.txt +++ b/docs/SCRATCH_INSTALL.txt @@ -2588,156 +2588,255 @@ database in order to start setting up the vicidial dialer system for use. (make sure you put your IP address in place of "10.10.10.15" in the queries below) ######------ BEGIN Mysql data entry(you can copy and paste this into terminal) # -insert into vicidial_conferences values('8600051','10.10.10.15',''); -insert into vicidial_conferences values('8600052','10.10.10.15',''); -insert into vicidial_conferences values('8600053','10.10.10.15',''); -insert into vicidial_conferences values('8600054','10.10.10.15',''); -insert into vicidial_conferences values('8600055','10.10.10.15',''); -insert into vicidial_conferences values('8600056','10.10.10.15',''); -insert into vicidial_conferences values('8600057','10.10.10.15',''); -insert into vicidial_conferences values('8600058','10.10.10.15',''); -insert into vicidial_conferences values('8600059','10.10.10.15',''); -insert into vicidial_conferences values('8600060','10.10.10.15',''); -insert into vicidial_conferences values('8600061','10.10.10.15',''); -insert into vicidial_conferences values('8600062','10.10.10.15',''); -insert into vicidial_conferences values('8600063','10.10.10.15',''); -insert into vicidial_conferences values('8600064','10.10.10.15',''); -insert into vicidial_conferences values('8600065','10.10.10.15',''); -insert into vicidial_conferences values('8600066','10.10.10.15',''); -insert into vicidial_conferences values('8600067','10.10.10.15',''); -insert into vicidial_conferences values('8600068','10.10.10.15',''); -insert into vicidial_conferences values('8600069','10.10.10.15',''); -insert into vicidial_conferences values('8600070','10.10.10.15',''); -insert into vicidial_conferences values('8600071','10.10.10.15',''); -insert into vicidial_conferences values('8600072','10.10.10.15',''); -insert into vicidial_conferences values('8600073','10.10.10.15',''); -insert into vicidial_conferences values('8600074','10.10.10.15',''); -insert into vicidial_conferences values('8600075','10.10.10.15',''); -insert into vicidial_conferences values('8600076','10.10.10.15',''); -insert into vicidial_conferences values('8600077','10.10.10.15',''); -insert into vicidial_conferences values('8600078','10.10.10.15',''); -insert into vicidial_conferences values('8600079','10.10.10.15',''); -insert into vicidial_conferences values('8600080','10.10.10.15',''); -insert into vicidial_conferences values('8600081','10.10.10.15',''); -insert into vicidial_conferences values('8600082','10.10.10.15',''); -insert into vicidial_conferences values('8600083','10.10.10.15',''); -insert into vicidial_conferences values('8600084','10.10.10.15',''); -insert into vicidial_conferences values('8600085','10.10.10.15',''); -insert into vicidial_conferences values('8600086','10.10.10.15',''); -insert into vicidial_conferences values('8600087','10.10.10.15',''); -insert into vicidial_conferences values('8600088','10.10.10.15',''); -insert into vicidial_conferences values('8600089','10.10.10.15',''); -insert into vicidial_conferences values('8600090','10.10.10.15',''); -insert into vicidial_conferences values('8600091','10.10.10.15',''); -insert into vicidial_conferences values('8600092','10.10.10.15',''); -insert into vicidial_conferences values('8600093','10.10.10.15',''); -insert into vicidial_conferences values('8600094','10.10.10.15',''); -insert into vicidial_conferences values('8600095','10.10.10.15',''); -insert into vicidial_conferences values('8600096','10.10.10.15',''); -insert into vicidial_conferences values('8600097','10.10.10.15',''); -insert into vicidial_conferences values('8600098','10.10.10.15',''); -insert into vicidial_conferences values('8600099','10.10.10.15',''); -insert into vicidial_conferences values('8600100','10.10.10.15',''); -insert into vicidial_conferences values('8600101','10.10.10.15',''); -insert into vicidial_conferences values('8600102','10.10.10.15',''); -insert into vicidial_conferences values('8600103','10.10.10.15',''); -insert into vicidial_conferences values('8600104','10.10.10.15',''); -insert into vicidial_conferences values('8600105','10.10.10.15',''); -insert into vicidial_conferences values('8600106','10.10.10.15',''); -insert into vicidial_conferences values('8600107','10.10.10.15',''); -insert into vicidial_conferences values('8600108','10.10.10.15',''); -insert into vicidial_conferences values('8600109','10.10.10.15',''); -insert into vicidial_conferences values('8600110','10.10.10.15',''); -insert into vicidial_conferences values('8600111','10.10.10.15',''); -insert into vicidial_conferences values('8600112','10.10.10.15',''); -insert into vicidial_conferences values('8600113','10.10.10.15',''); -insert into vicidial_conferences values('8600114','10.10.10.15',''); -insert into vicidial_conferences values('8600115','10.10.10.15',''); -insert into vicidial_conferences values('8600116','10.10.10.15',''); -insert into vicidial_conferences values('8600117','10.10.10.15',''); -insert into vicidial_conferences values('8600118','10.10.10.15',''); -insert into vicidial_conferences values('8600119','10.10.10.15',''); -insert into vicidial_conferences values('8600120','10.10.10.15',''); -insert into vicidial_conferences values('8600121','10.10.10.15',''); -insert into vicidial_conferences values('8600122','10.10.10.15',''); -insert into vicidial_conferences values('8600123','10.10.10.15',''); -insert into vicidial_conferences values('8600124','10.10.10.15',''); -insert into vicidial_conferences values('8600125','10.10.10.15',''); -insert into vicidial_conferences values('8600126','10.10.10.15',''); -insert into vicidial_conferences values('8600127','10.10.10.15',''); -insert into vicidial_conferences values('8600128','10.10.10.15',''); -insert into vicidial_conferences values('8600129','10.10.10.15',''); -insert into vicidial_conferences values('8600130','10.10.10.15',''); -insert into vicidial_conferences values('8600131','10.10.10.15',''); -insert into vicidial_conferences values('8600132','10.10.10.15',''); -insert into vicidial_conferences values('8600133','10.10.10.15',''); -insert into vicidial_conferences values('8600134','10.10.10.15',''); -insert into vicidial_conferences values('8600135','10.10.10.15',''); -insert into vicidial_conferences values('8600136','10.10.10.15',''); -insert into vicidial_conferences values('8600137','10.10.10.15',''); -insert into vicidial_conferences values('8600138','10.10.10.15',''); -insert into vicidial_conferences values('8600139','10.10.10.15',''); -insert into vicidial_conferences values('8600140','10.10.10.15',''); -insert into vicidial_conferences values('8600141','10.10.10.15',''); -insert into vicidial_conferences values('8600142','10.10.10.15',''); -insert into vicidial_conferences values('8600143','10.10.10.15',''); -insert into vicidial_conferences values('8600144','10.10.10.15',''); -insert into vicidial_conferences values('8600145','10.10.10.15',''); -insert into vicidial_conferences values('8600146','10.10.10.15',''); -insert into vicidial_conferences values('8600147','10.10.10.15',''); -insert into vicidial_conferences values('8600148','10.10.10.15',''); -insert into vicidial_conferences values('8600149','10.10.10.15',''); -insert into vicidial_conferences values('8600150','10.10.10.15',''); -insert into vicidial_conferences values('8600151','10.10.10.15',''); -insert into vicidial_conferences values('8600152','10.10.10.15',''); -insert into vicidial_conferences values('8600153','10.10.10.15',''); -insert into vicidial_conferences values('8600154','10.10.10.15',''); -insert into vicidial_conferences values('8600155','10.10.10.15',''); -insert into vicidial_conferences values('8600156','10.10.10.15',''); -insert into vicidial_conferences values('8600157','10.10.10.15',''); -insert into vicidial_conferences values('8600158','10.10.10.15',''); -insert into vicidial_conferences values('8600159','10.10.10.15',''); -insert into vicidial_conferences values('8600160','10.10.10.15',''); -insert into vicidial_conferences values('8600161','10.10.10.15',''); -insert into vicidial_conferences values('8600162','10.10.10.15',''); -insert into vicidial_conferences values('8600163','10.10.10.15',''); -insert into vicidial_conferences values('8600164','10.10.10.15',''); -insert into vicidial_conferences values('8600165','10.10.10.15',''); -insert into vicidial_conferences values('8600166','10.10.10.15',''); -insert into vicidial_conferences values('8600167','10.10.10.15',''); -insert into vicidial_conferences values('8600168','10.10.10.15',''); -insert into vicidial_conferences values('8600169','10.10.10.15',''); -insert into vicidial_conferences values('8600170','10.10.10.15',''); -insert into vicidial_conferences values('8600171','10.10.10.15',''); -insert into vicidial_conferences values('8600172','10.10.10.15',''); -insert into vicidial_conferences values('8600173','10.10.10.15',''); -insert into vicidial_conferences values('8600174','10.10.10.15',''); -insert into vicidial_conferences values('8600175','10.10.10.15',''); -insert into vicidial_conferences values('8600176','10.10.10.15',''); -insert into vicidial_conferences values('8600177','10.10.10.15',''); -insert into vicidial_conferences values('8600178','10.10.10.15',''); -insert into vicidial_conferences values('8600179','10.10.10.15',''); -insert into vicidial_conferences values('8600180','10.10.10.15',''); -insert into vicidial_conferences values('8600181','10.10.10.15',''); -insert into vicidial_conferences values('8600182','10.10.10.15',''); -insert into vicidial_conferences values('8600183','10.10.10.15',''); -insert into vicidial_conferences values('8600184','10.10.10.15',''); -insert into vicidial_conferences values('8600185','10.10.10.15',''); -insert into vicidial_conferences values('8600186','10.10.10.15',''); -insert into vicidial_conferences values('8600187','10.10.10.15',''); -insert into vicidial_conferences values('8600188','10.10.10.15',''); -insert into vicidial_conferences values('8600189','10.10.10.15',''); -insert into vicidial_conferences values('8600190','10.10.10.15',''); -insert into vicidial_conferences values('8600191','10.10.10.15',''); -insert into vicidial_conferences values('8600192','10.10.10.15',''); -insert into vicidial_conferences values('8600193','10.10.10.15',''); -insert into vicidial_conferences values('8600194','10.10.10.15',''); -insert into vicidial_conferences values('8600195','10.10.10.15',''); -insert into vicidial_conferences values('8600196','10.10.10.15',''); -insert into vicidial_conferences values('8600197','10.10.10.15',''); -insert into vicidial_conferences values('8600198','10.10.10.15',''); -insert into vicidial_conferences values('8600199','10.10.10.15',''); -insert into vicidial_conferences values('8600200','10.10.10.15',''); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600051','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600052','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600053','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600054','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600055','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600056','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600057','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600058','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600059','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600060','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600061','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600062','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600063','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600064','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600065','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600066','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600067','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600068','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600069','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600070','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600071','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600072','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600073','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600074','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600075','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600076','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600077','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600078','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600079','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600080','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600081','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600082','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600083','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600084','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600085','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600086','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600087','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600088','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600089','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600090','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600091','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600092','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600093','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600094','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600095','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600096','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600097','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600098','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600099','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600100','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600101','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600102','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600103','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600104','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600105','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600106','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600107','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600108','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600109','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600110','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600111','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600112','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600113','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600114','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600115','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600116','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600117','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600118','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600119','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600120','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600121','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600122','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600123','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600124','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600125','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600126','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600127','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600128','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600129','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600130','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600131','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600132','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600133','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600134','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600135','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600136','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600137','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600138','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600139','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600140','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600141','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600142','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600143','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600144','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600145','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600146','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600147','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600148','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600149','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600150','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600151','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600152','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600153','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600154','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600155','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600156','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600157','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600158','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600159','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600160','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600161','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600162','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600163','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600164','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600165','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600166','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600167','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600168','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600169','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600170','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600171','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600172','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600173','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600174','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600175','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600176','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600177','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600178','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600179','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600180','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600181','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600182','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600183','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600184','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600185','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600186','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600187','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600188','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600189','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600190','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600191','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600192','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600193','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600194','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600195','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600196','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600197','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600198','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600199','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600200','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600201','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600202','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600203','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600204','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600205','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600206','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600207','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600208','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600209','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600210','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600211','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600212','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600213','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600214','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600215','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600216','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600217','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600218','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600219','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600220','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600221','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600222','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600223','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600224','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600225','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600226','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600227','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600228','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600229','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600230','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600231','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600232','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600233','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600234','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600235','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600236','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600237','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600238','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600239','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600240','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600241','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600242','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600243','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600244','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600245','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600246','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600247','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600248','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600249','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600250','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600251','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600252','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600253','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600254','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600255','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600256','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600257','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600258','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600259','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600260','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600261','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600262','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600263','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600264','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600265','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600266','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600267','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600268','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600269','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600270','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600271','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600272','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600273','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600274','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600275','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600276','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600277','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600278','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600279','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600280','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600281','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600282','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600283','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600284','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600285','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600286','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600287','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600288','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600289','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600290','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600291','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600292','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600293','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600294','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600295','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600296','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600297','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600298','10.10.10.15'); +INSERT INTO vicidial_conferences(conf_exten,server_ip) values('8600299','10.10.10.15'); ######------ END Mysql data entry ------###### @@ -2910,37 +3009,44 @@ records) below) ######------ BEGIN Mysql data entry(you can copy and paste this into terminal) # -insert into vicidial_list values('','2004-01-06','','NEW','','','TEST01','101','TESTCAMP','N','1','7275551212','Mr','Matt','X','lead01','1234 Fake St.','','','Clearwater','FL','','33760','USA','M','1970-01-01','','test@test.com','suprise','comments go here','0'); -insert into vicidial_list values('','2004-01-06','','NEW','','','TEST01','101','TESTCAMP','N','1','7275551212','Mr','Matt','X','lead02','1234 Fake St.','','','Clearwater','FL','','33760','USA','M','1970-01-01','','test@test.com','suprise','comments go here','0'); -insert into vicidial_list values('','2004-01-07','','NEW','','','TEST01','101','TESTCAMP','N','1','7275551212','Mr','Matt','X','lead03','1234 Fake St.','','','Clearwater','FL','','33760','USA','M','1970-01-01','','test@test.com','suprise','comments go here','0'); -insert into vicidial_list values('','2004-01-07','','NEW','','','TEST01','101','TESTCAMP','N','1','7275551212','Mr','Matt','X','lead04','1234 Fake St.','','','Clearwater','FL','','33760','USA','M','1970-01-01','','test@test.com','suprise','comments go here','0'); -insert into vicidial_list values('','2004-01-07','','NEW','','','TEST01','101','TESTCAMP','N','1','7275551212','Mr','Matt','X','lead05','1234 Fake St.','','','Clearwater','FL','','33760','USA','M','1970-01-01','','test@test.com','suprise','comments go here','0'); -insert into vicidial_list values('','2004-01-07','','NEW','','','TEST01','101','TESTCAMP','N','1','7275551212','Mr','Matt','X','lead06','1234 Fake St.','','','Clearwater','FL','','33760','USA','M','1970-01-01','','test@test.com','suprise','comments go here','0'); -insert into vicidial_list values('','2004-01-07','','NEW','','','TEST01','101','TESTCAMP','N','1','7275551212','Mr','Matt','X','lead07','1234 Fake St.','','','Clearwater','FL','','33760','USA','M','1970-01-01','','test@test.com','suprise','comments go here','0'); +INSERT INTO vicidial_list(status,list_id,phone_code,phone_number,first_name,last_name,address1,city,state,postal_code,country_code,gender,email) values('NEW','101','1','7275551212','Matt','lead01','1234 Fake St.','Clearwater','FL','33760','USA','M','test@test.com'); +INSERT INTO vicidial_list(status,list_id,phone_code,phone_number,first_name,last_name,address1,city,state,postal_code,country_code,gender,email) values('NEW','101','1','7275551212','Matt','lead02','1234 Fake St.','Clearwater','FL','33760','USA','M','test@test.com'); +INSERT INTO vicidial_list(status,list_id,phone_code,phone_number,first_name,last_name,address1,city,state,postal_code,country_code,gender,email) values('NEW','101','1','7275551212','Matt','lead03','1234 Fake St.','Clearwater','FL','33760','USA','M','test@test.com'); +INSERT INTO vicidial_list(status,list_id,phone_code,phone_number,first_name,last_name,address1,city,state,postal_code,country_code,gender,email) values('NEW','101','1','7275551212','Matt','lead04','1234 Fake St.','Clearwater','FL','33760','USA','M','test@test.com'); +INSERT INTO vicidial_list(status,list_id,phone_code,phone_number,first_name,last_name,address1,city,state,postal_code,country_code,gender,email) values('NEW','101','1','7275551212','Matt','lead05','1234 Fake St.','Clearwater','FL','33760','USA','M','test@test.com'); +INSERT INTO vicidial_list(status,list_id,phone_code,phone_number,first_name,last_name,address1,city,state,postal_code,country_code,gender,email) values('NEW','101','1','7275551212','Matt','lead06','1234 Fake St.','Clearwater','FL','33760','USA','M','test@test.com'); +INSERT INTO vicidial_list(status,list_id,phone_code,phone_number,first_name,last_name,address1,city,state,postal_code,country_code,gender,email) values('NEW','101','1','7275551212','Matt','lead07','1234 Fake St.','Clearwater','FL','33760','USA','M','test@test.com'); ### these first 5 must be in all VICIDIAL systems for it to work properly # -insert into vicidial_statuses values('NEW','New Lead','N','N','UNDEFINED'); -insert into vicidial_statuses values('QUEUE','Lead To Be Called','N','N','UNDEFINED'); -insert into vicidial_statuses values('INCALL','Lead Being Called','N','N','UNDEFINED'); -insert into vicidial_statuses values('DROP','Agent Not Available','N','Y','UNDEFINED'); -insert into vicidial_statuses values('XDROP','Agent Not Available IN','N','Y','UNDEFINED'); -insert into vicidial_statuses values('NA','No Answer AutoDial','N','N','UNDEFINED'); - -insert into vicidial_statuses values('CALLBK','Call Back','Y','Y','UNDEFINED'); -insert into vicidial_statuses values('CBHOLD','Call Back Hold','N','Y','UNDEFINED'); -insert into vicidial_statuses values('A','Answering Machine','Y','N','UNDEFINED'); -insert into vicidial_statuses values('AA','Answering Machine Auto','N','N','UNDEFINED'); -insert into vicidial_statuses values('AM','Answering Machine Sent to Mesg','N','N','UNDEFINED'); -insert into vicidial_statuses values('AL','Answering Machine Msg Played','N','N','UNDEFINED'); -insert into vicidial_statuses values('B','Busy','Y','N','UNDEFINED'); -insert into vicidial_statuses values('DC','Disconnected Number','Y','N','UNDEFINED'); -insert into vicidial_statuses values('DEC','Declined Sale','Y','Y','UNDEFINED'); -insert into vicidial_statuses values('DNC','DO NOT CALL','Y','Y','UNDEFINED'); -insert into vicidial_statuses values('SALE','Sale Made','Y','Y','UNDEFINED'); -insert into vicidial_statuses values('N','No Answer','Y','N','UNDEFINED'); -insert into vicidial_statuses values('NI','Not Interested','Y','Y','UNDEFINED'); -insert into vicidial_statuses values('NP','No Pitch No Price','Y','Y','UNDEFINED'); -insert into vicidial_statuses values('XFER','Call Transferred','Y','Y','UNDEFINED'); +INSERT INTO vicidial_statuses values('NEW','New Lead','N','N','UNDEFINED'); +INSERT INTO vicidial_statuses values('QUEUE','Lead To Be Called','N','N','UNDEFINED'); +INSERT INTO vicidial_statuses values('INCALL','Lead Being Called','N','N','UNDEFINED'); +INSERT INTO vicidial_statuses values('DROP','Agent Not Available','N','Y','UNDEFINED'); +INSERT INTO vicidial_statuses values('XDROP','Agent Not Available IN','N','Y','UNDEFINED'); +INSERT INTO vicidial_statuses values('NA','No Answer AutoDial','N','N','UNDEFINED'); +INSERT INTO vicidial_statuses values('CALLBK','Call Back','Y','Y','UNDEFINED'); +INSERT INTO vicidial_statuses values('CBHOLD','Call Back Hold','N','Y','UNDEFINED'); +INSERT INTO vicidial_statuses values('A','Answering Machine','Y','N','UNDEFINED'); +INSERT INTO vicidial_statuses values('AA','Answering Machine Auto','N','N','UNDEFINED'); +INSERT INTO vicidial_statuses values('AM','Answering Machine Sent to Mesg','N','N','UNDEFINED'); +INSERT INTO vicidial_statuses values('AL','Answering Machine Msg Played','N','N','UNDEFINED'); +INSERT INTO vicidial_statuses values('B','Busy','Y','N','UNDEFINED'); +INSERT INTO vicidial_statuses values('DC','Disconnected Number','Y','N','UNDEFINED'); +INSERT INTO vicidial_statuses values('DEC','Declined Sale','Y','Y','UNDEFINED'); +INSERT INTO vicidial_statuses values('DNC','DO NOT CALL','Y','Y','UNDEFINED'); +INSERT INTO vicidial_statuses values('DNCL','DO NOT CALL Hopper Match','N','N','UNDEFINED'); +INSERT INTO vicidial_statuses values('SALE','Sale Made','Y','Y','UNDEFINED'); +INSERT INTO vicidial_statuses values('N','No Answer','Y','N','UNDEFINED'); +INSERT INTO vicidial_statuses values('NI','Not Interested','Y','Y','UNDEFINED'); +INSERT INTO vicidial_statuses values('NP','No Pitch No Price','Y','Y','UNDEFINED'); +INSERT INTO vicidial_statuses values('PU','Call Picked Up','N','N','UNDEFINED'); +INSERT INTO vicidial_statuses values('PM','Played Message','N','N','UNDEFINED'); +INSERT INTO vicidial_statuses values('XFER','Call Transferred','Y','Y','UNDEFINED'); +INSERT INTO vicidial_statuses values('ERI','Agent Error','N','N','UNDEFINED'); +INSERT INTO vicidial_statuses values('SVYEXT','Survey sent to Extension','N','N','UNDEFINED'); +INSERT INTO vicidial_statuses values('SVYVM','Survey sent to Voicemail','N','N','UNDEFINED'); +INSERT INTO vicidial_statuses values('SVYHU','Survey Hungup','N','N','UNDEFINED'); +INSERT INTO vicidial_statuses values('SVYREC','Survey sent to Record','N','N','UNDEFINED'); quit ######------ END Mysql data entry ------###### diff --git a/docs/VICIDIAL_statuses.txt b/docs/VICIDIAL_statuses.txt index e561b733..3b23a19e 100644 --- a/docs/VICIDIAL_statuses.txt +++ b/docs/VICIDIAL_statuses.txt @@ -27,3 +27,5 @@ SVYEXT - Survey sent to Extension - Survey outbound campaign status only SVYVM - Survey sent to Voicemail - Survey outbound campaign status only SVYHU - Survey Hungup - Survey outbound campaign status only SVYREC - Survey sent to Record - Survey outbound campaign status only +HXFER - Hold Recall Transfer to another in-group +HOLDTO - Hold time option call termination on inbound call diff --git a/docs/conf_examples/extensions.conf.sample b/docs/conf_examples/extensions.conf.sample index cf10b553..265a3137 100644 --- a/docs/conf_examples/extensions.conf.sample +++ b/docs/conf_examples/extensions.conf.sample @@ -13,6 +13,8 @@ SIPtrunk=SIP/1234:PASSWORD@sip.provider.net ; SIP trunk TRUNKloop = IAX2/ASTloop:test@127.0.0.1:40569 ; used for blind monitoring TRUNKblind = IAX2/ASTblind:test@127.0.0.1:41569 ; used for testing +[testtrunkinbound] +exten => _X.,1,AGI(agi-DID_route.agi) [default] ; VICI-GROUP DIRECT SUPPORT LINE (VICIHELP[84244357]) @@ -165,7 +167,6 @@ exten => _91NXXNXXXXXX,3,Hangup ; exten => _91XXXXXXXXXXXXX,2,Dial(${TRUNKloop}/9990011112,,to) ; exten => _91XXXXXXXXXXXXX,3,Hangup - ; parameters for call_inbound.agi (7 fields separated by five dashes "-----"): ; 1. the extension of the phone to ring as defined in the asterisk.phones table ; 2. the phone number that was called, for the live_inbound/_log entry @@ -228,6 +229,10 @@ exten => _90009.,3,Hangup exten => _990009.,1,Answer ; Answer the line exten => _990009.,2,AGI(agi-VDAD_ALL_inbound.agi,CLOSER-----LB-----CL_TESTCAMP-----7275551212-----Closer-----park----------999-----1) exten => _990009.,3,Hangup +; DID forwarded calls +exten => _99909*.,1,Answer +exten => _99909*.,2,AGI(agi-VDAD_ALL_inbound.agi) +exten => _99909*.,3,Hangup ; barge monitoring extension diff --git a/docs/conf_examples/extensions.conf.sample-1.4 b/docs/conf_examples/extensions.conf.sample-1.4 index 5a65eb75..f171cd4d 100644 --- a/docs/conf_examples/extensions.conf.sample-1.4 +++ b/docs/conf_examples/extensions.conf.sample-1.4 @@ -13,6 +13,8 @@ SIPtrunk=SIP/1234:PASSWORD@sip.provider.net ; SIP trunk TRUNKloop = IAX2/ASTloop:test@127.0.0.1:40569 ; used for blind monitoring TRUNKblind = IAX2/ASTblind:test@127.0.0.1:41569 ; used for testing +[testtrunkinbound] +exten => _X.,1,AGI(agi-DID_route.agi) [default] ; VICI-GROUP DIRECT SUPPORT LINE (VICIHELP[84244357]) @@ -227,6 +229,10 @@ exten => _90009.,3,Hangup exten => _990009.,1,Answer ; Answer the line exten => _990009.,2,AGI(agi-VDAD_ALL_inbound.agi,CLOSER-----LB-----CL_TESTCAMP-----7275551212-----Closer-----park----------999-----1) exten => _990009.,3,Hangup +; DID forwarded calls +exten => _99909*.,1,Answer +exten => _99909*.,2,AGI(agi-VDAD_ALL_inbound.agi) +exten => _99909*.,3,Hangup ; barge monitoring extension @@ -258,9 +264,9 @@ exten => _86000[0-4]X,1,Meetme,${EXTEN}|q ; VICIDIAL conferences exten => _86000[5-9]X,1,Meetme,${EXTEN}|F exten => _8600[1-2]XX,1,Meetme,${EXTEN}|F -; quiet entry and leaving conferences for VICIDIAL +; quiet entry and leaving conferences for VICIDIAL (inbound announce and SendDTMF) exten => _78600XXX,1,Meetme,${EXTEN:1}|Fq -; quiet monitor extensions for meetme rooms (for room managers) +; quiet monitor-only extensions for meetme rooms (for room managers) exten => _68600XXX,1,Meetme,${EXTEN:1}|Fmq ; quiet monitor-only entry and leaving conferences for VICIDIAL (recording) exten => _58600XXX,1,Meetme,${EXTEN:1}|Fmq @@ -462,7 +468,7 @@ exten => _999XX11112,3,Playback(ss-noservice) exten => _999XX11112,4,Playback(vm-goodbye) exten => _999XX11112,5,Hangup -exten => _999XXXX112,1,Wait(8) +exten => _999XXXX112,1,Wait(5) exten => _999XXXX112,2,Answer exten => _999XXXX112,3,Playback(demo-instruct) exten => _999XXXX112,4,Playback(demo-instruct) diff --git a/docs/conf_examples/voicemail.conf.sample b/docs/conf_examples/voicemail.conf.sample index dc3a8537..e4dbdbfd 100644 --- a/docs/conf_examples/voicemail.conf.sample +++ b/docs/conf_examples/voicemail.conf.sample @@ -13,7 +13,110 @@ central=America/Chicago|'vm-received' Q 'digits/at' IMp central24=America/Chicago|'vm-received' q 'digits/at' H 'digits/hundred' M 'hours' [default] -102 => 102,Grandstream Mailbox,root@localhost +100 => 8100,SIP 101 Phone +101 => 8101,SIP 101 Phone +102 => 8102,SIP 102 Phone +103 => 8103,SIP 103 Phone +104 => 8104,SIP 104 Phone +105 => 8105,SIP 105 Phone +106 => 8106,SIP 106 Phone +107 => 8107,SIP 107 Phone +108 => 8108,SIP 108 Phone +109 => 8109,SIP 109 Phone +110 => 8110,SIP 110 Phone +111 => 8111,SIP 111 Phone +112 => 8112,SIP 112 Phone +113 => 8113,SIP 113 Phone +114 => 8114,SIP 114 Phone +115 => 8115,SIP 115 Phone +116 => 8116,SIP 116 Phone +117 => 8117,SIP 117 Phone +118 => 8118,SIP 118 Phone +119 => 8119,SIP 119 Phone +120 => 8110,SIP 120 Phone +121 => 8121,SIP 121 Phone +122 => 8122,SIP 122 Phone +123 => 8123,SIP 123 Phone +124 => 8124,SIP 124 Phone +125 => 8125,SIP 125 Phone +126 => 8126,SIP 126 Phone +127 => 8127,SIP 127 Phone +128 => 8128,SIP 128 Phone +129 => 8129,SIP 129 Phone +130 => 8130,SIP 130 Phone +131 => 8131,SIP 131 Phone +132 => 8132,SIP 132 Phone +133 => 8133,SIP 133 Phone +134 => 8134,SIP 134 Phone +135 => 8135,SIP 135 Phone +136 => 8136,SIP 136 Phone +137 => 8137,SIP 137 Phone +138 => 8138,SIP 138 Phone +139 => 8139,SIP 139 Phone +140 => 8140,SIP 140 Phone +141 => 8141,SIP 141 Phone +142 => 8142,SIP 142 Phone +143 => 8143,SIP 143 Phone +144 => 8144,SIP 144 Phone +145 => 8145,SIP 145 Phone +146 => 8146,SIP 146 Phone +147 => 8147,SIP 147 Phone +148 => 8148,SIP 148 Phone +149 => 8149,SIP 149 Phone +150 => 8150,SIP 150 Phone + +300 => 8300,IAX 301 Phone +301 => 8301,IAX 301 Phone +302 => 8302,IAX 302 Phone +303 => 8303,IAX 303 Phone +304 => 8304,IAX 304 Phone +305 => 8305,IAX 305 Phone +306 => 8306,IAX 306 Phone +307 => 8307,IAX 307 Phone +308 => 8308,IAX 308 Phone +309 => 8309,IAX 309 Phone +310 => 8310,IAX 310 Phone +311 => 8311,IAX 311 Phone +312 => 8312,IAX 312 Phone +313 => 8313,IAX 313 Phone +314 => 8314,IAX 314 Phone +315 => 8315,IAX 315 Phone +316 => 8316,IAX 316 Phone +317 => 8317,IAX 317 Phone +318 => 8318,IAX 318 Phone +319 => 8319,IAX 319 Phone +320 => 8310,IAX 320 Phone +321 => 8321,IAX 321 Phone +322 => 8322,IAX 322 Phone +323 => 8323,IAX 323 Phone +324 => 8324,IAX 324 Phone +325 => 8325,IAX 325 Phone +326 => 8326,IAX 326 Phone +327 => 8327,IAX 327 Phone +328 => 8328,IAX 328 Phone +329 => 8329,IAX 329 Phone +330 => 8330,IAX 330 Phone +331 => 8331,IAX 331 Phone +332 => 8332,IAX 332 Phone +333 => 8333,IAX 333 Phone +334 => 8334,IAX 334 Phone +335 => 8335,IAX 335 Phone +336 => 8336,IAX 336 Phone +337 => 8337,IAX 337 Phone +338 => 8338,IAX 338 Phone +339 => 8339,IAX 339 Phone +340 => 8340,IAX 340 Phone +341 => 8341,IAX 341 Phone +342 => 8342,IAX 342 Phone +343 => 8343,IAX 343 Phone +344 => 8344,IAX 344 Phone +345 => 8345,IAX 345 Phone +346 => 8346,IAX 346 Phone +347 => 8347,IAX 347 Phone +348 => 8348,IAX 348 Phone +349 => 8349,IAX 349 Phone +350 => 8350,IAX 350 Phone + 2000 => 2000,Sipura Mailbox 1 2001 => 2001,Sipura Mailbox 2 3001 => 3001,Firefly Mailbox 1 diff --git a/extras/MySQL_AST_CREATE_tables.sql b/extras/MySQL_AST_CREATE_tables.sql index 4b00249a..d035fa87 100644 --- a/extras/MySQL_AST_CREATE_tables.sql +++ b/extras/MySQL_AST_CREATE_tables.sql @@ -66,6 +66,7 @@ DBY_pass VARCHAR(15) default '1234', DBY_port INT(6) default '3306', outbound_cid VARCHAR(20), enable_sipsak_messages ENUM('0','1') default '0', +email VARCHAR(100), index (server_ip) ); @@ -342,6 +343,7 @@ stage VARCHAR(20) default 'START', last_update_time TIMESTAMP, alt_dial VARCHAR(6) default 'NONE', queue_priority TINYINT(2) default '0', +agent_only VARCHAR(20) default '', index (uniqueid), index (callerid), index (call_time), @@ -390,7 +392,8 @@ user_group VARCHAR(20), xfercallid INT(9) UNSIGNED, term_reason ENUM('CALLER','AGENT','QUEUETIMEOUT','ABANDON','AFTERHOURS','NONE') default 'NONE', index (lead_id), -index (call_date) +index (call_date), +index (campaign_id) ); CREATE TABLE vicidial_xfer_log ( @@ -463,7 +466,9 @@ add_timeclock_log ENUM('1','0') default '0', modify_timeclock_log ENUM('1','0') default '0', delete_timeclock_log ENUM('1','0') default '0', alter_custphone_override ENUM('NOT_ACTIVE','ALLOW_ALTER') default 'NOT_ACTIVE', -vdc_agent_api_access ENUM('0','1') default '0' +vdc_agent_api_access ENUM('0','1') default '0', +modify_inbound_dids ENUM('1','0') default '0', +delete_inbound_dids ENUM('1','0') default '0' ); @@ -633,6 +638,8 @@ leave_3way ENUM('0','1') default '0', leave_3way_datetime DATETIME ); +CREATE UNIQUE INDEX serverconf on vicidial_conferences (server_ip, conf_exten); + CREATE TABLE vicidial_phone_codes ( country_code SMALLINT(5) UNSIGNED, country CHAR(3), @@ -685,7 +692,19 @@ qc_shift_id VARCHAR(20) default '24HRMIDNIGHT', qc_get_record_launch ENUM('NONE','SCRIPT','WEBFORM','QCSCRIPT','QCWEBFORM') default 'NONE', qc_show_recording ENUM('Y','N') default 'Y', qc_web_form_address VARCHAR(255), -qc_script VARCHAR(10) +qc_script VARCHAR(10), +play_place_in_line ENUM('Y','N') default 'N', +play_estimate_hold_time ENUM('Y','N') default 'N', +hold_time_option ENUM('NONE','EXTENSION','VOICEMAIL','IN_GROUP','CALLERID_CALLBACK','DROP_ACTION') default 'NONE', +hold_time_option_seconds SMALLINT(5) default '360', +hold_time_option_exten VARCHAR(20) default '8300', +hold_time_option_voicemail VARCHAR(20) default '', +hold_time_option_xfer_group VARCHAR(20) default '---NONE---', +hold_time_option_callback_filename VARCHAR(50) default 'vm-hangup', +hold_time_option_callback_list_id BIGINT(14) UNSIGNED default '999', +hold_recall_xfer_group VARCHAR(20) default '---NONE---', +no_delay_call_route ENUM('Y','N') default 'N', +play_welcome_message ENUM('ALWAYS','NEVER','IF_WAIT_ONLY','YES_UNLESS_NODELAY') default 'ALWAYS' ); CREATE TABLE vicidial_stations ( @@ -1210,6 +1229,31 @@ index (phone_number), UNIQUE INDEX phonecamp (phone_number, campaign_id) ); +CREATE TABLE vicidial_inbound_dids ( +did_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, +did_pattern VARCHAR(50) NOT NULL, +did_description VARCHAR(50), +did_active ENUM('Y','N') default 'Y', +did_route ENUM('EXTEN','VOICEMAIL','AGENT','PHONE','IN_GROUP') default 'EXTEN', +extension VARCHAR(50) default '9998811112', +exten_context VARCHAR(50) default 'default', +voicemail_ext VARCHAR(10), +phone VARCHAR(100), +server_ip VARCHAR(15), +user VARCHAR(20), +user_unavailable_action ENUM('IN_GROUP','EXTEN','VOICEMAIL','PHONE') default 'VOICEMAIL', +user_route_settings_ingroup VARCHAR(20) default 'AGENTDIRECT', +group_id VARCHAR(20), +call_handle_method VARCHAR(20) default 'CID', +agent_search_method ENUM('LO','LB','SO') default 'LB', +list_id BIGINT(14) UNSIGNED default '999', +campaign_id VARCHAR(8), +phone_code VARCHAR(10) default '1', +unique index (did_pattern), +index (group_id) +); + + ALTER TABLE vicidial_campaign_server_stats ENGINE=HEAP; ALTER TABLE live_channels ENGINE=HEAP; @@ -1225,6 +1269,7 @@ ALTER TABLE web_client_sessions ENGINE=HEAP; UPDATE system_settings SET auto_user_add_value='1101'; +INSERT INTO vicidial_inbound_groups(group_id,group_name,group_color,active) values('AGENTDIRECT','Single Agent Direct Queue','white','Y'); INSERT INTO vicidial_lists SET list_id='999',list_name='Default inbound list',campaign_id='TESTCAMP',active='N'; INSERT INTO vicidial_lists SET list_id='998',list_name='Default Manual list',campaign_id='TESTCAMP',active='N'; @@ -1264,7 +1309,7 @@ INSERT INTO vicidial_shifts SET shift_id='24HRMIDNIGHT',shift_name='24 hours 7 d UPDATE system_settings SET qc_last_pull_time=NOW(); -UPDATE system_settings SET db_schema_version='1106'; +UPDATE system_settings SET db_schema_version='1107'; GRANT RELOAD ON *.* TO cron@'%'; GRANT RELOAD ON *.* TO cron@localhost; diff --git a/extras/upgrade_2.0.5.sql b/extras/upgrade_2.0.5.sql index e61a2614..ad9fd0b2 100644 --- a/extras/upgrade_2.0.5.sql +++ b/extras/upgrade_2.0.5.sql @@ -406,3 +406,55 @@ ALTER TABLE vicidial_conferences ADD leave_3way ENUM('0','1') default '0'; ALTER TABLE vicidial_conferences ADD leave_3way_datetime DATETIME; UPDATE system_settings SET db_schema_version='1106'; + +CREATE UNIQUE INDEX serverconf on vicidial_conferences (server_ip, conf_exten); + +CREATE INDEX campaign_id on vicidial_closer_log (campaign_id); + +ALTER TABLE vicidial_inbound_groups ADD play_place_in_line ENUM('Y','N') default 'N'; +ALTER TABLE vicidial_inbound_groups ADD play_estimate_hold_time ENUM('Y','N') default 'N'; +ALTER TABLE vicidial_inbound_groups ADD hold_time_option ENUM('NONE','EXTENSION','VOICEMAIL','IN_GROUP','CALLERID_CALLBACK','DROP_ACTION') default 'NONE'; +ALTER TABLE vicidial_inbound_groups ADD hold_time_option_seconds SMALLINT(5) default '360'; +ALTER TABLE vicidial_inbound_groups ADD hold_time_option_exten VARCHAR(20) default '8300'; +ALTER TABLE vicidial_inbound_groups ADD hold_time_option_voicemail VARCHAR(20) default ''; +ALTER TABLE vicidial_inbound_groups ADD hold_time_option_xfer_group VARCHAR(20) default '---NONE---'; +ALTER TABLE vicidial_inbound_groups ADD hold_time_option_callback_filename VARCHAR(50) default 'vm-hangup'; +ALTER TABLE vicidial_inbound_groups ADD hold_time_option_callback_list_id BIGINT(14) UNSIGNED default '999'; +ALTER TABLE vicidial_inbound_groups ADD hold_recall_xfer_group VARCHAR(20) default '---NONE---'; +ALTER TABLE vicidial_inbound_groups ADD no_delay_call_route ENUM('Y','N') default 'N'; +ALTER TABLE vicidial_inbound_groups ADD play_welcome_message ENUM('ALWAYS','NEVER','IF_WAIT_ONLY','YES_UNLESS_NODELAY') default 'ALWAYS'; + +INSERT INTO vicidial_inbound_groups(group_id,group_name,group_color,active) values('AGENTDIRECT','Single Agent Direct Queue','white','Y'); + +CREATE TABLE vicidial_inbound_dids ( +did_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, +did_pattern VARCHAR(50) NOT NULL, +did_description VARCHAR(50), +did_active ENUM('Y','N') default 'Y', +did_route ENUM('EXTEN','VOICEMAIL','AGENT','PHONE','IN_GROUP') default 'EXTEN', +extension VARCHAR(50) default '9998811112', +exten_context VARCHAR(50) default 'default', +voicemail_ext VARCHAR(10), +phone VARCHAR(100), +server_ip VARCHAR(15), +user VARCHAR(20), +user_unavailable_action ENUM('IN_GROUP','EXTEN','VOICEMAIL','PHONE') default 'VOICEMAIL', +user_route_settings_ingroup VARCHAR(20) default 'AGENTDIRECT', +group_id VARCHAR(20), +call_handle_method VARCHAR(20) default 'CID', +agent_search_method ENUM('LO','LB','SO') default 'LB', +list_id BIGINT(14) UNSIGNED default '999', +campaign_id VARCHAR(8), +phone_code VARCHAR(10) default '1', +unique index (did_pattern), +index (group_id) +); + +ALTER TABLE vicidial_auto_calls ADD agent_only VARCHAR(20) default ''; + +ALTER TABLE phones ADD email VARCHAR(100); + +ALTER TABLE vicidial_users ADD modify_inbound_dids ENUM('1','0') default '0'; +ALTER TABLE vicidial_users ADD delete_inbound_dids ENUM('1','0') default '0'; + +UPDATE system_settings SET db_schema_version='1107'; diff --git a/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.5.txt b/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.5.txt index beaa3f83..1aca96a8 100644 --- a/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.5.txt +++ b/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.5.txt @@ -247,6 +247,89 @@ Use Campaign DNC List|| and possibly the campaign-specific DNC list|| There is also the option to add leads to the campaign-specific DNC lists for those campaigns that have them|| NOTE: Copying a campaign will copy all settings from the master campaign you select, but it will not copy a campaign-specific DNC list if there was one on the selected master campaign|| +Add New || +Copy || +New DID Addition|| +New Copied DID Addition|| +Modify || +Delete || +Play Place in Line -<\/B> This defines whether the caller will hear their place in line when they enter the queue as well as when they hear the announcemend. Default is N|| +Play Estimated Hold Time -<\/B> This defines whether the caller will hear the estimated hold time before they are transferred to an agent. Default is N|| +Hold Time Option -<\/B> This allows you to specify the routing of the call if the estimated hold time is over the amount of seconds specified below. Default is NONE|| +Hold Time Option Seconds -<\/B> If Hold Time Option is set to anything but NONE, this is the number of seconds of estimated hold time that will trigger the hold time option. Default is 360 seconds|| +Hold Time Option Extension -<\/B> If Hold Time Option is set to EXTENSION, this is the dialplan extension that the call will be sent to if the estimated hold time exceeds the Hold Time Option Seconds|| +Hold Time Option Voicemail -<\/B> If Hold Time Option is set to VOICEMAIL, this is the voicemail box that the call will be sent to if the estimated hold time exceeds the Hold Time Option Seconds|| +Hold Time Option Transfer In-Group -<\/B> If Hold Time Option is set to IN_GROUP, this is the inbound group that the call will be sent to if the estimated hold time exceeds the Hold Time Option Seconds|| +Hold Time Option Callback Filename -<\/B> If Hold Time Option is set to CALLERID_CALLBACK, this is the filename prompt that is played before the call is logged as a new lead to the list ID specified below if the estimated hold time exceeds the Hold Time Option Seconds|| +Hold Time Option Callback List ID -<\/B> If Hold Time Option is set to CALLERID_CALLBACK, this is the List ID the call is added to as a new lead if the estimated hold time exceeds the Hold Time Option Seconds|| +Hold Recall Transfer In-Group -<\/B> If a customer calls back to this in-group more than once and this is not set to NONE, then the call will automatically be sent on to the In-Group selected in this field. Default is NONE|| +No Delay Call Route -<\/B> Setting this to Y will remove all wait times and audio prompts and attempt to send the call right to an agent. Does not override welcome message or on hold prompt settings. Default is N|| +Play Welcome Message -<\/B> These settings select when to play the defined welcome message, ALWAYS will play it every time, NEVER will never play it, IF_WAIT_ONLY will only play the welcome message if the call does not immediately go to an agent, and YES_UNLESS_NODELAY will always play the welcome message unless the NO_DELAY setting is enabled. Default is ALWAYS|| +Play Place in Line: || +Play Estimated Hold Time: || +Hold Time Option: || +Hold Time Option Seconds: || +Hold Time Option Extension: || +Hold Time Option Voicemail: || +Hold Time Option Transfer In-Group: || +Hold Time Option Callback Filename: || +Hold Time Option Callback List ID: || +Hold Recall Transfer In-Group: || +No Delay Call Route: || +Play Welcome Message: || +DID Extension -<\/B> This is the number, extension or DID that will trigger this entry and that you will route within the system using this function|| +DID Description -<\/B> This is the description of the DID routing entry|| +DID Active -<\/B> This the field where you set the DID entry to active or not. Default is Y|| +DID Route -<\/B> This the type of route that you set the DID to use. EXTEN will send calls to the extension entered below, VOICEMAIL will send calls directly to the voicemail box entered below, AGENT will send calls to a VICIDIAL agent if they are logged in, PHONE will send the call to a phones entry selected below, IN_GROUP will send calls directly to the specified inbound group. Default is EXTEN|| +Extension -<\/B> If EXTEN is selected as the DID Route, then this is the dialplan extension that calls will be sent to. Default is 9998811112, no-service|| +Extension Context -<\/B> If EXTEN is selected as the DID Route, then this is the dialplan context that calls will be sent to. Default is default|| +Voicemail Box -<\/B> If VOICEMAIL is selected as the DID Route, then this is the voicemail box that calls will be sent to. Default is empty|| +Phone Extension -<\/B> If PHONE is selected as the DID Route, then this is the phone extension that calls will be sent to.|| +Phone Server IP -<\/B> If PHONE is selected as the DID Route, then this is the server IP for the phone extension that calls will be sent to|| +User Agent -<\/B> If AGENT is selected as the DID Route, then this is the VICIDIAL Agent that calls will be sent to|| +User Unavailable Action -<\/B> If AGENT is selected as the DID Route, and the user is not logged in or available, then this is the route that the calls will take|| +User Route Settings In-Group - If AGENT is selected as the DID Route, then this is the In-Group that will be used for the queue settings as the caller is waiting to be sent to the agent. Default is AGENTDIRECT|| +In-Group ID -<\/B> If IN_GROUP is selected as the DID Route, then this is the In-Group that calls will be sent to|| +In-Group Call Handle Method -<\/B> If IN_GROUP is selected as the DID Route, then this is the call handling method used for these calls. CID will add a new lead record with every call using the CallerID as the phone number, CIDLOOKUP will attempt to lookup the phone number by the CallerID in the entire system, CIDLOOKUPRL will attampt to lookup the phone number by the CallerID in only one specified list, CIDLOOKUPRC will attampt to lookup the phone number by the CallerID in all of the lists that belong to the specified campaign, CLOSER is specified for VICIDIAL Closer calls, ANI will add a new lead record with every call using the ANI as the phone number, ANILOOKUP will attempt to lookup the phone number by the ANI in the entire system, ANILOOKUPRL will attampt to lookup the phone number by the ANI in only one specified list, XDIGITID will prompt the caller for an X digit code before the call will be put into the queue. Default is CID|| +In-Group Agent Search Method -<\/B> If IN_GROUP is selected as the DID Route, then this is the agent search method to be used by the inbound group, LO is Load-Balanced-Overflow and will try to send the call to an agent on the local server before trying to send it to an agent on another server, LB is Load-Balanced and will try to send the call to the next agent no matter what server they are on, SO is Server-Only and will only try to send the calls to agents on the server that the call came in on. Default is LB|| +In-Group List ID -<\/B> If IN_GROUP is selected as the DID Route, then this is the List ID that leads may be searched through and that leads will be inserted into if necessary|| +In-Group Campaign ID -<\/B> If IN_GROUP is selected as the DID Route, then this is the Campaign ID that leads may be searched for in if the call handle method is CIDLOOKUPRC|| +In-Group Phone Code -<\/B> If IN_GROUP is selected as the DID Route, then this is the Phone Code used if a new lead is created|| +Phones Email -<\/B> The email address associated with this phone entry. This is used for voicemail settings|| +ADD A NEW DID|| +DID Extension: || +DID Description: || +COPY DID|| +Source DID: || +DID NOT ADDED|| +there is already a DID in the system with this ID|| +there is already a DID in the system with this extension|| +DID NOT MODIFIED|| +DID MODIFIED|| +MODIFY A DID RECORD: || +DID Route: || +Extension: || +Extension Context: || +Voicemail Box: || +Phone Extension: || +User Agent: || +User Unavailable Action: || +User Route Settings In-Group: || +In-Group ID: || +In-Group Call Handle Method: || +In-Group Agent Search Method: || +In-Group List ID: || +In-Group Campaign ID: || +In-Group Phone Code: || +DELETE THIS DID|| +Email: || +DID NOT DELETED|| +DID DELETION CONFIRMATION|| +Click here to delete || +DID DELETION COMPLETED|| +Delete DIDs: || +Modify DIDs: || +To disable the On Hold Prompt, set the interval to 0|| ############################################################ CLIENT diff --git a/www/vicidial/admin.php b/www/vicidial/admin.php index 7158e3d1..dd8ef706 100644 --- a/www/vicidial/admin.php +++ b/www/vicidial/admin.php @@ -787,6 +787,62 @@ if (isset($_GET["agent_clipboard_copy"])) {$agent_clipboard_copy=$_GET["agent_ elseif (isset($_POST["agent_clipboard_copy"])) {$agent_clipboard_copy=$_POST["agent_clipboard_copy"];} if (isset($_GET["agent_extended_alt_dial"])) {$agent_extended_alt_dial=$_GET["agent_extended_alt_dial"];} elseif (isset($_POST["agent_extended_alt_dial"])) {$agent_extended_alt_dial=$_POST["agent_extended_alt_dial"];} +if (isset($_GET["play_place_in_line"])) {$play_place_in_line=$_GET["play_place_in_line"];} + elseif (isset($_POST["play_place_in_line"])) {$play_place_in_line=$_POST["play_place_in_line"];} +if (isset($_GET["play_estimate_hold_time"])) {$play_estimate_hold_time=$_GET["play_estimate_hold_time"];} + elseif (isset($_POST["play_estimate_hold_time"])) {$play_estimate_hold_time=$_POST["play_estimate_hold_time"];} +if (isset($_GET["hold_time_option"])) {$hold_time_option=$_GET["hold_time_option"];} + elseif (isset($_POST["hold_time_option"])) {$hold_time_option=$_POST["hold_time_option"];} +if (isset($_GET["hold_time_option_seconds"])) {$hold_time_option_seconds=$_GET["hold_time_option_seconds"];} + elseif (isset($_POST["hold_time_option_seconds"])) {$hold_time_option_seconds=$_POST["hold_time_option_seconds"];} +if (isset($_GET["hold_time_option_exten"])) {$hold_time_option_exten=$_GET["hold_time_option_exten"];} + elseif (isset($_POST["hold_time_option_exten"])) {$hold_time_option_exten=$_POST["hold_time_option_exten"];} +if (isset($_GET["hold_time_option_voicemail"])) {$hold_time_option_voicemail=$_GET["hold_time_option_voicemail"];} + elseif (isset($_POST["hold_time_option_voicemail"])) {$hold_time_option_voicemail=$_POST["hold_time_option_voicemail"];} +if (isset($_GET["hold_time_option_xfer_group"])) {$hold_time_option_xfer_group=$_GET["hold_time_option_xfer_group"];} + elseif (isset($_POST["hold_time_option_xfer_group"])) {$hold_time_option_xfer_group=$_POST["hold_time_option_xfer_group"];} +if (isset($_GET["hold_time_option_callback_filename"])) {$hold_time_option_callback_filename=$_GET["hold_time_option_callback_filename"];} + elseif (isset($_POST["hold_time_option_callback_filename"])) {$hold_time_option_callback_filename=$_POST["hold_time_option_callback_filename"];} +if (isset($_GET["hold_time_option_callback_list_id"])) {$hold_time_option_callback_list_id=$_GET["hold_time_option_callback_list_id"];} + elseif (isset($_POST["hold_time_option_callback_list_id"])) {$hold_time_option_callback_list_id=$_POST["hold_time_option_callback_list_id"];} +if (isset($_GET["hold_recall_xfer_group"])) {$hold_recall_xfer_group=$_GET["hold_recall_xfer_group"];} + elseif (isset($_POST["hold_recall_xfer_group"])) {$hold_recall_xfer_group=$_POST["hold_recall_xfer_group"];} +if (isset($_GET["no_delay_call_route"])) {$no_delay_call_route=$_GET["no_delay_call_route"];} + elseif (isset($_POST["no_delay_call_route"])) {$no_delay_call_route=$_POST["no_delay_call_route"];} +if (isset($_GET["play_welcome_message"])) {$play_welcome_message=$_GET["play_welcome_message"];} + elseif (isset($_POST["play_welcome_message"])) {$play_welcome_message=$_POST["play_welcome_message"];} +if (isset($_GET["did_id"])) {$did_id=$_GET["did_id"];} + elseif (isset($_POST["did_id"])) {$did_id=$_POST["did_id"];} +if (isset($_GET["source_did"])) {$source_did=$_GET["source_did"];} + elseif (isset($_POST["source_did"])) {$source_did=$_POST["source_did"];} +if (isset($_GET["did_pattern"])) {$did_pattern=$_GET["did_pattern"];} + elseif (isset($_POST["did_pattern"])) {$did_pattern=$_POST["did_pattern"];} +if (isset($_GET["did_description"])) {$did_description=$_GET["did_description"];} + elseif (isset($_POST["did_description"])) {$did_description=$_POST["did_description"];} +if (isset($_GET["did_active"])) {$did_active=$_GET["did_active"];} + elseif (isset($_POST["did_active"])) {$did_active=$_POST["did_active"];} +if (isset($_GET["did_route"])) {$did_route=$_GET["did_route"];} + elseif (isset($_POST["did_route"])) {$did_route=$_POST["did_route"];} +if (isset($_GET["exten_context"])) {$exten_context=$_GET["exten_context"];} + elseif (isset($_POST["exten_context"])) {$exten_context=$_POST["exten_context"];} +if (isset($_GET["phone"])) {$phone=$_GET["phone"];} + elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];} +if (isset($_GET["user_unavailable_action"])) {$user_unavailable_action=$_GET["user_unavailable_action"];} + elseif (isset($_POST["user_unavailable_action"])) {$user_unavailable_action=$_POST["user_unavailable_action"];} +if (isset($_GET["user_route_settings_ingroup"])) {$user_route_settings_ingroup=$_GET["user_route_settings_ingroup"];} + elseif (isset($_POST["user_route_settings_ingroup"])) {$user_route_settings_ingroup=$_POST["user_route_settings_ingroup"];} +if (isset($_GET["call_handle_method"])) {$call_handle_method=$_GET["call_handle_method"];} + elseif (isset($_POST["call_handle_method"])) {$call_handle_method=$_POST["call_handle_method"];} +if (isset($_GET["agent_search_method"])) {$agent_search_method=$_GET["agent_search_method"];} + elseif (isset($_POST["agent_search_method"])) {$agent_search_method=$_POST["agent_search_method"];} +if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];} + elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];} +if (isset($_GET["email"])) {$email=$_GET["email"];} + elseif (isset($_POST["email"])) {$email=$_POST["email"];} +if (isset($_GET["modify_inbound_dids"])) {$modify_inbound_dids=$_GET["modify_inbound_dids"];} + elseif (isset($_POST["modify_inbound_dids"])) {$modify_inbound_dids=$_POST["modify_inbound_dids"];} +if (isset($_GET["delete_inbound_dids"])) {$delete_inbound_dids=$_GET["delete_inbound_dids"];} + elseif (isset($_POST["delete_inbound_dids"])) {$delete_inbound_dids=$_POST["delete_inbound_dids"];} if (isset($script_id)) {$script_id= strtoupper($script_id);} @@ -951,6 +1007,12 @@ $modify_timeclock_log = ereg_replace("[^0-9]","",$modify_timeclock_log); $delete_timeclock_log = ereg_replace("[^0-9]","",$delete_timeclock_log); $vdc_agent_api_access = ereg_replace("[^0-9]","",$vdc_agent_api_access); $vdc_agent_api_active = ereg_replace("[^0-9]","",$vdc_agent_api_active); +$hold_time_option_seconds = ereg_replace("[^0-9]","",$hold_time_option_seconds); +$hold_time_option_callback_list_id = ereg_replace("[^0-9]","",$hold_time_option_callback_list_id); +$did_id = ereg_replace("[^0-9]","",$did_id); +$source_did = ereg_replace("[^0-9]","",$source_did); +$modify_inbound_dids = ereg_replace("[^0-9]","",$modify_inbound_dids); +$delete_inbound_dids = ereg_replace("[^0-9]","",$delete_inbound_dids); ### DIGITS and COLONS $shift_length = ereg_replace("[^\:0-9]","",$shift_length); @@ -996,6 +1058,10 @@ $qc_show_recording = ereg_replace("[^NY]","",$qc_show_recording); $sale_category = ereg_replace("[^NY]","",$sale_category); $dead_lead_category = ereg_replace("[^NY]","",$dead_lead_category); $agent_extended_alt_dial = ereg_replace("[^NY]","",$agent_extended_alt_dial); +$play_place_in_line = ereg_replace("[^NY]","",$play_place_in_line); +$play_estimate_hold_time = ereg_replace("[^NY]","",$play_estimate_hold_time); +$no_delay_call_route = ereg_replace("[^NY]","",$no_delay_call_route); +$did_active = ereg_replace("[^NY]","",$did_active); $qc_enabled = ereg_replace("[^0-9NY]","",$qc_enabled); @@ -1124,6 +1190,18 @@ $survey_method = ereg_replace("[^-\_0-9a-zA-Z]","",$survey_method); $alter_custphone_override = ereg_replace("[^-\_0-9a-zA-Z]","",$alter_custphone_override); $manual_dial_filter = ereg_replace("[^-\_0-9a-zA-Z]","",$manual_dial_filter); $agent_clipboard_copy = ereg_replace("[^-\_0-9a-zA-Z]","",$agent_clipboard_copy); +$hold_time_option = ereg_replace("[^-\_0-9a-zA-Z]","",$hold_time_option); +$hold_time_option_xfer_group = ereg_replace("[^-\_0-9a-zA-Z]","",$hold_time_option_xfer_group); +$hold_recall_xfer_group = ereg_replace("[^-\_0-9a-zA-Z]","",$hold_recall_xfer_group); +$play_welcome_message = ereg_replace("[^-\_0-9a-zA-Z]","",$play_welcome_message); +$did_route = ereg_replace("[^-\_0-9a-zA-Z]","",$did_route); +$user_unavailable_action = ereg_replace("[^-\_0-9a-zA-Z]","",$user_unavailable_action); +$user_route_settings_ingroup = ereg_replace("[^-\_0-9a-zA-Z]","",$user_route_settings_ingroup); +$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); ### ALPHA-NUMERIC and underscore and dash and comma $logins_list = ereg_replace("[^-\,\_0-9a-zA-Z]","",$logins_list); @@ -1132,6 +1210,12 @@ $logins_list = ereg_replace("[^-\,\_0-9a-zA-Z]","",$logins_list); $lead_order = ereg_replace("[^ 0-9a-zA-Z]","",$lead_order); ### ALPHA-NUMERIC and hash $group_color = ereg_replace("[^\#0-9a-zA-Z]","",$group_color); +### ALPHA-NUMERIC and hash and star and dot and underscore +$hold_time_option_exten = ereg_replace("[^\*\#\.\_0-9a-zA-Z]","",$hold_time_option_exten); +$did_pattern = ereg_replace("[^\*\#\.\_0-9a-zA-Z]","",$did_pattern); +$voicemail_ext = ereg_replace("[^\*\#\.\_0-9a-zA-Z]","",$voicemail_ext); +$phone = ereg_replace("[^\*\#\.\_0-9a-zA-Z]","",$phone); +$phone_code = ereg_replace("[^\*\#\.\_0-9a-zA-Z]","",$phone_code); ### ALPHA-NUMERIC and spaces dots, commas, dashes, underscores $adaptive_dl_diff_target = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$adaptive_dl_diff_target); @@ -1168,6 +1252,7 @@ $vsc_description = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$vsc_description); $code_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$code_name); $alias_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$alias_name); $shift_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$shift_name); +$did_description = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$did_description); ### ALPHA-NUMERIC and underscore and dash and slash and at and dot $call_out_number_group = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$call_out_number_group); @@ -1185,6 +1270,7 @@ $queuemetrics_pass = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$queuemetrics_pas $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); ### ALPHA-NUMERIC and underscore and dash and slash and at and space and colon $vdc_header_date_format = ereg_replace("[^- \:\/\_0-9a-zA-Z]","",$vdc_header_date_format); @@ -1367,11 +1453,12 @@ $survey_camp_record_dir = ereg_replace(";","",$survey_camp_record_dir); # 80829-2359 - Added EXTENDED auto_alt_dial options # 80831-0406 - Added agent screen extended alt-dial option to campaigns # 80909-0553 - Added campaign-specific DNC list option and add +# 81002-1101 - Added more in-group options and new DID section and user options # # 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.0.5-142'; -$build = '80909-0553'; +$admin_version = '2.0.5-143'; +$build = '81002-1101'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -1469,6 +1556,8 @@ $browser = getenv("HTTP_USER_AGENT"); $LOGmodify_remoteagents =$row[41]; $LOGmodify_servers =$row[42]; $LOGview_reports =$row[43]; + $LOGmodify_dids =$row[56]; + $LOGdelete_dids =$row[57]; $stmt="SELECT allowed_campaigns from vicidial_user_groups where user_group='$LOGuser_group';"; $rslt=mysql_query($stmt, $link); @@ -1514,6 +1603,8 @@ if ($ADD==111) {$hh='lists'; echo "Add New List";} if ($ADD==121) {$hh='lists'; echo "Add New DNC";} if ($ADD==1111) {$hh='ingroups'; echo "Add New In-Group";} if ($ADD==1211) {$hh='ingroups'; echo "Copy In-Group";} +if ($ADD==1311) {$hh='ingroups'; echo "Add New DID";} +if ($ADD==1411) {$hh='ingroups'; echo "Copy DID";} if ($ADD==11111) {$hh='remoteagent'; echo "Add New Remote Agents";} if ($ADD==111111) {$hh='usergroups'; echo "Add New Users Group";} if ($ADD==1111111) {$hh='scripts'; echo "Add New Script";} @@ -1540,6 +1631,8 @@ if ($ADD==29) {$hh='campaigns'; $sh='listmix'; echo "Campaign List Mix Added"; if ($ADD==211) {$hh='lists'; echo "New List Addition";} if ($ADD==2111) {$hh='ingroups'; echo "New In-Group Addition";} if ($ADD==2011) {$hh='ingroups'; echo "New Copied In-Group Addition";} +if ($ADD==2311) {$hh='ingroups'; echo "New DID Addition";} +if ($ADD==2411) {$hh='ingroups'; echo "New Copied DID Addition";} if ($ADD==21111) {$hh='remoteagent'; echo "New Remote Agents Addition";} if ($ADD==211111) {$hh='usergroups'; echo "New Users Group Addition";} if ($ADD==2111111) {$hh='scripts'; echo "New Script Addition";} @@ -1591,6 +1684,7 @@ if ($ADD==38) {$hh='campaigns'; $sh='dialstat'; echo "Campaign Dial Statuses"; if ($ADD==39) {$hh='campaigns'; $sh='listmix'; echo "Campaign List Mixes";} if ($ADD==311) {$hh='lists'; echo "Modify List";} if ($ADD==3111) {$hh='ingroups'; echo "Modify In-Group";} +if ($ADD==3311) {$hh='ingroups'; echo "Modify DID";} if ($ADD==31111) {$hh='remoteagent'; echo "Modify Remote Agents";} if ($ADD==311111) {$hh='usergroups'; echo "Modify Users Groups";} if ($ADD==3111111) {$hh='scripts'; echo "Modify Script";} @@ -1622,6 +1716,7 @@ if ($ADD==49) {$hh='campaigns'; $sh='listmix'; echo "Modify Campaign List Mix" if ($ADD=='40A') {$hh='campaigns'; $sh='survey'; echo "Modify Campaign Survey";} if ($ADD==411) {$hh='lists'; echo "Modify List";} if ($ADD==4111) {$hh='ingroups'; echo "Modify In-Group";} +if ($ADD==4311) {$hh='ingroups'; echo "Modify DID";} if ($ADD==41111) {$hh='remoteagent'; echo "Modify Remote Agents";} if ($ADD==411111) {$hh='usergroups'; echo "Modify Users Groups";} if ($ADD==4111111) {$hh='scripts'; echo "Modify Script";} @@ -1645,6 +1740,7 @@ if ($ADD==52) {$hh='campaigns'; $sh='detail'; echo "Logout Agents";} if ($ADD==53) {$hh='campaigns'; $sh='detail'; echo "Emergency VDAC Jam Clear";} if ($ADD==511) {$hh='lists'; echo "Delete List";} if ($ADD==5111) {$hh='ingroups'; echo "Delete In-Group";} +if ($ADD==5311) {$hh='ingroups'; echo "Delete DID";} if ($ADD==51111) {$hh='remoteagent'; echo "Delete Remote Agents";} if ($ADD==511111) {$hh='usergroups'; echo "Delete Users Group";} if ($ADD==5111111) {$hh='scripts'; echo "Delete Script";} @@ -1668,6 +1764,7 @@ if ($ADD==68) {$hh='campaigns'; $sh='dialstat'; echo "Campaign Dial Status Rem if ($ADD==69) {$hh='campaigns'; $sh='listmix'; echo "Campaign List Mix Removed";} if ($ADD==611) {$hh='lists'; echo "Delete List";} if ($ADD==6111) {$hh='ingroups'; echo "Delete In-Group";} +if ($ADD==6311) {$hh='ingroups'; echo "Delete DID";} if ($ADD==61111) {$hh='remoteagent'; echo "Delete Remote Agents";} if ($ADD==611111) {$hh='usergroups'; echo "Delete Users Group";} if ($ADD==6111111) {$hh='scripts'; echo "Delete Script";} @@ -1691,6 +1788,7 @@ if ($ADD==8111) {$hh='usergroups'; echo "CallBacks Within User Group";} if ($ADD==10) {$hh='campaigns'; $sh='list'; echo "Campaigns";} if ($ADD==100) {$hh='lists'; echo "Lists";} if ($ADD==1000) {$hh='ingroups'; echo "In-Groups";} +if ($ADD==1300) {$hh='ingroups'; echo "DIDs";} if ($ADD==10000) {$hh='remoteagent'; echo "Remote Agents";} if ($ADD==100000) {$hh='usergroups'; echo "User Groups";} if ($ADD==1000000) {$hh='scripts'; echo "Scripts";} @@ -1932,7 +2030,7 @@ if ( ( (strlen($ADD)>4) && ($ADD < 99998) ) or ($ADD==3) or (($ADD>20) and ($ADD $groups = explode(" ", $closer_campaigns); } - $stmt="SELECT group_id,group_name from vicidial_inbound_groups order by group_id"; + $stmt="SELECT group_id,group_name from vicidial_inbound_groups where group_id NOT IN('AGENTDIRECT') order by group_id"; $rslt=mysql_query($stmt, $link); $groups_to_print = mysql_num_rows($rslt); $groups_list=''; @@ -2126,7 +2224,7 @@ if ( ( (strlen($ADD)>4) && ($ADD < 99998) ) or ($ADD==3) or (($ADD>20) and ($ADD $o++; } - $stmt="SELECT group_id,group_name from vicidial_inbound_groups order by group_id"; + $stmt="SELECT group_id,group_name from vicidial_inbound_groups where group_id NOT IN('AGENTDIRECT') order by group_id"; $rslt=mysql_query($stmt, $link); $groups_to_print = mysql_num_rows($rslt); @@ -2158,7 +2256,7 @@ if ( ( (strlen($ADD)>4) && ($ADD < 99998) ) or ($ADD==3) or (($ADD>20) and ($ADD ##### END get campaigns listing for checkboxes ##### - if ( (strlen($ADD)==11) or (strlen($ADD)>12) ) + if ( (strlen($ADD)==11) or (strlen($ADD)>12) or ( ($ADD > 1299) and ($ADD < 9999) ) ) { ##### get server listing for dynamic pulldown $stmt="SELECT server_ip,server_description from servers order by server_ip"; @@ -3101,6 +3199,11 @@ echo "
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--- +
+ +
+Play Welcome Message - These settings select when to play the defined welcome message, ALWAYS will play it every time, NEVER will never play it, IF_WAIT_ONLY will only play the welcome message if the call does not immediately go to an agent, and YES_UNLESS_NODELAY will always play the welcome message unless the NO_DELAY setting is enabled. Default is ALWAYS. +

@@ -3114,7 +3217,52 @@ echo "

-On Hold Prompt Interval - The length of time in seconds to wait before playing the on hold prompt. Default is 60. +On Hold Prompt Interval - The length of time in seconds to wait before playing the on hold prompt. Default is 60. To disable the On Hold Prompt, set the interval to 0. + +
+
+
+Play Place in Line - This defines whether the caller will hear their place in line when they enter the queue as well as when they hear the announcemend. Default is N. + +
+
+
+Play Estimated Hold Time - This defines whether the caller will hear the estimated hold time before they are transferred to an agent. Default is N. + +
+
+
+Hold Time Option - This allows you to specify the routing of the call if the estimated hold time is over the amount of seconds specified below. Default is NONE. + +
+
+
+Hold Time Option Seconds - If Hold Time Option is set to anything but NONE, this is the number of seconds of estimated hold time that will trigger the hold time option. Default is 360 seconds. + +
+
+
+Hold Time Option Extension - If Hold Time Option is set to EXTENSION, this is the dialplan extension that the call will be sent to if the estimated hold time exceeds the Hold Time Option Seconds. + +
+
+
+Hold Time Option Voicemail - If Hold Time Option is set to VOICEMAIL, this is the voicemail box that the call will be sent to if the estimated hold time exceeds the Hold Time Option Seconds. + +
+
+
+Hold Time Option Transfer In-Group - If Hold Time Option is set to IN_GROUP, this is the inbound group that the call will be sent to if the estimated hold time exceeds the Hold Time Option Seconds. + +
+
+
+Hold Time Option Callback Filename - If Hold Time Option is set to CALLERID_CALLBACK, this is the filename prompt that is played before the call is logged as a new lead to the list ID specified below if the estimated hold time exceeds the Hold Time Option Seconds. + +
+
+
+Hold Time Option Callback List ID - If Hold Time Option is set to CALLERID_CALLBACK, this is the List ID the call is added to as a new lead if the estimated hold time exceeds the Hold Time Option Seconds.
@@ -3176,6 +3324,113 @@ echo "> +> 1) { ?> @@ -5191,7 +5452,7 @@ if ($ADD==1211) echo "
QC Script - This is the script that can be used by QC agents in the SCRIPT tab in the QC screen. +
+ +
+Hold Recall Transfer In-Group - If a customer calls back to this in-group more than once and this is not set to NONE, then the call will automatically be sent on to the In-Group selected in this field. Default is NONE. + +
+
+
+No Delay Call Route - Setting this to Y will remove all wait times and audio prompts and attempt to send the call right to an agent. Does not override welcome message or on hold prompt settings. Default is N. + + + + +



+ +VICIDIAL_INBOUND_DIDS TABLE

+
+
+
+DID Extension - This is the number, extension or DID that will trigger this entry and that you will route within the system using this function. + +
+
+
+DID Description - This is the description of the DID routing entry. + +
+
+
+DID Active - This the field where you set the DID entry to active or not. Default is Y. + +
+
+
+DID Route - This the type of route that you set the DID to use. EXTEN will send calls to the extension entered below, VOICEMAIL will send calls directly to the voicemail box entered below, AGENT will send calls to a VICIDIAL agent if they are logged in, PHONE will send the call to a phones entry selected below, IN_GROUP will send calls directly to the specified inbound group. Default is EXTEN. + +
+
+
+Extension - If EXTEN is selected as the DID Route, then this is the dialplan extension that calls will be sent to. Default is 9998811112, no-service. + +
+
+
+Extension Context - If EXTEN is selected as the DID Route, then this is the dialplan context that calls will be sent to. Default is default. + +
+
+
+Voicemail Box - If VOICEMAIL is selected as the DID Route, then this is the voicemail box that calls will be sent to. Default is empty. + +
+
+
+Phone Extension - If PHONE is selected as the DID Route, then this is the phone extension that calls will be sent to. + +
+
+
+Phone Server IP - If PHONE is selected as the DID Route, then this is the server IP for the phone extension that calls will be sent to. + +
+
+
+User Agent - If AGENT is selected as the DID Route, then this is the VICIDIAL Agent that calls will be sent to. + +
+
+
+User Unavailable Action - If AGENT is selected as the DID Route, and the user is not logged in or available, then this is the route that the calls will take. + +
+
+
+User Route Settings In-Group - If AGENT is selected as the DID Route, then this is the In-Group that will be used for the queue settings as the caller is waiting to be sent to the agent. Default is AGENTDIRECT. + +
+
+
+In-Group ID - If IN_GROUP is selected as the DID Route, then this is the In-Group that calls will be sent to. + +
+
+
+In-Group Call Handle Method - If IN_GROUP is selected as the DID Route, then this is the call handling method used for these calls. CID will add a new lead record with every call using the CallerID as the phone number, CIDLOOKUP will attempt to lookup the phone number by the CallerID in the entire system, CIDLOOKUPRL will attampt to lookup the phone number by the CallerID in only one specified list, CIDLOOKUPRC will attampt to lookup the phone number by the CallerID in all of the lists that belong to the specified campaign, CLOSER is specified for VICIDIAL Closer calls, ANI will add a new lead record with every call using the ANI as the phone number, ANILOOKUP will attempt to lookup the phone number by the ANI in the entire system, ANILOOKUPRL will attampt to lookup the phone number by the ANI in only one specified list, XDIGITID will prompt the caller for an X digit code before the call will be put into the queue. Default is CID. + +
+
+
+In-Group Agent Search Method - If IN_GROUP is selected as the DID Route, then this is the agent search method to be used by the inbound group, LO is Load-Balanced-Overflow and will try to send the call to an agent on the local server before trying to send it to an agent on another server, LB is Load-Balanced and will try to send the call to the next agent no matter what server they are on, SO is Server-Only and will only try to send the calls to agents on the server that the call came in on. Default is LB. + +
+
+
+In-Group List ID - If IN_GROUP is selected as the DID Route, then this is the List ID that leads may be searched through and that leads will be inserted into if necessary. + +
+
+
+In-Group Campaign ID - If IN_GROUP is selected as the DID Route, then this is the Campaign ID that leads may be searched for in if the call handle method is CIDLOOKUPRC. + +
+
+
+In-Group Phone Code - If IN_GROUP is selected as the DID Route, then this is the Phone Code used if a new lead is created. + +



@@ -3823,6 +4078,12 @@ The VICIDIAL basic web-based lead loader is designed simply to take a lead file
Phones Logins List - The comma separated list of phone logins used when an agent logs in using phone load balanced logins. The Agent application will find the active server with the fewest agents logged into it and place a call from that server to the agent upon login. +
+
+
+Phones Email - The email address associated with this phone entry. This is used for voicemail settings. + +



@@ -4721,7 +4982,7 @@ if (strlen($filters_hh) > 1) { 1) { ?> -
>   > Show In-Groups     |     > Add A New In-Group     |     > Copy In-Group
>   > Show In-Groups     |     > Add A New In-Group     |     > Copy In-Group     |     > Show DIDs   |   > Add A New DID   |   > Copy DID
Source Group ID:
\n"; + echo ""; + + echo "
ADD A NEW DID
\n"; + echo "\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
DID Extension: (no spaces)$NWB#vicidial_inbound_dids-did_pattern$NWE
DID Description: $NWB#vicidial_inbound_dids-did_description$NWE
\n"; + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# ADD=1411 display the COPY DID SCREEN +###################### + +if ($ADD==1411) +{ + if ($LOGmodify_dids==1) + { + echo "\n"; echo "\n"; + echo "\n"; + echo "\n"; echo "\n"; echo "\n"; @@ -10635,7 +11163,7 @@ if ($ADD==31) } ##### get in-groups listings for dynamic drop in-group pulldown - $stmt="SELECT group_id,group_name from vicidial_inbound_groups order by group_id"; + $stmt="SELECT group_id,group_name from vicidial_inbound_groups where group_id NOT IN('AGENTDIRECT') order by group_id"; $rslt=mysql_query($stmt, $link); $Dgroups_to_print = mysql_num_rows($rslt); $Dgroups_menu=''; @@ -12487,7 +13015,6 @@ if ($ADD==311) $rslt=mysql_query($stmt, $link); $campaigns_to_print = mysql_num_rows($rslt); $campaigns_list=''; - $o=0; while ($campaigns_to_print > $o) { $rowx=mysql_fetch_row($rslt); @@ -12836,9 +13363,21 @@ if ($ADD==3111) $qc_show_recording = $row[38]; $qc_web_form_address = $row[39]; $qc_script = $row[40]; + $play_place_in_line = $row[41]; + $play_estimate_hold_time = $row[42]; + $hold_time_option = $row[43]; + $hold_time_option_seconds = $row[44]; + $hold_time_option_exten = $row[45]; + $hold_time_option_voicemail = $row[46]; + $hold_time_option_xfer_group = $row[47]; + $hold_time_option_callback_filename = $row[48]; + $hold_time_option_callback_list_id = $row[49]; + $hold_recall_xfer_group = $row[50]; + $no_delay_call_route = $row[51]; + $play_welcome_message = $row[52]; ##### get in-groups listings for dynamic pulldown - $stmt="SELECT group_id,group_name from vicidial_inbound_groups order by group_id"; + $stmt="SELECT group_id,group_name from vicidial_inbound_groups where group_id NOT IN('AGENTDIRECT') order by group_id"; $rslt=mysql_query($stmt, $link); $Xgroups_to_print = mysql_num_rows($rslt); $Xgroups_menu=''; @@ -12847,6 +13386,10 @@ if ($ADD==3111) $Dgroups_selected=0; $Agroups_menu=''; $Agroups_selected=0; + $Hgroups_menu=''; + $Hgroups_selected=0; + $Tgroups_menu=''; + $Tgroups_selected=0; $o=0; while ($Xgroups_to_print > $o) { @@ -12854,6 +13397,8 @@ if ($ADD==3111) $Xgroups_menu .= "\n"; $Dgroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]\n"; if ($group_id!=$rowx[0]) - {$Agroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]\n";} + { + $Agroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]\n"; + $Tgroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]\n"; + $Hgroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]\n"; + } $o++; } if ($Xgroups_selected < 1) @@ -12887,6 +13446,14 @@ if ($ADD==3111) {$Agroups_menu .= "\n";} else {$Agroups_menu .= "\n";} + if ($Tgroups_selected < 1) + {$Tgroups_menu .= "\n";} + else + {$Tgroups_menu .= "\n";} + if ($Hgroups_selected < 1) + {$Hgroups_menu .= "\n";} + else + {$Hgroups_menu .= "\n";} echo "
MODIFY A GROUPS RECORD: $row[0]\n"; @@ -12962,12 +13529,34 @@ if ($ADD==3111) 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"; @@ -12976,6 +13565,12 @@ if ($ADD==3111) echo "$Xgroups_menu"; echo "$NWB#vicidial_inbound_groups-default_xfer_group$NWE\n"; + echo "\n"; + + echo "\n"; + echo "\n"; echo "\n"; @@ -13133,6 +13728,155 @@ if ($ADD==3111) +###################### +# ADD=3311 modify did info in the system +###################### + +if ($ADD==3311) +{ + if ($LOGmodify_dids==1) + { + echo "
\n"; + echo ""; + + echo "
COPY DID\n"; + echo "\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + + echo "\n"; + echo "
DID Extension: (no spaces)$NWB#vicidial_inbound_dids-did_pattern$NWE
DID Description: $NWB#vicidial_inbound_dids-did_description$NWE
Source DID: $NWB#vicidial_inbound_dids-did_pattern$NWE
\n"; + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + ###################### # ADD=11111 display the ADD NEW REMOTE AGENTS SCREEN ###################### @@ -5806,7 +6138,7 @@ if ($ADD=="2A") $rslt=mysql_query($stmt, $link); } - $stmt="INSERT INTO vicidial_users (user,pass,full_name,user_level,user_group,phone_login,phone_pass,delete_users,delete_user_groups,delete_lists,delete_campaigns,delete_ingroups,delete_remote_agents,load_leads,campaign_detail,ast_admin_access,ast_delete_phones,delete_scripts,modify_leads,hotkeys_active,change_agent_campaign,agent_choose_ingroups,closer_campaigns,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,delete_filters,alter_agent_interface_options,closer_default_blended,delete_call_times,modify_call_times,modify_users,modify_campaigns,modify_lists,modify_scripts,modify_filters,modify_ingroups,modify_usergroups,modify_remoteagents,modify_servers,view_reports,vicidial_recording_override,alter_custdata_override,qc_enabled,qc_user_level,qc_pass,qc_finish,qc_commit,add_timeclock_log,modify_timeclock_log,delete_timeclock_log,alter_custphone_override,vdc_agent_api_access) SELECT \"$user\",\"$pass\",\"$full_name\",user_level,user_group,phone_login,phone_pass,delete_users,delete_user_groups,delete_lists,delete_campaigns,delete_ingroups,delete_remote_agents,load_leads,campaign_detail,ast_admin_access,ast_delete_phones,delete_scripts,modify_leads,hotkeys_active,change_agent_campaign,agent_choose_ingroups,closer_campaigns,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,delete_filters,alter_agent_interface_options,closer_default_blended,delete_call_times,modify_call_times,modify_users,modify_campaigns,modify_lists,modify_scripts,modify_filters,modify_ingroups,modify_usergroups,modify_remoteagents,modify_servers,view_reports,vicidial_recording_override,alter_custdata_override,qc_enabled,qc_user_level,qc_pass,qc_finish,qc_commit,add_timeclock_log,modify_timeclock_log,delete_timeclock_log,alter_custphone_override,vdc_agent_api_access from vicidial_users where user=\"$source_user_id\";"; + $stmt="INSERT INTO vicidial_users (user,pass,full_name,user_level,user_group,phone_login,phone_pass,delete_users,delete_user_groups,delete_lists,delete_campaigns,delete_ingroups,delete_remote_agents,load_leads,campaign_detail,ast_admin_access,ast_delete_phones,delete_scripts,modify_leads,hotkeys_active,change_agent_campaign,agent_choose_ingroups,closer_campaigns,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,delete_filters,alter_agent_interface_options,closer_default_blended,delete_call_times,modify_call_times,modify_users,modify_campaigns,modify_lists,modify_scripts,modify_filters,modify_ingroups,modify_usergroups,modify_remoteagents,modify_servers,view_reports,vicidial_recording_override,alter_custdata_override,qc_enabled,qc_user_level,qc_pass,qc_finish,qc_commit,add_timeclock_log,modify_timeclock_log,delete_timeclock_log,alter_custphone_override,vdc_agent_api_access,modify_inbound_dids,delete_inbound_dids) SELECT \"$user\",\"$pass\",\"$full_name\",user_level,user_group,phone_login,phone_pass,delete_users,delete_user_groups,delete_lists,delete_campaigns,delete_ingroups,delete_remote_agents,load_leads,campaign_detail,ast_admin_access,ast_delete_phones,delete_scripts,modify_leads,hotkeys_active,change_agent_campaign,agent_choose_ingroups,closer_campaigns,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,delete_filters,alter_agent_interface_options,closer_default_blended,delete_call_times,modify_call_times,modify_users,modify_campaigns,modify_lists,modify_scripts,modify_filters,modify_ingroups,modify_usergroups,modify_remoteagents,modify_servers,view_reports,vicidial_recording_override,alter_custdata_override,qc_enabled,qc_user_level,qc_pass,qc_finish,qc_commit,add_timeclock_log,modify_timeclock_log,delete_timeclock_log,alter_custphone_override,vdc_agent_api_access,modify_inbound_dids,delete_inbound_dids from vicidial_users where user=\"$source_user_id\";"; $rslt=mysql_query($stmt, $link); $stmtA="INSERT INTO vicidial_inbound_group_agents (user,group_id,group_rank,group_weight,calls_today) SELECT \"$user\",group_id,group_rank,group_weight,\"0\" from vicidial_inbound_group_agents where user=\"$source_user_id\";"; @@ -6327,7 +6659,7 @@ if ($ADD==2011) } else { - $stmt="INSERT INTO vicidial_inbound_groups (group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script) SELECT \"$group_id\",\"$group_name\",group_color,\"N\",web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script from vicidial_inbound_groups where group_id=\"$source_group_id\";"; + $stmt="INSERT INTO vicidial_inbound_groups (group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message) SELECT \"$group_id\",\"$group_name\",group_color,\"N\",web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message from vicidial_inbound_groups where group_id=\"$source_group_id\";"; $rslt=mysql_query($stmt, $link); echo "
GROUP ADDED: $group_id\n"; @@ -6345,6 +6677,102 @@ $ADD=3111; } +###################### +# ADD=2311 adds the new did to the system +###################### + +if ($ADD==2311) +{ + echo ""; + $stmt="SELECT count(*) from vicidial_inbound_dids where did_id='$did_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + {echo "
DID NOT ADDED - there is already a DID in the system with this ID\n";} + else + { + $stmt="SELECT count(*) from vicidial_inbound_dids where did_pattern='$did_pattern';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + {echo "
DID NOT ADDED - there is already a DID in the system with this extension\n";} + else + { + if ( (strlen($did_pattern) < 1) or (strlen($did_pattern) < 1) or (eregi(' ',$did_pattern)) or (eregi(' ',$did_pattern)) or (eregi("\+",$did_pattern)) ) + { + echo "
DID NOT ADDED - Please go back and look at the data you entered\n"; + echo "
DID Extension must be between 2 and 20 characters in length and contain no ' -+'.\n"; + } + else + { + $stmt="INSERT INTO vicidial_inbound_dids (did_pattern,did_description) values('$did_pattern','$did_description');"; + $rslt=mysql_query($stmt, $link); + + $stmt="SELECT did_id from vicidial_inbound_dids where did_pattern='$did_pattern';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $did_id = $row[0]; + + echo "
DID ADDED: $did_pattern - $did_id\n"; + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|ADD A DID |$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + } +$ADD=3311; +} + + +###################### +# ADD=2411 adds copied did to the system +###################### + +if ($ADD==2411) +{ + echo ""; + $stmt="SELECT count(*) from vicidial_inbound_dids where did_pattern='$did_pattern';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + {echo "
DID NOT ADDED - there is already a DID in the system with this extension\n";} + else + { + if ( (strlen($did_id) < 1) or (strlen($did_pattern) < 1) or (eregi(' ',$did_id)) or (eregi(' ',$did_pattern)) or (eregi("\+",$did_id)) ) + { + echo "
DID NOT ADDED - Please go back and look at the data you entered\n"; + echo "
DID Extension must be between 2 and 20 characters in length and contain no ' -+'.\n"; + } + else + { + $stmt="INSERT INTO vicidial_inbound_dids (did_pattern,did_description,did_active,did_route,extension,exten_context,voicemail_ext,phone,server_ip,user,user_unavailable_action,user_route_settings_ingroup,group_id,call_handle_method,agent_search_method,list_id,campaign_id,phone_code) SELECT \"$did_pattern\",\"$did_description\",did_active,did_route,extension,exten_context,voicemail_ext,phone,server_ip,user,user_unavailable_action,user_route_settings_ingroup,group_id,call_handle_method,agent_search_method,list_id,campaign_id,phone_code from vicidial_inbound_dids where did_id=\"$source_did\";"; + $rslt=mysql_query($stmt, $link); + + $stmt="SELECT did_id from vicidial_inbound_dids where did_pattern='$did_pattern';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $did_id = $row[0]; + + echo "
DID ADDED: $did_pattern - $did_id\n"; + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|COPY A DID |$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } +$ADD=3311; +} + + ###################### # ADD=21111 adds new remote agents to the system ###################### @@ -7046,7 +7474,7 @@ if ($ADD=="4A") { echo "
USER MODIFIED - ADMIN: $user\n"; - $stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',delete_users='$delete_users',delete_user_groups='$delete_user_groups',delete_lists='$delete_lists',delete_campaigns='$delete_campaigns',delete_ingroups='$delete_ingroups',delete_remote_agents='$delete_remote_agents',load_leads='$load_leads',campaign_detail='$campaign_detail',ast_admin_access='$ast_admin_access',ast_delete_phones='$ast_delete_phones',delete_scripts='$delete_scripts',modify_leads='$modify_leads',hotkeys_active='$hotkeys_active',change_agent_campaign='$change_agent_campaign',agent_choose_ingroups='$agent_choose_ingroups',closer_campaigns='$groups_value',scheduled_callbacks='$scheduled_callbacks',agentonly_callbacks='$agentonly_callbacks',agentcall_manual='$agentcall_manual',vicidial_recording='$vicidial_recording',vicidial_transfers='$vicidial_transfers',delete_filters='$delete_filters',alter_agent_interface_options='$alter_agent_interface_options',closer_default_blended='$closer_default_blended',delete_call_times='$delete_call_times',modify_call_times='$modify_call_times',modify_users='$modify_users',modify_campaigns='$modify_campaigns',modify_lists='$modify_lists',modify_scripts='$modify_scripts',modify_filters='$modify_filters',modify_ingroups='$modify_ingroups',modify_usergroups='$modify_usergroups',modify_remoteagents='$modify_remoteagents',modify_servers='$modify_servers',view_reports='$view_reports',vicidial_recording_override='$vicidial_recording_override',alter_custdata_override='$alter_custdata_override',qc_enabled='$qc_enabled',qc_user_level='$qc_user_level',qc_pass='$qc_pass',qc_finish='$qc_finish',qc_commit='$qc_commit',add_timeclock_log='$add_timeclock_log',modify_timeclock_log='$modify_timeclock_log',delete_timeclock_log='$delete_timeclock_log',alter_custphone_override='$alter_custphone_override',vdc_agent_api_access='$vdc_agent_api_access' where user='$user';"; + $stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',delete_users='$delete_users',delete_user_groups='$delete_user_groups',delete_lists='$delete_lists',delete_campaigns='$delete_campaigns',delete_ingroups='$delete_ingroups',delete_remote_agents='$delete_remote_agents',load_leads='$load_leads',campaign_detail='$campaign_detail',ast_admin_access='$ast_admin_access',ast_delete_phones='$ast_delete_phones',delete_scripts='$delete_scripts',modify_leads='$modify_leads',hotkeys_active='$hotkeys_active',change_agent_campaign='$change_agent_campaign',agent_choose_ingroups='$agent_choose_ingroups',closer_campaigns='$groups_value',scheduled_callbacks='$scheduled_callbacks',agentonly_callbacks='$agentonly_callbacks',agentcall_manual='$agentcall_manual',vicidial_recording='$vicidial_recording',vicidial_transfers='$vicidial_transfers',delete_filters='$delete_filters',alter_agent_interface_options='$alter_agent_interface_options',closer_default_blended='$closer_default_blended',delete_call_times='$delete_call_times',modify_call_times='$modify_call_times',modify_users='$modify_users',modify_campaigns='$modify_campaigns',modify_lists='$modify_lists',modify_scripts='$modify_scripts',modify_filters='$modify_filters',modify_ingroups='$modify_ingroups',modify_usergroups='$modify_usergroups',modify_remoteagents='$modify_remoteagents',modify_servers='$modify_servers',view_reports='$view_reports',vicidial_recording_override='$vicidial_recording_override',alter_custdata_override='$alter_custdata_override',qc_enabled='$qc_enabled',qc_user_level='$qc_user_level',qc_pass='$qc_pass',qc_finish='$qc_finish',qc_commit='$qc_commit',add_timeclock_log='$add_timeclock_log',modify_timeclock_log='$modify_timeclock_log',delete_timeclock_log='$delete_timeclock_log',alter_custphone_override='$alter_custphone_override',vdc_agent_api_access='$vdc_agent_api_access',modify_inbound_dids='$modify_inbound_dids',delete_inbound_dids='$delete_inbound_dids' where user='$user';"; $rslt=mysql_query($stmt, $link); @@ -7965,7 +8393,7 @@ if ($ADD==4111) echo "
GROUP MODIFIED: $group_id\n"; - $stmt="UPDATE vicidial_inbound_groups set group_name='$group_name', group_color='$group_color', active='$active', web_form_address='" . mysql_real_escape_string($web_form_address) . "', voicemail_ext='$voicemail_ext', next_agent_call='$next_agent_call', fronter_display='$fronter_display', ingroup_script='$script_id', get_call_launch='$get_call_launch', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number', xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',drop_action='$drop_action',drop_call_seconds='$drop_call_seconds',drop_exten='$drop_exten',call_time_id='$call_time_id',after_hours_action='$after_hours_action',after_hours_message_filename='$after_hours_message_filename',after_hours_exten='$after_hours_exten',after_hours_voicemail='$after_hours_voicemail',welcome_message_filename='$welcome_message_filename',moh_context='$moh_context',onhold_prompt_filename='$onhold_prompt_filename',prompt_interval='$prompt_interval',agent_alert_exten='$agent_alert_exten',agent_alert_delay='$agent_alert_delay',default_xfer_group='$default_xfer_group',queue_priority='$queue_priority',drop_inbound_group='$drop_inbound_group',ingroup_recording_override='$ingroup_recording_override',ingroup_rec_filename='$ingroup_rec_filename',afterhours_xfer_group='$afterhours_xfer_group',qc_enabled='$qc_enabled',qc_statuses='$QC_statuses',qc_shift_id='$qc_shift_id',qc_get_record_launch='$qc_get_record_launch',qc_show_recording='$qc_show_recording',qc_web_form_address='$qc_web_form_address',qc_script='$qc_script' where group_id='$group_id';"; + $stmt="UPDATE vicidial_inbound_groups set group_name='$group_name', group_color='$group_color', active='$active', web_form_address='" . mysql_real_escape_string($web_form_address) . "', voicemail_ext='$voicemail_ext', next_agent_call='$next_agent_call', fronter_display='$fronter_display', ingroup_script='$script_id', get_call_launch='$get_call_launch', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number', xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',drop_action='$drop_action',drop_call_seconds='$drop_call_seconds',drop_exten='$drop_exten',call_time_id='$call_time_id',after_hours_action='$after_hours_action',after_hours_message_filename='$after_hours_message_filename',after_hours_exten='$after_hours_exten',after_hours_voicemail='$after_hours_voicemail',welcome_message_filename='$welcome_message_filename',moh_context='$moh_context',onhold_prompt_filename='$onhold_prompt_filename',prompt_interval='$prompt_interval',agent_alert_exten='$agent_alert_exten',agent_alert_delay='$agent_alert_delay',default_xfer_group='$default_xfer_group',queue_priority='$queue_priority',drop_inbound_group='$drop_inbound_group',ingroup_recording_override='$ingroup_recording_override',ingroup_rec_filename='$ingroup_rec_filename',afterhours_xfer_group='$afterhours_xfer_group',qc_enabled='$qc_enabled',qc_statuses='$QC_statuses',qc_shift_id='$qc_shift_id',qc_get_record_launch='$qc_get_record_launch',qc_show_recording='$qc_show_recording',qc_web_form_address='$qc_web_form_address',qc_script='$qc_script',play_place_in_line='$play_place_in_line',play_estimate_hold_time='$play_estimate_hold_time',hold_time_option='$hold_time_option',hold_time_option_seconds='$hold_time_option_seconds',hold_time_option_exten='$hold_time_option_exten',hold_time_option_voicemail='$hold_time_option_voicemail',hold_time_option_xfer_group='$hold_time_option_xfer_group',hold_time_option_callback_filename='$hold_time_option_callback_filename',hold_time_option_callback_list_id='$hold_time_option_callback_list_id',hold_recall_xfer_group='$hold_recall_xfer_group',no_delay_call_route='$no_delay_call_route',play_welcome_message='$play_welcome_message' where group_id='$group_id';"; $rslt=mysql_query($stmt, $link); ### LOG CHANGES TO LOG FILE ### @@ -7987,6 +8415,47 @@ $ADD=3111; # go to in-group modification form below +###################### +# ADD=4311 modify did info in the system +###################### + +if ($ADD==4311) +{ + if ($LOGmodify_dids==1) + { + echo ""; + + if ( (strlen($did_id) < 1) or (strlen($did_pattern) < 1) ) + { + echo "
DID NOT MODIFIED - Please go back and look at the data you entered\n"; + echo "
did_extension must be at least 1 character in length\n"; + } + else + { + echo "
DID MODIFIED: $did_pattern\n"; + + $stmt="UPDATE vicidial_inbound_dids set did_pattern='$did_pattern',did_description='$did_description',did_active='$did_active',did_route='$did_route',extension='$extension',exten_context='$exten_context',voicemail_ext='$voicemail_ext',phone='$phone',server_ip='$server_ip',user='$user',user_unavailable_action='$user_unavailable_action',user_route_settings_ingroup='$user_route_settings_ingroup',group_id='$group_id',call_handle_method='$call_handle_method',agent_search_method='$agent_search_method',list_id='$list_id',campaign_id='$campaign_id',phone_code='$phone_code' where did_id='$did_id';"; + $rslt=mysql_query($stmt, $link); + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|MODIFY DID INFO |$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=3311; # go to did modification form below +} + + + ###################### # ADD=41111 modify remote agents info in the system ###################### @@ -8343,7 +8812,7 @@ if ($ADD==41111111111) { echo "
PHONE MODIFIED: $extension\n"; - $stmt="UPDATE phones set extension='$extension', dialplan_number='$dialplan_number', voicemail_id='$voicemail_id', phone_ip='$phone_ip', computer_ip='$computer_ip', server_ip='$server_ip', login='$login', pass='$pass', status='$status', active='$active', phone_type='$phone_type', fullname='$fullname', company='$company', picture='$picture', protocol='$protocol', local_gmt='$local_gmt', ASTmgrUSERNAME='$ASTmgrUSERNAME', ASTmgrSECRET='$ASTmgrSECRET', login_user='$login_user', login_pass='$login_pass', login_campaign='$login_campaign', park_on_extension='$park_on_extension', conf_on_extension='$conf_on_extension', VICIDIAL_park_on_extension='$VICIDIAL_park_on_extension', VICIDIAL_park_on_filename='$VICIDIAL_park_on_filename', monitor_prefix='$monitor_prefix', recording_exten='$recording_exten', voicemail_exten='$voicemail_exten', voicemail_dump_exten='$voicemail_dump_exten', ext_context='$ext_context', dtmf_send_extension='$dtmf_send_extension', call_out_number_group='$call_out_number_group', client_browser='$client_browser', install_directory='$install_directory', local_web_callerID_URL='" . mysql_real_escape_string($local_web_callerID_URL) . "', VICIDIAL_web_URL='" . mysql_real_escape_string($VICIDIAL_web_URL) . "', AGI_call_logging_enabled='$AGI_call_logging_enabled', user_switching_enabled='$user_switching_enabled', conferencing_enabled='$conferencing_enabled', admin_hangup_enabled='$admin_hangup_enabled', admin_hijack_enabled='$admin_hijack_enabled', admin_monitor_enabled='$admin_monitor_enabled', call_parking_enabled='$call_parking_enabled', updater_check_enabled='$updater_check_enabled', AFLogging_enabled='$AFLogging_enabled', QUEUE_ACTION_enabled='$QUEUE_ACTION_enabled', CallerID_popup_enabled='$CallerID_popup_enabled', voicemail_button_enabled='$voicemail_button_enabled', enable_fast_refresh='$enable_fast_refresh', fast_refresh_rate='$fast_refresh_rate', enable_persistant_mysql='$enable_persistant_mysql', auto_dial_next_number='$auto_dial_next_number', VDstop_rec_after_each_call='$VDstop_rec_after_each_call', DBX_server='$DBX_server', DBX_database='$DBX_database', DBX_user='$DBX_user', DBX_pass='$DBX_pass', DBX_port='$DBX_port', DBY_server='$DBY_server', DBY_database='$DBY_database', DBY_user='$DBY_user', DBY_pass='$DBY_pass', DBY_port='$DBY_port', outbound_cid='$outbound_cid', enable_sipsak_messages='$enable_sipsak_messages' where extension='$old_extension' and server_ip='$old_server_ip';"; + $stmt="UPDATE phones set extension='$extension', dialplan_number='$dialplan_number', voicemail_id='$voicemail_id', phone_ip='$phone_ip', computer_ip='$computer_ip', server_ip='$server_ip', login='$login', pass='$pass', status='$status', active='$active', phone_type='$phone_type', fullname='$fullname', company='$company', picture='$picture', protocol='$protocol', local_gmt='$local_gmt', ASTmgrUSERNAME='$ASTmgrUSERNAME', ASTmgrSECRET='$ASTmgrSECRET', login_user='$login_user', login_pass='$login_pass', login_campaign='$login_campaign', park_on_extension='$park_on_extension', conf_on_extension='$conf_on_extension', VICIDIAL_park_on_extension='$VICIDIAL_park_on_extension', VICIDIAL_park_on_filename='$VICIDIAL_park_on_filename', monitor_prefix='$monitor_prefix', recording_exten='$recording_exten', voicemail_exten='$voicemail_exten', voicemail_dump_exten='$voicemail_dump_exten', ext_context='$ext_context', dtmf_send_extension='$dtmf_send_extension', call_out_number_group='$call_out_number_group', client_browser='$client_browser', install_directory='$install_directory', local_web_callerID_URL='" . mysql_real_escape_string($local_web_callerID_URL) . "', VICIDIAL_web_URL='" . mysql_real_escape_string($VICIDIAL_web_URL) . "', AGI_call_logging_enabled='$AGI_call_logging_enabled', user_switching_enabled='$user_switching_enabled', conferencing_enabled='$conferencing_enabled', admin_hangup_enabled='$admin_hangup_enabled', admin_hijack_enabled='$admin_hijack_enabled', admin_monitor_enabled='$admin_monitor_enabled', call_parking_enabled='$call_parking_enabled', updater_check_enabled='$updater_check_enabled', AFLogging_enabled='$AFLogging_enabled', QUEUE_ACTION_enabled='$QUEUE_ACTION_enabled', CallerID_popup_enabled='$CallerID_popup_enabled', voicemail_button_enabled='$voicemail_button_enabled', enable_fast_refresh='$enable_fast_refresh', fast_refresh_rate='$fast_refresh_rate', enable_persistant_mysql='$enable_persistant_mysql', auto_dial_next_number='$auto_dial_next_number', VDstop_rec_after_each_call='$VDstop_rec_after_each_call', DBX_server='$DBX_server', DBX_database='$DBX_database', DBX_user='$DBX_user', DBX_pass='$DBX_pass', DBX_port='$DBX_port', DBY_server='$DBY_server', DBY_database='$DBY_database', DBY_user='$DBY_user', DBY_pass='$DBY_pass', DBY_port='$DBY_port', outbound_cid='$outbound_cid', enable_sipsak_messages='$enable_sipsak_messages', email='$email' where extension='$old_extension' and server_ip='$old_server_ip';"; $rslt=mysql_query($stmt, $link); ### LOG CHANGES TO LOG FILE ### @@ -8978,6 +9447,28 @@ if ($ADD==5111) $ADD='3111'; # go to in-group modification below } +###################### +# ADD=5311 confirmation before deletion of did +###################### + +if ($ADD==5311) +{ + echo ""; + + if ( (strlen($did_id) < 1) or ($LOGdelete_dids < 1) ) + { + echo "
DID NOT DELETED - Please go back and look at the data you entered\n"; + echo "
did_id be at least 1 characters in length\n"; + } + else + { + echo "
DID DELETION CONFIRMATION: $group_id\n"; + echo "

Click here to delete DID $did_id


\n"; + } + +$ADD='3311'; # go to did modification below +} + ###################### # ADD=51111 confirmation before deletion of remote agent record ###################### @@ -9690,7 +10181,7 @@ if ($ADD==6111) } else { - $stmt="DELETE from vicidial_inbound_groups where group_id='$group_id' limit 1;"; + $stmt="DELETE from vicidial_inbound_groups where group_id='$group_id' and group_id NOT IN('AGENTDIRECT') limit 1;"; $rslt=mysql_query($stmt, $link); $stmt="DELETE from vicidial_inbound_group_agents where group_id='$group_id';"; @@ -9713,6 +10204,38 @@ if ($ADD==6111) $ADD='1000'; # go to in-group list } +###################### +# ADD=6311 delete did record +###################### + +if ($ADD==6311) +{ + echo ""; + + if ( (strlen($did_id) < 1) or ($CoNfIrM != 'YES') or ($LOGdelete_dids < 1) ) + { + echo "
DID NOT DELETED - Please go back and look at the data you entered\n"; + echo "
did_id be at least 1 characters in length\n"; + } + else + { + $stmt="DELETE from vicidial_inbound_dids where did_id='$did_id' limit 1;"; + $rslt=mysql_query($stmt, $link); + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|!DELETING DID!!!!!!!|$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + echo "
DID DELETION COMPLETED: $did_id\n"; + echo "

\n"; + } + +$ADD='1300'; # go to did list +} + ###################### # ADD=61111 delete remote agent record ###################### @@ -10247,6 +10770,9 @@ if ($ADD==3) $delete_timeclock_log = $row[53]; $alter_custphone_override = $row[54]; $vdc_agent_api_access = $row[55]; + $modify_inbound_dids = $row[56]; + $delete_inbound_dids = $row[57]; + if ( ($user_level >= $LOGuser_level) and ($LOGuser_level < 9) ) { @@ -10353,6 +10879,8 @@ if ($ADD==3) echo "
Modify In-Groups: $NWB#vicidial_users-modify_sections$NWE
Delete In-Groups: $NWB#vicidial_users-delete_ingroups$NWE
Modify DIDs: $NWB#vicidial_users-modify_sections$NWE
Delete DIDs: $NWB#vicidial_users-delete_ingroups$NWE
Modify Remote Agents: $NWB#vicidial_users-modify_sections$NWE
Delete Remote Agents: $NWB#vicidial_users-delete_remote_agents$NWE
Welcome Message Filename: $NWB#vicidial_inbound_groups-welcome_message_filename$NWE
Play Welcome Message: $NWB#vicidial_inbound_groups-play_welcome_message$NWE
Music On Hold Context: $NWB#vicidial_inbound_groups-moh_context$NWE
On Hold Prompt Filename: $NWB#vicidial_inbound_groups-onhold_prompt_filename$NWE
On Hold Prompt Interval: $NWB#vicidial_inbound_groups-prompt_interval$NWE
Play Place in Line: $NWB#vicidial_inbound_groups-play_place_in_line$NWE
Play Estimated Hold Time: $NWB#vicidial_inbound_groups-play_estimate_hold_time$NWE
Hold Time Option: $NWB#vicidial_inbound_groups-hold_time_option$NWE
Hold Time Option Seconds: $NWB#vicidial_inbound_groups-hold_time_option_seconds$NWE
Hold Time Option Extension: $NWB#vicidial_inbound_groups-hold_time_option_exten$NWE
Hold Time Option Voicemail: $NWB#vicidial_inbound_groups-hold_time_option_voicemail$NWE
Hold Time Option Transfer In-Group: $NWB#vicidial_inbound_groups-hold_time_option_xfer_group$NWE
Hold Time Option Callback Filename: $NWB#vicidial_inbound_groups-hold_time_option_callback_filename$NWE
Hold Time Option Callback List ID: $NWB#vicidial_inbound_groups-hold_time_option_callback_list_id$NWE
Agent Alert Extension: $NWB#vicidial_inbound_groups-agent_alert_exten$NWE
Agent Alert Delay: $NWB#vicidial_inbound_groups-agent_alert_delay$NWE
Hold Recall Transfer In-Group: $NWB#vicidial_inbound_groups-hold_recall_xfer_group$NWE
No Delay Call Route: $NWB#vicidial_inbound_groups-no_delay_call_route$NWE
In-Group Recording Override: $NWB#vicidial_inbound_groups-ingroup_recording_override$NWE
In-Group Recording Filename: $NWB#vicidial_inbound_groups-ingroup_rec_filename$NWE
\n"; echo "\n"; echo "\n"; + echo "\n"; echo "\n"; echo "\n"; echo "\n"; @@ -15178,6 +15923,49 @@ echo "
\n"; + echo ""; + + $stmt="SELECT * from vicidial_inbound_dids where did_id='$did_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $did_id = $row[0]; + $did_pattern = $row[1]; + $did_description = $row[2]; + $did_active = $row[3]; + $did_route = $row[4]; + $extension = $row[5]; + $exten_context = $row[6]; + $voicemail_ext = $row[7]; + $phone = $row[8]; + $server_ip = $row[9]; + $user = $row[10]; + $user_unavailable_action = $row[11]; + $user_route_settings_ingroup = $row[12]; + $group_id = $row[13]; + $call_handle_method = $row[14]; + $agent_search_method = $row[15]; + $list_id = $row[16]; + $campaign_id = $row[17]; + $phone_code = $row[18]; + + + $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns order by campaign_id"; + $rslt=mysql_query($stmt, $link); + $campaigns_to_print = mysql_num_rows($rslt); + $campaigns_list=''; + $o=0; + while ($campaigns_to_print > $o) { + $rowx=mysql_fetch_row($rslt); + $campaigns_list .= "\n"; + $o++; + } + + ##### get in-groups listings for dynamic pulldown + $stmt="SELECT group_id,group_name from vicidial_inbound_groups order by group_id"; + $rslt=mysql_query($stmt, $link); + $Xgroups_to_print = mysql_num_rows($rslt); + $Xgroups_menu=''; + $Xgroups_selected=0; + $o=0; + while ($Xgroups_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $Xgroups_menu .= "\n"; + $o++; + } + if ($Xgroups_selected < 1) + {$Xgroups_menu .= "\n";} + else + {$Xgroups_menu .= "\n";} + + + ##### get in-groups listings for dynamic pulldown + $stmt="SELECT group_id,group_name from vicidial_inbound_groups where group_id NOT IN('AGENTDIRECT') 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 DID RECORD: $row[0]\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 "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "
DID Extension: $NWB#vicidial_inbound_dids-did_pattern$NWE
DID Description: $NWB#vicidial_inbound_dids-did_description$NWE
Active: $NWB#vicidial_inbound_dids-did_active$NWE
DID Route: $NWB#vicidial_inbound_dids-did_route$NWE
Extension: $NWB#vicidial_inbound_dids-extension$NWE
Extension Context: $NWB#vicidial_inbound_dids-exten_context$NWE
Voicemail Box: $NWB#vicidial_inbound_dids-voicemail_ext$NWE
Phone Extension: $NWB#vicidial_inbound_dids-phone$NWE
Server IP: $NWB#vicidial_inbound_dids-server_ip$NWE
User Agent: $NWB#vicidial_inbound_dids-user$NWE
User Unavailable Action: $NWB#vicidial_inbound_dids-user_unavailable_action$NWE
User Route Settings In-Group: $NWB#vicidial_inbound_dids-user_route_settings_ingroup$NWE
In-Group ID: $NWB#vicidial_inbound_dids-group_id$NWE
In-Group Call Handle Method: $NWB#vicidial_inbound_dids-call_handle_method$NWE
In-Group Agent Search Method: $NWB#vicidial_inbound_dids-agent_search_method$NWE
In-Group List ID: $NWB#vicidial_inbound_dids-list_id$NWE
In-Group Campaign ID: $NWB#vicidial_inbound_dids-campaign_id$NWE
In-Group Phone Code: $NWB#vicidial_inbound_dids-phone_code$NWE
\n"; + echo "

\n"; + + + + if ($LOGdelete_dids > 0) + { + echo "

DELETE THIS DID\n"; + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + + ###################### # ADD=31111 modify remote agents info in the system ###################### @@ -13888,6 +14632,7 @@ if ($ADD==31111111111) echo "
Active Account: $NWB#phones-active$NWE
Phone Type: $NWB#phones-phone_type$NWE
Full Name: $NWB#phones-fullname$NWE
Email: $NWB#phones-email$NWE
Company: $NWB#phones-company$NWE
Picture: $NWB#phones-picture$NWE
New Messages: $row[14]$NWB#phones-messages$NWE
\n"; } +###################### +# ADD=1300 display all inbound dids +###################### +if ($ADD==1300) +{ +echo "
\n"; + echo ""; + + $stmt="SELECT * from vicidial_inbound_dids order by did_pattern"; + $rslt=mysql_query($stmt, $link); + $dids_to_print = mysql_num_rows($rslt); + +echo "
INBOUND GROUP LISTINGS:\n"; +echo "
\n"; +echo ""; +echo ""; +echo ""; +echo "\n"; +echo ""; +echo ""; +echo "\n"; +echo "\n"; + + $o=0; + while ($dids_to_print > $o) { + $row=mysql_fetch_row($rslt); + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo "\n"; + $o++; + } + +echo "
#DIDDESCRIPTIONACTIVEROUTEMODIFY
$row[0] $row[1] $row[2] $row[3] $row[4]MODIFY
\n"; +} + + ###################### # ADD=10000 display all remote agents ######################