GXP 2000 XML phonebook from VCARD
Posted by rene on 09 Jan 2007 at 08:47 pm | Tagged as: Hacking
Using my Grandstream GXP 2000 since a few days, I liked to get all my adresses from an electronical addressbook to it. I found the possibillity to upload a phonebook as XML (see [1] and [2]) and so I wrote a small script to convert VCARDS (as for instance exported from kaddressbook) into the appropriate format.
You can download version 0.2 of the script at http://absorb.it/hacked/vcard2gxp.awk
Just call it with the addressbook (in the below example the kde kaddressbook) as a parameter and you can send the output to the file you offer your phone than (in my case /var/www/localhost/htdocs/grandstream/gs_phonebook.xml)
vcard2gxp.awk /home/user/.kde/share/apps/kabc/std.vcf >/var/www/localhost/htdocs/grandstream/gs_phonebook.xml
just to be sure:
You don’t like to end up your address book at any public webserver. So the example works in my local network, the webserver is not reachable from the outside.
if you have an public webserver (running apache), than you might block any public access by an adapted .htaccess file like this:
Order deny,allow
Deny from all
Allow from 192.168.1.2 # fill in the IP of your GXP
It should work, but you better try the blocking before releasing your address book to the world 😉
Hello
I have a problem with your Script, if I use it I get the following Error message:
awk: ./vcard2gxp.awk:41: switch ($i) {
awk: ./vcard2gxp.awk:41: ^ syntax error
awk: ./vcard2gxp.awk:42: case „N“ : {
awk: ./vcard2gxp.awk:42: ^ syntax error
awk: ./vcard2gxp.awk:46: case „TEL“ : {
awk: ./vcard2gxp.awk:46: ^ syntax error
Do you know what I have done wrong? I start the script with:
./vcard2gxp.awk contacts.vcf
both files are in the actually directory.
I have installed awk in Version 3.1.5.
Thanks for reading my message.
Fabian
Hi,
no Idea, should work this way. Maybe the downloaded script is corrupt? Did you made a ’save as‘ on the link? Download it again or check the md5sum of the script:
~ $ md5sum vcard2gxp.awk
af1b5f2e31b999150a575a48da2b054e vcard2gxp.awk
~ $
Regards,
Rene