- Why Connect Your PBX to AI?
- Two Integration Methods
- Method 1: AI Transfers Calls via SIP URI
- Method 2: PBX Routes Calls to AI
- Real-World Use Cases
- Technical Setup Guide
- Firewall Configuration
- Creating a SIP Extension
- NAT-Safe Configuration
- Entering Credentials in Mihu AI
- Maximizing Efficiency
- Troubleshooting
- Quick Reference Checklist
The most common misconception about AI voice agents? That you need to replace your entire phone system to use them.
The reality is different. If you're running 3CX, Asterisk, FreePBX, or any SIP-compatible PBX, you can connect it to Mihu AI today—without touching your existing infrastructure. Your current dial plans, ring groups, and extensions all stay exactly where they are. AI simply becomes another extension on your system, ready to handle calls or receive transfers.
This guide shows you exactly how to set this up—both from a business perspective (what becomes possible) and a technical perspective (how to configure it). By the end, you'll understand how to create a seamless customer experience where AI and humans work together through your existing phone system.
Why Connect Your PBX to AI?
Before diving into the technical setup, let's address the fundamental question: what does PBX integration actually give you?
In modern customer service, the biggest pain points aren't usually about the technology itself—they're about availability, consistency, and speed. Customers call outside business hours and get voicemail. They wait on hold during busy periods. They navigate confusing IVR menus pressing buttons for options that don't quite match what they need. They repeat their issue to multiple agents after transfers.
PBX-integrated AI solves these problems without requiring you to change how your team works. Your receptionists, sales reps, and support agents keep using the same phones and extensions they always have. The AI handles everything else—the overflow, the after-hours calls, the routine inquiries that don't need human attention.
The Business Case for PBX + AI Integration
Companies integrating AI with their PBX typically see: 95% reduction in average wait times, 24/7 availability without additional staffing costs, 40% decrease in repetitive calls reaching human agents, and zero missed calls during peak periods or after hours.
Two Integration Methods: Choose What Works for Your Business
Mihu AI offers two complementary ways to integrate with your PBX. You can use one or both depending on your needs:
The power comes from using both together. AI becomes your first line of defense for incoming calls, handling what it can and routing what it can't. Simultaneously, your PBX can forward overflow calls, after-hours calls, or specific request types directly to AI.
Method 1: AI Transfers Calls to Your Team via SIP URI
This is Mihu AI's most powerful routing capability. When a caller needs to speak with a human—or when their request matches specific criteria you've defined—the AI transfers them directly to any extension on your PBX using standard SIP URI format.
No IVR menus. No "press 1 for sales." The caller simply says what they need, and the AI routes them intelligently.
How AI-Powered Call Routing Works
Your Number
Answers
Intent
to Extension
SIP URI Format for Transfers
Configure your transfer destinations using standard SIP URIs that point directly to extensions on your PBX:
# Standard format sip:{extension}@{your_pbx_address} # Department Extensions sip:100@pbx.yourcompany.com # Sales ring group sip:101@pbx.yourcompany.com # Support queue sip:102@pbx.yourcompany.com # Billing department sip:103@pbx.yourcompany.com # Reception desk # Individual Extensions sip:201@pbx.yourcompany.com # Account manager - John sip:202@pbx.yourcompany.com # Technical lead - Sarah sip:210@pbx.yourcompany.com # CEO direct line # Special Routing sip:300@pbx.yourcompany.com # VIP customer queue sip:911@pbx.yourcompany.com # Emergency escalation
Intelligent Routing Examples
The AI doesn't just match keywords—it understands intent. Here's how routing rules work in practice:
| What Caller Says | AI Understands | Routes To |
|---|---|---|
| "I want to buy your product" | Sales inquiry | sip:100@pbx → Sales |
| "My order hasn't arrived yet" | Order issue / Support | sip:101@pbx → Support |
| "I need to speak with someone about my invoice" | Billing question | sip:102@pbx → Billing |
| "Is John available? He's my account manager" | Specific person request | sip:201@pbx → John |
| "This is urgent, I need a manager now" | Escalation request | sip:911@pbx → Priority queue |
Semantic Understanding, Not Keyword Matching
Mihu AI uses advanced natural language understanding. Callers don't need to say magic words—"I'd like to make a purchase," "looking to buy," "interested in your services," and "can I order something" all route to Sales without you configuring each variation.
Method 2: Your PBX Routes Calls to AI
The second integration method works in the opposite direction. Register Mihu AI as an extension on your PBX, then configure your dial plan to forward specific scenarios to that extension.
This is incredibly powerful for handling situations your current setup can't address—overflow, after-hours, specific request types that would otherwise go to voicemail.
How It Works
Register Mihu AI as Extension 200
Create a SIP extension on your PBX specifically for Mihu AI. We register to it just like a softphone would.
Configure Your Dial Plan Rules
Set up conditions that forward calls to extension 200—no answer timeouts, after-hours rules, specific IVR options, or direct routing.
AI Handles the Call
Mihu AI answers on that extension, handles the caller's request, and can transfer back to any other extension if human assistance is needed.
Scenarios Where PBX → AI Routing Excels
Ring group doesn't pick up? Forward to AI instead of voicemail. Caller gets immediate assistance rather than leaving a message that may not be returned for hours.
Time-based routing sends all calls after 6pm to AI. Customers get 24/7 service without you paying for night shift staff.
IVR detects "check order status" or "product availability" → routes to AI. AI queries your inventory system and provides instant answers.
Caller says "schedule an appointment" → AI handles the entire booking, checks calendar availability, and confirms the slot. No human intervention required.
Sample Dial Plan Configuration
# No Answer Overflow IF ring_group_100 no_answer_after = 15 seconds THEN forward_to = extension_200 # Mihu AI # After Hours Routing IF time NOT BETWEEN 09:00 AND 18:00 THEN forward_to = extension_200 # Mihu AI # Specific IVR Options IF caller_presses = 4 # "Check order status" THEN forward_to = extension_200 # Mihu AI IF caller_presses = 5 # "Book appointment" THEN forward_to = extension_200 # Mihu AI # All Agents Busy IF queue_100 wait_time > 60 seconds THEN offer_callback via extension_200 # Mihu AI
Real-World Use Cases by Industry
Different businesses use PBX + AI integration in different ways. Here are scenarios we see most frequently:
Healthcare Clinics
Challenge: Front desk overwhelmed with appointment calls, patients waiting on hold, after-hours emergencies going to voicemail.
Solution:
- AI handles all appointment scheduling, rescheduling, and cancellations via SIP transfer to practice management system
- After-hours calls route to AI, which triages: urgent symptoms transfer to on-call doctor (sip:oncall@pbx), routine questions get scheduled callbacks
- Prescription refill requests handled entirely by AI, transferring to pharmacy queue only when needed
Result: 70% of calls handled without human intervention. Front desk focuses on in-person patients.
Auto Dealerships
Challenge: Sales calls going unanswered during test drives, service department overwhelmed with status checks, lost leads.
Solution:
- All inbound calls hit AI first—qualifies leads, captures contact info, books test drive appointments
- Hot leads ("I'm ready to buy today") transfer immediately to sip:sales@pbx with context
- "Is my car ready?" calls handled entirely by AI checking service management system
- After-hours inquiry? AI schedules callback for next business day with specific salesperson
Result: Zero missed leads. Service advisors handle 3x more customers. Sales conversion up 40%.
E-Commerce / Retail
Challenge: Order status calls overwhelming support team, repetitive questions eating agent time.
Solution:
- IVR option "track my order" routes directly to AI extension
- AI queries order management system, provides real-time status, estimated delivery
- Return/exchange requests handled by AI, only escalating to human when policy exception needed
- Product availability questions answered instantly from inventory database
Result: Support team handles 60% fewer calls. Average handle time down. CSAT scores up because agents aren't rushed.
Property Management
Challenge: Maintenance requests at all hours, tenant lockouts, showing requests overwhelming leasing office.
Solution:
- Emergency maintenance (flooding, no heat) transfers immediately to on-call tech: sip:emergency@pbx
- Routine maintenance logged by AI, work orders created automatically
- Showing requests handled entirely by AI—checks availability, schedules tour, sends confirmation
- Rent payment questions answered from tenant portal data
Result: 24/7 tenant support. Leasing staff focuses on closings. Emergency response time cut in half.
The Common Thread
Every successful integration follows the same pattern: AI handles volume (routine requests, after-hours, overflow), humans handle value (complex issues, relationship building, exceptions). SIP URI transfers ensure seamless handoffs between them.
Technical Setup Guide
Now let's get into the technical details. Whether you're an IT administrator or working with one, this section covers everything needed to get Mihu AI connected to your PBX.
Four Steps to Complete Integration
Firewall Configuration
Before Mihu AI can register to your PBX, your firewall must allow incoming connections from our servers. Add these IP addresses to your firewall whitelist:
This Step Is Critical
If these IP addresses aren't whitelisted in your firewall, Mihu AI cannot connect to your PBX. You'll see registration failures even if all other settings are correct. Add both IPs for redundancy.
Creating a SIP Extension on Your PBX
Create a new extension on your PBX specifically for Mihu AI. Configure it with these settings:
| Parameter | Recommended Value | Notes |
|---|---|---|
| Transport | UDP | Primary transport protocol |
| Authentication | Username + Password | Digest authentication (MD5) |
| Codecs | G.711 µ-law, G.711 A-law, G.722 | G.722 optional for HD audio |
| DTMF Mode | RFC4733 | Out-of-band DTMF tones |
| Direct Media | Disabled | Prevents NAT/media issues |
NAT-Safe Configuration
These settings on your PBX are critical for reliable operation. Without proper NAT configuration, you'll experience one-way audio, registration drops, and call failures.
Rewrites the Contact header with the actual source IP, ensuring SIP responses reach Mihu AI correctly.
Forces SIP responses to the port the request was received from, bypassing NAT port mapping issues.
Sends RTP audio to the address and port it was received from, fixing one-way audio problems.
Forces all media through your PBX, preventing direct RTP which often fails with NAT.
PBX Configuration Examples
Asterisk / FreePBX (PJSIP)
Add the following to your pjsip.conf file to create the extension for Mihu AI:
; ========================================== ; Extension for Mihu AI Voice Agent ; ========================================== ; Authentication credentials [mihu-ai-auth] type = auth auth_type = userpass username = mihu_ai_ext password = your_secure_password_here ; Address of Record (AOR) [mihu-ai-aor] type = aor max_contacts = 1 remove_existing = yes qualify_frequency = 30 ; Endpoint configuration [mihu-ai-endpoint] type = endpoint auth = mihu-ai-auth aors = mihu-ai-aor context = from-internal disallow = all allow = ulaw,alaw,g722 dtmf_mode = rfc4733 ; NAT-safe settings (CRITICAL) direct_media = no rewrite_contact = yes force_rport = yes rtp_symmetric = yes
Entering Credentials in Mihu AI
Once your PBX extension is configured, enter the connection details in the Mihu AI dashboard:
Navigate to PBX Integration
In your Mihu AI dashboard, go to Settings → Integrations → PBX Connection
Enter Your PBX Server Address
Enter your PBX's public IP address or hostname (e.g., pbx.yourcompany.com or 203.0.113.50)
Enter Extension Credentials
Provide the username and password you configured for the extension on your PBX
Save and Test
Click Save. Mihu AI will attempt to register. If successful, the status will show "Registered"
What "Registered" Means
When you see "Registered" status, Mihu AI has successfully connected to your PBX and is ready to handle calls. You can now route calls to this extension through your dial plan.
Maximizing Efficiency: Integration Scenarios
The real power of PBX + AI integration comes from combining both methods strategically. Here are proven configurations that maximize efficiency:
Scenario 1: Full AI Front-Door with Smart Escalation
Configuration: All inbound calls route to Mihu AI first
# Inbound Call Flow INCOMING → Mihu AI answers IF request = "order status" → AI handles completely IF request = "appointment" → AI books, no transfer IF request = "sales inquiry" → sip:100@pbx (hot lead) IF request = "complex issue" → sip:101@pbx (support) IF request = "speak to human" → sip:103@pbx (reception)
Efficiency gain: 60-70% of calls never reach human agents. Humans only handle calls that truly need their expertise.
Scenario 2: AI as Overflow Safety Net
Configuration: Human agents as primary, AI catches overflow
# Inbound Call Flow INCOMING → Ring group 100 (Sales team) IF no_answer > 20 seconds → ext 200 (Mihu AI) IF all_agents_busy → ext 200 (Mihu AI) IF after_hours → ext 200 (Mihu AI) # AI then handles or transfers back AI → Handles request OR transfers to sip:xxx@pbx
Efficiency gain: Zero missed calls. 24/7 coverage without staffing costs. Peak periods handled seamlessly.
Scenario 3: Hybrid IVR Replacement
Configuration: Replace traditional IVR menu with AI-powered routing
# BEFORE: Traditional IVR "Press 1 for Sales, 2 for Support, 3 for Billing..." # Customer frustration: 45% abandon rate # AFTER: AI-Powered Routing "Hello, how can I help you today?" Customer: "I have a question about my bill" AI: Handles directly OR transfers to sip:102@pbx # Abandon rate: 8%
Efficiency gain: 80% reduction in call abandonment. Average handle time reduced. Customer satisfaction scores increase significantly.
Measuring Integration Success
| Metric | Before AI | With AI Integration | Improvement |
|---|---|---|---|
| Average Wait Time | 4:32 | 0:08 | -98% |
| Calls to Voicemail | 23% | 0% | -100% |
| After-Hours Coverage | 0% | 100% | +100% |
| First Call Resolution | 62% | 84% | +35% |
| Agent Calls/Hour | 12 | 8 (higher quality) | Focus on value |
Troubleshooting Guide
Common issues and their solutions when connecting Mihu AI to your PBX:
18.102.215.56 and 35.152.240.23 are whitelisted. Check port 5060 is open. Confirm PBX address and credentials are correct.rtp_symmetric, force_rport, and set direct_media = no.qualify_frequency = 30 on your PBX to send keepalive probes. Check your internet connection stability.sip:extension@your-pbx-address.Debug Commands for Your PBX
Use these commands on Asterisk/FreePBX to diagnose issues:
# Check if Mihu AI is registered asterisk -rx "pjsip show endpoints" # View registration contacts asterisk -rx "pjsip show contacts" # Enable SIP debug logging asterisk -rx "pjsip set logger on" # View active call channels asterisk -rx "core show channels" # Monitor logs in real-time tail -f /var/log/asterisk/full # Capture SIP traffic for analysis tcpdump -i any -n port 5060 -w sip_debug.pcap
Quick Reference Checklist
Pre-Deployment Verification
Ready to Go Live
Once all checklist items are verified, your Mihu AI integration is production-ready. Monitor the first few days of live calls to catch any edge cases, and don't hesitate to reach out to our support team if you encounter any issues.