Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Current »

FastAMD is a new kind of digital Answering Machine Detection (AMD) for use in data centres where strict adherence to best practice is a necessity. Conventional AMD has been with us for a long time and its benefits are well understood, as are the drawbacks. FastAMD approaches answer machine detection in a new way.

Conventional AMD (sometimes called cadence AMD) works by making a good guess at what is making the noise that is coming down the line. Two key issues discount its use in quality centric environments. The first problem is that it can mistake live call recipients for answering machines and hang up on them (a false positive). Conventional AMD vendors will quote their percentage of false positives at around 3%, though possibly 15% is now more the norm; greetings for cell phones are on average longer and noisier and cadence detection does not cope well with this, pushing false positives to completely unacceptable levels.

The second problem with traditional cadence AMD is that its detection process takes too long – even a 2-second pause after a “Hello” is enough to alert the recipient that this is likely to be a call from a data centre. Forewarned, the call already starts on the wrong foot - if it starts at all.

FastAMD’s approach eradicates these two issues. Firstly, FastAMD relies on finding a digital match for the incoming voice. It does not hang up on a connected live recipient so there is a 0.0% rate of false positives. Also, a digital match (if found) takes 0.5 seconds so calls identified as live can be transferred rapidly and live recipients are unaware of any delay.

There is a trade-off, FastAMD is implicitly more cautious than cadence AMD so it does not detect all answering machines, but it detects sufficient to provide significant performance gains; more than enough to improve the productivity of your staff, without annoying your call list.

FastAMD

FastAMD is an Asterisk Dialplan application designed to perform analysis of the in-band content of a call immediately after connection. It processes the media of the call and assesses the origin of the content.

It incorporates Asterisk’s own native AMD application features and provides two more features over and above that provided by the native application.

  1. Fax/modem tone detection
  2. Fast Voice Mail message detection (FastAMD).

The component functions, basic AMD, Fax detect and FastAMD detect, can be run together or turned on/off independently.

The FastAMD feature

To perform its detection, FastAMD uses a library of templates derived from the standard voicemail (VM) introductions. These are collected from the voice mail (VM) services of major national PSTN and cell service providers and common PBXs. The content of a call is matched with these templates in real time. This matching may be done several times during the first fractions of a second. The matching is extremely fast (micro-second) so there is no lag between media collection and detection. This allows FastAMD to determine an outcome on average within 0.4 seconds of the start of the call.

The make-up of digital templates and the matching algorithm means that the probability of a false positive is around 2-30 (0.000000001); effectively there are no false positives. Templates are so unique that even the chances of the same individual re-producing a live voice segment to match a previous one are extremely remote (infinitesimal).

FastAMD matches calls with a “known” message set. This means that it ignores domestic answer machines terminating on analogue lines. However in some countries (like the UK) “matchable” AM calls represent around 70% of all AM calls. Such limits are however outweighed by the effective removal of false positives and the speed with which detection is performed.        

FastAMD also has a dynamic and parallel learning feature. This feature runs in the background and compares templates captured from previous calls. If template matches are found they are deemed to be from an identical source – i.e. a digital recording. These matched templates can be automatically promoted as “graduate” templates. The graduates and the associated media content can be examined before including into the main library, or they can be “employed” dynamically and immediately. In the latter case there is no separation between the learning phase and the deployment phases, and the learning phase can run continuously.

To support these learning options FastAMD has 3 exclusive modes that can be run together or independently.

  • Detect mode. This uses a set of pre-built templates for comparison with the current call media. It may also be set to use graduate templates.
  • Template capture mode. This will capture a new set of templates based on the content of calls. These can be analysed in the background to build or add to the library of templates used in detection mode.
  • Media capture mode. This will save short media files (max 2 seconds) containing the initial part of call content. These may be used to qualify the captured templates as part of a manual graduation process  

Templates and media files will be saved only when a fast-AMD detect match is not made. Saving of files may also be made conditional on a positive basic AMD detection (if that is running).

Installation

The installation is an rpm that places the binary and configuration files in various locations on the asterisk server. It also places a license control tool on the server. To install run “rpm –i magusamd-<version>” from the directory containing the rpm file

The following files are installed

