cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2539
Views
5
Helpful
6
Replies

Cisco IP Phone SPA504G Personal Directory

robertpuleo
Level 1
Level 1

I know I can access http://192.6.3.188:2006/pdir.htm and manually enter Names/Ext., but how to I delploy to multiple phones faster? Also is there a guide for the syntax I can use? I don't like how "N=Michael RamosP=147" puts their phone ext. 147 under the name. Can you hide the .ext or have it all on one line? Currently using cloud PBX using vocalocity.com

Thanks in advance!

-Rob

6 Replies 6

Dan Lukes
VIP Alumni
VIP Alumni

Just do the same the browser is doing. Fetch the pfir.htm page, parse item indexes from it, compile response and put it to the phone.

It is simple shell script that can be created by even not so skilled user of a UNIX-like OS.

Or search Google for the solution (if I remember correctly, there is a Windows application, but I forgotten the name).

Or pay Cisco for support ...

Thanks for the fast response. I called Cisco and they told they don't know how to help since I'm using vocalocity.com for cloud PBX. I tried to google solution before posting with no luck too. Any way you can provide me the script to automate this process? :-)

Well, I forgotten for whom and where I created the script. But I can recreate it for you. The first one is "get" script. It will print content of personal directory as text file. Note that text of my message may be wrapped so I encapsulated it into table. Every row of table's right column is one line of text script. The script take one argument - the IP or name of phone in question. The result is written to stdout.

#Line
1#!/bin/sh
2

ip="$1"

3

/usr/local/bin/wget -q -O /dev/stdout "http://$ip/pdir.htm" \

4

| /usr/bin/sed '/

/,/<\/form>/!d' \

5

| /usr/bin/sed '/

/,/<\/table>/!d;/^//;s/maxlength=2047>\

6

7

| /usr/bin/sed '/^

\([0-9]*\)\. /\1|\3/'

The second one is the "put" script. It take two arguments - the first one is IP or name of phone in question, the second one is the name of file with new content. The format of the file is the same as in the file saved by "get" script.

#Line
1#!/bin/sh
2

ip="$1"

3file="$2"
4

/usr/local/bin/wget -q -O /dev/stdout "http://$ip/pdir.htm" \

5

| /usr/bin/sed '//,/<\/form>/!d' \

6

| /usr/bin/sed '/

/,/<\/table>/!d;/^//;s/maxlength=2047>\

7

8

| /usr/bin/sed '/^

\([0-9]*\)\. /\1|\2/' >/tmp/phl.$$.1

9

NPDIR=$( /usr/bin/join -t '|' -1 1 -2 1 -o 1.2,2.2 /tmp/phl.$$.1 "$file" | /usr/bin/sed 's/=/%3D/g;s/ /+/g;s/|/=/' | tr '\n' '&' )

10

/usr/local/bin/wget -O /dev/stdout -q -S "--post-data=${NPDIR%%&}" "http://$ip/pdir.csc" 2>&1 >/dev/null | /usr/bin/head -1

11

rm /tmp/phl.$$.*

Note:

  1. Values needs to be url-encoded for POSTing. But few chars are properly urlencoded by sed on line 9 only.
  2. '|' char is used as delimiter in file so it can't be used in text
  3. Not tested so much, needs to be considered as dirty hack, Despite of it, you should rate my reply by five stars ... ;-)

Hi Rob,

There is also a small programm called : Linksys spa personal directory manager that helps you deploy the phonebook to multiple spa504 phones at once. It is about 2 or 3 dollars and works great. You can also import a file and then upload it to the phones. Works only for the spa504.

http://www.tachytelic.net/2011/01/updated-linksys-spa-personal-directory-manager/

Hope this helps.

Kind regards,

Paul Verstappen

Voips BV

www.voips.nl

Note that both scripts above has been broken badly during migration from old CSC UI to the new one. It take about hour to create those script for the first time and I really have no power to recreate them now.

I asked that the broken message has been restored from old system here but no response.

So sorry to saying it, but if you have problem with personal directories, take products of other vendors into consideration. Cisco have no solution for you, in advance, Cisco destroy other works trying to help you. Well, it's the Cisco's way of doing business ...

I'n ready to delete this message when when broken message bcome restored. Of course, it require another issue to be solved by Cisco ...

Yes, I'm frustrated!

 

Dan Lukes
VIP Alumni
VIP Alumni

If your's firmware is recent enough, read Configuring Personal Address Book.