5

I've skimmed google on this but haven't found anything too useful.

Is there a way to use Google Contacts with a HardPhone supported by Asterisk PBX?

Google contacts is exposed thru a MSExchange server

Thanks

4 Answers 4

5

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:

directory_url: "http://yourWebsiteOrIp/directory.xml";

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.

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!

1
  • cool, now all thats left is google contacts to xml. Jun 1, 2009 at 15:12
2

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.

4
  • so there's directory listings are seperate from asterisk and vendor specific? May 6, 2009 at 11:12
  • Yes, because they're accessed directly from the phone, not through asterisk. Asterisk also has a 'dial the first 4 letters of the last name of the person you wish to reach'-style directory suitable for being an option from an auto-attendant, but I didn't think that was what you were asking about.
    – pjz
    May 6, 2009 at 12:58
  • that's pretty cool, does asterisk use a similar xml directory for that? Jun 1, 2009 at 15:11
  • I think asterisk's only real directory is the users.conf one, which is more like a .ini file than like xml.
    – pjz
    Jun 1, 2009 at 16:08
2
  1. 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.

  2. 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

  3. Go install the vcardcmxml script.

  4. Feed the output of your Google contacts export to the vcardcmxml script.

  5. Use cron to lather, rinse, repeat for updates to the Contacts list as frequently as necessary.

1
  • that sounds like the solution Aug 11, 2009 at 19:15
1

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.

1
  • thanks, guess I'm going to have to roll my own on this one Jun 1, 2009 at 15:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .