Skip to main content
Every telephony provider in Rapida implements two Go interfaces. Adding a new one requires implementing both, registering them in the factory, and adding a provider constant.

Directory Structure


Step 1 — Add the Provider Constant

Open api/assistant-api/internal/channel/telephony/telephony.go:
This string becomes the provider identifier in all webhook URLs: /v1/talk/my-provider/call/{assistantId}

Step 2 — Implement internal_type.Telephony


Step 3 — Implement internal_type.Streamer

Audio format notes:
  • Rapida’s STT pipeline expects raw PCM 16-bit mono
  • Twilio and Exotel send base64-encoded μ-law 8kHz in JSON envelopes — decode before forwarding
  • Vonage sends raw Linear PCM 16kHz binary frames

Step 4 — Register in the Factory

Open api/assistant-api/internal/channel/telephony/telephony.go:

Step 5 — Rebuild

The new provider’s webhook is automatically registered at:

Reference Implementations


Telephony Overview

URL routing and provider comparison

Adding an STT Provider

Same interface pattern for speech-to-text

Configuration

All assistant-api env vars

Architecture

Full system topology