login | register
Sun 07 of Sep, 2008 [08:55 UTC]

voip-info.org

Discuss [1] History

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

  1. Download to /etc/asterisk amd2.conf or amd.conf
  2. Execute 'mv amd2.conf amd.conf', if necessary
  3. Execute 'dos2unix amd.conf'
  4. Execute 'vi amd.conf' and change [AnsweringMachineDetector] to [amd]
  5. Download to /usr/src/asterisk/apps app_amd2.c or app_amd2.c
  6. Execute 'mv app_amd2.c app_amd.c'
  7. Execute 'dos2unix app_amd.c'
  8. Ensure astxs is executable: 'chmod +x /usr/src/asterisk/contrib/scripts/astxs'
  9. Install and load app_amd.c via '/usr/src/asterisk/contrib/scripts/astxs -install -autoload app_amd.c'
  10. 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 out
Asterisk cmd MachineDetect (addon)
Asterisk cmd BackGroundDetect

17274 views strong.



Comments

Comments Filter
222

333Using AMD with Asterisk 1.4.13

by flajeff, Wednesday 09 of July, 2008 [12:42:48 UTC]
I followed the installation instructions and got up the point of installing the amd_conf.c file with astxs, unfortunately, I can't seem to find astxs anywhere on my system (I do have the source code installed and asterisk has been working for sometime now).

Any tricks/tips would be appreciated.