Summary
This guide enables real-time transcription for outbound calls (manual and campaign) on the Media Server.
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. -
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 |
Note: Use export (not set). Do not put spaces around = (use transcription_enabled=true, not transcription_enabled =true).
6. 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.
7. 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 For SIPRec Transcription.
Verification
-
Place an answered outbound call (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).