<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Haider Jarral</title>
    <description>The latest articles on DEV Community by Haider Jarral (@hkjarral).</description>
    <link>https://dev.to/hkjarral</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3597804%2Ff16fd3b4-e049-44de-9112-3c0b3446dfe5.jpg</url>
      <title>DEV Community: Haider Jarral</title>
      <link>https://dev.to/hkjarral</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hkjarral"/>
    <language>en</language>
    <item>
      <title>Giving "Hands" to AI Voice: Building a Self-Hosted, Tool-Capable Agent with Asterisk</title>
      <dc:creator>Haider Jarral</dc:creator>
      <pubDate>Mon, 02 Feb 2026 03:53:13 +0000</pubDate>
      <link>https://dev.to/hkjarral/giving-hands-to-ai-voice-building-a-self-hosted-tool-capable-agent-with-asterisk-1k42</link>
      <guid>https://dev.to/hkjarral/giving-hands-to-ai-voice-building-a-self-hosted-tool-capable-agent-with-asterisk-1k42</guid>
      <description>&lt;p&gt;Most AI voice platforms today are "SaaS black boxes." You send your audio to a proprietary API, pay a per-minute tax, and pray the latency stays low. As developers, we lose three things: Privacy, Visibility, and Control.&lt;/p&gt;

&lt;p&gt;I’ve been working on the Asterisk AI Voice Agent—an open-source project designed to bring the "Home Assistant" philosophy to telephony. In my latest release, I’ve moved beyond simple "chatting" bots to create an agent that can actually do work using a tri-stage tooling architecture.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Architecture: Why Asterisk?&lt;/strong&gt;&lt;br&gt;
For the Linux-savvy developer, the stack is straightforward but powerful:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Asterisk&lt;/strong&gt;: The battle-tested telephony engine.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Python/Node.js Logic&lt;/strong&gt;: Handling the bridge between audio streams and LLMs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;REST Webhooks&lt;/strong&gt;: The universal language for "Skills."&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By running this locally (or on your own VPS), you eliminate the per-minute SaaS cost and keep your voice data within your own network.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The New Feature: Tool-Calling (Pre, In, and Post-Call)&lt;/strong&gt;&lt;br&gt;
The real "magic" happens when the AI can interact with your existing stack. I’ve implemented three specific hooks using standard REST webhooks:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Pre-Call (Data Enrichment)&lt;/strong&gt;&lt;br&gt;
Before the agent even says "Hello," it performs a lookup. If the Caller ID matches a record in your CRM or database, the agent is initialized with that context.&lt;/p&gt;

&lt;p&gt;Example: "Hi [User Name], I see your last order was [Order #]..."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. In-Call (Real-Time Agency)&lt;/strong&gt;&lt;br&gt;
During the conversation, the LLM can decide to trigger a tool. Since these are standard REST calls, your agent can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Query a live calendar.&lt;/li&gt;
&lt;li&gt;Toggle a smart home device.&lt;/li&gt;
&lt;li&gt;Check shipping status via an external API.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. Post-Call (The Automation Hand-off)&lt;/strong&gt;&lt;br&gt;
Once the call ends, the agent summarizes the interaction and pushes it to an endpoint like n8n, Make, or a custom webhook. I personally use this to send call summaries directly to WhatsApp via an n8n workflow.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;See the Implementation&lt;/strong&gt;&lt;br&gt;
I’ve documented the full setup and a demo of these tools in action here:&lt;/p&gt;

&lt;p&gt;

  &lt;iframe src="https://www.youtube.com/embed/0URwjJ6unkA"&gt;
  &lt;/iframe&gt;


&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Join the Project (Open Source)&lt;/strong&gt;&lt;br&gt;
This is a project for builders. If you are tired of proprietary voice wrappers and want to contribute to a universal open-source voice AI platform, come join us.&lt;/p&gt;

&lt;p&gt;GitHub Repo: hkjarral/Asterisk-AI-Voice-Agent&lt;/p&gt;

&lt;p&gt;Status: Looking for contributors to help build more "Skills" and refine the core engine.&lt;/p&gt;

