Basix XML Response
When a phone call comes in to Basix, it makes an HTTP request to the Answer URL. In your response to that request you can tell Basix how to control the call.
Your web app at the Answer URL should respond to Basix's request with XML. Basix XML Elements can be categorized as follows: the parent element and the other children elements.
Basix XML Interpreter
When Basix receives the XML, it executes the elements in order from top to bottom. As an example, the following XML snippet says "Good morning" to the caller before playing Trumpet.wav and hanging up (call will end as there is nothing else to be done).
1 2 3 4 |
<IVR> <Speak voice="en-US-Standard-C">Good morning</Speak> <Play>http://somewhere/sounds/Trumpet.wav</Play> </IVR> |
Basix names are case-sensitive. For example, using <speak> instead of <Speak> will result in an error.
Attribute name are also case sensitive and "camelCased".
If there is an error in the XML the call will terminate and the Answer URL will be notified with CallStatus=error and a parameter 'Error' with details. Ex: CallStatus=error&Error=Element+Speak+does+not+support+attribute+studio
When all elements are executed the call finishes (it is hung up). Unless the last element is a <Transfer>.
Also, the XML doesn't need to come from an app server: you can store a XML file in your Basix pbx folder and we would retrieve it from there.
The Parent <IVR/> | <Response/> Element
The parent element of the XML is either an <IVR/> or a <Response/> element. All children elements must be nested within this element. Any other structure is considered invalid.
Example:
1 2 3 |
<IVR> <Speak voice="en-US-Standard-C">Good morning</Speak> </IVR> |
1 2 3 |
<Response> <Speak voice="en-US-Standard-C">Good morning</Speak> </Response> |
Obs: you can use either <IVR/> or <Response/>.
We originaly created <Response/> and at that time, all calls would need to get the XML from an app server.
But after we added support for XML files stored in the pbx domain, the name 'Response' didn't make sense anymore.
So, the <IVR/> was created for the case of XML coming from a local XML file: there is no external server involved and so there is no "response'.
So we are adopting <IVR/> as a proper way to specify this is an IVR XML no matter how it is obtained but we will continue to support <Response/> for legacy applications.
Please refer to XML Elements for more details.
