[cisco-voip] Making phone changes through SQL ?

Robert Singleton rsingleton at novateck.com
Wed Oct 4 11:01:10 EDT 2006


On Wed, 2006-10-04 at 08:23 -0500, Tech Guy wrote:
 
> This leads me to want to confirm some thing.  I am almost 99.9%
> positive that you can change just about anything you want through SQL,
> if it is in the database you can change it and as long as you do it
> right there shouldn't be a problem.

In theory, yes. The tricky part is understanding the database design
intimately, and for that reason, Cisco doesn't support manipulating the
database directly. They recommend using the AXL interface, and it is my
understanding that BAT and even CCMAdmin itself is written to the AXL
interface. Even so, you still have to understand the database very well.

The problem comes from the fact that the database is actually pretty
well designed, which means that there is almost no data duplicated. If
there is something that can even potentially be shared amongst multiple
entities, there is a table for it and and index to the table, not the
value of the thing, is usually what needs to be changed. These index
values are *NOT* people friendly references, typically something like
"C44A2B25-FA5D-4B2E-897D-6AD1B11C4C20", which is, incidentally, the
foreign key reference to the PhoneTemplate table for my own desk phone.
To make a change that might be a checkbox on CCMAdmin, you might have to
change pointers in several databases, based on foreign keys in databases
you may not have thought were involved. It's also very easy to
accidentally change or even delete all records in a database, with only
the restoral of backup files for recovery.

That all having been said, I use a few isql one-liners to change
information that I have determined through experimentation to be safe to
change. The most commonly used is a command line tool to set forwarding
destinations. For example, on a command line, I type "forward 2000785
2000411" to forward my extension to the helpdesk dispatcher. Another
oneliner script lets me change the device on a test phone entry so that
we can quickly test phones returning from branches. Both of those,
however, change one field value in one table.

I ran a script to correct an old misunderstanding of the function of
Maximum Number of Calls and Busy Trigger on thousands of lines on nearly
a thousand phones. That was trickier, because I could not change it on
*all* phones and the selection criteria were complex. I ended up doing
it in several passes, each changing another group of phones meeting
different criteria.

So, to sum up: 

1. Your changes can most likely be done directly in SQL
2. It may take as long to determine what you need to change as it might
to do the changes manually.
3. Cisco is unlikely to be very helpful if you do screw it up.
4. If succesful, you will be viewed by users and management alike as a
guru afterall. 

> Earlier this week I asked about changing the phone softkey field
> through BAT.  Can't seem to find an option to do this within BAT,
> people informed me that you could kinda do this through the device
> pool.  Helpful yes, but not exactly.
>  
> See the problem with the device pool is that only works if the phones
> are set to "none" for the softkey field so then they inherit the
> setting from the device pool.  Well apparently when they had
> CallManager setup over here someone set all the softkey fields on each
> phone to the same.  So, changes to the device pool are not taking
> affect for me.

It's not a happy thing to realize, but I have the same problem here.
Phone button template, Softkey template, etc, is set, as we were taught
by the integrator that installed our system, in each telephone, though
it should be set in each Device Pool unless something specifically
requires a different template (adding a 7914, for example). At first
blush, I have at least 970 entries to check, though probably not *all*
of them will need to be changed.

Robert



More information about the cisco-voip mailing list