SPA IP Phone: Extracting Configuration with spacfg.xml

Document

Fri, 04/07/2017 - 00:23
Nov 23rd, 2010
User Badges:
  • Cisco Employee,

Extracting a Configured Phone's Configuration

 

If you already have a configured and working phone, you can use the spacfg.xml command to display, in a browser, the phone's configuration. You can use this browser output as input for the xml configuration file. For example: Using Google's Chrome use the following URL:
view-source:http://<IP_address_of_phone>/admin/spacfg.xml

 

cap-0117.jpg

 

Copy and paste the contents of the browser into a file named for the MAC address of the phone. For example: spa002584d8d147.xml.

 

Note: Use the View Source menu option for Internet Explorer and Firefox browsers.

 

Forcing a Phone to Retrieve a Configuration

 

At some point in time, you will need to force a previously deployed and operational phone to retrieve a specific configuration. If you have an error in a phone's configuration profile, this is an easy way to direct the phone to the appropriate configuration. The phone will retrieve the configuration and subsequently update its profile rule. Here is how you can achieve this.

 

Force a phone to update its Provisioning tab > Configuration Profile > Profile Rule.

 

http://<Phone_IP_Address>/admin/resync?tftp://<Server_IP_Address>/<new_config>

 

Rebooting a Remote Phone

 

It is often more efficient to reboot a phone via the network. This will cause the phone to reboot and request the file specified in its Profile Rule. Here is how to accomplish this:

 

http://<Phone_IP_Address>/admin/reboot

 

Note: You cannot force a phone resync if the Admin access has been disabled in a profile.

 

Note: you cannot factory reset a password protected phone if you do not have its admin password.

<end>

Loading.
seinelen1 Wed, 10/16/2013 - 11:14
User Badges:

Great, but !


How export sip account auth-id / password readable ?


Thanks

Dan Lukes Sun, 11/02/2014 - 00:20
User Badges:
  • Red, 2250 points or more
  • Cisco Designated VIP,

    2017 Small Business

No way. Ask your administrator (or Telco operator) for the passwords.

Thank you very much for the helpful information on extracting and retrieving configuration. I should do config. extraction from a SPA504G, but I I have a problem: I have a SPA504G with Vodafone configuration and when I connect it to my modem/router and/or to my PC through the ethernet cable it doesn't register and I cannot see it on my PC connected to the domestic WiFi network. On the contrary, if I connect another SPA504G without any configuration (I have carried out the factory reset) I can see it linking directly to its IP address assigned by the modem/router. Is there any chance to extract the configuration of the Vodafone SPA504G without a Vodafone server? Or the only possibility to extract the configuration is to register the Vodafone SPA504G to a Vodafone server?

Dan Lukes Tue, 03/24/2015 - 11:47
User Badges:
  • Red, 2250 points or more
  • Cisco Designated VIP,

    2017 Small Business

This document is dedicated to SPA IP Phones, so it doesn't apply to SPA112 (it is ATA gateway, not SPA IP phone). You didn't mentioned the device model, so I assumed it's an SPA IP phone - which assumption has been wrong. 

I decided not to pollute this document with further unrelated discussion. As your's issue is related to SPA112, create new discussion in ATAs, Gateways and Accessories, please.

Don't forged to mention the firmware of device in question.

 

derek.dombrowski1 Tue, 02/16/2016 - 11:30
User Badges:

Thanks for this article, the reboot and config extraction are very helpful. However, I can't get the config send to work. After sending that command, the web browser responds with an admin login and password, with none of the passwords I set working. Is there a special password? Are there settings that need to be configured to allow this? Can the .xml file be uploaded from a local file, rather than a server? What would the syntax for that look like?

Thanks for your help!

Dan Lukes Wed, 02/17/2016 - 04:59
User Badges:
  • Red, 2250 points or more
  • Cisco Designated VIP,

    2017 Small Business

After sending that command

The original article is rather long. Can be more specific, please ? What "that command" of those mentioned in article you have in the mind ?

none of the passwords I set working

It require admin credentials. The same required to log in to WWW UI as administrator (not the just user).

Can the .xml file be uploaded from a local file, rather than a server? 

No.

derek.dombrowski1 Wed, 02/17/2016 - 12:31
User Badges:

I'm trying to force the phone to retrieve a configuration, using the http://<Phone_IP_Address>/admin/resync?tftp://<Server_IP_Address>/<new_config> command. I don't have a tftp server, so I used http instead. This successfully uploads the new config file to the phone, but the user and admin passwords are changed to something- not the passwords that were active before. I have no idea what the passwords are, it's nothing I set or any sort of logical default passwords. The phone works with the new config, but I can't use the WWW UI to get into the phone, since the new passwords are unknown. At this point the only thing to do is factory reset the phone, which blows away all configurations and makes the whole process of forcing a configuration rather pointless.

In short, after uploading a new configuration file, what are the passwords?

Dan Lukes Wed, 02/17/2016 - 23:17
User Badges:
  • Red, 2250 points or more
  • Cisco Designated VIP,

    2017 Small Business

This successfully uploads the new config file to the phone, but the user and admin passwords are changed to something

It's changed to something specified in the configuration file you ordered to retrieve.

NEVER download unknown configurations to your phone. Such configuration may not only change the admin password, but may disable reset to factory defailt at the same time. Your phone may become irreversibly locked with password you don't know. Fortunately, the configuration in question has not disabled the reset to factory default, so you can recover from unknown password.

