Identify Caller
For every call, we send lots of information about the caller, example caller ID, Caller name, Number dialed etc. Let's use some of that information.
Identify Caller by Name
<?php
// contacts array will List everyone your contacts
$contacts = array(
"9495797676"=>"John",
"9495776878"=>"Lily",
"3102168544"=>"Bob",
"8587771234"=>"Wendy"
"6058393817"=>"Amanda"
);
// if the caller is known, then greet them by name
// otherwise, just identify them as another caller
if(!$name = $contacts[$_REQUEST['From']])
$name = "there";
// now greet the caller
header("content-type: text/xml");
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
?>
<Response>
<Say>Hello <?php echo $name ?>.</Say>
</Response>Last updated