The <Set>
element sets a variable var to a value val.
The variables can be interpolated in text for element Speak.
They can also be used with <Switch>
element.
They will be informed in subsequent HTTP XML requests.
Element Attributes
Attribute Name | Description | Allowed Values | Default Value |
---|---|---|---|
var | name of the variable to be set | non-empty string | none |
val | value | any string | none |
Example:
1 2 3 4 5 |
<?xml version="1.0" encoding="UTF-8" ?> <Response> <Set var="amount" val="1234"/> <Speak voice="rms">Hello, you have {{amount}} dollars in your account.</Speak> </Response> |
Since in the above XML there is nothing else to be done, if notification of CallStatus=completed is enabled, you will receive a request containing this: Direction=inbound&To=05011112222From=090111122226&CallerName=09011112222&DomainName=brs.basix.ne.jp&CallUUID=c58ae32a-6f19-47ba-a402-6f3d031cb1ab&CallStatus=completed&var_amount=1234