I have a requirement. We use <Exotel.com> for our ...
# ask-ai
f
I have a requirement. We use Exotel.com for our IVR system to attend incoming sales call inquiries. Currently when someone calls our Hotline number. It opens the IVR system and gets the language input. When the customer hits the number - the system will route the calls to the respected team members and they will answer the call. It will happen during the week day. During outside office hours on Sundays, we get many calls too. To handle those calls, I inquired with Exotel for a Voice bot AI. So when the IVR system is off - the Voice bot AI should activate. The customer will be able to press the number based on the destination he wants to inquire and calls to be directed to the Voice bot AI. The Voicebot AI will ask pre defined questions to the customer - record their answers, transcribe their answers to text, At the end of the call - the call transcription should be sent to an email ID. our team will load the lead into the CRM manually. When asked with Exotel - they said - We have to build it using a 3rd party like livekit.io and then integrate that to Exotel. Can you tell me the possibility to implement this feature?
t
Thanks for reaching out, Dimaak. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I'm happy to let you know that the feature you described can definitely be implemented using LiveKit. Here’s a friendly guide on how we can make it happen: • IVR Call Handling: LiveKit supports IVR navigation using DTMF tones and can seamlessly integrate with Exotel via SIP trunking. This setup allows calls to be routed to a Voicebot AI whenever the IVR system is off. • Voicebot AI: You have the option to build a Voicebot AI within LiveKit that can ask predefined questions, record responses, and even transcribe them in real-time using STT engines like Deepgram. • Transcription and Email: Although LiveKit doesn’t have built-in email features, you can extend your Voicebot’s logic to send transcriptions via email using external services like SendGrid or AWS SES. To get started, you’ll want to configure Exotel as a SIP provider in LiveKit by setting up a SIP trunk with Exotel’s server details (domain, port, credentials). Once that’s done, you can test call routing and start building your Voicebot logic. Do you already have SIP trunking enabled on your Exotel account? If so, I’d be glad to walk you through setting up the SIP configuration or assist with implementing the transcription-to-email feature. Just let me know how I can help! Sources: Text and transcriptions | LiveKit docs | Create and configure a Plivo SIP trunk | LiveKit docs | Using Wavix to accept and make calls | LiveKit docs | Live Conversations with AI using ChatGPT and WebRTC | Building an Automated IVR Menu Caller | LiveKit Docs
f
great, before that, will livekit support multi languages. Many of our clients will speak in tamil language. Will it uspport tamil too
t
I'm happy to share that LiveKit supports multi-language transcription, including Tamil! You can use STT models like Deepgram's Nova-2 or Cartesia's Ink Whisper, both of which are great choices for Tamil transcription. Plus, there's a handy feature to enable multilingual transcription, so it can automatically detect Tamil and other languages within the same audio stream. If you'd like, I’d be more than happy to guide you through setting up Tamil transcription for your Voicebot AI. Just let me know! Sources: plugins/deepgram/src/models.ts | Cartesia STT | LiveKit Docs | Speech-to-text (STT) models | LiveKit Docs | Gladia STT plugin guide | LiveKit Docs | AssemblyAI STT | LiveKit Docs
f
Great, Now, I have created a flow in exotel, when user calls the IVR number, i have used connect modal to reach livekit sip url sip:258f99p8h2b.sip.livekit.cloud. After that what should I do
t
Thanks for connecting Exotel to LiveKit's SIP URL! Let’s walk through the next steps to get your Voicebot AI up and running smoothly: 1. Set Up SIP Trunks: First, make sure you’ve configured an inbound SIP trunk in LiveKit to accept calls from Exotel. This means setting Exotel’s SIP endpoint to forward calls to LiveKit. 2. Initialize the Voicebot AI: Next, use LiveKit’s VoicePipelineAgent to manage calls. You’ll want to configure it with STT (like Deepgram), TTS (such as Cartesia), and an LLM (for example, OpenAI) to understand and respond to user inputs. 3. Handle SIP Participant Events: Set up event listeners in your agent code that will activate the Voicebot whenever a SIP participant joins the room. 4. Enable DTMF Handling: Implement logic to process DTMF inputs for IVR navigation, making sure to include proper cooldowns between inputs for a smooth experience. 5. Deploy the Agent: Finally, run your Voicebot agent either in a production environment or locally for testing. Use LiveKit’s dispatch rules to route calls to your agent effectively. If you’d like, I’d be happy to provide more detailed guidance on any of these steps—whether it’s configuring the SIP trunk or setting up the Voicebot AI. Just let me know how I can assist! Sources: Using Wavix to accept and make calls | LiveKit docs | ivr-nagivator/agent.py | README.md | Making outbound calls | LiveKit docs | README.md
f
I have done the step one. Can you let me know how to handle from step 2
t
To help you move forward with step 2 and get your Voicebot AI up and running, here’s a friendly guide to follow: 1. Set Up the VoicePipelineAgent: You’ll want to initialize the VoicePipelineAgent in your code using these key components: ◦ STT (Speech-to-Text): Consider using a reliable engine like Deepgram for smooth, real-time transcription. ◦ TTS (Text-to-Speech): Cartesia or another supported TTS engine will help your Voicebot respond naturally to callers. ◦ LLM (Language Model): OpenAI or a similar model is great for processing and generating thoughtful responses. ◦ VAD (Voice Activity Detection): Tools like Silero can detect when the caller is speaking, which is super helpful. 1. Example Code: Here’s a simple example to get you started with initializing the agent:
Copy code
agent = VoicePipelineAgent(
    vad=silero.VAD.load(),
    stt=deepgram.STT(),
    llm=openai.LLM(),
    tts=cartesia.TTS(),
    fnc_ctx=fnc_ctx,
    min_endpointing_delay=0.75  # Ensures IVR prompts are fully heard before responding
)
2. Handle SIP Participant Events: You’ll want to add some logic so the Voicebot kicks in when a SIP participant joins the room:
Copy code
@ctx.room.on("participant_connected")
def on_participant_connected(participant):
    if "sip_" in participant.identity:
        agent.start(ctx.room, participant)
