When the booking is confirmed, the app sends an SMS confirmation.
That is the interesting part: this is not just a chatbot. It is a phone workflow with voice input, ai reasoning, spoken output, and a messaging follow-up.
Why I Like This Example
It is simple enough to demo quickly, but it still maps to real developer questions:
- how do i answer an inbound phone call with code?
- how do i collect speech from a caller?
- how do i use ai to decide what to say next?
- how do i send an sms after a call?
- how do i inspect what happened after the demo?
The /reservations endpoint is useful because it gives the audience something visible after the call. The SMS confirmation gives the demo a clear finish.
Run It Locally
git clone https://github.com/team-telnyx/telnyx-code-examples.git
cd telnyx-code-examples/ai-restaurant-reservation-voice-agent-python
cp .env.example .env
pip install -r requirements.txt
python app.py
Then expose the webhook:
ngrok http 5000
In the Telnyx Portal, point your Voice API application webhook to:
https://<ngrok-id>.ngrok-free.app/webhooks/voice
Assign a Telnyx number to that Voice API application and call the number.
What To Demo
I would keep the demo short:
- Show the Voice API app webhook.
- Call the number.
- Book a table.
- Show the SMS confirmation.
- Open
/reservations.
That gives viewers the full loop without getting lost in implementation details.
Where To Take It Next
The demo uses in-memory state, which is perfect for learning. The next production steps are database storage, availability checks, webhook verification, and a real reservation system integration.
The important thing is that the skeleton is already there: voice in, ai decision, voice out, and SMS follow-up.
Resources