I saw that you tagged Cisco in our question, so I am guessing you are using Cisco phones, I have only used Cisco phones with Asterisk, so that is all I will be able to cover in my answer.
The first thing you will need to do is add a directory entry to your SIPDefault.cnf file (inside the TFTP directory your phone points to. Here is the line you need to add:
The url must be a web server that is accessible to the phone, not the server. That line can go anywhere in the SIPDefault.cnf file
The file on the server should follow this format:
<CiscoIPPhoneDirectory>
<Title>Directory name (will appear in menu)</Title>
<Prompt>Select a person to call</Prompt>
<DirectoryEntry>
<Name>My Phone</Name>
<Telephone>101</Telephone>
</DirectoryEntry>
</CiscoIPPhoneDirectory>
Unfortunately I am not all that experienced with exchange or gmail. What I gan tell you is that you will need to create a cron job that will run a program every x amount of time that will generate this XML file and put it on the server. Every time the phone accesses the directory it will download the XML file.
This is going to depend on the hardphone in question. Polycom phones will pick up files of a certain name (00000000-directory.xml, I think) from the ftp/tftp/http server that they get their config from. You could conceivably snag the contacts and periodically regenerate that file. This manual has details; see page 4-10 (p64 in the pdf) for details on the 'Local Contact Directory File Format'. Oh, looks like there's a new feature since I last looked: Corporate Directory (p4-34/p88) that is a way to point the phone directly at an LDAP server.
Log into Google Contacts and Export your contacts. There's a link in the top-right to do this, and will offer a choice of three formats: Google CSV, Outlook CSV, or vCard. Choose vCard.
When the "Downloads" box pops up with contacts.vcf, right-click and choose "Copy Download Link." It should look something like this:
All VoIP phones that support directory XML can be made to work with arbitrary data. You just have to program that functionality. You can provide the XML data from a database on the fly via some scripting engine running on the server, or just a static XML file generated at some time. Nothing out of the box I'm afraid.
I saw that you tagged Cisco in our question, so I am guessing you are using Cisco phones, I have only used Cisco phones with Asterisk, so that is all I will be able to cover in my answer.
The first thing you will need to do is add a directory entry to your SIPDefault.cnf file (inside the TFTP directory your phone points to. Here is the line you need to add:
The url must be a web server that is accessible to the phone, not the server. That line can go anywhere in the SIPDefault.cnf file
The file on the server should follow this format:
Unfortunately I am not all that experienced with exchange or gmail. What I gan tell you is that you will need to create a cron job that will run a program every x amount of time that will generate this XML file and put it on the server. Every time the phone accesses the directory it will download the XML file.
EDIT: Here is a link that provides a lot of useful information, including a section on creating the XML file with PHP: http://www.voip-info.org/wiki/view/Asterisk+Cisco+79XX+XML+Services
Hope that helps some!
This is going to depend on the hardphone in question. Polycom phones will pick up files of a certain name (00000000-directory.xml, I think) from the ftp/tftp/http server that they get their config from. You could conceivably snag the contacts and periodically regenerate that file. This manual has details; see page 4-10 (p64 in the pdf) for details on the 'Local Contact Directory File Format'. Oh, looks like there's a new feature since I last looked: Corporate Directory (p4-34/p88) that is a way to point the phone directly at an LDAP server.
Log into Google Contacts and Export your contacts. There's a link in the top-right to do this, and will offer a choice of three formats: Google CSV, Outlook CSV, or vCard. Choose vCard.
When the "Downloads" box pops up with contacts.vcf, right-click and choose "Copy Download Link." It should look something like this:
http //mail.google.com/mail/contacts/data/export?exportType=GROUP&groupToExport=%5EMine&out=VCARD
Go install the vcardcmxml script.
Feed the output of your Google contacts export to the vcardcmxml script.
Use cron to lather, rinse, repeat for updates to the Contacts list as frequently as necessary.
All VoIP phones that support directory XML can be made to work with arbitrary data. You just have to program that functionality. You can provide the XML data from a database on the fly via some scripting engine running on the server, or just a static XML file generated at some time. Nothing out of the box I'm afraid.