Twilio Voice TwiML for Codex: Validate a Local IVR Response
Build and parse a small TwiML response for a fictional interactive voice menu, then verify its instructions before connecting any phone line.
中文Setup for Codex
Codex with a local XML parser or Twilio SDK installed for generation. The static example does not require a Twilio account or a public URL.
- Use the pinned Twilio checkout linked below. Copy `skills/twilio/twilio-voice-twiml/` to the scratch project's `.agents/skills/twilio-voice-twiml/` and load the skill from a fresh Codex session.
- Review the Voice TwiML verb structure. Keep the local XML fixture separate from any webhook or telephony configuration.
Example task
Parse this fixture: `<Response><Gather numDigits="1"><Say>Press 1 for hours.</Say></Gather><Say>No input.</Say></Response>`. Ask for the accepted digit count, nested prompt, and fallback position.Expected result
The root element is Response. Gather expects one digit and contains the first Say element. The final Say is a sibling that follows Gather.
Upstream documentation
Original SKILL.md on GitHub · MIT license · Source reviewed
Frequently asked question
Why test the Twilio IVR response locally?
A parser can confirm well-formed XML and the intended element order before you verify live Voice behavior in a separately configured environment.