Learn how to build an inbound restaurant reservation voice agent with Telnyx Voice AI, AI Inference, and SMS confirmations.
Restaurants lose bookings when callers hit voicemail, wait on hold, or call outside staffed hours. A voice ai reservation agent gives developers a practical way to answer inbound calls, collect booking details, and send a confirmation without building a full contact center.
The canonical code example is in the Telnyx code examples repo:
This Python example creates an inbound restaurant reservation agent using Telnyx Voice AI, AI Inference, and SMS/MMS.
The call flow is straightforward:
This example is small enough to understand in one sitting, but it still shows the core pieces developers need for a real voice ai workflow:
/reservations endpoint for demo visibilityThat makes it a good first project for developers who want to understand how voice, ai, and messaging fit together in one application.
The example metadata lists:
Voice AI handles the phone-call experience. AI Inference interprets what the caller says and generates the host response. SMS/MMS sends the reservation confirmation after the booking is complete.
The application stores demo reservations in memory. For a production deployment, replace that with a database and add authentication, observability, signature verification, rate limits, and retention controls.
Fill in the environment variables:
Expose the local webhook:
Then configure your Telnyx Voice API application webhook URL:
Assign your Telnyx phone number to that Voice API application and call the number.
Say:
If the agent asks follow-up questions, provide:
After the booking completes, check:
You should see the saved reservation and receive an SMS confirmation.
Before using this pattern in production, add:
Related articles