&lt;p&gt;I’d love to hear your thoughts: What is the first "Skill" you would give a self-hosted voice agent? A private receptionist? A voice-activated server monitor? Let’s discuss in the comments.&lt;/p&gt;

</description>
      <category>asterisk</category>
      <category>ai</category>
      <category>opensource</category>
      <category>learning</category>
    </item>
    <item>
      <title>Building a Production-Ready AI Call Center with Asterisk in 15 Minutes</title>
      <dc:creator>Haider Jarral</dc:creator>
      <pubDate>Thu, 06 Nov 2025 18:32:56 +0000</pubDate>
      <link>https://dev.to/hkjarral/building-a-production-ready-ai-call-center-with-asterisk-in-15-minutes-3ng3</link>
      <guid>https://dev.to/hkjarral/building-a-production-ready-ai-call-center-with-asterisk-in-15-minutes-3ng3</guid>
      <description>&lt;p&gt;Traditional IVR (Interactive Voice Response) systems are dying. For decades, they have been the frontline of customer service, but their rigid menus and frustrating "press 1 for sales" loops are a relic of a bygone era. Customers today expect instant, intelligent, and natural interactions. If your business still relies on a traditional IVR, you are likely losing customers to competitors who have already embraced conversational AI.&lt;/p&gt;

&lt;p&gt;The good news is that building a powerful, AI-driven voice agent is no longer the exclusive domain of large corporations with massive budgets. Thanks to the vibrant open-source community and the power of modern AI, you can build and deploy a production-ready AI call center with Asterisk in about 15 minutes. This guide will show you how.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem with Traditional IVRs
&lt;/h2&gt;

&lt;p&gt;Before we dive into the solution, let's be clear about the problem. Traditional IVRs fail because they are not intelligent. They are based on a simple, tree-like logic that cannot handle the complexity of human conversation. This leads to a number of common frustrations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Limited Options:&lt;/strong&gt; Callers are forced to choose from a predefined menu, which often doesn't include their specific issue.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No Natural Language Understanding:&lt;/strong&gt; IVRs cannot understand the nuances of human speech, leading to misunderstandings and repeated requests.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;High Abandonment Rates:&lt;/strong&gt; Frustrated callers often hang up and seek support elsewhere, leading to lost revenue and customer churn.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Poor Customer Experience:&lt;/strong&gt; A frustrating IVR experience can damage your brand reputation and erode customer loyalty.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In short, traditional IVRs are a bottleneck, not a solution. It's time for a change.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Solution: Asterisk + AI
&lt;/h2&gt;

&lt;p&gt;By combining the power of &lt;strong&gt;Asterisk&lt;/strong&gt;, the world's most popular open-source PBX, with modern AI technologies, we can create an intelligent voice agent that overcomes the limitations of traditional IVRs. Our open-source project, &lt;strong&gt;Asterisk AI Voice Agent&lt;/strong&gt;, provides the bridge between your Asterisk server and the world of conversational AI.&lt;/p&gt;

&lt;h3&gt;
  
  
  How It Works: The Architecture
&lt;/h3&gt;

