# Identify Caller

## Identify Caller by Name

Now that you have successfully written your first Voice API, we will modify the code to make is more personalized we will include caller name in greeting.

F*or example: “Hello Bob”*

```
<?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>
```

&#x20;In the code above we started off by creating an array $contact. In this array we have listed all the known contacts with their phone number and name. When the call comes in  *from* parameter will be triggered and look in the $contact array to see if we have the phone number in our contacts. If the phone number is located in the contacts then the code will greet the caller with name (*like Hello Bob)* else it will treat the caller unknown and respond “Hello There”.

***Key word used = Say***\
Say Reads the text and convert’s that to audio and play to the caller.

Wohooo!!!! You successfully completed the step and identified your caller by name!!!

Sounds good, now let's. Let's collect users response and so you can transfer call to the right person.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cebodtelecom.com/api/quick-start/identify-caller.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
