Create an IVR Input Function

From Taridium

Revision as of 21:10, 4 February 2011 by Webmaster (Talk | contribs)
Jump to: navigation, search

This How-To shows you how to create an IVR Input function using the example of a function to opt out of a fax marketing list.

Detailed instructions on all configuration elements for IVR inputs can be found here.

1. record your query prompt using the prompt recording function or upload a pre-recorded file. Detailed instructions on prompt recording and uploading can be found here. Do the same for your validation success and failure prompts.

2. Create an IVR Input called 'OptOut' and select your newly created prompt. Set an optional extension for testing purposes and enter the maximum number of digits you will accept. In this case we set it to 10 digits for North American numbers.

3. Your input validation URL will call a script to validate the input number. Set the retries to 2 for a maximum of 3 attempts. Set your success and failure prompts from the drop-down boxes. Check hangup on failure.

<?
/*  A simple script to validate input against a value */
/* valid numbers */
$mydb[] = "2125551001";
$mydb[] = "2125551002";
$mydb[] = "2125551003";
$mydb[] = "2125551004";
$mydb[] = "2125551005";

if ($_GET['input']){
	
	if (in_array($_GET['input'],$mydb)){
		
		$reply = "VALID";
		
	} else {
		
		$reply = "INVALID";
		
	}
		
} else {
	
	$reply = "INVALID";
	
}

echo $reply;
?>

4. Set the URL you want to call if you are sure this is a valid and accepted number.

Ivr-input.png

Personal tools
Namespaces
Variants
Actions
Toolbox