Ejemplo n.º 1
0
					}else{
						print('<rejectCallWithBusy value="true"/>');
					}
				}
		echo("<queryResults recordsFound=\"".$recordsFound."\">");
		echo('<!--One Record Found-->');
		echo('<recordName>'. $record['firstName'] . " " . $record['lastName']. '</recordName>');
		echo "</queryResults>";
	
		}elseif($recordsFound>1){
			echo "<rejectWithBusy>".checkRejectWithBusy()."</rejectWithBusy>";
			echo "<ifRecordFound>".getOnANIMatchCondition()."</ifRecordFound>";
				if(getOnANIMatchCondition()=="acceptCall"){
					print('<rejectCallWithBusy value="false">'	.	getRedirectRoute("acceptCall")	.	'</rejectCallWithBusy>');
				}else{
					if(checkRejectWithBusy()=='false'){
						print('<rejectCallWithBusy value="false">'	.	getRedirectRoute("rejectCall")	.	'</rejectCallWithBusy>');	
					}else{
						print('<rejectCallWithBusy value="true"/>');
					}
				}
	
				echo("<queryResults recordsFound=\"".$recordsFound."\">");
				echo('<!-- Multiple Records Found-->');
				// Print out records found if there are more then one

				$query = "SELECT * FROM userRecords WHERE (ANI='".$_REQUEST['callerID']."') ORDER BY 1 DESC";	
				$dbhandle = sqlite_open($dbPath,0666);
				$result = sqlite_array_query($dbhandle,$query, SQLITE_ASSOC);

				foreach ($result as $entry) {
Ejemplo n.º 2
0
		if(getOnANIMatchCondition()=="acceptCall"){
			getReasonMessage("rejectCall",true);
		}
		print('</recordData>');
		print('</xmlReturn>');
		exit;
		/* NO USER RECORD FOUND */
	}	else 
		{  
			if(getOnANIMatchCondition()=="acceptCall"){
				if (checkRejectWithBusy()=="false"){
					getRedirectRoute("acceptCall");
				}
			}else{
				if (checkRejectWithBusy()=="true"){
					getRedirectRoute("acceptCall");
				}
		}
		print('</generalRules>');
		print('<recordData>');
		if(getOnANIMatchCondition()=='rejectCall'){
			getReasonMessage("acceptCall",false);
		}	else {	
			if (checkRejectWithBusy()=="false"){
				getReasonMessage("acceptCall",false);
			}
		}
		print('</recordData>');
	}
	print('</xmlReturn>');	
?>