Every week, a developer posts on Stack Overflow or Reddit: "My Twilio number gets rejected at Stripe/Google/WhatsApp." The answer is always the same — VoIP numbers fail carrier lookup. But why?
This is the deep technical explanation of how carrier detection works, what databases are involved, and why real SIM is the only reliable solution for AI agent verification.
The Carrier Lookup Infrastructure
When a service like Stripe verifies your phone number, it doesn't just check a blocklist. It queries a chain of authoritative databases:
LERG (Local Exchange Routing Guide)
The LERG is the master database of North American phone numbers. Maintained by iconectiv (formerly Telcordia), it maps every NPA-NXX (area code + exchange) to:
- Operating Company Number (OCN) — Who owns this number block
- Line type — Mobile, landline, VoIP, toll-free
- Rate center — Geographic location
- LATA — Local Access and Transport Area
When Twilio buys a block of numbers from Bandwidth, those numbers are registered in LERG under Bandwidth's OCN with line_type voip. This is permanent and public.
NPAC (Number Portability Administration Center)
NPAC tracks ported numbers. If a number was originally Verizon mobile but got ported to Twilio, NPAC records this. Services that do deep verification check NPAC to see if a mobile number was ported to a VoIP provider.
HLR (Home Location Register)
The HLR is the real-time database on each carrier's network. When you query a T-Mobile number via HLR, it returns:
- Whether the number is currently registered on the network
- The IMSI (International Mobile Subscriber Identity)
- The serving MSC (Mobile Switching Center)
- Roaming status
VoIP numbers don't exist in any HLR — they route through internet gateways, not cell towers.
How Services Use This Data
Stripe's Approach
1. Receive phone number
2. Query LERG → Get OCN and line_type
3. If line_type = "voip" → REJECT
4. If line_type = "mobile" → Query HLR for active registration
5. If HLR active → SEND SMS
Google's Approach (More Aggressive)
1. Receive phone number
2. Query LERG → Get carrier and line_type
3. If line_type = "voip" → REJECT
4. If carrier is known VoIP provider (even if line_type is ambiguous) → REJECT
5. Query HLR → Check active mobile registration
6. Check behavioral patterns (creation velocity, geo-consistency)
7. If all checks pass → SEND SMS
WhatsApp's Approach (Strictest)
1. Receive phone number
2. Query LERG + NPAC for current carrier
3. Check against WhatsApp's internal VoIP blocklist
4. Query HLR for active mobile registration
5. Check number history (spam reports, previous bans)
6. If all checks pass → SEND SMS
Why VoIP Numbers Are Detectable
It's not just about databases. VoIP numbers have fundamental technical differences:
Network Topology
- Mobile: Phone → Cell tower → MSC → SMS Center → Delivery
- VoIP: API call → Internet → SIP gateway → SMS aggregator → Delivery
The routing path is different. Services can detect SIP gateways in the delivery chain.
Number Allocation
- Mobile carriers get number blocks directly from regulators
- VoIP providers lease from wholesale carriers (Bandwidth, Peerless)
- LERG records who owns each block — this is public information
Registration Status
- Mobile: Continuously registered with a cell tower via SIM card
- VoIP: No network registration. Numbers exist only in software databases
Real SIM vs VoIP: Technical Comparison
| Characteristic | VoIP Number | Real SIM Number |
|---|---|---|
| LERG line_type |
voip or nonFixedVoip
|
mobile |
| HLR registration | ❌ None | ✅ Active on tower |
| Carrier in LERG | Twilio/Bandwidth/Vonage | T-Mobile/AT&T/Verizon |
| Physical SIM card | ❌ No | ✅ Yes |
| Cell tower connection | ❌ No | ✅ Yes |
| IMSI on network | ❌ No | ✅ Yes |
| SMS routing | Internet → SIP gateway | Carrier SMS Center |
| Stripe verification | ❌ 0% success | ✅ 100% success |
| Google verification | ❌ 0% success | ✅ 98% success |
| WhatsApp verification | ❌ 0% success | ✅ 100% success |
AgentSIM: Real SIM for AI Agents
AgentSIM bridges the gap. It provisions actual SIM cards on carrier networks and exposes them via API:
import agentsim
agentsim.configure(api_key="asm_live_xxx")
async with agentsim.provision(agent_id="my-agent", country="US") as num:
print(num.number) # +14155552671 (real T-Mobile number)
# This number passes LERG, NPAC, and HLR checks
# because it IS a real mobile number
otp = await num.wait_for_otp(timeout=60)
print(otp.otp_code) # "391847"
# Auto-released
MCP Integration
{
"mcpServers": {
"agentsim": {
"url": "https://mcp.agentsim.dev/mcp",
"headers": {
"Authorization": "Bearer asm_live_xxx"
}
}
}
}
The Bottom Line
VoIP detection isn't going away. It's getting more sophisticated as fraud scales. The only reliable solution for AI agents that need phone verification is real SIM-backed numbers.
-
Install:
pip install agentsim-sdk - Try it: agentsim.dev — 10 free sessions/month
- Docs: docs.agentsim.dev
- GitHub: github.com/agentsimdev
Top comments (0)