This guide enables real-time transcription for call cases (inbound, manual outbound, and campaign) on the Media Server.
Transcription starts when the agent and customer are connected. The Media Server sends a call audio copy to Jambonz through the eavesdropping script (outbound_transcription_eavesdrop.lua). Deprecated outbound-route dialing is not used.
Configuration overview:
-
Deploy script — download the attachment and copy it to the media server.
-
Configure script — set the Jambonz DN, gateway UUID, and (optional) campaign domain map.
-
Register hook — add the script as a
CHANNEL_BRIDGEhook inlua.conf.xml. -
Restart FreeSWITCH — required after changing the hook.
-
Manual Outbound dialplan — add two
exportactions inManual_Outbound. -
Inbound dialplan — no configuration needed.
-
Campaign (optional) — add the domain in the script map.
-
Jambonz — ensure the DN points to the
/sipRecapplication.
Configuration
1. Deploy the Transcription Script
-
Download
outbound_transcription_eavesdrop.luafrom this page’s Attachments. -
Copy the file to the media server:
/usr/share/freeswitch/scripts/outbound_transcription_eavesdrop.lua
2. Configure the Script
-
Open the script on the media server:
nano /usr/share/freeswitch/scripts/outbound_transcription_eavesdrop.lua
-
Update the values at the top of the file:
|
Parameter |
Description |
Example |
|---|---|---|
|
|
Jambonz phone number (DN) for transcription |
|
|
|
FusionPBX gateway UUID toward Jambonz |
|
|
|
Domain → DN map for campaign calls (optional) |
|
-
Save the file.
3. Register the CHANNEL_BRIDGE Hook
-
Open
/etc/freeswitch/autoload_configs/lua.conf.xmlon the media server. -
Add the following hook:
<hook event="CHANNEL_BRIDGE" subclass="" script="outbound_transcription_eavesdrop.lua"/>
-
Save the file.
4. Restart FreeSWITCH
reloadxml does not load new mod_lua hooks. Restart FreeSWITCH:
systemctl restart freeswitch
5. Manual Outbound Dialplan
For manual outbound calls, add two variables in the domain’s Manual_Outbound dialplan. Place them before the bridge action.
-
Open the FusionPBX web interface and log in.
-
Select the target Domain.
-
Go to Dialplan → Dialplan Manager.
-
Open Manual_Outbound.
-
Add the following actions before
bridge, then save:
|
Order |
Tag |
Type |
Data |
Enabled |
|---|---|---|---|---|
|
(before bridge) |
action |
|
|
true |
|
(before bridge) |
action |
|
|
true |
Replace 8765 with your Jambonz DN if different.
To disable transcription for manual outbound:
|
Order |
Tag |
Type |
Data |
Enabled |
|---|---|---|---|---|
|
(before bridge) |
action |
|
|
true |
Use export (not set). Do not put spaces around = (use transcription_enabled=true, not transcription_enabled =true).
6. Inbound Dialplan
For inbound, just set the Jambonz phone number (DN) for transcription, as described in step 2. You don’t need to configure anything else for inbound transcription.
7. Campaign Transcription (Optional)
To enable transcription for all campaign modes (Progressive / Preview / Predictive / …) on a domain:
-
Open
outbound_transcription_eavesdrop.luaon the media server. -
Add the domain under
DOMAIN_CAMPAIGN_TRANSCRIPTION:
local DOMAIN_CAMPAIGN_TRANSCRIPTION = {
["your-domain.com"] = "8765",
}
-
Save the file. No FreeSWITCH restart is required for this change.
8. Jambonz Application
-
Confirm a Jambonz phone number (DN) is created and linked to the application whose calling webhook ends with
/sipRec. -
Confirm a FusionPBX gateway exists toward Jambonz (this gateway UUID is used in step 2).
-
Set
CCM_BASE_URLon the Jambonz app tohttps://<CX-FQDN>/ccm.
For Jambonz application/carrier / phone-number setup, see Jambonz Configuration Guide - Media Server to Jambonz Cloud.
Verification
-
Place and answered a call (inbound,manual with the dialplan exports, or a campaign call on a mapped domain).
-
On the media server, confirm FreeSWITCH logs show:
[EAVESDROP] CHANNEL_BRIDGE handler
[EAVESDROP] decide ...
[EAVESDROP] role=agent ...
[EAVESDROP] role=customer ...
-
Confirm the Jambonz app posts transcripts to CCM (
[CCM] message sent).
If [EAVESDROP] lines do not appear, the hook was not loaded — repeat step 4 (restart FreeSWITCH).
Supported Cases and Limitation
The following table shows for which cases we support transcription.
|
Case |
Description |
Status |
|---|---|---|
|
Manual outbound |
Agent-initiated outbound call from Agent Desk (dialpad) |
Supported |
|
Campaign outbound |
System/dialer outbound (Progressive, Preview, Predictive, and other campaign modes on a mapped domain) |
Supported |
|
Hold/resume on a supported outbound call |
Transcription continues on the same connected 1-1 outbound call |
Supported |
|
Inbound |
Customer-initiated inbound call |
Supported |
|
Consult |
Agent consults another agent |
Not supported |
|
Consult transfer |
Consult then transfer to another agent or queue |
Not supported |
|
Direct transfer |
Direct transfer to another agent or queue |
Not supported |
|
Conference/barge |
Conference, consult conference, or supervisor barge |
Not supported |
|
Voicemail |
Customer leaves a voicemail |
Not supported |
|
Unanswered outbound |
Customer does not answer, or the call never bridges |
Not supported |
-
Manual outbound requires
transcription_enabled=trueandtranscription_dnin the Manual_Outbound dialplan (see step 5). -
Campaign outbound requires the domain in
DOMAIN_CAMPAIGN_TRANSCRIPTION(see step 6). -
Transcription does not start until
CHANNEL_BRIDGE(agent and customer connected).
Limitations:
-
Background Noise Misinterpretation: The ASR engine may interpret background noise as valid speech, resulting in unintended words such as “thank you,” “bye,” or “yes.”
-
ASR Accuracy Degradation in Too Noisy Environments: ASR accuracy decreases noticeably in noisy environments compared to quiet conditions, showing a clear downward trend as background noise increases.
-
Conversation View Representation: The interface does not provide separate icons or logos to distinguish between the Bot and the Agent in the conversation view.
-
Failover during Transcription: If Jambonz goes down during an active call, no error message is displayed on the Agent Desk, leaving the agent unaware of the failure.
-
Transcription Export Limitation: Agents do not have the option to export or download call transcriptions from the interface.
-
Role-Based Access Limitation: Keycloak roles are not available to restrict permissions, preventing users from being limited to viewing or exporting only their own transcriptions.
-
Lack of Keyword Search: The system does not provide a keyword search feature to locate specific conversations.
-
Transcription During Hold: Customer speech continues to be transcribed even when the agent places the call on hold.