vCard to Cisco IP Phone CMXML Directory

Cisco's 79XX series phones are widely deployed by home-grown PBX users. They have the ability to interact with a directory, but unless you're running Cisco's call manager software and have it integrated into your Windows Active Directory, you're probably not taking advantage of it. Other open-source integration scripts are available to retrieve directory content from relational databases or LDAP servers. These are great methods, but some of us don't want the hassle of running yet another directory server or database since all the contacts we want are stored in our local address book and not in a web-connected database or LDAP server.

Do you have a Cisco IP phone connected to your Asterisk, SER, or other PBX or voice over IP system? Do you want to be able to search or browse your address book from the phone without integrating the phone with a directory infrastructure or a relational database? Do you use Apple's Mac OS X Address Book or any other application that exports vCards? If so, this may be a good solution for you.

What the Script Provides

The script gives you the ability to search your vCard file by name or browse through your vCard file name-by-name using your IP Phone's External Directory feature. You can simply tap Dial to call any entry. The script supports paging (Next page, ...) to get around the phone's silly limitation on number of entries per page, reformats phone numbers automatically to work with the IP Phone, and even labels entries with Work, Mobile, Home, or Main for contacts with multiple phone numbers. View Source Code.

Requirements

  • A web server with PHP enabled
  • A vCard file containing your contacts

vCards to CMXML Directory in 3 Easy Steps

You can have a fully CMXML-compliant, vCard-based directory on your Cisco IP Phone in less than 5 minutes by following these simple steps:

  1. Open your Address Book application, select all your contacts or a contact group, and Export them to a vCard file. In Mac OS X, this is as simple as opening Address Book, clicking on a Group, and selecting File->Export Group vCard...
  2. Download this script to your web documents directory, customize the variables at the top of the script including setting the location of your vCard file.
  3. Edit your SIPDefault.cnf phone configuration file (or your phone's specific configuration file) to include the line:
    directory_url: "http://<yourWebserverIP>/vcdir.php"

After rebooting your phone, you can tap your Directories key and select option 5: External Directory. The script will present you with a search page where you can perform a case-insensitive search of all names in your vCard or you may simply tap Submit to browse the list name-by-name (select More->Next to see the next page).

Extending the Script

See the addStaticEntries() function: here you can add static entries yourself without breaking anything. This script also makes it easy to integrate with a database or LDAP server to get additional entries. All you have to do is call addEntry() on each row returned.

SIP URI Dialing

Barrett Lyon and Victor also put together a great reference on Peer-to-Peer SIP with URI Dialing which shows how to set up your Asterisk PBX to connect directly to other SIP peers based on people's e-mail addresses.

 

Most Popular Links