Moreover, configuration may even turn your phone into dead brick, so you should not import unknown configurations.


derek.dombrowski1 Thu, 02/18/2016 - 07:13
User Badges:

Thanks for your quick reply! I should have mentioned that this is not an unknown configuration. The configuration I'm trying to load into the phone is a backup of the phone itself- the configuration is identical. I'm trying to do what a configuration backup is designed for: I configured the phone, then downloaded and saved the configuration. Pretending that the phone's config was corrupted or changed, I upload the saved configuration file back into the same phone. This is when the passwords are changed.


Doing some more testing, it seems that when the phone's config is downloaded and saved, in the XML file, the password fields are "*************", I assume to hide the actual passwords. When uploaded into the phone, this is interpreted by the phone as a literal string, so the password is now "*************, or 13 asterisks. I guess you could get around this by modifying the XML file to remove the 13 asterisks, or change it to the desired password (which would then be visible in the XML file). I'd say that this is a bug. If not a bug, then it's an added step that makes this config backup/restore method somewhat cumbersome.

Dan Lukes Thu, 02/18/2016 - 07:45
User Badges:
  • Red, 2250 points or more
  • Cisco Designated VIP,

    2017 Small Business

Phone doesn't offer "backup of configuration" service.

Phone can export current configuration, but sensitive values (some passwords and GPP_Sx values) are excluded. It's documented behavior, so it will not be considered bug.

The expected use case is:

1. one common configuration per company, it's provisioned into phone, the source file can be used to recover common configuration of phone anytime

2. per phone configuration file carrying carrying phone specific configuration - like particular SIP account credentials., Such file can be used to recover particular phone.

Casual users are NOT allowed to change admin level of phone's configuration, so those files can be used to recover a phone's configuration.

Exported configuration is here for debugging, not as a backup.

richard klein Wed, 09/14/2016 - 06:45
User Badges:

I sometimes replace phones that are wall mounted.  Is there a way to edit the XML file to give it a generic mac - I read something about using :  $MA  


Original config Mac:

<Host_Name group="Info/System_Information">SEP7081053CAA12</Host_Name>


Generic Mac?

<Host_Name group="Info/System_Information">$MA</Host_Name>  

Dan Lukes Wed, 09/14/2016 - 12:10
User Badges:
  • Red, 2250 points or more
  • Cisco Designated VIP,

    2017 Small Business

What you mean "generic MAC" ?

Moreover, attributes of Info/* group are read only. You can't change them.

So, please create new discussion (you are slightly off topic here) and describe the goal. We will discuss a solution then.


Thank you very much for the helpful information on extracting and retrieving configuration. I should do config. extraction from a SPA504G, but I I have a problem: I have a SPA504G with Vodafone configuration and when I connect it to my modem/router and/or to my PC through the ethernet cable it doesn't register and I cannot see it on my PC connected to the domestic WiFi network. On the contrary, if I connect another SPA504G without any configuration (I have carried out the factory reset) I can see it linking directly to its IP address assigned by the modem/router. Is there any chance to extract the configuration of the Vodafone SPA504G without a Vodafone server? Or the only possibility to extract the configuration is to register the Vodafone SPA504G to a Vodafone server? Thanks in advance ...

Dan Lukes Tue, 04/04/2017 - 02:27
User Badges:
  • Red, 2250 points or more
  • Cisco Designated VIP,

    2017 Small Business

Don't post same comment twice, please. Also, you should not hijack unrelated thread for new issue.

it doesn't register and I cannot see it on my PC connected to the domestic WiFi network

May be it's current network configuration is unsuitable for the environment you are connecting your phone to. Your test with virgin device seems to support such hypothesis.

Is there any chance to extract the configuration of the Vodafone SPA504G without a Vodafone server? Or the only possibility to extract the configuration is to register the Vodafone SPA504G to a Vodafone server?

A server play no role here. You can extract configuration as long as you know the admin password of the device in question.

Can you mention the goal ?

You either know admin password - then just tweak current configuration to fit new environment. Or you didn't know admin password then reset device to factory default (unless blocked) and configure it from scratch according your wishes.






ok, sorry for that.

The goal is the following: I' m a consultant of the Court of Milan and I've been committed to make an investigation on some SPA303 and SPA504G devices.

Actually, what happens with my domestic network is the following: when I connect through the ethernet cable a virgin device to my modem/router I see that the device get an IP address, when I connect a Vodafone device I see that it doesn't get any IP address (the field remain 0.0.0.0). Do you think it may depend on an admin password? But I can't see where in the menu of the phone I could set the password ...

Dan Lukes Tue, 04/04/2017 - 03:23
User Badges:
  • Red, 2250 points or more
  • Cisco Designated VIP,

    2017 Small Business

when I connect a Vodafone device I see that it doesn't get any IP address (the field remain 0.0.0.0)

Well, it look the dynamic IP is configured, but DHCP server doesn't assign IP to the device for a reason. Catch the DHCP packets between SPA504G and your local DHCP server and/or check the DHCP server logs.

It have nothing to do with admin password.

I can't see where in the menu of the phone I could set the password

You need to be logged as admin to be allowed to change admin password. And admin password is required to log in. So you either know password already or you are not eligible to change it.

For further discussion Create New Discussion, please.


Dan Lukes Fri, 04/07/2017 - 00:23
User Badges:
  • Red, 2250 points or more
  • Cisco Designated VIP,

    2017 Small Business

Please don't hijack other's thread. Moreover, for things unrelated to it's topic. Create New Discussion for your question.