Response element.
Purpose
TheResponse element acts as the container for all XML verb elements that control call behavior. It tells Vobiz that the XML document contains valid call instructions and marks the beginning and end of your call flow logic.
Attributes
| Type | Required | Description |
|---|---|---|
| - | - | The Response element has no attributes. |
Nesting rules
Allowed child elements
TheResponse element can contain the following verb elements:
Details
<Dial>- dial a phone number or SIP user<Speak>- synthesize speech<Play>- play an audio file<Record>- record the call<Gather>- collect DTMF or speech input<Hangup>- hang up the call<Redirect>- redirect to another XML URL<Wait>- pause the call<Conference>- join a conference room<PreAnswer>- play audio before answering<DTMF>- send DTMF tones<Stream>- start an audio stream
Parent elements
TheResponse element has no parent - it is always the root element.
Important: Every XML document must have exactly one Response element. Multiple Response elements or a missing Response element will result in an XML parsing error.
Examples
Basic usage
Multiple actions
IVR flow
Empty response
Response element is valid but performs no actions. The call continues without any instructions. Use this for call events where no action is needed.
Best practices
Always include the XML declaration
Start your XML documents with<?xml version="1.0" encoding="UTF-8"?> to ensure proper parsing and character encoding.
Validate your XML
Use an XML validator or linter during development to catch syntax errors before deploying to production. Malformed XML will cause call failures.Set the proper Content-Type
When your application responds to Vobiz webhooks, set the HTTPContent-Type header to application/xml or text/xml. A text/html or text/plain response causes a parsing error and drops the call.
Stay within the size and time limits
Keep each XML response under 100 KB and return it within 1-2 seconds. Verbs execute strictly top-to-bottom; an element that hands control elsewhere -<Redirect> or a <Dial>/<Gather>/<Record> action URL - ends processing of the current document, so anything after it acts as a fallback only if that handoff does not occur.