<Response> becomes Vobiz’s <Response>, <Say> becomes <Speak>, and the builder - twilio.twiml.voice_response.VoiceResponse() - becomes vobizxml.ResponseElement(). This page maps each voice verb and its attributes, then shows before/after IVRs you can copy.
The builder swap
Twilio’s helper libraries expose aVoiceResponse builder; Vobiz ships the equivalent ResponseElement in the bundled vobizxml module. Nesting, chaining, and serialization all mirror what you already do.
Verb-by-verb mapping
Before / after: a DTMF IVR menu
A one-key menu.input/timeout/numDigits become inputType/executionTimeout/numDigits, and nested say becomes add_speak.
Before / after: forward a call with caller ID
Twilio’s<Dial> + <Number> maps straight to Vobiz’s <Dial> + <Number>; a <Client>/<Sip> target becomes <User>. callerId and timeout keep their names.
<Client>/<Sip>), nest a <User> instead of <Number>:
Vobiz · Python
Before / after: fork audio to a WebSocket
Twilio’sstart().stream() (one-way) and connect().stream() (two-way) both map to Vobiz’s <Stream> - track becomes audioTrack, and bidirectional="true" requests two-way media.
Key differences
- Same document, renamed verbs. The root stays
<Response>; only leaf names change (Say→Speak,Pause→Wait,Client/Sip→User). Nesting, ordering, and the “return XML from your answer URL” model are identical. Gathergives you two silence timers. Twilio’s singletimeoutbecomes Vobiz’sexecutionTimeout, andspeechTimeoutbecomesspeechEndTimeout. Vobiz adds a dedicateddigitEndTimeoutfor inter-digit pacing, so DTMF and speech end conditions are tuned independently. Full attribute list on the Gather reference.- One
Gatherhandles digits and speech together. SetinputType="dtmf speech"and whichever the caller does first is posted to youractionURL - one verb for menus and open-ended intent capture. Usercovers bothClientandSip. A single<User>element dials SIP endpoints and softphones, carriessendDigitsfor extensions, and sets customX-VH-SIP headers viasipHeaders.Conferenceis a top-level verb. Where Twilio nests<Conference>inside<Dial>, Vobiz returns<Conference>directly from<Response>; the room is created on first join and named by the element’s text content.- Transfers are declarative. Instead of an imperative “modify live call” step, return a
<Redirect>(or new<Dial>) from your answer URL and Vobiz continues the call with the fresh XML - the same webhook-driven pattern your TwiML app already uses. - Streaming is built in.
<Stream>forks audio overwss://withaudioTrackselection andbidirectionaltwo-way media for AI voice-agent pipelines. See the Stream reference for codecs and reconnect options.
Related
- Twilio → Vobiz overview - the full migration order and at-a-glance matrix.
- Gather XML reference - every input attribute and webhook parameter.