OneML overview
OneML is the XML markup you return from your webhook URL to control a live call. When PressOne needs instructions for a call, it requests your webhook URL and executes the OneML document your server returns, verb by verb, until the document runs out or a verb ends the call.
Document rules
Every OneML document follows the same set of rules:
- The root element must be
<Response>. PressOne rejects any document whose root element is something else. - Verbs execute top-to-bottom, in document order.
- Unknown verbs and unknown attributes are rejected. Parsing is strict: a typo in a verb or attribute name fails the entire document, it is not silently ignored.
Fetching OneML documents
PressOne fetches OneML documents from the webhook URL you configure. For a GET request, call parameters are sent as query string parameters. For a POST request (the default), call parameters are sent as an application/x-www-form-urlencoded request body.
PressOne waits at most 10 seconds for your server to respond, and follows at most 5 HTTP redirects before it gives up on the request.
Verbs
| Verb | Description |
|---|---|
| Say | Speaks text to the caller using text-to-speech. |
| Play | Plays an audio file, or sends DTMF tones, to the caller. |
| Gather | Collects DTMF digits or speech input from the caller. |
| Record | Records the caller's voice. |
| Dial | Connects the call to another phone number. |
| Redirect | Fetches and executes a new OneML document. |
| Pause | Waits silently on the call for a specified duration. |
| Hangup | Ends the call. |
| Reject | Rejects an incoming call before it is answered. |
| Stream | Streams call audio to a WebSocket endpoint. |
| Disconnect | Returns control of the call to the platform dialplan without ending it. |
Limits
| Limit | Value |
|---|---|
| Inline OneML document size | 4,000 characters maximum |
| Redirect loop cap | 10 consecutive parameterless redirects |
loop="0" repeat cap | 1,000 iterations |
| Webhook fetch timeout | 10 seconds |
Minimal example
The following document answers the call, speaks a greeting, and hangs up:
Code