/usr/src/magus/app_magusamd.cky
/usr/src/magus/MakeMagusAMD

/etc/asterisk/magusamd.conf
/usr/sbin/maguslic.
/usr/sbin/magus-compiler.

maguslic is an executable that manages the licensing. It must be run as an administrative user – root. On installation, it is automatically run and creates a /etc/magusamd.lic file. This contains a unique server key and license. On creation the license is empty.

Once the installation is done there are two further steps:

Firstly the encrypted code needs to be compiled. Copy the app_magusamd.cky and MakeMagusAMD to the “<asterisk source>/apps” directory. From within the apps directory open a terminal window and run the shell as root (super user). Then run “make --file=MakeMagusAMD install”. This will compile the source file and copy the binaries to the correct modules directory. Please report any compilation errors back to the vendor.  

Secondly run “maguslic /etc/magusamd.lic” from the Linux command prompt. This will display the key. This must be provided to your software supplier. They will provide you with a license (5 hex quartets) of a specific duration that will contain the number of permitted channels

When you receive your license enter it using “maguslic -l /etc/magusamd.lic  2 <licence value>”. It will also verify that the license matches the server. (don’t forget the “2” in the command line).

Once these two steps are completed, restart/reload Asterisk.

Use

To employ FastAMD a call must first be set-up using from a device nominated in the dial plan. This can be done either using an originate() from either the dial plan or the Asterisk Manager API.

[outbound-originate-extn]

exten => s,1,magusAMD([profile]) //
; process “MAGUSAMDSTATUS” here

Like the AMD application the FastAMD application blocks until it has enough information to determine the call content type. On return the FastAMD application sets a channel variable MAGUSAMDSTATUS and MAGUSAMDCAUSE (optionally). It may also be configured to return other variables of user nominated names. The maximum time spent analysing the in-band media can be configured.

FastAMD takes one optional parameter; this is the “profile”. Profiles are defined in the /etc/asterisk/magusamd.conf file. Each profile can define a set of operating parameters and nominate a set of templates. Supporting multiple profiles allows for use of basic and FastAMD separately, and for use of independent template sets, for instance language/national sets.

Possible values for MAGUSAMDSTATUS are

MACHINE (for basic AMD and fast AMD mode)
HUMAN (for basic AMD mode only)
NOTSURE
HANGUP
FAX (for Fax/Modem mode)
MODEM (for Fax/Modem mode)

There are also user definable return associates with template sets and basic AMD silence timeouts.  

FastAMD also has a dynamically parallel learning module. If set to capture templates and apply the learning cycle magusAMD will dynamically compare any newly captured templates to the set of previously captured templates. If matches are found then the templates “graduate” to the templates used in matching against live calls. There need be no “training” phase separate from a “live” phase. The learning process is parallel with live usage.

The template library for each profile as a defined “top level” directory. Any match to templates held in this directory will return MACHINE in the MAGUSAMDSTATUS channel variable. The learning cycle my place graduated templates into the “graduate” directory under the top level. Any match to templates held in this directory will return MACHINE in the MAGUSAMDSTATUS channel variable. There may be other template sets held in subdirectories of the top level.  Any match to templates held in any of these directories will return the relative directory name in the MAGUSAMDSTATUS channel variable.


Arguments and Configuration values

FastAMD takes one optional parameter; this is the “profile”. Profiles are defined in the /etc/asterisk/magusamd.conf file.

The .conf file is broken into a [general] region and any number of user defines [profile] regions. Operational parameters may be defined in the [general] sections. The values there will be used as default values for other profiles (note “general” should not be used as a profile name). There is a [default] profile. This will be used where the FastAMD() application is run without a parameter. If the [default] profile is not explicitly defined in the .conf file it will take its values from the [general] section.

FastAMD’s basic AMD function retains the same conf file configuration values as the operation of asterisks native AMD.  Below are amendments to those values and additional values. The parameters specified below can be present in the general section and in any profiles.

total_analysis_time
This integer value is already available as a basic AMD parameter; in that respect its usage is unchanged. However the duration the Fax/modem and FastAMD detection cycles will also be limited by this value.

