cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1160
Views
0
Helpful
4
Replies

CUCM, SQL to attach second DN to a phone

kumar4321
Level 1
Level 1

hi,
I needed to create 300 phones with 3 DNs each i.e a total of 900 DNs.
First I created 900 DNs using SQL.
Then I added 300 phones using SQL. Although I wanted to attach three DNS from the already created DNs to each phone, the SQL would only allow me to attach just one DN to each phone.
Now I need to attach the remaining two DNs to each phone. For that I have so far figured out that I need to add one row for attaching one DN to one phone, so I need to add 600 rows altogether to the table.
I need help with SQL statement to insert data into devicenumplanmap. Below is the example statement I am trying to use, but it throws up an error '115'..
run sql INSERT INTO devicenumplanmap (fkdevice,numplanindex,fknumplan,tkringsetting) VALUES ('1c586191-c8a2-1a80-0fdc-aa67e451f58e','2','ba818ed8-8688-4755-aeff-20162c0dacad','4');
I have retrieved the values of fkdevice and fknumplanindex by quering the device table and the numplan table.
any help please ? I do not want to do it manually.

2 Accepted Solutions

Accepted Solutions

Vaijanath Sonvane
VIP Alumni
VIP Alumni

Hi,

I do not know about the SQL statement but I used CUCM Bulk Administration Tool (BAT) a lot to build many phones with multiple lines. Have you tried BAT Tool?

 

 

Please rate helpful posts and if applicable mark "Accept as a Solution".
Thanks, Vaijanath S.

View solution in original post

hi,

SQL is still an issue, but managed to do with BAT.

To add phones, using BAT, have to use the SPECIFIC DETAILS, not ALL DETAILS.

I dont know why the ALL DETAILS throws up error whenever I have more than one DN..

But the workaround is good enough for me.

View solution in original post

4 Replies 4

Vaijanath Sonvane
VIP Alumni
VIP Alumni

Hi,

I do not know about the SQL statement but I used CUCM Bulk Administration Tool (BAT) a lot to build many phones with multiple lines. Have you tried BAT Tool?

 

 

Please rate helpful posts and if applicable mark "Accept as a Solution".
Thanks, Vaijanath S.

hi Vaij,

After getting stuck with SQL, I did try to use CSV upload just for one phone to investigate but that too throws error when I put more than one DN on a phone. It works fine with just one DN.  My device type is third party sip advanced. Attached is my CSV file, if you could spot any error please. For this file to work I have to remove the last four columns which relate to DN 2 and DN 3 and their partitions.

 

 

hi,

SQL is still an issue, but managed to do with BAT.

To add phones, using BAT, have to use the SPECIFIC DETAILS, not ALL DETAILS.

I dont know why the ALL DETAILS throws up error whenever I have more than one DN..

But the workaround is good enough for me.

Jaime Valencia
Cisco Employee
Cisco Employee

That's the least preferred way to do that task, has no validation and you could end up with orphaned entries or break something.

If you wanted to do this programatically, you should have used AXL. Otherwise, as advised, use BAT for that purpose.

Easiest way is to configure what you want manually, and then export that config to use as a sample.

HTH

java

if this helps, please rate