Requirement
Call Progress Analysis is required for outbound campaign calls to determine whether the answering party is:
-
Human
-
Voicemail
-
Answering machine
-
Other machine-based responses
This helps the dialer decide whether to connect the call to an agent, drop it, retry later, or route it to voicemail automation.
Prerequisites
|
Item |
Recommended |
Installation guide |
|---|---|---|
|
Media Server |
Latest version |
|
|
CX Dialer |
5.1 |
3. Implementation & Installation Workflow
Step 1: Clone the AMD Module
Clone the mod_amd source repository:
git clone https://github.com/seanbright/mod_amd
Step 2: Move Source Code to Build Directory
Move the cloned module into the FreeSWITCH source location:
mv mod_amd /usr/src/
Step 3: Set Build Environment
Export the pkg-config path before compilation:
export PKG_CONFIG_PATH=/usr/lib/pkgconfig/
Step 4: Update Makefile
Open the module Makefile:
vi /usr/src/mod_amd/Makefile
Locate the following line:
MODCFLAGS = -Wall -Werror
Comment it out:
# MODCFLAGS = -Wall -Werror
This prevents compilation failure caused by warning-level issues.
Step 5: Build the Module
Navigate to the module directory and compile:
cd /usr/src/mod_amd
make
Step 6: Deploy the Compiled Module
Move the generated shared object file to the FreeSWITCH modules directory:
mv mod_amd.so /usr/lib/freeswitch/mod/
4. AMD Configuration
Create the AMD configuration file:
vi /etc/freeswitch/autoload_configs/amd.conf.xml
Add the following configuration:
<configuration name="amd.conf" description="mod_amd Configuration">
<settings>
<!-- Noise floor — keep low, clean VoIP -->
<param name="silence_threshold" value="256"/>
<!-- Initial silence before ANY voice.
Only declare machine if 4500ms of dead air (clear voicemail delay).
Humans pick up and speak within 1-2s. -->
<param name="initial_silence" value="4500"/>
<!-- Max continuous voice before = MACHINE.
Real machine greetings run 4-8s. Humans rarely speak >3s straight.
Set high so normal human speech never triggers this. -->
<param name="greeting" value="3500"/>
<!-- Silence after greeting = HUMAN.
Human says "Hello?" then waits. Even 200ms pause = human.
Keep low so we detect human quickly. -->
<param name="after_greeting_silence" value="200"/>
<!-- Total time budget. Increase so algorithm has enough time
to observe after-greeting silence and confirm human. -->
<param name="total_analysis_time" value="7000"/>
<!-- Min voice to count as a word.
120ms filters noise but counts short syllables. -->
<param name="min_word_length" value="120"/>
<!-- Gap to split into new word.
150ms means natural breath pauses don't fragment speech.
Machines have clean word boundaries; humans have messy ones. -->
<param name="between_words_silence" value="150"/>
<!-- Max single word/utterance length before = MACHINE -->
<param name="maximum_word_length" value="5000"/>
<!-- Max words before = MACHINE.
Set to 5 — machines say 6-10+ words in their greeting.
Humans almost never say more than 4 words as an opener. -->
<param name="maximum_number_of_words" value="5"/>
</settings>
</configuration>
5. Parameter Tuning Recommendations
The AMD parameters should be tuned based on the expected answering behavior in your telephony environment.
Common tuning areas
-
Initial silence → Time to wait before speech starts
-
Greeting length → Helps detect long voicemail greetings
-
Maximum words → Useful for distinguishing human “hello” vs voicemail prompt
-
Post-greeting silence → Helps confirm voicemail beep or pause
It is recommended to validate these values against:
-
Local telecom carriers
-
PSTN routing behavior
-
Regional voicemail systems
-
Customer answering patterns
6. Load the Module in FreeSWITCH
Open the FreeSWITCH CLI:
fs_cli
Load the AMD module:
load mod_amd
To verify successful loading:
show modules
7. Dialplan Integration
Run the AMD application during outbound calls by adding it into the dialplan of the respective domain.
8. Enable Automatic Module Loading on Restart
To ensure the AMD module loads automatically whenever:
-
FreeSWITCH service restarts
-
The VM/server reboots
-
The service recovers after downtime
-
Systemd restarts FreeSWITCH after failure
the module must be added to the FreeSWITCH module load configuration.
Step 1: Edit modules.conf.xml
Open the module configuration file:
vi /etc/freeswitch/autoload_configs/modules.conf.xml
Add the following line inside the <modules> section:
<load module="mod_amd"/>
Example:
<configuration name="modules.conf" description="Modules">
<modules>
<load module="mod_commands"/>
<load module="mod_sofia"/>
<load module="mod_amd"/>
</modules>
</configuration>
Step 2: Reload Module Configuration
Apply the configuration without restarting the server:
fs_cli -x "reloadxml"
Step 3: Validate Auto-Load
Restart FreeSWITCH:
systemctl restart freeswitch
Then verify:
fs_cli -x "show modules" | grep mod_amd
Expected output:
mod_amd
This confirms the module is now part of the automatic startup sequence.