3. Test the Agent: Once everything is set, try deploying the agent locally or in your production environment to see how it handles calls and responds to inputs. If you have any questions or need a hand with the code or setting up any part of this, just let me know—I’m here to help!
f
can you give me a step by step procedure to build teh voicepilpline agent from scratch
t
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!
f
Cannot read properties of undefined (reading 'canPublish')
t
I'm here to help you with the error "Cannot read properties of undefined (reading 'canPublish'). This usually happens when the LiveKit client SDK tries to access the
canPublish
property from a
permissions
object that hasn't been defined yet. Let’s walk through some steps to resolve this together: 1. Verify Token Generation: Please double-check that your JWT token includes the
canPublish
permission within the VideoGrant. It should look something like this:
Copy code
const videoGrant = {
  room: roomName,
  roomJoin: true,
  canPublish: true,  // This must be present
  canSubscribe: true,
};
2. Check Permission Loading: Make sure the participant is fully connected before trying to publish tracks. Waiting for connection events or verifying the participant's permission state can really help here. 3. Update Permissions Dynamically: If you need to grant permissions after the connection is established, you can use the UpdateParticipant API like this:
Copy code
await roomService.updateParticipant(roomName, identity, undefined, {
  canPublish: true,
  canSubscribe: true,
  canPublishData: true,
});
4. Fix Dependency Issues: For those using React Native, it’s important to ensure there are no conflicts with dependency versions. You might find
yarn-deduplicate
helpful, or consider switching to npm if needed. 5. Handle Permission Errors Gracefully: It’s a good idea to implement error handling that can catch permission-related issues, like insufficient permissions for publishing. This way, you can manage these situations smoothly. If you’d like, I’m here to guide you through any of these steps or answer any questions you might have. Just let me know! Sources: Authentication | LiveKit docs | Managing participants | LiveKit docs | Tests/LiveKitCoreTests/PublishTrackTests.swift | CHANGELOG.md | Aggregated LiveKit Platform | livekit/livekit_composite | DeepWiki