cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2380
Views
5
Helpful
9
Replies

Managing Local Contacts on TC7 Endpoints

Vishal Sharma
Level 1
Level 1

I have a few TC endpoints with Local Contacts in 100s. I would like to have a way to delete all in a go through Command Line.

 

I have been trying to use command xcommand Phonebook Contact Delete ContactId: in different possible ways, but am still unable to get a combination to delete all existing in a go. The only way I see right now is to delete it one by one.

 

has anyone tried it before? is there a way to completely erase the local favorites list quickly?

 

 

2 Accepted Solutions

Accepted Solutions

Put the below into a text file and import it into the endpoint under Configuration > Local Contacts Management.  The import will replace anything on the endpoint with whatever is in the file.

<?xml version="1.0" encoding="UTF-8"?>
<LocalPhoneBook>
</LocalPhoneBook>

Another way, which is what I did to test this, is to export the current phone book and remove all contact entries found in the export, then import the edited file back into the endpoint with no contacts present.

View solution in original post

I had thought of that but wasn't sure if it was going to merge or overwrite and hadn't got around to trying it (damn meetings).  Good thing for the OP that it does overwrite the phonebook, gives a relatively easy way to blank them.

Wayne
--
Please remember to rate responses and to mark your question as answered if appropriate.

Wayne

Please remember to mark helpful responses and to set your question as answered if appropriate.

View solution in original post

9 Replies 9

Wayne DeNardi
VIP Alumni
VIP Alumni

If you go to the web interface on the device and go to Configuration > Security, then the "Non-persistent Mode" tab and set the "Local Phonebook" to "Non-persistent".

Then, click the "Save and reboot" button.

Upon reboot, all the local contacts should be removed.

Then, optionally, depending on whether you want to keep the local contacts in the future or not, you can return the setting back to Persistent or not.

Edit: Just tested this on one of my endpoints, and sorry, it doesn't quiet work like I'd expected.  Setting the non-persistent flag on the local directory appears to save the current state of the directory and keep that state on a reboot, so you'd still need to empty it first, before setting the non-persistent mode on an empty phonebook if you wanted to make sure there were no entries stored in it.

Unfortunately, this doesn't help you accomplish what you want right now, but may help you afterwards.

Wayne
--
Please remember to rate responses and to mark your question as answered if appropriate.

Wayne

Please remember to mark helpful responses and to set your question as answered if appropriate.

The admin guides state (see below for exact text) that whatever configurations the codec is in at the time of turning on non-persistent mode will be saved and used as the codec's persistent configuration going forward, it's only after the mode is enabled that any changes made will not be saved permanently after a reboot.

Note that logs, configurations etc. that was stored before you switch to Non-persistent mode, will not be cleared or deleted.

Have you tried to delete them using the codec's web interface via the Call Control page?

One option, however untested, is to do a backup of the codec and perform a factory reset, then restore the codec using the backup taken, but before you restore the backup edit the file removing all instances of the phone book entries.

Have you tried to delete them using the codec's web interface via the Call Control page?

I had thought of that, but unfortunately, either via the Call Control Page, or via Configuration > Local Contacts Management, you still have to delete them all individually, there's not a bulk delete option.  Would be very tedious to do a large amount of entries, especially if you also needed to do it on a large number of endpoints.

The backup, factory reset, restore option could be a good option though as the backup file (the one created through the Maintenance > Backup and Restore menu in the web interface anyway) doesn't store the Local Phonebook entries, so you don't have to worry about removing anything.  Still a hassle having to do it manually like that for all the endpoints if there's a lot of them.

Wayne
--
Please remember to rate responses and to mark your question as answered if appropriate.

Wayne

Please remember to mark helpful responses and to set your question as answered if appropriate.

I've never used the endpoint's backup and restore feature, one would think it would backup the local phone book entries as well.  The way I see it, if they're already using SSH to do the deletions, they're having to login into the codecs anyway, so the backup, factory reset, and restore isn't really much of an extra step.

"one would think it would backup the local phone book entries as well"

Yep - that's what someone would reasonably expect - but it isn't the case - do one yourself if you have a chance - it's basically just a dump of the output of the xconfiguration CLI command - and that doesn't contain any of the local phonebook entries.

It's a shame there's not a "delete all" command, or a recursive delete (like there is a recursive search) for the phonebook as the OP is looking for, that'd make scripting the delete from multiple endpoints extremely easy - which is what it sounds like they're looking for.  Connect, delete, disconnect, connect to next, delete, disconnect, repeat until all done...

The only real option for this the way things are currently would be to connect, dump the results of a phonebook search, then manipulate the dump and feed back as multiple delete commands.

Wayne
--
Please remember to rate responses and to mark your question as answered if appropriate.

Wayne

Please remember to mark helpful responses and to set your question as answered if appropriate.

Put the below into a text file and import it into the endpoint under Configuration > Local Contacts Management.  The import will replace anything on the endpoint with whatever is in the file.

<?xml version="1.0" encoding="UTF-8"?>
<LocalPhoneBook>
</LocalPhoneBook>

Another way, which is what I did to test this, is to export the current phone book and remove all contact entries found in the export, then import the edited file back into the endpoint with no contacts present.

I had thought of that but wasn't sure if it was going to merge or overwrite and hadn't got around to trying it (damn meetings).  Good thing for the OP that it does overwrite the phonebook, gives a relatively easy way to blank them.

Wayne
--
Please remember to rate responses and to mark your question as answered if appropriate.

Wayne

Please remember to mark helpful responses and to set your question as answered if appropriate.

This was easy to follow. Replacing with an empty phonebook worked well.

thank you Patrick.

Welcome, glad we found a simple easy solution.  I didn't look at the admin guide until just now, but it does say that all current contacts will be discarded when importing new contacts from a file.