Skip to main content

Overview

AcefoneFrameSerializer converts between Pipecat frames and the Acefone / Smartflo (Tata Tele Business) bi-directional audio streaming protocol, enabling real-time voice agents over a websocket. It is designed to be wired into a FastAPIWebsocketTransport so you can host a Pipecat agent on the Acefone/Smartflo telephony stack and reach it over an Indian phone number. It supports both ULAW (8kHz G.711 μ-law, the default) and PCM (16-bit linear PCM) wire formats, DTMF keypad input, interruptions, and optional automatic call termination over the same websocket.

Source Repository

Source code, examples, and issues for the Acefone/Smartflo integration

PyPI Package

The pipecat-acefone package on PyPI

Acefone

Learn about Acefone / Smartflo telephony and get a phone number

Protocol Docs

Acefone/Smartflo bi-directional audio streaming message formats

Installation

This is a community-maintained package distributed separately from pipecat-ai:

Prerequisites

To host an agent on the Acefone/Smartflo telephony stack you need:
  1. An Acefone or Smartflo phone number: with bi-directional audio streaming enabled and pointed at your bot’s websocket endpoint.
  2. A public websocket endpoint: expose your bot’s websocket so Acefone/Smartflo can connect to it (for example, by tunneling with ngrok during development).
The serializer itself does not require any API keys — automatic hang-up is performed over the same websocket via an end event. The provider’s message formats are documented in the Acefone and Smartflo docs.

Configuration

AcefoneFrameSerializer takes a single, optional params argument:
AcefoneFrameSerializer.InputParams
default:"InputParams()"
Serializer input parameters, including the stream/call identifiers. See InputParams below.

InputParams

Passed via the params constructor argument using AcefoneFrameSerializer.InputParams(...).
See the source repository for the authoritative, up-to-date list of parameters and message formats.

Usage

Wire the serializer into a FastAPIWebsocketTransport. The stream_sid (and call_sid, if you enable auto hang-up) is read from the initial websocket start message Acefone/Smartflo sends when a call connects.
See the source repository for a complete bot.py example, including parsing stream_sid from the initial websocket messages and running the bot behind an ngrok tunnel.

Compatibility

Tested with Pipecat v1.5.0 and Python 3.11+. Check the source repository for the latest tested version and changelog.