This repository contains an example implementation of a voice-enabled phone assistant using LiveKit and OpenAI. The agent.py module demonstrates how t

Search code, repositories, users, issues, pull requests...

submited by
Style Pass
2024-11-22 18:00:08

This repository contains an example implementation of a voice-enabled phone assistant using LiveKit and OpenAI. The agent.py module demonstrates how to handle voice interactions, DTMF signals, and SIP REFER transfers to different departments based on user input.

The assistant provides options for callers to be transferred to Billing, Technical Support, or Customer Service departments by pressing corresponding digits.

When callers call the phone number that's attached to your SIP trunk, calls will be routed into LiveKit rooms. When a room is created, your Agent will join, wait for the caller to finish connecting, and then greet the user.

The entrypoint function serves as the main entry for the assistant. It initializes the PhoneAssistant class and manages the connection lifecycle.

You can customize the department options by modifying the department_numbers dictionary in the _setup_event_handlers method, and then changing the names of the phone numbers in your .env.local config file.

Leave a Comment