Call Us Today! 877.742.2583

Page tree
Skip to end of metadata
Go to start of metadata


mod_com_amd is a FreeSWITCH™ commercial module used to analyze call progress and identify if it was answered by a human or a machine.

 Click here to expand Table of Contents


FreeSWITCH™ provides a licensed commercial Answering Machine Detection module. A key technology for autodialers is the ability to detect live human pickup and answering machine. Since there is no indication/hardware signal when a call is answered by an answering machine or voicemail system, autodialer systems have to analyze incoming audio in order to make a prediction. Currently, there is no algorithm that can achieve 100% accuracy.

Getting Licenses

All FreeSWITCH™purchases must be done through our billing system. Go to, click on the top right menu called Account  and then on Register. 


After registering, go to login page at and provide your credentials. Once logged in the system, you'll see a menu on top of the page called Products, click and then click on Order New Products. Direct link is

On the cart page, scroll down your screen and you'll see AMD product description. Click on the Order Now button. Direct link is

On the next screen you need to type how many licenses you need. A license is needed for each created channel that you need to activate the detection. If you have 5 simultaneous calls and want to detect who's answering you'll need 5 ports/channels. Click on Add to Cart after selecting the number of licenses.

If you need to activate licenses for different servers you need to buy them separately. For example, if you need 5 licenses to server A and more 10 to server B, add 5 licenses to the cart and then add 10 more again, you'll receive two activation codes, one for each server.


Now you can proceed to payment, and the end of the page there's a Complete Order button. The payment method is PayPal, if you don't have paypal account please proceed to PayPal's registration page and follow the instructions.

After the payment, PayPal will notify  FreeSWITCH™ billing system about the new payment and the license(s) will be sent to your email. This process takes a few minutes, if you do not receive the email in a few minutes please contact us at or at #freeswitch at For more information on how to contact us please visit IRC page.



Updated Instructions for FreeSWITCH 1.8

Install the package
Uncomment or create in autoload_configs/modules.conf.xml

Validate license


Unzip the key

Copy key to /etc/freeswitch (do not put the zip file in there)

Shutdown freeswitch

Start license server

Start freeswitch again

Check that amd is communicating with license server

Do some testing in dialplan. Download test wav file Answering_Machine.wav.

Checking for available license

notice how we check if license are available by checking a regex against zero using the amd_info api

<condition field="${expand regex ${amd_info}|available => 0}" expression="false">

if regex is false, then proceed with amd usage, else if true, do anti actions to notify customer with a custom sound file

<anti-action application="playback" data="${sounds_dir}/All_Circuits_Busy.mp3"/>
<anti-action application="hangup"/>






Older Instructions for Freeswitch 1.6

We have packaged our commercial modules into a single installer, All products currently offered (mod_com_amd, mod_com_g729, mod_com_g719, mod_com_g728) are all installed and take up very little space.

Downloading and Running Installer

This will guide you thru some installation steps. We try to detect the most common places your FreeSWITCH™ installation may be located, If we can't detect it then we will prompt for information about where your FreeSWITCH™ is installed. You can optionally you can provide the data as arguments to the fs-latest-installer binary:

Installer arguments

Once you accept the EULA, you'll see output similar to this:


Once complete you'll need to activate your licenses using the validator outlined in the installation completion/thank you message. You'll use the same validator application for any of our commercial products that are available from our online store.

Once you start the validator you'll see output similar to this:


Licencing tool - Installing new licence.

The resulting will be in the current working directory, Unzip and copy the .conf files into /etc/freeswitch:

Unzip Licenses

Hardcode Path Here

/etc/freeswitch is a hard coded path the freeswitch_license_server will auto-scan up restart... You MUST put your <HEX>.conf file in /etc/freeswitch regardless of where you've installed FreeSWITCH.


To make the license process aware of your new licenses please run:

Reloading licence server

This will make the license server rescan the directory adding any additional licenses to your list of resources its capable of licensing. We just activated a license for mod_com_amd which when loading the module will look like this:


Loading mod_com_amd

As you can see its seeing the licenses that were just installed, you can use the various api calls registered to manage your licenses.

Default Configuration

The default mod_com_amd configuration will be suitable in most cases, but if you need to tweak the configuration go to /usr/local/freeswitch/conf/autoload_configs and open amd.conf.xml:



Let's figure out how can we use the mod_com_amd.

XML Dialplan Example

The first way you can use mod_com_amd is from the xml dialplan. When the module is loaded, three application are created:

  • voice_start
  • voice_stop
  • waitforresult

Let's build a dialplan that when the call gets answered by a machine one message gets delivered to the voicemail:

AMD Dialplan XML Example

Pay attention to the variable amd_execute_on_machine and the application voice_start.

When the call gets answered  FreeSWITCH™ will route it to extension "amd_example". This extension will set the variable amd_execute_on_machine, which will transfer the call to destination "machine_detected" at context "default" if the call gets answered by a machine, otherwise the playback actions will get executed (dialplan lines 6, 7, 8 and 9).

If a machine answers this call, it'll be transfered to our next extension, machine_detected, which can be useful when you want to leave message in the customer voicemail, in this case you can use the application wait_for_silence to wait the end of voicemail initial greeting and then leave your message.

mod_com_amd sets a variable called "amd_status" and his value can be "human" or "machine". You can see the value with the "info" application (dialplan line 20).

In this first example, you can originate a call to 5551212 using:

Originating call

This will make a call to sofia/profile/number and when answered  FreeSWITCH™ will look for extension that matches 5551212 in your dialplan. 

Lua Example

If you're building your routing logic with Lua, you can use the same application and variables used earlier in the xml dialplan. Example:


Call this lua script using:

Testing Dialplan

XML for self testing the config setting... be sure to download the Answering_Machine.wav  file and put in your sounds directory. With this setup, you should be able to tweak settings and get a feel for thier values beyond the default.

uuid_displace have options [m]ux and [r]ead, so you can hear the ensuing found extension audio, and also induce the answering machine file onto the read channel so amd can operate on it.

more technical info about mod_com_amd

 Click here to expand...

mod_amd - Answering Machine Detection for FreeSWITCH
mod_amd supplies three different dialplan apps and several channel variables.
It also fires events during the detection process. They are listed here for reference.
voice_start - starts the answering machine detection on a channel
voice_stop - stops the answering machine detection on a channel
waitforresult [<file to play while while waiting>] - waits for AMD to return a result, and optionally playback a file
Channel variables, results:
amd_status - Contains whatever was detected:
'person', 'machine', 'unsure'
Basically, anything other than 'machine' should be assumed to be a human
amd_result - Contains more information about what was detected:
'too-long' - detection process took longer than total_analysis_time (amd.conf.xml)
'max-count' - max noisy frames detected, probably a machine speaking
'max-intro' - max noisy frames detected during intro, probably a machine speaking
'silent-initial' - nothing heard on line, assume human
'silent-after-intro' - short burst of noisy frames followed by silence - probably human
Channel variables, control:
execute_on_machine_app - application to execute if machine detected
execute_on_machine_arg - argument to application to execute if machine detected
CUSTOM::AMD::EVENT - Action: Start Talking
CUSTOM::AMD::EVENT - Action: Stop Talking
SWITCH_MEDIA_BUG_ADD - Fired at start of detection process
SWITCH_MEDIA_BUG_REMOVE - Fired at stop of detection process
Look for variable_amd_status header
mod_amd can be used three ways:
via event socket, where an event-based script watches for AMD events and acts accordingly
via the supplied JavaScript file
via the dialplan by setting "execute_on_machine_app" and "execute_on_machine_arg"
See default.xml for simple examples