Your Digital Business Phone System: Phone & Text with AI
What if every phone number in your business had its own AI agent, answering texts instantly, routing calls intelligently, and capturing leads 24/7? The Phone & Text integration turns every DID into a smart business line with AI-powered SMS auto-reply and voice routing. This revolutionary feature empowers businesses to take their customer engagement to the next level.
**Integration Overview**
Phone & Text v1.0.0 is built on top of VectaVoIP, Asterisk 20 PBX, and AI agents powered by ZeroAI. The integration utilizes Docker microservices for seamless scalability and performance. This comprehensive solution includes:
* **Phone numbers**: Search, purchase, assign DIDs to your A2BillingPlus customer account, release numbers, and view all assigned DIDs.
* **Messages**: Full SMS inbox per DID with threaded conversations grouped by contact number. Each message shows direction inbound/outbound, timestamp, body text, AI suggestion if generated, and auto-replied flag. Send outbound SMS from any DID.
* **Rules**: AI agent binding per DID: master AI_enabled toggle, SMS_auto_reply toggle for immediate AI responses vs draft-only, global agent or custom tenant agent selector, transparent mode to reply as user rather than agent persona, custom system prompt override per DID, reply tone — professional/friendly/concise/formal/casual, TTS engine selection — edge/azure/elevenlabs/openai/espeak, TTS voice picker, voice_enabled and SMS_enabled toggles.
* **Extensions**: Internal SIP extensions with multi-tenant naming c{customerId}-ext; agent/voicemail assignment per extension; forward type: AI/Ring/Forward external; voicemail with TTS greeting, custom voice, and transcription).
* **Settings**: VectaVoIP base URL, service API key, provisioning token, webhook secret; IDempotent account provisioning — auto-creates or recovers A2BillingPlus customer linked by external_id CRM_{org_id}.
**Inbound SMS Flow**
1. **VectaVoIP Webhook → HMAC Verification → Org_ID Lookup**: The VectaVoIP webhook sends a message to the API, which verifies the HMAC signature and retrieves the org ID from the DID index.
2. **Load DID AI Config**: The API loads the DID AI config, which includes agent settings such as global toggle, SMS auto-reply, tone, TTS engine selection, and voice picker.
3. **Build System Prompt with Agent Persona + Tone + Override**: The PhoneTextAIProcessor resolves the agent (global from MariaDB or custom from tenant SQLite or transparent) based on the DID AI config.
4. **Calls to AI**: If SMS auto-reply is enabled, the API sends a request to the AI service to resolve the agent and build a system prompt with agent persona + tone + override.
5. **Stores Suggestion**: The AI service generates an AI suggestion if generated and stores it in the message database.
**Voice Calls**
1. **Inbound from SIP.vectavoip.com Lands in Asterisk [from-vectavoip] Context → AGI Script Resolves Tenant + Extension**: The inbound call is routed to the Asterisk context, where the AGI script resolves the tenant and extension.
2. **Routes to PJSIP Endpoint or AI Voice Handler with TTS**: The AGI script routes the call to a PJSIP endpoint or an AI voice handler with TTS.
**Voicemail**
1. **Recording URL, Duration, Transcription, Read/Unread Status**: Voicemail recording details are stored in the database.
2. **Call Logs**: Caller information, direction, duration, agent used, TTS engine/voice, timestamps are recorded.
**Multi-Tenant SIP**
* Every endpoint is isolated as c{customerId}-{extension} in real-time PJSIP tables, ensuring seamless scalability and performance.
Brand Voice: Confident, technical, forward-thinking. Written in first person from a founder’s perspective.
By implementing Phone & Text with AI, businesses can unlock new levels of customer engagement and lead generation. With its comprehensive features and seamless integration, this solution empowers businesses to stay ahead of the competition.
