cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
869
Views
0
Helpful
14
Replies

How do I Deactivate Directory a large group of numbers

jsalomon
Level 1
Level 1

Hello,

New to CUCM and need some help.

 

I imported all users via LDAP sync, however, we are starting to migrate from one provider to another and about 95% of the users imported need to be deactivate, and will only need to be activated once their DID has been ported to the new trunk.  Since I only have about 50 users active, if is easier to deactivate them all, and then I can go back and activate the ones that should be active, that will work too. 

Is it possible to run some script to deactivate the unassigned  DNs?

 

thanks

 

John

1 Accepted Solution

Accepted Solutions

If you go down the path of export and import in general the headers should be intact, however it can be different between an export and an import. You have to check by doing an import of a select few DNs and see if there are any errors. The CSV file should be in a TAR file when you upload it to the CM.



Response Signature


View solution in original post

14 Replies 14

If you disable them from AD and force sync, they will be deactivated in
cucm.

**** please remember to rate useful posts

This would remove the end users from CM, but not the directory numbers. Those would still be present and tied to any device it was set up for. What would happen is that all these would become “orphaned” as the end user disappears when it gets disabled in AD.



Response Signature


jsalomon
Level 1
Level 1

Thanks for the prompt responses. Just ran it by my director, and disabling end users in AD is not an option. 

 

John 

Put those extensions on a different partition which no one can access.

you can use python script which use soap libraries  with SQL query to delete the  unassigned DN's or put then in a different partitions



Response Signature


Thanks Nithin,

 

I am do not know python, but have someone in our team that does and I will have him help me on Wednesday when he is back.  Question if the unassigned DNs are placed in a different partition, will they still show active?  Meaning if I dial the 4-digit extension will they then go to voicemail or the system will ignore it completely?

 

FYI: we are using version 12.5

 

John

What @Nithin Eluvathingal suggest is to put the directory numbers into a partition that is not visible in the CSS of the calling party. With this the number(s) will not be dial-able as it is not seen by the number analysis in the system and it would result in a number not found response to the calling party.



Response Signature


As @Roger Kallberg explained, make a new partition and put these extensions on the new partition. Doing so these numbers will not be accessible.

 

You can use BAT to do this and no need of a script.

 

 



Response Signature


Thanks Guys,

 

the idea of moving to a different partition and doing it on BAT sounds like the way I need to go.  Where and how in the CLI do I setup the BAT file, also how do I know or find out what field(s) I need to search for and change?

 

thanks,

John

It is accessed via the webUI.
image.png



Response Signature


Thanks Roger,

 

Do I select the Export and then select Directory Number (Unassigned) and Partition (Class of Control). then once I have it exported to a xls or csv file I can add the new partition name I created and upload it?  Is this how it works?  I have yet to do any bulk type process.

 

John

The directory number(s) are not unassigned per the definition in CM. An unassigned DN is when it is not assigned to any device. From you're described outline that would not be the situation that you would be in.

Likely the easiest would be to use the query option, see below.
image.png

If that does not work you're left with the Export option. For that you should select the Phone option as per below as that contains the assigned DNs.
image.png



Response Signature


Hi Roger,

 

Sorry for any confusion, I attach a picture of the area I need to change or like you mentioned if I move them to a different partition that number will not be available.  What I found out if I uncheck the Active in the directory number config, that works, meaning the system does not seem to recognize the number of being part of it.  If this field is active then the system tries to connect to it, is what I found.  So your solution of changing the Partition seems to be the best way for me to go.

 

I download the list and have changed to partition, when I upload it back, do I need to have all the same headers and footers that were download, and does the file need to be .TAR?

 

thanks,

John

 

 

If you go down the path of export and import in general the headers should be intact, however it can be different between an export and an import. You have to check by doing an import of a select few DNs and see if there are any errors. The CSV file should be in a TAR file when you upload it to the CM.



Response Signature


Roger,

 

Thank you so much for your insight and helpfulness.  The BAT is really a nice tool.  I was able to accomplish what i needed by replacing the Partition.   Thank you again for all your help.

 

John