cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
383
Views
0
Helpful
3
Replies

Bulk Delete Of Call Handlers Unity 4.x

ischarcm
Level 1
Level 1

I have several extension ranges of call handers Id like to delete... What is the best way of doing this? There seem to have been a lot of call handlers we created for extensions that don't exist and Im just trying to clean things up a bit. Bulk Edit has been a great tool in making large changes, but I don't see anything to delete call handlers in bulk... Is there a way?

Thank you

3 Replies 3

lindborg
Cisco Employee
Cisco Employee

There's a bulk subscriber delete tool, but I never put together a bulk handler delete - this is the first request I've had for something like that.

This can be done through an SQL query if need be, but it's a little complex sine you want to make real sure you don't delete any primary call handlers (those handlers associtated with subscribers) or remove handlers actually in use.

Most handlers are not actually assigned extensions (They're optional for handlers) - it's a little unusual for extensions to be in use unless they're used as a routing device (i.e. handlers in an audio text application would typically not have extensions assigned to them) - this makes a bulk delete tool a little awkward for most installations.

Hey Jeff

Yes, these are routing handlers... Not many folks have DID's... so those without voicemail need a call handler to route calls to their extensions... Somehow we did a bulk create or import and ended up doing ranges of extensions I guess to create them... Im doing cleanup and discovered we have a lot of handlers where extensions aren't even present in the call manager.. Id like some way of getting rid of them without going into each one.. and im not a sql guy, so Id be afraid to dabble in SQL to that extent... I assume if im the only one that has ever requsted, there isn't much drive for you to create something for me :)

It's not that tough to do in SQL directly - you can use the Query Analyzer tool from MS or the Data Link Explorer (which you'll find in the Tools Depot on your desktop) to enter the following query:

SELECT CallHandler.Alias, DTMFAccessID.DTMFAccessID

FROM CallHandler INNER JOIN DTMFAccessID

ON CallHandler.CallHandlerObjectID=DTMFAccessID.ParentObjectID

WHERE DTMFAccessID.DTMFAccessID BETWEEN 5000 and 5500

This will just show you the list of application call handlers that have primary extensions between 5000 and 5500 (obviusly you stick your own extension range in there). This wont pick up primary call handlers (associated with subscribers) becasue the subscriber's OBjectID is listed as the parent.

When you're happy that you have the list of handlers you want, then just modify the query to be a delete instead of a select like this:

DELETE CallHandler

FROM CallHandler INNER JOIN DTMFAccessID

ON CallHandler.CallHandlerObjectID=DTMFAccessID.ParentObjectID

WHERE DTMFAccessID.DTMFAccessID BETWEEN 5000 and 5500

Of course, snag yourself a fresh backup with DiRT before embarking on this type of thing... always a good idea.