initial_silence_response
This is the string value that is returned in MAGUSAMDSTATUS by the basic AMD operation when the initial_silence_timeout is exceeded. In the functionality offered by asterisks native AMD operation the value returned is fixed as “MACHINE”. In FastAMD this event’s MAGUSAMDSTATUS value is configurable (default = “MACHINE”)

do_AMD_basic
Boolean value turning basic AMD on/off . Values “yes”/”no”. Default = yes. Note: if performing media and template capture at the same time as basic AMD, these capture operations will be delineated to the point of AMD detection.  Default = no

do_fax_detect
Boolean value turning fax detect on/off. Values “yes”/”no”. Default = no  

do_fast_AMD_detect
Boolean value turning fast-AMD detect mode on/off. Values “yes”/”no”. Default = yes

do_fast_AMD_template_capture
Boolean value turning template capture mode on/off. Values “yes”/”no”. Template files have a .tmpl extension. A single call may generate several template files. Default = no

do_fast_AMD_media_capture
Boolean value turning media capture mode on/off. Values “yes”/”no”. Media files are .sln format (16bit 8khz sample). A call will generate just one media file. The duration of the file will delimited to the point the detection terminated. This will be determined by the timeout parameters. Template and Media capture can be run with no detection modes in operation. This allows for an independent learning phase. In such a case total_analysis_time will determine the media file duration. Default = no

fast_AMD_capture_on_AMD_machine_only.
Boolean value forcing template and media capture to save files only when basic AMD is running and has detect a machine. Values “yes”/”no”. Default = no

fast_AMD_read_dir
Text value for the directory location of the templates used in detection mode. Default = /etc/ magusamd.

fast_AMD_write_dir
Text value for the directory location of the templates and media capture. Default = /var/lib/magusamd (do not make fast_AMD_read_dir and fast_AMD_write_dir the same)

fast_AMD_silence_threshold
Integer value corresponding to the energy threshold beneath which Fast-AMD considers the media to be silence. If the media content remains below the threshold for from the start to fast_AMD_maximum_silence then the application returns sets the MAGUSAMDSTATUS to MACHINE. Once crossed the fast_AMD_maximum_silence timer ends and the fast_AMD_maximum_after_silence timer starts. This “after silence” timer continues to run regardless of whether the media energy later drops below the threshold. The units of the threshold are the PCM value of the media. Asterisk averages the energy over 20ms. Default = 12

fast_AMD_maximum_silence
Integer value in milliseconds. This is the maximum silence period that fast-AMD detection will tolerate. If no other detection is running, magusAMD will terminate setting MAGUSAMDSTATUS to MACHINE. (default 800)

fast_AMD_maximum_after_silence
Integer value in milliseconds. This is the maximum period fast-AMD detection will tolerate once the fast_AMD_silence_threshold is breached. If no other detection is running, and no match is made, magusAMD will terminate after fast_AMD_maximum_after_silence milliseconds, setting MAGUSAMDSTATUS to NOTSURE. fast_AMD_maximum_silence and fast_AMD_maximum_silence run independently of total_analysis_time. Fast-AMD detection will end if any of these expire. (default 400)

do_fast_AMD_learn
Boolean (yes/no). If do_fast_AMD_learn is set on and do_fast_AMD_template_capture is set on, then magusAMD will check to see if newly captured templates match any other captured templates (this occurs in a separate worker thread and so does not affect the performance of an individual magusAMD app instance). If matches are found then these templates are moved to the graduate directory under fast_AMD_read_dir (just one instance for each match is moved).. (default = no)

fast_AMD_employ_graduates
Boolean (yes/no). fast_AMD_employ_graduates determines whether the “graduate” templates are used in the standard templates match set for the fast-AMD operation. (default = yes)

fast_AMD_captured_template_max
Integer value. This is the number of captured templates that magusAMD retains. This prevents the storage media being consumed. Any associated media files are also removed. If this limit is reached then as new files are captured, the oldest ones are destroyed. This housekeeping operation is independent of do_fast_AMD_learn. (default = 5000)

fast_AMD_template_threshold
Integer value. This is the energy threshold that any template must exceed if it is to be captured. (default 1200)

status_variable_name
Text value for the name of an additional channel variable in which to report the outcome status. default = “”

cause_variable_name
Text value for the name of an additional channel variable in which to report the outcome cause. default = “”



             

  • No labels