06-06-2022 09:12 AM
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
Solved! Go to Solution.
06-09-2022 12:01 PM
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.
06-06-2022 09:35 AM
06-06-2022 10:39 AM
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.
06-06-2022 10:47 AM
Thanks for the prompt responses. Just ran it by my director, and disabling end users in AD is not an option.
John
06-06-2022 11:14 AM
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
06-06-2022 11:33 AM
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
06-06-2022 10:08 PM - edited 06-07-2022 03:25 AM
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.
06-07-2022 02:24 AM
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.
06-08-2022 08:16 AM
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
06-08-2022 08:29 AM
It is accessed via the webUI.
06-08-2022 10:03 AM
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
06-09-2022 03:32 AM
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.
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.
06-09-2022 09:03 AM
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
06-09-2022 12:01 PM
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.
06-09-2022 04:31 PM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide