Basix XML Request
When a call arrives, Basix will make a synchronous HTTP POST request to the XML Server URL (you can set more than one URL to permit fallback), and wait to receive XML in response. Basix sends call parameters to your application that you can act upon before responding.
Request Parameters
Basix sends the following parameters with its request:
| Parameter | Description |
|---|---|
| CallUUID | A unique identifier for this call (used for logging, correlation and troubleshooting) |
| CallStatus | This parameter informs the status for the call. "ringing" (not answered yet), "in-progress" (already answered) |
| Direction | "inbound" (incoming call to your PBX) or "outbound" (outgoing call from your PBX) |
| CalledNumber | Number that is the target of this call |
| CallingNumber | Number that originated this call |
| RedirectingNumber | In case this call arrived as a result of a redirection, this will be filled with the telephone number that caused a redirection to this CalledNumber |
| Anonymous | Indicates if the call is Anonymous (caller ID hidden) or not: "true" or "false" |
| StartTime | Timestamp (in microseconds) when the call started |
| AnswerTime | Timestamp (in microseconds) when the call was answered |
| UserId/UserName | basix user.id and user.name if the person at the distant-end is a basix user |
| GroupId/GroupName | basix group.id and group.name if if the person at the distant-end is a basix user on the context of a group. Important: this doesn't indicate the call arrived to a certain group. Instead it indicates a call was generated from that group to a member of the group and so, there is group member in this call. |
| CACode | If you are a local carrier and are allowed to see this information, it will provide the CACode of the calling party. |
| CarrierID | If you are a local carrier and are allowed to see this information, it will provide the CarrierID of the calling party. |
| To | Same as CalledNumber (this is a legacy (deprecated) parameter: it is the SIP UserName in the header To. Use CalledNumber instead) |
| From | Same as CallingNumber (this is a legacy (deprecated) parameter: it is the SIP UserName in the header From. Use CallingNumber instead) |
| CallerName | Name of the caller if available or the same as the CallingNumber (this is a legacy (deprecated) parameter: it is the SIP DisplayName in the header From) |
Obs:
StartTime, AnswerTime, UserId, UserName, GroupId, GroupName, RedirectingNumber: introduced in v. 1.6.0
CalledNumber, CallingNumber, RedirectingNumber: introduced in v. 1.8.0
The parameters are sent in the body of the request as an URL encoded query string.
Ex: Direction=inbound&CalledNumber=0501111222&CallingNumber=09011112222&To=05011112222From=090111122226&CallerName=09011112222&DomainName=brs.basix.ne.jp&CallUUID=c58ae32a-6f19-47ba-a402-6f3d031cb1ab&CallStatus=ringing
If we are not able to connect to the first XML Server URL within 10 seconds, we will try the next one till we get a response or till the list of URLs is exhausted.
These parameters will also be available as variables during processing of the XML doc. So that you can do things like these:
Transfer to different group based on CalledNumber
1 2 3 4 5 6 7 8 9 10 11 12 13
<IVR> <Switch expr="CalledNumber"> <Case val="0311111111"> <Transfer>sales1</Transfer> </Case> <Case val="0322222222"> <Transfer>sales2</Transfer> </Case> <Default> <Transfer>sales3</Transfer> </Default> </Switch> </IVR>
Transfer to different group based on CallingNumber
1 2 3 4 5 6 7 8 9 10
<IVR> <If expr="CallingNumber == '0312341234'"> <Then> <Transfer>vip_service</Transfer> </Then> <Else> <Transfer>concierge</Transfer> </Else> </If> </IVR>
Speak parameter value
1 2 3
<IVR> <Speak>Your calling number is {{CallingNumber}}</Speak> </IVR>
And elements GetDigits, ReceiveFax and SendFax will add extra parameters after they complete.
When the call finishes, if configured to do so, Basix will notify the xml server that the call terminated with parameters CallStatus=completed and DisconnectedBy.
| Name | Description |
|---|---|
| CallStatus | "completed" (this means the call ended so we are not asking for XML data, we are just informing the call terminated). |
| DisconnectedBy | local-end" (your pbx disconnected the call) or "distant-end" (the distant-end terminated the call) |
If there is an error during XML processing like invalid XML syntax or invalid parameters for Elements, this will terminate the call and the error will be notified to the XML Server URL with extra parameter Error:
| Name | Description |
|---|---|
| Error | some error string like "Unable to parse XML document" or "Invalid parameter 'date' for Element Play" |
