cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4622
Views
10
Helpful
32
Replies

Updating description of phones using BAT

All,

I was wondering if someone could step me through updating phones description using bat.

I tried a coupe of ways but none seem to work correctly.

The idea is that I'm going to be putting floor numbers in the description for easy firmware upgrading but they have to be unique - ie..."28FL - Jane Doe"; "29FL - John Doe".

I tried Bulk Administration --> Phones  ----> Export Phones ---> Specific Details.  Downloaded the excel file and updated that file how I wanted it to look then saved it to my desktop as a text (tab delimited).

I then Bulk Administration --->Upload / Download ---> Add New --> Selected File; Target=Phones; Transaction Type=Update Phone - Custom File.  I then go to Bulk Administration ---> Phones ----> Update Phones ---> Custom File.

I select Description and the custom file but it returns = Status 0 records Found.
Can someone tell me what I'm doing wrong?

32 Replies 32

@Maren Mahoney   Yea, it keeps failing. I'm not sure what I'm doing wrong :( 

I'm following the instructions but I just got this error:

test12345_12345

Begin Time : 06/20/2019 13:33:08

Query :

Insert Phones in /common/bps/csvfiles/phones/insert/all/test12345_12345.txt

Failure Details :

MAC Address/Device Name Error Code Error Description

-----------------------------------------------------------------------------------------

sql.SQLException: Cannot create file for table (%s).

SEP00B1E3BA35BB Record does not match the file format selected.

Result Summary :

INSERT for 0 PHONES passed.

INSERT for 1 PHONES failed.

End Time : 06/20/2019 13:33:38

How interesting! Would you be comfortable posting (or sending me in a PM) the file you are using to import?

And remind me please which version of CUCM you are using.... I'll spin one up and see if I can figure out what's wrong.

If nothing else works, I wonder if pulling the trace from the BPS service would show anything? I've never looked at that one. It may have nothing useful.

Maren

@Maren Mahoney  I would be surprised if there is something wrong with the system. I'm sure I'm just doing something small wrong which is kicking off this error. 
I'm exporting, editing and going to run it again - then send you the file to play around with

 

I wasn't suggesting that there was a problem with BPS. I was thinking more along the lines of a trace of the BPS service may give us more detailed information about the error.

Maren

@Maren Mahoney  after i download the file from CUCM and insert it into excel, do i leave everything as is and just edit what i need to edit?  (ie....edit my own phone)  Meaning, all lines will remain the same except for my line?  Or am I deleting everything except for my phone and then uploading it?  I'm wondering if that is what i was doing incorrectly.

To be safe, and for the job to run faster, I would remove all lines except those you are editing. But I'm a safety kind of gal that way.

Also, what exact (exact!) version of CUCM are you running? There is a bug in one version of CUCM that makes this process not work. It may be what you are running into. I'll see if I can locate the bug.

Maren

@Maren Mahoney  I'm running 11.5.1.15900-18

 

@Maren Mahoney   I just tried to insert the attached file and it failed again.

Dear Andrew,

 

The problem with your file is it is TAB Delimited .txt file. 

You have to have Comma Delimited CSV File.

 

1) When you download file form CUCM It will be Comma Delimited .txt file as the below

 

CSV-4.PNG

 

2) When you open the file you have to choose comma as Delimiter in Excel.  Make the required changes.

 

CSV-2.PNG

3) But when you save the file you have to Use Save As and Select CSV ( Command delimited) . and not use the default .txt format 

 

DON't USE THIS DEFAULT

 

TAB-1.PNG

 

 

 

USE THIS CSV FORMAT

 

CSV-3.PNG

 

And if this help Please don't forget to rate helpful post; Mark "Accept as a Solution" if the issue is resolved.

 

Thanks,
Haris

 

@HARIS_HUSSAIN   I'm going to try your solution right now.  thank you for your tips. 

I think you edited that with Excel instead of Notepad++. If you look in the file, the commas are gone. CUCM works with CSV (comma separated values) which mean "no comma-no work".

Try taking your original file and editing it in Notepad++ (it's pretty easy to delete lines) and trying again.

Maren

@Maren Mahoney  I did edit it in excel - i just tried in Notepad ++ (right clicked on the downloaded file from CUCM, selected "edit in Notepad ++")  made my edit and then just clicked the save button.  I tried to do File --Save As but there is no .csv file extension to save as.

I uploaded it and did an insert but it failed again. I attached the file.

It can remain a txt file, but the commas have to be there regardless.

I see your description has quotation marks. Try removing those. Unlike scripts and things like Powershell, CSV files will accept what is between commas without having to use quotation marks.

I am attaching a file I used to update descriptions in my test system as an example.

Maren

I'm sorry to say that I tried @HARIS_HUSSAIN method and also @Maren Mahoney  your method but both fail for me.

The last one i just did, removed the quotation marks as suggested but it failed:

"sql.SQLException: Could not open or create a temporary file.

SEP00B1E3BA35BB Record does not match the file format selected.

Result Summary :

INSERT for 0 PHONES passed.

INSERT for 1 PHONES failed.

End Time : 06/25/2019 10:45:40"

 

I'm just not sure what else to do at this point except updating each phone one by one.

 

I sent you a PM with my email address. Let's see what I can do with this...

Maren

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: