Asterisk cmd AMD
Created by: Blumagic,Last modification on Fri 29 of Feb, 2008 [12:41 UTC] by JustRumours
Answering Machine Detect (AMD)
Possible bugs.
Synopsis
Attempts to detect answering machines.Description
AMD([|initialSilence][|greeting][|afterGreetingSilence][|totalAnalysisTime][|minimumWordLength][|betweenWordsSilence][|maximumNumberOfWords][|silenceThreshold])This application attempts to detect answering machines at the beginning of outbound calls.
Simply call this application after the call has been answered (outbound only, of course).
When loaded, AMD reads amd.conf and uses the parameters specified as default values.
Those default values get overwritten when calling AMD with parameters.
- 'initialSilence' is the maximum silence duration before the greeting. If exceeded then MACHINE.
- 'greeting' is the maximum length of a greeting. If exceeded then MACHINE.
- 'afterGreetingSilence' is the silence after detecting a greeting. If exceeded then HUMAN.
- 'totalAnalysisTime' is the maximum time allowed for the algorithm to decide on a HUMAN or MACHINE.
- 'minimumWordLength'is the minimum duration of Voice to considered as a word.
- 'betweenWordsSilence' is the minimum duration of silence after a word to considere the audio what follows as a new word.
- 'maximumNumberOfWords'is the maximum number of words in the greeting. If exceeded then MACHINE.
- 'silenceThreshold' is the silence threshold.
This application sets the following channel variable upon completion:
AMDSTATUS - This is the status of the answering machine detection.
Possible values are:
MACHINE | HUMAN | NOTSURE | HANGUP
AMDCAUSE - Indicates the cause that led to the conclusion.
Possible values are:
TOOLONG-<%d total_time>
INITIALSILENCE-<%d silenceDuration>-<%d initialSilence>
HUMAN-<%d silenceDuration>-<%d afterGreetingSilence>
MAXWORDS-<%d wordsCount>-<%d maximumNumberOfWords>
LONGGREETING-<%d voiceDuration>-<%d greeting>
Installation
You'll need the source code for your version (I'm able to compile in 1.2.9.1):as 'root' user
cd /usr/src
rm -rf asterisk
wget http://ftp.digium.com/pub/asterisk/releases/asterisk-1.2.7.1.tar.gz (or whatever your version, e.g. asterisk-1.2.9.1.tar.gz)
tar -zxvf asterisk-1.2.7.1.tar.gz
mv asterisk-1.2.7.1 asterisk
- Download to /etc/asterisk amd2.conf or amd.conf
- Execute 'mv amd2.conf amd.conf', if necessary
- Execute 'dos2unix amd.conf'
- Execute 'vi amd.conf' and change [AnsweringMachineDetector] to [amd]
- Download to /usr/src/asterisk/apps app_amd2.c or app_amd2.c
- Execute 'mv app_amd2.c app_amd.c'
- Execute 'dos2unix app_amd.c'
- Ensure astxs is executable: 'chmod +x /usr/src/asterisk/contrib/scripts/astxs'
- Install and load app_amd.c via '/usr/src/asterisk/contrib/scripts/astxs -install -autoload app_amd.c'
- That's it!
To the Playground!
User comment (Feb '08): The general feedback we get is that most call centres prefer to turn off AMD due to the delay before connecting a call to an agent. BTW - we have a customer who prefers have the agent listen to the answering machine and leave a message as they find that around 25% of messages, which sound sufficiently personalized, actually get returned!!! Amazing.The only other suggestion I have would be to tweak the AMD settings such that it's far less accurate but much quicker to connect to the agent (therefore the filtering success would be lower). This is the approach that Dialogic have taken with their HMP product wherein they offer a choice between 2 styles of AMD - rapid V's accurate.
Example 1
Asterisk 1.2[outbound]
exten => s,1,NoCDR
exten => s,n,AMD
exten => s,n,GotoIf($[${AMDSTATUS}=AMD_PERSON]?humn:mach)
exten => s,n(mach),WaitForSilence(2500)
exten => s,n,Playback(message-when-machine)
exten => s,n,Hangup
exten => s,n(humn),WaitForSilence(500)
exten => s,n,Playback(message-when-human)
exten => s,n,Hangup
Asterisk 1.4
[outbound]
exten => s,1,NoCDR
exten => s,n,AMD
exten => s,n,GotoIf($[${AMDSTATUS}=HUMAN]?humn:mach)
exten => s,n(mach),WaitForSilence(2500)
exten => s,n,Playback(message-when-machine)
exten => s,n,Hangup
exten => s,n(humn),WaitForSilence(500)
exten => s,n,Playback(message-when-human)
exten => s,n,Hangup
See also:
Asterisk auto-dial outAsterisk cmd MachineDetect (addon)
Asterisk cmd BackGroundDetect
17274 views strong.
- Asterisk | Applications | FAQ | Tips & Tricks
Comments
333Using AMD with Asterisk 1.4.13
Any tricks/tips would be appreciated.