How to get a CP-524 to pick up per-phone configuration from it's UC500?

Answered Question
Feb 14th, 2010

Marcos says that a CP-524 phone can request per-phone configuration data from it's TFTP server on boot (for example, to raise the handest input gain by supplying an XML file).  The suggested solution is to turn on debug tftp events and figure out which file to supply.


OK, so here is where I'm at with it so far.


The only TFTP debug which contains a MAC address of any sort upon phone reset is this one:


000409: Feb 15 06:26:19.801: TFTP: Looking for SEP001DE5EA9878.cnf.xml
000410: Feb 15 06:26:20.321: TFTP: Opened system:/its/XMLDefault524G.cnf.xml, fd 14, size 1237 for process 183
000411: Feb 15 06:26:20.337: TFTP: Finished system:/its/XMLDefault524G.cnf.xml, time 00:00:00 for process 183


As I read the above trace, it seems that SEP001DE5EA9878.cnf.xml is being served up from system:/its/XMLDefault524G.cnf.xml.


OK, so in theory I could configure:


tftp-server flash:custom/SEP001DE5EA9878.cnf.xml alias SEP001DE5EA9878.cnf.xml


But it doesn't work.  The tftp-server accepts the command, but when SEP001DE5EA9878.cnf.xml is looked-for at the next phone reset, it's still served up from system:/its/XMLDefault524G.cnf.xml



Is this the file I should be supplying Marcos (it feels a bit wrong, admittedly)?  If not, what's the right one?  If so, how can I make it work?


My full 'restart a 524' session trace (complete with debug tftp events) is given below:


UC520#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
UC520(config)#ephone 5
UC520(config-ephone)#reset
resetting 001D.E5EA.9878
UC520(config-ephone)#
000437: Feb 15 06:43:13.609: %IPPHONE-6-UNREGISTER_NORMAL: ephone-5:SEP001DE5EA9878 IP:10.1.1.11 Socket:1 DeviceType:Phone has unregistered normally.
000438: Feb 15 06:43:15.297: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1/6, changed state to down
000439: Feb 15 06:43:15.297: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to down
000440: Feb 15 06:43:15.297: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan100, changed state to down
000441: Feb 15 06:43:16.297: %LINK-3-UPDOWN: Interface FastEthernet0/1/6, changed state to down
000442: Feb 15 06:43:23.889: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up
000443: Feb 15 06:43:23.889: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan100, changed state to up
000444: Feb 15 06:43:24.889: %LINK-3-UPDOWN: Interface FastEthernet0/1/6, changed state to up

000445: Feb 15 06:43:25.889: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1/6, changed state to up
000446: Feb 15 06:43:26.329: TFTP: Looking for SEP001DE5EA9878.cnf.xml
000447: Feb 15 06:43:26.849: TFTP: Opened system:/its/XMLDefault524G.cnf.xml, fd 14, size 1237 for process 183
000448: Feb 15 06:43:26.865: TFTP: Finished system:/its/XMLDefault524G.cnf.xml, time 00:00:00 for process 183
000449: Feb 15 06:43:26.869: TFTP: Looking for cp524g-8-1-17.BIN
000450: Feb 15 06:43:26.869: TFTP: Opened flash:/phones/521_524/cp524g-8-1-17.bin, fd 14, size 892511 for process 183
000451: Feb 15 06:43:26.893: TFTP: Looking for RingList.xml
000452: Feb 15 06:43:26.893: TFTP: Opened flash:/ringtones/RingList.xml, fd 15, size 2823 for process 213
000453: Feb 15 06:43:26.909: TFTP: Finished flash:/ringtones/RingList.xml, time 00:00:00 for process 213
000454: Feb 15 06:43:26.913: TFTP: Looking for DistinctiveRingList.xml
000455: Feb 15 06:43:26.917: TFTP: Opened flash:/ringtones/DistinctiveRingList.xml, fd 15, size 2823 for process 213
000456: Feb 15 06:43:26.937: TFTP: Finished flash:/ringtones/DistinctiveRingList.xml, time 00:00:00 for process 213
000457: Feb 15 06:43:27.013: TFTP: Looking for English_United_States/524-dictionary.xml
000458: Feb 15 06:43:27.117: TFTP: Looking for English_United_States/SCCP-dictionary.xml
000459: Feb 15 06:43:27.117: TFTP: Opened system:/its/united_states/SCCP-dictionary.xml, fd 15, size 2740 for process 213
000460: Feb 15 06:43:27.129: TFTP: Finished system:/its/united_states/SCCP-dictionary.xml, time 00:00:00 for process 213
000461: Feb 15 06:43:27.249: TFTP: Looking for English_United_States/SCCP-dictionary.xml
000462: Feb 15 06:43:27.249: TFTP: Opened system:/its/united_states/SCCP-dictionary.xml, fd 15, size 2740 for process 213
000463: Feb 15 06:43:27.265: %IPPHONE-6-REG_ALARM: Name=SEP001DE5EA9878  Load=8.1.17 Last=Hard+CMERequested
000464: Feb 15 06:43:27.265: TFTP: Finished system:/its/united_states/SCCP-dictionary.xml, time 00:00:00 for process 213
000465: Feb 15 06:43:27.465: %IPPHONE-6-REGISTER: ephone-5:SEP001DE5EA9878 IP:10.1.1.11 Socket:2 DeviceType:Phone has registered.
000466: Feb 15 06:43:41.725: TFTP: Looking for /CP-524G-cfg.xml
000467: Feb 15 06:43:41.725: TFTP: Opened flash:/phones/521_524/cp-524g-cfg.xml, fd 15, size 401 for process 213
000468: Feb 15 06:43:41.729: TFTP: Finished flash:/phones/521_524/cp-524g-cfg.xml, time 00:00:00 for process 213
000469: Feb 15 06:43:51.885: TFTP: Finished flash:/phones/521_524/cp524g-8-1-17.bin, time 00:00:25 for process 183
Correct Answer by Maulik Shah about 7 years 1 hour ago

The CP524 operates in SPCP mode with the UC500 - i.e. the SPA configuration file method is not supported when in this mode. It may work in a hacked manner as you found out but this is unsupported currently. The parameters that you can change per phone when in SPCP mode are listed at below:


http://www.cisco.com/en/US/docs/voice_ip_comm/cucme/admin/configuration/guide/cmelabel.html#wp1024573


We will add this to our list of roadmap items.

Correct Answer by Steven Smith about 7 years 1 week ago

The CP-524 cannot be changed into a SIP mode.  SIP mode doesn't exist for this phone, only SPCP with the UC500 products.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
Loading.
dtbullock Mon, 02/15/2010 - 21:29

OK, so according to the Cisco Unified CME Administrator Guide, in order to stop the phone from getting its .cnf file from system: you need to configure:


telephony-service

  cnf-files flash:

  cnf-files perphone



Immediately after doing this (ie. without having actually supplied any per-phone configuration files), the phone makes these TFTP queries on reset (repeatedly, in a desperate attempt to configure itself):


000821: Feb 16 05:16:34.703: TFTP: Looking for SEP001DE5EA9878.cnf.xml
000822: Feb 16 05:16:34.707: TFTP: Looking for XMLDefault524G.cnf.xml
000823: Feb 16 05:16:34.711: TFTP: Looking for XMLDefault.cnf.xml


It even seems like I ought to be able to provide XMLDefault524G.cnf.xml for every phone I don't want to specially configure, and provide a per-phone configuration file for each phone I want to customize.


One would like to simply alias the existing system:/its/XMLDefault524G.cnf.xml into the TFTP namespace using:


tftp-server system:/its/XMLDefault524G.cnf.xml alias XMLDefault524G.cnf.xml


That's no good though ... 0 bytes (of the 1237 byte file) are served up:


001255: Feb 16 05:26:56.727: TFTP: Looking for SEP001DE5EA9878.cnf.xml
001256: Feb 16 05:26:56.731: TFTP: Looking for XMLDefault524G.cnf.xml
001257: Feb 16 05:26:56.731: TFTP: Opened system:/its/XMLDefault524G.cnf.xml, fd 14, size 0 for process 183
001258: Feb 16 05:26:56.735: TFTP: Finished system:/its/XMLDefault524G.cnf.xml, time 00:00:00 for process 183
001259: Feb 16 05:26:56.739: TFTP: Looking for XMLDefault.cnf.xml




Anybody got a (CCA-friendly) strategy for causing the relevant files to exist on flash: ?


