I built a small Telnyx Voice example around a pattern I keep running into: one voice agent, multiple business contexts.
For appointment scheduling, a dental office, medical clinic, and physical therapy practice often need the same basic call flow. The assistant still answers the call, collects appointment details, and confirms the next step.
What changes is the business context: name, hours, services, tone, and greeting.
Instead of creating a separate assistant for every business, this example uses one reusable base assistant and applies runtime instructions when the call starts.
The flow is:
- Caller dials a Telnyx number.
- The webhook checks which number was called.
- The number maps to a business config.
- The server renders the right instructions and greeting.
- Telnyx starts the assistant with that runtime context.
That makes it easier to reuse one assistant pattern across multiple businesses without copying the whole assistant setup.
Run it:
git clone https://github.com/team-telnyx/telnyx-code-examples.git
cd telnyx-code-examples/provisional-telnyx-voice-api-agents-nodejs
npm install
cp .env.example .env
npm run dev
You can also preview a generated payload:
npm run preview -- smile-dental
Code example:
[https://github.com/team-telnyx/telnyx-code-examples/tree/main/provisional-telnyx-voice-api-agents-nodejs]
Top comments (0)