Extracting / Pushing a Device's XML Configuration

Document

Feb 17, 2009 6:53 AM
Feb 17th, 2009

Ever find yourself wishing that you could save the configuration of a SPA phone, ATA, or IP PBX, and then restore it later?

[Edit October 2nd 2009: not supported by PAP2T, SPA2102, or SPA3102 devices]

Of course you can use the SPA9000 Setup Wizard to save and restore SPA9xx IP phone backups in a SPA9000 Voice System deployment.

But what if you just want to tweak a device's configuration and then restore it, and you don't want to use the Wizard?

You will need:

  - a TFTP server [search for a free one on the Internet]

  - a simple text editor that does not insert characters on its own [vim, for example]

Sometimes I find it very useful to extract the XML configuration from a device with the following command:

http://<IP_of_device>/admin/spacfg.xml

For example: http://192.168.0.45/admin/spacfg.xml [where the SPA device's IP address is 192.168.0.45]

I then copy and paste the output into a plain text file.

I like to name the file for the device I'm working with, for example: SPA962_feb172009.xml.

I edit the file with vi or vim, but not NotePad because it can insert unwanted characters.

Assume I called the file SPA962_feb172009.xml

I can now edit SPA962_feb172009.xml and then push the modified configuration back to the device with the following command:

http://<IP_of_device>/admin/resync?tftp://<IP_of_TFTP_server>/SPA962_feb172009.xml

Example: Assume IP address of the:

  SPA device is 192.168.0.45

  TFTP server is 192.168.0.200

The URL would be:

http://192.168.0.45/admin/resyn?tftp://192.168.0.200/SPA962_feb172009.xml

The device will request the file name that I specified, retrieve the file from the TFTP server, reboot, load, and run the new configuration.

Enjoy.

<end>

Average Rating: 0 (0 ratings)

Comments

Patrick Born Tue, 09/08/2009 - 13:21

Hi esmeraldaduran,

That is not a download URL. It is an example of what you type in the browser. You need to replace <IP_of_device> with the IP address of the SPA942 or SPA3102 for example.

For example, your device's IP address is 192.168.14.99 so you would change

http://<IP_of_device>/admin/spacfg.xml to be http://192.168.14.99/admin/spacfg.xml

Good luck.

Regards,

Patrick

------------

esmeraldaduran Tue, 09/08/2009 - 18:28

Hi Patrick

Yes sure I changed the ip address and show up the error 404 no found

I have a spa8800 I don’t know if the process is the same to SPA942

Regards

atcomputing Fri, 10/02/2009 - 05:44

When using Linux, another way to get the config is

$ wget $(SPA942HOST)/admin/spacfg.xml --output-document=SPA942.xml

Patrick Born Fri, 10/02/2009 - 07:57

Indeed. For those without Linux/UNIX, you can use the GNU wget SourceForge project which provides Windows support.

Thanks for contributing atcomputing.

Regards,

Patrick

----------

lukasz_naumowicz Fri, 11/27/2009 - 06:26

Hi Patrick,

Is there possibility to push configuration to PAP2T using the same command syntax like in the phones?

I'm asking beacuse I've seen the added comment on the top of the documment, and we need such thing for PAP2T ATAs.

Thanks,

Lukasz

scd2zaken Tue, 01/12/2010 - 13:38

Patrick,

We have developm. a small tool called cid4u.exe .. to collect calls from the SPA942.
I have used the information who is available in the spacfg.xml during call.
Do you think I can use this file (status of the phone) also to push a phone number TO it .. I want to give the tool .. also ' push to call'  functionality.

I can not find any extra information to give a ' push' call to the phone .. I'am believing that this option is not available .. is it ?

Regards,

Eric Oosterbaan

www.uc500.info

trotty1970 Tue, 10/26/2010 - 13:27 (reply to scd2zaken)

Patrick,

I have setup the tftp server to pick up an XML file I have saved but am not having much joy.

I issue the browser command:

http://192.168.1.10/admin/resync?tftp://192.168.1.100/spacfg.xml

The SPA9000 then generates the following screen message:

SPA will resync the profile when it is not in use  and reboot
you can click HERE to return to the  configuration page

However, it never attempts to talk to the tftp server. I have turned off the firewall and tried the usual tricks but no luck. Can I force it to resync or have I made a basic error?

uhudson_z Thu, 11/11/2010 - 16:08

That was a very well written article, and the best documentation to date on the subject, however

It doesnt work

"SPA will rysync the profile when it is not in use and reboot

you can click here to return to the configuration page"

How to force it to be "not in use" and make it reboot and get the appropriate file? The SPA seems to ignore dchp option 66 tftp, and this way is about my last option

sourceminer Mon, 02/21/2011 - 08:01 (reply to uhudson_z)

I agree uleave, Love the attempts to make great documentaion, however I wonder if support is even testing against the documets. I have had this forum post explain exactly what is being done and still have yet to get an answer that is not a cop out or generic response.

https://supportforums.cisco.com/thread/2068338?tstart=0

Also regarding this thread: https://supportforums.cisco.com/docs/DOC-13059

Although I understand that a phone will reboot after these items are changed, doesnt explain why they continue to reboot.

Patrick Born Tue, 12/01/2009 - 15:28

Hi Lukasz,

1. Use the PAP2T SPC utility to generate a configuration template.

2. Modify the template to make a configuration file for the PAP2T.

3. Cause the PAP2T to resync so that it retrieves its configuration from a provisioning server.

The instructions in this SPA500 family phone document are mostly valid for the PAP2T:
https://supportforums.cisco.com/docs/DOC-9954

Regards,

Patrick

----------

Actions

Login or Register to take actions

This Document

Posted February 17, 2009 at 6:53 AM
Stats:
Comments:11 Avg. Rating:0
Views:12064 Contributors:8
Shares:0

Related Content

Documents Leaderboard