thanks,

David.

dtbullock Mon, 02/15/2010 - 21:39

OK, that would be:


UC520(config)#telephony-service
UC520(config-telephony)#cnf-file location flash:
UC520(config-telephony)#create cnf-files
Creating CNF files
UC520(config-telephony)#end


After doing this, there are some files on the flash that weren't there before:


UC520#dir flash:its
Directory of flash:/its/


  181  -rw-          56  Feb 15 2010 21:45:14 -08:00  SEPDEFAULT.cnf
  182  -rw-        3950  Feb 15 2010 21:45:14 -08:00  XMLDefault.cnf.xml
  183  -rw-        1413  Feb 15 2010 21:45:16 -08:00  SEP001DE5EA9878.cnf.xml
  184  -rw-         903  Feb 15 2010 21:45:16 -08:00  united_states_7960-tones.xml
  185  -rw-        8777  Feb 15 2010 21:45:16 -08:00  united_states_7960-font.xml
  186  -rw-        1313  Feb 15 2010 21:45:16 -08:00  united_states_7960-kate.xml
  187  -rw-       19750  Feb 15 2010 21:45:18 -08:00  united_states_7960-dictionary.xml
  188  -rw-        2740  Feb 15 2010 21:45:18 -08:00  united_states_SCCP-dictionary.xml


128184320 bytes total (24387584 bytes free)


Although sadly, no tftp-server entries:


UC520#sh run | se tftp-server.*its
UC520#



So I'll grumble ahead and make those ...


Message was edited by: David Bullock on account of bad spelling

dtbullock Mon, 02/15/2010 - 21:57

OK, so configuring:


tftp-server flash:/its/XMLDefault.cnf.xml alias /XMLDefault.cnf.xml


gets us back to where we started - the phone boots as it did before we changed the cnf-files location.  (Interestingly, the phone still requests /CP-524G-cfg.xml towards the end of the boot process.)


So now presumably, we simply edit flash:/its/SEP001DE5EA9878.cnf.xml to our liking to configure it. But here's the rub:



{524G Feb 15 2010 21:45:16}
0
false



.... etc


Isn't much at all like the syntax:


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
http://www.sipura.net/xsd/CP524SG" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sipura.net/xsd/CP524SG http://www.sipura.net/xsd/CP524SG/CP524SG-8-1-16.xsd">

6


It seems that -cfg.xml does not equal .cnf.xml !


Sigh.  So Marcos, how do I configure the the gain on an individual handset?  Is there some option in the which says "also try to get your per phone config" that I need to turn on?  If so, what is the syntax?


thanks,

David


(who learnt a lot just now about CME in general, but who will be very frustrated if there is in fact NOT a way to configure the handset input gain on a per-phone basis).

dtbullock Mon, 02/15/2010 - 22:03

PS. It's a good thing that hacking files in flash:/its/ is not the way to supply per-phone additional configuration parameters anyhow, because these presumably get clobbered each time you do a create cnf-files

Marcos Hernandez Tue, 02/16/2010 - 08:12

Hi David,


I will look into this. In the meantime, you could change your SPA phone to SIP, change whatever you want via the web interface and then change it back to SPCP. This will give you a  workaround for the few phone you want to change, without affecting others.


Marcos

Correct Answer
Steven Smith Tue, 02/16/2010 - 09:39

The CP-524 cannot be changed into a SIP mode.  SIP mode doesn't exist for this phone, only SPCP with the UC500 products.

dtbullock Thu, 02/18/2010 - 02:46

Well, Extracting/Pushing a Device's Configuration references  Asterisk Zero-Touch Configuration Guide which references the Cisco IP Telephony Devices Provisioning Guide, and after reading it all, I have the notion that that for most SPAxxx phones, and the fact that UC500 leaves the phone in a state where it will attempt to get /CP-524G-cfg.xml in the late stages of the phone's configuration, it would seem we have the opportunity to do this:



  Yes
  10
  tftp://192.168.2.245/xml/spa$MA.xml


The phone expands the variable $MA to its own MAC address.  It seems that we can then (for the phones we wish to) put files like /xml/spa001de5ea9878.xml on the tftp server, again supplying a .


