cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4433
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

I just did this in my lab and got the exact same behavior. Reading further, I realized that the "Custom File" for updating phones is a way to select a group of phones rather than using the Query feature. For instance, the custom file would list all of the MAC Addresses/Device Names for the set of phones you want to update. Then, when you click "Next", you would get the same screen as you would if you did a query.

How I updated the description field on a set of phones using export was:

  • Do an "Export Phones - All Details"
  • Download the resulting file.
  • Edit the Description field using Notepad++ (not Excel!) Also be sure to delete the lines for all templates.
  • Upload the file choosing "Phones / Insert Phones - All Details"
  • On the Bulk Administration > Phones > Insert Phones, select "Insert Phones - All Details"
  • Choose your file.
  • Check the box for "Override the existing configuration".
  • Run the BAT job.

It's scary, and I'd do it off hours to make sure no one else is in the system. But it works just fine. If someone else knows how to do this more cleanly, I'd love to know myself.

Maren

Hi @Maren Mahoney 

Thank You for your reply and explanation on custom files!

So it sounds like your method updates all phones, rather than a subset of phones?

Also, what exactly do you mean by:

  • Edit the Description field using Notepad++ (not Excel!) Also be sure to delete the lines for all templates."  --> what template are you referring to?

 

When you do the export, it can be for all phones or for a certain phone type. Depending on the number of phones you need to update, you can choose one or the other.

When I did my test I chose to export all phones. That sort of export also exports the Universal Device Templates and any Device-type BAT templates you may have created. You will want to delete those lines from the exported file. That's what I meant about deleting those lines.

The remaining lines will be a list of all of your phones. For any phone you do not wish to update, simply delete that line from the text file. Edit the remaining records, and do the import.

Does that help explain? If not, let me know.

Maren

Thank You @Maren Mahoney 

Yes, that explains it beautifully.

Thank You - I will give this a try but only use cisco 8861 and delete all phones just leave my personal phone to update.

Ill update that one and if it works - then i can do it for the rest of the 8861 phones.

 

On a side note - thank you for your service! I'm ex-navy :)

Ooh-RAH!

That is the only way to Edit the Descriptions in Bulk.

You can refer below post which describes the procedure in detail. You can also use Excel as described in the Post.
Try with a few phones first then you can apply on rest.

https://community.cisco.com/t5/ip-telephony-and-phones/bulk-edit-line-display-ascii-display-and-line-text-label/td-p/2959806

*** Please rate helpful post; Mark "Accept as a Solution" if applicable

Thanks,
Haris

Thanks for the votes, Haris!

My concern about using Excel centers on +E.164 numbers that might be in the records. Excel has a bad habit of converting them to jibberish, and when you save the file out the jibberish remains. I have stopped using Excel for working with CSV files of any type except for viewing the data. Any time I need to edit, I use Notepad++.

YMMV

Maren

@Maren Mahoney   I agree Maren, I've done other bulk updates in excel with +E.164 and it always does some weird stuff to the numbers.  There use to be a formula that i used on the row that put it in the correct form- I'm going to try to dig it up and give it you.  I use something similar for exporting cdr and converting the epoch to normal dates :)

@HARIS_HUSSAIN   Thanks for your reply.  My only question is with the below step:

  • "In excel find the column Line Text Label and edit as per you requirement and save as CSV. Make sure to save it as CSV Only"

 

For this - I understand that you are editing the line text label but am i missing something? How does CUCM know which line text label on which device?  Do you remove all field besides the MAC and what you want to edit?

When you export the File from CUCM via BAT it will have all the details including MAC, Description, etc. All the Device and Line Level Fields. We will edit only the one which is required and keep the rest intact.

 

*** Please rate helpful post; Mark "Accept as a Solution" if applicable

Thanks,
Haris

@HARIS_HUSSAIN   Its weird but I just tried it and it failed.  Exported the file from CUCM via BAT. Left all the devices alone, just updated my own person phone description. Saved it CSV and did a Bulk-->Phones --> Insert Phones.  Selected my file and checked "override existing configuration"

 

From the BAT Log:

Failure Details :

MAC Address/Device Name Error Code Error Description

(MANY MORE MAC'S - JUST SENDING AS AN EXAMPLE)

sql.SQLException: Could not open database table (informix.typebatfunctionfieldinfomap).

SEP2C9BA2BD7280 Record does not match the file format selected.

 

 

Result Summary :

INSERT for 0 PHONES passed.

INSERT for 1555 PHONES failed.

End Time : 06/20/2019 10:53:30

Did you do the export via Bulk Administration > Import/Export > Export? If so, that would explain it. The format of the Device Name is different when you do it that way versus Bulk Administration > Phones > Export Phones.

Maren

@Maren Mahoney  No, I exported - Bulk Administration ---> Phones ----> Export -----> All Details

 

I'm trying your method now too...I have 1550 phones exported just based on phone type (same way as above) in my Notepad ++.  Can I delete all of them except my own phone, make changes and do the import as you explained or do i just make changes to my phone? Do i keep the header that has Device Name, Description, etc..?

To be on the safe side, I'd go with one or two phones for your testbed. Plus that will make the job run faster so you know what will work. Yes, you need to keep the header row!

If you did your export based on Bulk > Phones > Export Phones All Details it should have worked. Unless something funky happened to your header row, the data should have been perfect.

Keep us posted!

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: