OK seems I figured it out...
So you have two possible servers to run CME : SIP (voice register global) and SCCP (telephony-service).
When you create ephone, you basicaly create SEPAAAABBBBCCCC.cfg.xml file for that phone (assume MAC address is aaaa.bbbb.cccc)
When you create voice register pool, you create SIPAAAABBBBCCCC.cfg.xml file for that phone ( MAC address is aaaa.bbbb.cccc)
When the phone boots it looks for its config files in this order:
SEPAAAABBBBCCCC.cfg.xml
SIPAAAABBBBCCCC.cfg.xml
So if both files exist (both ephone and voice register pool with same MAC), it will take SEP file, and the phone will remain (or upgrade to) SCCP
Useful command that shows which files exactly you have on tftp is :
show telephony-service tftp
show voice register tftp
debug tftp events >> when powering the phone
Now for the tricky part:
If you had your phone configured as ephone, and you want to upgrade it to SIP, just by "no ephone" command you won't remove the SEP file (alias to be correct). And the phone will still find its SEP file and register with SCCP, although appearing "empty" - no ephone-dn. So you have to remove the alias line from the output of "show telephony-service tftp" command.
Only then will phone when booting come to the part to download SIPAAAABBBCCC file...
Phew...
Hope it's useful :) (At least I'l know where to find it next time)
Goran Pilat