*** title: Overview subtitle: How inbound calls reach your Voice AI scenario -------------------------------------------------------- Inbound calling means the caller starts the call and Voximplant routes it to your scenario. ## Call flow 1. Caller enters through an endpoint (phone number, WhatsApp, SIP, or app user alias). 2. A routing rule in your application matches the destination. 3. VoxEngine starts the attached inbound scenario (`AppEvents.CallAlerting`). 4. The scenario answers, creates a connector client, and bridges audio. ```js title="Inbound Voice AI skeleton" require(Modules.OpenAI); require(Modules.ApplicationStorage); VoxEngine.addEventListener(AppEvents.CallAlerting, async (event) => { const call = event.call; call.answer(); const apiKey = (await ApplicationStorage.get("OPENAI_API_KEY")).value; const voiceAIClient = OpenAI.createRealtimeAPIClient({ apiKey, model: "your-realtime-model" }); VoxEngine.sendMediaBetween(call, voiceAIClient); }); ``` ## Voice AI checklist for inbound scenarios * Answer quickly with `call.answer()`. * Read connector credentials from `ApplicationStorage`. * Configure the session before or immediately after bridging. * Implement barge-in by clearing connector media buffer when user speech starts. * Log key lifecycle events (`ConversationCreated`, `SessionUpdated`, `ResponseDone`, errors). * Clean up both legs on disconnect. ## Entry point options * [Phone numbers](guides-inbound-call-basics-phone-numbers) * [WhatsApp](guides-inbound-call-basics-whatsapp) * [SIP](guides-inbound-call-basics-sip) * [App users](guides-inbound-call-basics-app-users) - New screenshot: Inbound rule test in Control Panel showing destination match and selected scenario.