Skip to main content

Voice AI Agents

Kaanha AI includes a full Voice AI stack powered by Bolna — an open-source voice orchestration engine — with Twilio for telephony and ElevenLabs for text-to-speech.

Architecture

Your Contact's Phone → Twilio SIP → Voice Engine (Bolna) → LLM (OpenAI)

                              ASR: Deepgram (speech-to-text)
                              TTS: ElevenLabs (text-to-speech)
All voice configuration is stored per-organization in Kaanha AI. The voice engine runs as a separate Railway service.

Activating Voice & SMS

Voice and SMS use Kaanha AI’s Twilio Tech Provider model — each organization gets its own Twilio subaccount and phone number.
  1. Go to Settings → Voice
  2. Select your Country (for phone number purchase)
  3. Click Activate Voice & SMS →
The platform will:
  • Create a dedicated Twilio subaccount for your organization
  • Purchase a local phone number in your selected country
  • Configure inbound webhooks automatically
  • Show your assigned phone number
Requirements: Twilio Tech Provider program must be enabled at the platform level. Contact your admin if activation fails.

Creating a Voice Agent

  1. Go to Voice Agents → Create Agent
  2. Configure the agent:
FieldDescription
NameAgent name (e.g., “Support Bot”)
System PromptInstructions for the AI (same as chat agents)
First MessageWhat the bot says when the call connects
LLM ModelOpenAI GPT-4o or compatible
VoiceElevenLabs voice ID
LanguagePrimary language for the conversation
ASR ProviderDeepgram (default)

Advanced Configuration

FieldDefaultDescription
Interruption SensitivityMediumHow easily the AI pauses when spoken over
Silence Timeout10sHang up after N seconds of silence
Max Duration600sMaximum call length in seconds
End Call Keywordsgoodbye, bye, end callPhrases that terminate the call

Making Outbound Calls

  1. Open a Voice Agent
  2. Click Call Contact
  3. Enter a phone number in E.164 format (e.g., +1 415 555 0100)
  4. Click Start Call
The system will:
  • Initiate a call from your assigned Twilio number
  • Connect the contact to your voice agent
  • Record the call transcript in real-time

Handling Inbound Calls

Inbound calls to your Twilio number are automatically routed to the voice agent configured for inbound handling. Webhook: POST /api/webhooks/twilio/voice

Call History

View all calls under Voice Agents → [Agent Name] → Call History:
ColumnDescription
ContactCaller’s phone number
DurationCall length in seconds
Statuscompleted / failed / busy / no-answer
TranscriptFull conversation transcript
RecordingAudio recording (if enabled)
Click Load More to paginate through older calls.

SMS Channel

Your Twilio phone number also supports two-way SMS messaging, visible in the Chat inbox with the SMS channel indicator.

SMS Compliance (TCPA)

Kaanha AI automatically handles TCPA keyword compliance:
KeywordAction
STOP, UNSUBSCRIBE, CANCEL, QUITOpt out — no more SMS sent to this contact
START, SUBSCRIBE, UNSTOPOpt back in
HELP, INFOAuto-reply with support info
The smsOptedIn field on contacts is independent of WhatsApp opt-in.

Provisioning Details

ResourceWhere Stored
Subaccount SIDOrganization.twilioSubAccountSid
Auth TokenOrganization.twilioSubAccountToken (AES-256-GCM encrypted)
Phone Number SIDOrganization.twilioPhoneNumberSid
Phone NumberShown in Settings → Voice
To deactivate Voice & SMS: Settings → Voice → Deactivate. This releases the phone number and closes the Twilio subaccount.