Voice Bridge Module (Real-Time Voice Bridge)

Mirejeta
Mirejeta
  • Updated

Overview

The Voice Bridge module connects a live phone call to your own voicebot, AI agent or LLM service in real time. The caller talks to your bot, while the call itself stays on the babelforce platform the whole time.

When the bot is done, babelforce continues the call in your call flow: for example to a queue with human agents, a closing prompt, or another IVR module.

Typical use cases:

  • A voicebot that identifies the caller before routing them to an agent
  • Self-service, such as collecting a meter reading or an order number
  • Handing collected data to the agent who takes the call next

Under the hood, the module uses the Real-Time Voice Bridge Protocol (RTVBP). In some screens and logs the module appears with the technical name realtime.

How it works

When a call reaches the Voice Bridge module, babelforce opens a secure WebSocket connection (wss://) to the endpoint URL you configured. Two things then run in parallel over that connection:

  • Audio stream: the caller's voice goes to your bot and the bot's voice comes back, in both directions at the same time (full duplex).
  • Control messages: JSON messages for call events and data, such as session start and end, hangup, DTMF (keypad) input, keep-alive pings, and reading or writing session variables.

The call never leaves babelforce. When your bot ends the session, the call moves on to the module you selected as the after-flow.

Setting it up in babelforce Manager

You set up the Voice Bridge like any other IVR module. All settings are on one settings tab.

  1. In babelforce Manager, create a new module and choose Voice Bridge as the module type.
  2. Give it a clear name, for example Voicebot - Caller identification.
  3. Fill in the settings (see the table below).
  4. Save the module.
  5. Route a phone number to the module, or link it from an earlier module in your call flow.
  6. Place a test call before you go live.
SettingWhat it doesExample
Endpoint URLThe WebSocket address of your voicebot server. Must start with wss://.wss://voicebot.example.com/rtvbp
Request body (metadata)Extra data sent to your bot when the session starts, for example an environment or a use-case name.{"useCase": "caller-identification"}
After-flowThe module the call goes to after the Voice Bridge session ends.Queue: Customer Service

Please note: The TTS and STT are sent by the VoiceBot Server, not by the VoiceBridge Module!

Example: identify the caller, then hand over to an agent

In this example, a voicebot asks for the customer number and the reason for the call. It then passes both to the agent who takes the call.

  1. Inbound number routes to the module Voicebot - Caller identification (type Voice Bridge).
  2. Endpoint URL: wss://voicebot.example.com/rtvbp
  3. Request body (metadata):
{
  "useCase": "caller-identification",
  "language": "en"
}
  1. During the call, your bot asks its questions and stores the answers as session variables, for example customerNumber and callReason.
  2. After-flow: a queue module, Queue - Customer Service.
  3. In the queue and agent modules, you use the values as {ivr.customerNumber} and {ivr.callReason}, for example to show them to the agent or to look up the customer in your CRM.

Session variables and finish reason

Your bot can write data into the babelforce call session and read it back, using the session.set and session.get messages of the protocol.

  • A variable your bot sets as customerNumber is stored as ivr.customerNumber. If your bot already sends ivr.customerNumber, it is stored once, not twice.
  • Later modules in the call flow read it with the expression {ivr.customerNumber}.
  • When your bot reads variables with session.get, it uses the plain name (customerNumber), without the ivr. prefix.

When the session ends, babelforce records a finish reason for the Voice Bridge module. You can use it in the after-flow to decide where the call goes next, for example to an agent or to a closing message.

 

Requirements and troubleshooting

Your voicebot server must:

  • Accept secure WebSocket connections (wss://) at the endpoint URL
  • Be reachable from babelforce, so allow incoming connections in your firewall
  • Support the Real-Time Voice Bridge Protocol (RTVBP): send and receive audio in both directions, and answer keep-alive pings
  • Check the signed JWT token that babelforce sends when it connects, so you only accept calls from babelforce
  • Be highly available, because every call in the module depends on it

Common questions

ProblemWhat to check
The caller hears silenceIs the endpoint URL correct and does it start with wss://? Does your firewall allow connections from babelforce?
The call does not continue after the botIs an after-flow module selected? Does your bot end the session cleanly?
{ivr.<name>} is empty in later modulesDid your bot send session.set with that exact variable name before the session ended?
Audio is choppy or cuts outCheck the network between babelforce and your server, and the load on your server.

Still stuck? Contact babelforce support with the phone number you called, the time of the call, and the name of the Voice Bridge module.

Related to

Was this article helpful?

/

Comments

0 comments

Please sign in to leave a comment.