<forward>
Role: <forward>
Use:
- IVR – When building an IVR for your company <gather> collects the digits that the user enters to direct the call to correct department/individual.
- Conference – When joining a conference caller enters the “pin”. This pin is collected by <gather> for validating the user.
- Authentication – Yet another way of using <gather> for security authentication when accessing personal or secured information over phone.
While there are no limitation on where <gather> can be used, there definitely is requirement or set of attributes to use with <gather>. Below is a list of attributes to be used with <gather>, each attribute has a specific function and can use certain values.
Attributes
Attribute |
Value |
Default |
action | Callback URL | none |
Method | POST/GET | POST |
minDigits | 1-200 | 1 |
numDigits | 1-200 | 20 |
Timeout (in seconds) | Integer | 4 Seconds |
Tries | 1-10 | 3 |
Audiotype | text to speech (tts) | none |
finishOnKey | 0-9 ; * ; # | # |
Here is an example of how <gather> is used within code.
1 2 3 4 5 6 |
<?xml version="1.0" encoding="UTF-8"?> <Response> <Gather timeout="10" finishOnKey="*" action=”handle-key.xml> <Say>Please enter the Extension number you want to dial.</Say> </Gather> </Response> |
1 2 3 |
<?php echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; echo "<Response><Say>You entered ".$_REQUEST['Digits']. "</Say></Response>"; ?> |