Greet Caller by Name in PHP
<?php $phoneBook = array( "+12345671" => "John", "1001" => "Kevin", "+12345675" => "Jack",); if (array_key_exists($_REQUEST['Caller'], $phoneBook)){ $CallerName = $phoneBook[$_REQUEST['Caller']]; } else { $CallerName = "Sir or Madame"; } print "<Response>"; print "<Speak>Hello $CallerName!</Speak>"; print "</Response>"; ?>
Code example 1
- Greeting the caller by using a phonebook
IN MORE DETAILS
- When your application receives a call, you will get a Request with all of the call details.
- Fill an associative array with telephone numbers and names.
- In this associative array (phonebook) we are looking for the Caller parameter of the Request.
- After that, send back the response OzML to the caller.
More information
- Greet Caller by Name in PHP
- Greet Caller by Name in C#.net
- Greet Caller by Name in Ruby
- Greet Caller by Name in VB
- Greet Caller by Name in ASP.net
- Greet Caller by Name in Perl
- How to record the voice of the Caller with Ozeki Phone System VoIP PBX
- How to transfer a call to another phone with Ozeki Phone System
- Greet Caller by Name in Python
- Greet Caller by Name in Java