Real-Time Transcription

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:

  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. Inbound dialplan — no configuration needed.

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

  8. 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

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:

  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.

8. 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 Guide - Media Server to Jambonz Cloud.

Verification

  1. Place and answered a call (inbound,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).

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=true and transcription_dn in 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.