Skip to main content

Overview

The IVRNavigator is a pipeline component that provides intelligent navigation of IVR phone systems. It combines LLM-based decision making with DTMF tone generation to automatically traverse phone menus toward specified goals. The navigator includes automatic classification between IVR systems and human conversations, enabling flexible call handling scenarios.

IVR Navigator Reference

Complete API documentation and method details

Constructor

Parameters

llm
LLMService
required
The LLM service instance used for text generation and navigation decision making.
ivr_prompt
str
required
The navigation goal that will be integrated with the base IVR navigation instructions. This should clearly describe what you want to accomplish (e.g., “Navigate to billing support to discuss account charges”).
ivr_vad_params
VADParams | None
default:"VADParams(stop_secs=2.0)"
Voice Activity Detection parameters optimized for IVR navigation. The default 2.0 second stop time allows the system to hear complete menu options before responding, improving navigation success rates.
The IVRNavigator processes several XML-tagged commands from LLM responses:

DTMF Commands

Valid DTMF values: 0-9, *, #

IVR Status Commands

Mode Classification

Event Handlers

The navigator supports two primary event handlers for different interaction scenarios.

on_conversation_detected

Triggered when the system classifies incoming audio as a human conversation rather than an IVR system.
Parameters:
  • processor: The IVRProcessor instance
  • conversation_history: List of message dictionaries from previous context (excluding system messages)

on_ivr_status_changed

Triggered when IVR navigation status changes during the navigation process.
Parameters:
  • processor: The IVRProcessor instance
  • status: IVRStatus enum value (DETECTED, COMPLETED, STUCK)

IVRStatus Enumeration

Built-in Prompts

The IVRNavigator includes sophisticated built-in prompts that handle classification and navigation logic automatically.

Classification Prompt

The navigator starts with an automatic classification system that distinguishes between: IVR System Indicators:
  • Menu options (“Press 1 for billing”, “Press 2 for support”)
  • Automated instructions (“Please enter your account number”)
  • System prompts (“Thank you for calling [company]”)
  • Hold messages (“Please continue to hold”)
Human Conversation Indicators:
  • Personal greetings (“Hello, this is Sarah”)
  • Interactive responses (“Who am I speaking with?”)
  • Natural speech patterns and conversational flow
  • Direct engagement (“I can help with that”)
Once IVR is detected, the system uses your provided goal with comprehensive navigation instructions that include:
  • Decision making logic for menu option selection
  • DTMF sequence handling for data entry (dates, account numbers, phone numbers)
  • Verbal response generation for conversational prompts
  • Completion detection for successful navigation
  • Stuck state recognition for error scenarios
  • Wait state management for incomplete transcriptions

Advanced Usage

Context Preservation

The navigator automatically preserves conversation context when switching between modes:

VAD Parameter Management

Integration Examples

Basic Pipeline Integration