It's not quite clear to me whether a phone receiving the above configuration simply fetches and processes the directive each time it is reynched, or whether it causes the phone to fetch its configuration from spa$MA.xml next time (thus spurning /CP-524G-cfx.xml) for next time.


Can you comment on:


1) whether you expect this will work for CP-52x phones as well (which are unlike SPA* phones in some respects);

2) whether doing this is likely to interact poorly with the UC500 device (and if so, any alternative ideas?);

3) whether doing this is supported by TAC / Small Business Support Centre or not?


thanks!

David

Marcos Hernandez Thu, 02/18/2010 - 15:09

I need some time to digest this last post. The provisioning guide for SIP mode has some tools that are not (to my knowledge) available in SPCP, but I might be wrong. Give me a day or two to make some inquiries and I will get back to you ASAP.


Marcos

dtbullock Mon, 02/22/2010 - 22:45

Well, I can confirm that if you use the following for /CP-524G-cfg.xml


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

http://www.sipura.net/xsd/CP524SG" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://www.sipura.net/xsd/CP524SG http://www.sipura.net/xsd/CP524SG/CP524SG-8-1-16.xsd">

  Yes

  10

  tftp://192.168.11.1/xml/spa$MA.xml


... then the phone will request tftp://192.168.11.1/xml/spa$MA.xml (expanding out the $MA variable to its MAC address), 10 seconds after it has reset.

Using this technique, I can set the Handset_Input_Gain of an individual phone.


However, it's not very pretty.  The CP-524 processes the every seconds after the phone has been reset.  This means:

  • there is a period of time immediately after the phone has reset, but before it has processed the , when the new settings have not been applied
  • the phone repeatedly processes every ... not just immediately after a reset.

Also contributing to the ugliness is:

  • the IP address of the router is hard-coded into a file on flash, that isn't managed by a 'generate cnf-files' (or by CCA), so if the router's IP address changes, the per-phone customisations will be orphaned.

So I'm still looking for another way.

dtbullock Tue, 02/23/2010 - 16:42

And I would like some assitance to find that other way, seeing as the claim that one *can* distribute per-phone configuration of Handset_Input_Gain has not been retracted.


Update: I've got PDI case #     100223-000423 working on this too.

Correct Answer
Maulik Shah Thu, 02/25/2010 - 11:02

The CP524 operates in SPCP mode with the UC500 - i.e. the SPA configuration file method is not supported when in this mode. It may work in a hacked manner as you found out but this is unsupported currently. The parameters that you can change per phone when in SPCP mode are listed at below:


http://www.cisco.com/en/US/docs/voice_ip_comm/cucme/admin/configuration/guide/cmelabel.html#wp1024573


We will add this to our list of roadmap items.

dtbullock Thu, 02/25/2010 - 20:13

Hi, thanks for the reply.  It would be great if you could put Handset_Input_Gain on the list of supported parameters.



So in summary on this quest, we've found out the following about CP-52x phones with UC520 and software pack 8.0:


  1. there isn't an SPCP-supported way of setting Handset_Input_Gain per-phone, although for the supported parameters, you can do it;
  2. the phone always requests /CP-524G-cfg.xml for it's SPA-style configuration, heedless of the 'cnf-files perphone' setting;
  3. it's 'not supported' to 'hack' /CP-524G-cfg.xml for any purpose;
  4. you can hack it in such a fashion that it will request a per-phone configuration (see earlier in this thread), but at the expense of:
    1. the phone not acquiring its configuration until seconds after it has been reset;
    2. the phone constantly re-acquiring its configuration every seconds;
  5. Marcos was failing to distinguish between SCCP 'cnf.xml' files and SPA 'cfg.xml' files when he commented saying "You can create XML files per phone (using their MAC address)".


Further possible research areas are:


  1. whether the Handset_Input_Gain setting 'sticks' when you configure it and subsequently remove the /CP-524G-cfg.xml file and reset the phone;
  2. whether the CP-52x uses the default 5-minute setting anyhow if you don't touch in /CP-524G-cfg.xml;
  3. whether there is any way to force the phone into requesting a per-phone SPA-style configuration, by setting one of the supported parameters.


I'll just quietly note that 11 calendar days have elapsed between the time I raised this query and it reached a conclusion.  Certainly, the PDI Help Desk was more responsive than this community-based support.  Can't say I'm impressed as such.

Actions

This Discussion