&lt;p&gt;Our voice agent uses a modular, real-time architecture to process calls. Here's a high-level overview:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Asterisk Call Handling:&lt;/strong&gt; An incoming call is received by your Asterisk server.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ARI &amp;amp; ExternalMedia:&lt;/strong&gt; Asterisk's REST Interface (ARI) and the externalMedia application are used to send the call's audio to our Python-based voice agent in real-time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Speech-to-Text (STT):&lt;/strong&gt; The agent transcribes the caller's speech into text using either a cloud-based service (like Deepgram) or a local, open-source model (like Whisper).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Large Language Model (LLM):&lt;/strong&gt; The transcribed text is sent to a large language model (like OpenAI's GPT-4o or a local Llama 3 model) to generate an intelligent response.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Text-to-Speech (TTS):&lt;/strong&gt; The LLM's response is converted back into natural-sounding speech using a TTS engine (like ElevenLabs or a local Piper model).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real-time Audio Streaming:&lt;/strong&gt; The synthesized audio is streamed back to the caller through Asterisk, creating a seamless, conversational experience.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This entire process happens in near real-time, with a typical round-trip latency of under a second, making the conversation feel natural and fluid.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick Start: Your AI Call Center in 15 Minutes
&lt;/h2&gt;

&lt;p&gt;Ready to build your own? Here's a quick-start guide to get you up and running. This tutorial assumes you have a working Asterisk server and are familiar with basic Linux commands.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Clone the Repository (2 minutes)
&lt;/h3&gt;

&lt;p&gt;First, clone the Asterisk AI Voice Agent repository from GitHub:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/hkjarral/Asterisk-AI-Voice-Agent.git
&lt;span class="nb"&gt;cd &lt;/span&gt;Asterisk-AI-Voice-Agent
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2: Configure Your Environment (5 minutes)
&lt;/h3&gt;

&lt;p&gt;Next, you'll need to configure your environment variables. We provide a simple .env.example file to get you started.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cp&lt;/span&gt; .env.example .env
nano .env
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You will need to fill in the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Asterisk ARI credentials&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Your choice of STT, LLM, and TTS providers&lt;/strong&gt; (we support both cloud and local options)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;API keys&lt;/strong&gt; for your chosen providers&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 3: Run with Docker Compose (5 minutes)
&lt;/h3&gt;

&lt;p&gt;We've made deployment incredibly simple with Docker Compose. From the project's root directory, simply run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker-compose up &lt;span class="nt"&gt;-d&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will build the Docker image, install all dependencies, and start the voice agent in the background. Your AI call center is now running!&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Configure Your Asterisk Dialplan (3 minutes)
&lt;/h3&gt;

&lt;p&gt;Finally, you need to tell Asterisk to send calls to your new AI agent. Add the following to your extensions.conf dialplan:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;exten =&amp;gt; 1234,1,Answer()
same =&amp;gt; n,Stasis(voice-agent)
same =&amp;gt; n,Hangup()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, when someone calls extension 1234, they will be connected to your AI voice agent. It's that simple!&lt;/p&gt;

&lt;h2&gt;
  
  
  Real-World Use Cases
&lt;/h2&gt;

&lt;p&gt;An AI-powered voice agent can transform your business in a number of ways:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;24/7 Customer Support:&lt;/strong&gt; Provide instant, intelligent support to your customers, any time of day or night.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automated Appointment Booking:&lt;/strong&gt; Allow callers to book, reschedule, or cancel appointments without human intervention.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Intelligent Call Routing:&lt;/strong&gt; Understand the caller's intent and route them to the correct department, every time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lead Qualification:&lt;/strong&gt; Automatically qualify inbound sales leads and schedule follow-up calls.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Healthcare Triage:&lt;/strong&gt; Help patients with common medical questions and direct them to the appropriate level of care.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What's Next? Join the Community!
&lt;/h2&gt;

&lt;p&gt;This is just the beginning. The world of open-source voice AI is moving at an incredible pace, and we are constantly improving the Asterisk AI Voice Agent project. We invite you to join our growing community of developers and help us build the future of conversational AI.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;⭐ &lt;strong&gt;Star us on GitHub:&lt;/strong&gt; &lt;a href="https://github.com/hkjarral/Asterisk-AI-Voice-Agent" rel="noopener noreferrer"&gt;https://github.com/hkjarral/Asterisk-AI-Voice-Agent&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;💬 &lt;strong&gt;Join our Discord:&lt;/strong&gt; &lt;a href="https://discord.gg/CAVACtaY" rel="noopener noreferrer"&gt;https://discord.gg/CAVACtaY&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;📝 &lt;strong&gt;Read our Blog:&lt;/strong&gt; &lt;a href="https://hkjarral.github.io/Asterisk-AI-Voice-Agent/" rel="noopener noreferrer"&gt;https://hkjarral.github.io/Asterisk-AI-Voice-Agent/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Together, we can finally put an end to the frustrating IVR and create a world where every phone call is an intelligent, natural, and productive conversation.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>asterisk</category>
      <category>voiceai</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
