Inbound calls
Flows where the caller initiates the session
Inbound flows start when a caller reaches your destination (phone number, WhatsApp destination, SIP username, or app user alias) and a routing rule launches your scenario.
Use AppEvents.CallAlerting as the entry point
All inbound calls use the same entry point, allowing easy, common handling regardless of the channel. Use AppEvents.CallAlerting to answer the call and start your Voice AI logic.
For example:
Inbound Voice AI pattern
Inbound guidelines:
- Answer quickly with
call.answer() - Listen for key call events (
Disconnected,Failed, etc.) and handle as needed - Create/configure the connector client
- Bridge media between call and connector:
- Use
VoxEngine.sendMediaBetween(...)for simple two-party bridging - Alternatively use
call.sendMediaTo(...)andconnector.sendMediaTo(...)for more complex pipelines
- Use
- Invoke methods and handle events from the connector to drive your Voice AI logic