Get
Definition
Calls the specified URL. The tag works with CallFire XML variables and the PHP script to obtain data from a specified source. The resulting data string can be stored under a varname and referenced later in the script.
Value
The value is the URL referencing the desired data string.
Attributes
Attribute | Required | Values | Description |
---|---|---|---|
name | N | any text | A unique name for the tag |
varname | N | any text | Stores the response from the get request to this variable |
timeout | N | an integer | Number of milliseconds before timeout |
Examples
Call a URL with an ID and play back the response in a play tag.
<dialplan name="Root">
<menu maxDigits="4" name="menu_top" timeout="5500">
<play type="tts" voice="male1">Hello. Please enter your 4 digit id number.</play>
<keypress pressed="0000-9999">
<stash varname="id">${call.lastinput}</stash>
<!--notify me on keypress at myurl.com with value of keypress-->
<get varname="getData" name="getId" timeout="30000">https://myurl.com?id=${id}</get>
<play type="tts" voice="male1">The response back is ${getData}. Thank you.</play>
<goto>hangup</goto>
</keypress>
</menu>
</dialplan>
Comments
0 comments
Please sign in to leave a comment.