documentation updates

sample Asterisk 1.4 conf file updates
updated AMD processing to work with Asteirsk 1.4

git-svn-id: svn://192.168.202.10@722 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2007-11-18 08:30:07 +00:00
parent fe2142ec25
commit 76e5d3e318
10 changed files with 114 additions and 43 deletions
+2
View File
@@ -17,6 +17,8 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom
use asterisk
\. /path/from/root/extras/upgrade_2.0.4.sql
quit
NOTE: If you do not use the standard "cron" database login, you will
need to add "LOCK TABLES" to the permissions to your db login
3. add the "server_reports" directory to your Web Path:
mkdir $PATHweb/vicidial/server_reports/
+12 -9
View File
@@ -1,6 +1,6 @@
#!/usr/bin/perl
#
# VD_amd.agi version 0.5 *DBI-version*
# VD_amd.agi version 2.0.4 *DBI-version*
#
# NOTE: This script is only needed with app_amd enabled systems
#
@@ -18,8 +18,7 @@
# exten => 8369,6,AGI(agi-VDAD_LB_transfer.agi,${EXTEN})
# exten => 8369,7,Hangup
#
#
# Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
# Copyright (C) 2007 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
#
# changes:
# 60206-1434 first build
@@ -28,7 +27,8 @@
# 60731-1407 - changed to use DBI-DBD::mysql
# - changed to use /etc/astguiclient.conf for configs
# 60815-1310 - added output options check from database
#
# 71118-0252 - compatibility with Asterisk 1.4, added AA and AM statuses
#
$script = 'VD_amd.agi';
@@ -243,9 +243,12 @@ if ($A)
if ($AGILOG) {$agi_string = "AAAAA AMD results: |$AMDSTATUS|$AMDCAUSE|"; &agi_output;}
}
# Asterisk 1.2.X
# AAAAA AMD results: |AMD_PERSON|AMD_HUMAN-300-300|
# AAAAA AMD results: |AMD_MACHINE|AMD_LONGGREETING-1500-1500|
# Asterisk 1.4.X:
# AAAAA AMD results: |HUMAN|HUMAN-1000-1000|0000000000|
# AAAAA AMD results: |MACHINE|MAXWORDS-4-4|0000000000|
if ($AMD_LOG)
{
@@ -258,7 +261,7 @@ if ($AMD_LOG)
##################################################################################
########## AMD says it's a person so exit and go on to transfer scripts ##########
if ($AMDSTATUS =~ /PERSON|NOTSURE|HANGUP/)
if ($AMDSTATUS =~ /PERSON|HUMAN|NOTSURE|HANGUP/)
{
if ($A)
{
@@ -310,7 +313,7 @@ $sthA->finish();
########## UPDATE vicidial_list ##########
$stmtA = "UPDATE vicidial_list set status='A' where lead_id = '$VD_lead_id';";
$stmtA = "UPDATE vicidial_list set status='AA' where lead_id = '$VD_lead_id';";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDAD vicidial_list update: |$affected_rows|$VD_lead_id"; &agi_output;}
@@ -339,14 +342,14 @@ if (!$epc_countCUSTDATA)
{
if ($AGILOG) {$agi_string = "no VDL record found: $uniqueid $calleridname $VD_lead_id $uniqueid"; &agi_output;}
$end_epoch = ($now_date_epoch + 3);
$stmtA = "INSERT INTO vicidial_log (uniqueid,lead_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,processed,length_in_sec,end_epoch) values('$uniqueid','$VD_lead_id','$VD_campaign_id','$now_date','$now_date_epoch','A','$VD_phone_code','$VD_phone_number','VDAD','N','3','$end_epoch')";
$stmtA = "INSERT INTO vicidial_log (uniqueid,lead_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,processed,length_in_sec,end_epoch) values('$uniqueid','$VD_lead_id','$VD_campaign_id','$now_date','$now_date_epoch','AA','$VD_phone_code','$VD_phone_number','VDAD','N','3','$end_epoch')";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$affected_rows = $dbhA->do($stmtA);
}
else
{
$VD_seconds = ($now_date_epoch - $VD_start_epoch);
$stmtA = "UPDATE vicidial_log set status='A',end_epoch='$now_date_epoch',length_in_sec='$VD_seconds' where uniqueid='$uniqueid' and lead_id='$VD_lead_id' order by call_date desc limit 1;";
$stmtA = "UPDATE vicidial_log set status='AA',end_epoch='$now_date_epoch',length_in_sec='$VD_seconds' where uniqueid='$uniqueid' and lead_id='$VD_lead_id' order by call_date desc limit 1;";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDAD vicidial_log update: |$affected_rows|$uniqueid|"; &agi_output;}
+13 -6
View File
@@ -1,6 +1,6 @@
#!/usr/bin/perl
#
# VD_amd_post.agi version 0.3 *DBI-version*
# VD_amd_post.agi version 2.0.4 *DBI-version*
#
# NOTE: This script is only needed with app_amd enabled systems
#
@@ -12,20 +12,27 @@
# ; VICIDIAL_auto_dialer transfer script AMD with Load Balanced:
# exten => 8369,1,AGI(call_log.agi,${EXTEN})
# exten => 8369,2,(AMD),AMD
# exten => 8369,3,AGI(VD.agi,${EXTEN})
# exten => 8369,3,AGI(VD_amd.agi,${EXTEN})
# exten => 8369,4,AGI(agi-VDAD_LB_transfer.agi,${EXTEN})
# exten => 8369,5,AGI(agi-VDAD_LB_transfer.agi,${EXTEN})
# exten => 8369,6,AGI(agi-VDAD_LB_transfer.agi,${EXTEN})
# exten => 8369,7,Hangup
#
#
# Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
# ; this is used for playing a message to an answering machine forwarded from AMD in VICIDIAL
# ; replace conf with the message file you want to leave
# exten => 8320,1,WaitForSilence(2000,2) ; AMD got machine. leave message after recording
# exten => 8320,2,Playback(conf)
# exten => 8320,3,AGI(VD_amd_post.agi,${EXTEN})
# exten => 8320,4,Hangup
#
# Copyright (C) 2007 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
#
# changes:
# 60217-1119 first build
# 60731-1403 - changed to use DBI-DBD::mysql
# - changed to use /etc/astguiclient.conf for configs
# 60817-1025 - added output options check from database
# 71118-0257 - updated comments
#
$script = 'VD_amd_post.agi';
@@ -250,12 +257,12 @@ exit;
$stmtA = "UPDATE vicidial_log set status='AL' where lead_id='$VD_lead_id' order by call_date desc limit 1;";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDAD vicidial_log AM update: |$affected_rows|$uniqueid|"; &agi_output;}
if ($AGILOG) {$agi_string = "-- VDAD vicidial_log AL update: |$affected_rows|$uniqueid|"; &agi_output;}
$stmtA = "UPDATE vicidial_list set status='AL' where lead_id='$VD_lead_id';";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDAD vicidial_list AM update: |$affected_rows|$uniqueid|"; &agi_output;}
if ($AGILOG) {$agi_string = "-- VDAD vicidial_list AL update: |$affected_rows|$uniqueid|"; &agi_output;}
$dbhA->disconnect();
+40 -2
View File
@@ -834,7 +834,26 @@ if ($agent_search_method =~ /^SO|^LO/)
}
else
{
if ($AGILOG) {$agi_string = "WWWWW VDAD XFER LOCAL WAIT: |$rec_countWAIT|$channel_group|$channel|$callerid|$uniqueid|"; &agi_output;}
### For Debugging purposes display the call ahead of this call
if ( ($rec_countWAIT == '1') && ($drop_timer > 3) && ($AGILOG) )
{
$stmtA = "SELECT call_time,campaign_id,last_update_time,callerid,status,channel FROM vicidial_auto_calls where status = 'LIVE' and server_ip='$VARserver_ip' and campaign_id = '$channel_group' and call_time < \"$SQLdateBEGIN\" and lead_id != '$insert_lead_id';";
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;
$agi_string .= "|$aryA[0]|$aryA[1]|$aryA[2]|$aryA[3]|$aryA[4]|$aryA[5]|\n";
$r++;
}
$sthA->finish();
&agi_output;
}
if ($AGILOG) {$agi_string = "WWWWW VDAD XFER LOCAL WAIT: |$rec_countWAIT|$channel_group|$channel|$callerid|$uniqueid|$drop_timer|"; &agi_output;}
}
}
@@ -1034,7 +1053,26 @@ if ($agent_search_method =~ /^LO|^LB/)
}
else
{
if ($AGILOG) {$agi_string = "WWWWW VDAD XFER BALANCE WAIT: |$rec_countWAITrem|$channel_group|$channel|$callerid|$uniqueid|"; &agi_output;}
if ( ($rec_countWAITrem == '1') && ($drop_timer > 3) && ($AGILOG) )
{
$stmtA = "SELECT call_time,campaign_id,last_update_time,callerid,status,channel FROM vicidial_auto_calls where status = 'LIVE' and campaign_id = '$channel_group' and call_time < \"$SQLdateBEGIN\" and lead_id != '$insert_lead_id';";
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;
$agi_string .= "|$aryA[0]|$aryA[1]|$aryA[2]|$aryA[3]|$aryA[4]|$aryA[5]|\n";
$r++;
}
$sthA->finish();
&agi_output;
}
if ($AGILOG) {$agi_string = "WWWWW VDAD XFER BALANCE WAIT: |$rec_countWAITrem|$channel_group|$channel|$callerid|$uniqueid|$drop_timer|"; &agi_output;}
}
}
+7 -1
View File
@@ -73,6 +73,10 @@ cd ../asterisk-1.2.24
wget http://www.eflo.net/files/amd2.conf
mkdir /etc/asterisk
mv amd2.conf /etc/asterisk/amd.conf
*OPTIONAL*(1.2.23 thru 1.2.24) apply the meetme DTMF passthru patch
wget http://www.eflo.net/files/meetme_DTMF_passthru-1.2.23.patch
patch -p1 < ./meetme_DTMF_passthru-1.2.23.patch
- File to patch: app_meetme.c
*OPTIONAL*(1.2.12.1 thru 1.2.24) apply the meetme volume control patch
*Different patches available for 1.2.7.1 through 1.2.14
wget http://www.eflo.net/files/meetme_volume_control_1.2.16.patch
@@ -471,7 +475,9 @@ insert into vicidial_statuses values('NA','No Answer AutoDial','N','N','UNDEFINE
insert into vicidial_statuses values('CALLBK','Call Back','Y','Y','UNDEFINED');
insert into vicidial_statuses values('A','Answering Machine','Y','N','UNDEFINED');
insert into vicidial_statuses values('AM','Answering Machine Auto','N','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');
+18 -14
View File
@@ -386,6 +386,11 @@ mv -f *.mp3 ../orig-mp3/
############# INSTRUCTIONS FOR Asterik 1.4 release ####################
NOTE: If you want to use Asterisk 1.4, you will need to make sure that you set
the servers table "asterisk_version" field to the proper version number and you
can use the docs/conf_examples/extensions.conf.sample-1.4 file for your default
dialplan
### If upgrading from 1.2.X Asterisk, run the following lines first:
rm -f /usr/lib/asterisk/modules/app_curl.so
rm -f /usr/lib/asterisk/modules/app_cut.so
@@ -406,24 +411,24 @@ rm -f /usr/lib/asterisk/modules/pbx_functions.so
mkdir /usr/src/asterisk-1.4
cd /usr/src/asterisk-1.4
wget http://ftp.digium.com/pub/asterisk/releases/asterisk-1.4.11.tar.gz
wget http://ftp.digium.com/pub/zaptel/releases/zaptel-1.4.4.tar.gz
wget http://ftp.digium.com/pub/libpri/releases/libpri-1.4.1.tar.gz
gunzip asterisk-1.4.11.tar.gz
tar xvf asterisk-1.4.11.tar
gunzip zaptel-1.4.4.tar.gz
tar xvf zaptel-1.4.4.tar
gunzip libpri-1.4.1.tar.gz
tar xvf libpri-1.4.1.tar
cd ./zaptel-1.4.4
wget http://ftp.digium.com/pub/asterisk/releases/asterisk-1.4.14.tar.gz
wget http://ftp.digium.com/pub/zaptel/releases/zaptel-1.4.6.tar.gz
wget http://ftp.digium.com/pub/libpri/releases/libpri-1.4.2.tar.gz
gunzip asterisk-1.4.14.tar.gz
tar xvf asterisk-1.4.14.tar
gunzip zaptel-1.4.6.tar.gz
tar xvf zaptel-1.4.6.tar
gunzip libpri-1.4.2.tar.gz
tar xvf libpri-1.4.2.tar
cd ./zaptel-1.4.6
./configure
make
make install
cd ../libpri-1.4.1
cd ../libpri-1.4.2
make clean
make
make install
cd ../asterisk-1.4.11
cd ../asterisk-1.4.14
wget http://www.eflo.net/files/enter.h
wget http://www.eflo.net/files/leave.h
mv -f enter.h apps/enter.h
@@ -437,8 +442,7 @@ make install
#### pureftpd
#### pureftpd FTP server installation instructions ####
cd /usr/local
wget ftp://ftp.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.20.tar.gz
+15 -4
View File
@@ -827,11 +827,16 @@ PHASE 4: INSTALLING ASTERISK
OK, all the prep work is done, now it's time to start having fun with Asterisk.
There are two basic ways to install Asterisk, an official release(at the time of
this writing the official release is 1.2.17) and the SVN_DEV version(development
branch). We recommend using Asterisk 1.2.17. These instructions are how we get
this writing the official release is 1.2.24) and the SVN_DEV version(development
branch). We recommend using Asterisk 1.2.24. These instructions are how we get
our Asterisk system with it's T1 line installed with our 2 SIP VOIP devices and
one IAX2 softphone.
NOTE: If you want to use Asterisk 1.4, you will need to make sure that you set
the servers table "asterisk_version" field to the proper version number and you
can use the docs/conf_examples/extensions.conf.sample-1.4 file for your default
dialplan
NOTE: If you want to use release 1.0.8 or 9 we would recommend either using the
CVS_v1-0 branch where the issues are fixed, or patching your 1.0.8/1.0.9 code
with the following patch:
@@ -856,7 +861,7 @@ with the following patch:
- svn checkout http://svn.digium.com/svn/asterisk/branches/1.2 asterisk-1.2
- svn checkout http://svn.digium.com/svn/zaptel/branches/1.2 zaptel-1.2
- svn checkout http://svn.digium.com/svn/libpri/branches/1.2 libpri-1.2
C. if you want latest SVN_DEV version (not recommended) [1.5 tree]
C. if you want latest SVN_DEV version (not recommended) [1.6 tree]
- svn checkout http://svn.digium.com/svn/asterisk/trunk asterisk
- svn checkout http://svn.digium.com/svn/zaptel/trunk zaptel
- svn checkout http://svn.digium.com/svn/libpri/trunk libpri
@@ -897,6 +902,10 @@ with the following patch:
- wget http://www.eflo.net/files/amd2.conf
- mkdir /etc/asterisk
- mv amd2.conf /etc/asterisk/amd.conf
*OPTIONAL*(1.2.23 thru 1.2.24) apply the meetme DTMF passthru patch
- wget http://www.eflo.net/files/meetme_DTMF_passthru-1.2.23.patch
- patch -p1 < ./meetme_DTMF_passthru-1.2.23.patch
- File to patch: app_meetme.c
*OPTIONAL*(1.2.12.1 thru 1.2.24) apply the meetme volume control patch
*Different patches available for 1.2.7.1 through 1.2.14
- wget http://www.eflo.net/files/meetme_volume_control_1.2.16.patch
@@ -2954,7 +2963,9 @@ insert into vicidial_statuses values('NA','No Answer AutoDial','N','N','UNDEFINE
insert into vicidial_statuses values('CALLBK','Call Back','Y','Y','UNDEFINED');
insert into vicidial_statuses values('A','Answering Machine','Y','N','UNDEFINED');
insert into vicidial_statuses values('AM','Answering Machine Auto','N','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');
@@ -225,8 +225,8 @@ exten => h,1,DeadAGI(agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG---
; Extension 7275551212 - Inbound local number from PRI with 10 digit delivery
exten => 7275551212,1,Ringing
exten => 7275551212,2,Wait(1)
exten => 7275551212,3,AGI(agi://127.0.0.1:4577/call_log--fullCID--${EXTEN}-----${CALLERID}-----${CALLERIDNUM}-----${CALLERIDNAME})
;exten => 7275551212,3,AGI(call_logCID.agi,${EXTEN}-----${CALLERID}-----${CALLERIDNUM}-----${CALLERIDNAME})
exten => 7275551212,3,AGI(agi://127.0.0.1:4577/call_log--fullCID--${EXTEN}-----{CALLERID(all)}-----${CALLERID(num)}-----${CALLERID(name)})
;exten => 7275551212,3,AGI(call_logCID.agi,${EXTEN}-----{CALLERID(all)}-----${CALLERID(num)}-----${CALLERID(name)})
exten => 7275551212,4,Answer
exten => 7275551212,5,Dial,sip/spa2000&sip/spa2001|30|to
exten => 7275551212,6,Voicemail,u2000
@@ -647,14 +647,14 @@ exten => 8307,3,Hangup
; this is used for recording conference calls, the client app sends the filename
; value as a callerID recordings go to /var/spool/asterisk/monitor (WAV)
exten => 8309,1,Answer
exten => 8309,2,Monitor(wav,${CALLERIDNAME})
exten => 8309,2,Monitor(wav,${CALLERID(name)})
exten => 8309,3,Wait,3600
exten => 8309,4,Hangup
; this is used for recording conference calls, the client app sends the filename
; value as a callerID recordings go to /var/spool/asterisk/monitor (GSM)
exten => 8310,1,Answer
exten => 8310,2,Monitor(gsm,${CALLERIDNAME})
exten => 8310,2,Monitor(gsm,${CALLERID(name)})
exten => 8310,3,Wait,3600
exten => 8310,4,Hangup
@@ -682,7 +682,7 @@ exten => _851XXXXX,3,Hangup
; this is used to allow the GUI to send you directly into voicemail
; don't forget to set GUI variable $voicemail_exten to this extension
exten => 8501,1,VoicemailMain(s${CALLERIDNUM})
exten => 8501,1,VoicemailMain(s${{CALLERID(num)}(num)})
exten => 8501,2,Hangup
; this is used to allow the GUI to send live calls directly into voicemail
@@ -89,7 +89,7 @@ After Hours Extension -<\/B> The dialplan extension to send the call to if the A
After Hours Voicemail -<\/B> The voicemail box to send the call to if the Action is set to VOICEMAIL||
Welcome Message Filename -<\/B> 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---||
Music On Hold Context -<\/B> The music on hold context to use when the customer is placed on hold. Default is default||
On Hold Prompt Filename -<\/B> The audio file located on the server to be played at a regular interval when the customer is on hold. Default is generic_hold||
On Hold Prompt Filename -<\/B> The audio file located on the server to be played at a regular interval when the customer is on hold. Default is generic_hold. This audio file MUST be 9 seconds or less in length.||
On Hold Prompt Interval -<\/B> The length of time in seconds to wait before playing the on hold prompt. Default is 60||
Agent Alert Extension -<\/B> The extension to send into the agent session to announce that a call is coming to the agent. This extension should have a Playback of an audio file. To not use this function set this to X. Default is X||
Agent Alert Delay -<\/B> The length of time in milliseconds to wait before sending the call to the agent after playing the on Agent Alert Extension. Default is 1000||
+1 -1
View File
@@ -2510,7 +2510,7 @@ echo "<TABLE WIDTH=98% BGCOLOR=#E6E6E6 cellpadding=2 cellspacing=0><TR><TD ALIGN
<BR>
<A NAME="vicidial_inbound_groups-onhold_prompt_filename">
<BR>
<B>On Hold Prompt Filename -</B> The audio file located on the server to be played at a regular interval when the customer is on hold. Default is generic_hold.
<B>On Hold Prompt Filename -</B> The audio file located on the server to be played at a regular interval when the customer is on hold. Default is generic_hold. This audio file MUST be 9 seconds or less in length.
<BR>
<A NAME="vicidial_inbound_groups-prompt_interval">