Cebod Telecom
  • Introduction
  • Customer Onboarding
  • FAQs (Frequently Asked Questions)
  • Cebod Telecom Web Portal
    • Dashboard
    • Activities
      • Call records
      • Messages
      • Active calls
      • SMS records
      • Faxes
    • Phone System
      • Phone Numbers
      • IVR (Auto Receptionist)
      • Users (Extensions)
        • Dynamic Caller ID
      • Manage Devices
      • Manage Groups
      • Manage Conferences
      • Postcall Actions
      • Webhooks
      • Time Conditions
      • Call Blocking
      • Call Center
        • Active Calls
        • Agents
        • Queue
        • Agents to queue
        • Agents Status
        • Agent Statistics
    • Tools / Settings
      • Manage Phone Lines
      • Add 911 Address
      • SMS
      • International Calling
      • Outbound Rates
      • Manage Recordings
        • AI Text-to-Speech Feature
      • Global Settings
        • Daily Spent Control
      • Voicemail Greetings
      • CNAM
    • My Account
      • Profile
      • Change Password:
      • Add Balance
      • Payment History
      • Vouchers
      • Invoices
      • Auto Refill
      • Logout
  • How To's
    • Set up BLF
    • Register a New Account
    • Setup Call Forwarding
      • Call Forwarding to an Extension
      • Call Forwarding Manually to a Cell Phone
    • Dial-By-Name Directory
    • Voicemail
      • Setting up the Voicemail Menu
      • Accessing Voicemail
      • Navigate through the Voicemail Menu
    • Provisioning
      • Cisco 8841
    • Setup Speed Dial
    • Cebod Telecom Free Applications
      • MS Windows Desktop Softphone
      • Mac Desktop Softphone
      • Apple IOS Mobile App
      • Android Mobile App
      • Desktop SMS/MMS Application
      • Click to Call Browser Extension
    • GS Wave
    • Setting Up Whisper Announcement
  • Enable Call Recording
  • Features
    • Manage Phone Features
      • Call Block
      • Call transfer
      • Call Queue
      • Call Center
      • Active Call Features
      • Ring Groups
      • Call Forward
      • Call Recording
      • Call Park
      • Paging
      • Voicemail
      • Call Monitoring
      • Hide Caller ID
    • Missed Call SMS
    • Missed Call Email Notification
    • 3-Way Calling
    • Conference Bridge
    • Setting up Time Condition
    • Setup Email FAX - Incoming
    • Sending eFax using email
  • API
    • Voice API
    • Quick Start
      • Identify Caller
      • Collect Response
    • didML reference doc
      • Voice API reference params
      • Voice API response
      • didML Verbs
        • <dial>
          • <client>
          • <conference>
          • <number>
          • <queue>
          • <sip>
        • <enqueue>
        • <fax>
        • <gather>
        • <hangup>
        • <pause>
        • <play>
        • <postcall>
        • <record>
        • <recordcall>
        • <redirect>
        • <reject>
        • <say>
        • <sms>
Powered by GitBook
On this page

Was this helpful?

  1. API
  2. Quick Start

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.

For 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>

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.

PreviousQuick StartNextCollect Response

Last updated 6 years ago

Was this helpful?