Outbound Call Transcription — FusionPBX Setup

Summary

This guide enables real-time transcription for outbound calls (manual and campaign) on the Media Server.

Configuration overview:

  1. Deploy script — download the attachment and copy it to the media server.

  2. Configure script — set the Jambonz DN, gateway UUID, and (optional) campaign domain map.

  3. Register hook — add the script as a CHANNEL_BRIDGE hook in lua.conf.xml.

  4. Restart FreeSWITCH — required after changing the hook.

  5. Manual Outbound dialplan — add two export actions in Manual_Outbound.

  6. Campaign (optional) — add the domain in the script map.

  7. Jambonz — ensure the DN points to the /sipRec application.


Configuration

1. Deploy the Transcription Script

  1. Download outbound_transcription_eavesdrop.lua from this page’s Attachments.

  2. Copy the file to the media server:

/usr/share/freeswitch/scripts/outbound_transcription_eavesdrop.lua

2. Configure the Script

  1. Open the script on the media server:

nano /usr/share/freeswitch/scripts/outbound_transcription_eavesdrop.lua
  1. Update the values at the top of the file:

Parameter

Description

Example

EAVESDROP_JAMBONZ_DN

Jambonz phone number (DN) for transcription

8765

EAVESDROP_JAMBONZ_GW

FusionPBX gateway UUID toward Jambonz

<YOUR-GATEWAY-UUID>

DOMAIN_CAMPAIGN_TRANSCRIPTION

Domain → DN map for campaign calls (optional)

["your-domain.com"] = "8765"

  1. Save the file.

3. Register the CHANNEL_BRIDGE Hook

  1. Open /etc/freeswitch/autoload_configs/lua.conf.xml on the media server.

  2. Add the following hook:

XML
<hook event="CHANNEL_BRIDGE" subclass="" script="outbound_transcription_eavesdrop.lua"/>
  1. 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.

  1. Open the FusionPBX web interface and log in.

  2. Select the target Domain.

  3. Go to DialplanDialplan Manager.

  4. Open Manual_Outbound.

  5. Add the following actions before bridge, then save:

Order

Tag

Type

Data

Enabled

(before bridge)

action

export

transcription_enabled=true

true

(before bridge)

action

export

transcription_dn=8765

true

Replace 8765 with your Jambonz DN if different.

To disable transcription for manual outbound:

Order

Tag

Type

Data

Enabled

(before bridge)

action

export

transcription_enabled=false

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:

  1. Open outbound_transcription_eavesdrop.lua on the media server.

  2. Add the domain under DOMAIN_CAMPAIGN_TRANSCRIPTION:

Lua
local DOMAIN_CAMPAIGN_TRANSCRIPTION = {
    ["your-domain.com"] = "8765",
}
  1. Save the file. No FreeSWITCH restart is required for this change.

7. Jambonz Application

  1. Confirm a Jambonz phone number (DN) is created and linked to the application whose calling webhook ends with /sipRec.

  2. Confirm a FusionPBX gateway exists toward Jambonz (this gateway UUID is used in step 2).

  3. Set CCM_BASE_URL on the Jambonz app to https://<CX-FQDN>/ccm.

For Jambonz application / carrier / phone-number setup, see Jambonz Configuration For SIPRec Transcription.


Verification

  1. Place an answered outbound call (manual with the dialplan exports, or a campaign call on a mapped domain).

  2. On the media server, confirm FreeSWITCH logs show:

[EAVESDROP] CHANNEL_BRIDGE handler
[EAVESDROP] decide ...
[EAVESDROP] role=agent ...
[EAVESDROP] role=customer ...
  1. 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).