09-20-2019 09:34 AM
4 times a week, I have to change the number of call forwarding in "Unified Communication Self Care Portal", Version 11.5.1. In case it's not clear, let me describe it.
1. Open "Unified Communication Self Care Portal" at https://my_cucm.mydomain.com/ucmuser/
2. Sign in account A
3. Click on "Call Forwarding" on the left (cf image)
4. Change the number in the "Forward all calls to:" field
5. Press "Save"
6. Log out
I have a lot of accounts (A, B, C, D, etc) and a lot of different destination numbers. Right now, I have to do this manually few times per week. So, it's very prone to human error.
I would like to know if it's possible to program some "robots" to do the job for me. I could use Python, PowerShell or any other script language.
Thanks in advance
09-20-2019 09:56 AM - edited 09-20-2019 12:19 PM
Why wouldn't you just do this from CCMAdmin, as opposed to self care? Are you not the Admin? I would think you are, based on your previous posts.
At any rate, yes, this is possible. Check the following:
https://github.com/CiscoDevNet/axl-python-zeep-samples
EDIT:
If you were to take the example Python files from the above repository, it looks like the creds.py has incorrect variable names in them.
The creds file should have:
CUCM_ADDRESS USERNAME PASSWORD
And not:
CUCM_LOCATION AXL_USERNAME AXL_PASSWORD
Additionally, if you needed some help looping over a list of pairs of DNs and where to forward them, this might help you. Start with the axl_add_updateLine.py example script and delete everything from like line 120 down. Where the last thing you'll keep from the sample file is the "# Create the Zeep service binding..." section.
Then add this into the bottom of the script:
# Execute the updateLine request data_pairs = [ ('\+16125551212', '2000'), ('\+16125551313', '3000'), ('\+16125551414', '4000'), ] partition = 'YourDNPartitionNameHere' for data_pair in data_pairs: try: resp = service.updateLine(pattern = data_pair[0], routePartitionName = partition, callForwardAll = {'destination': data_pair[1]}) except Fault as err: print("Zeep error: updateLine: {0}".format( err ) ) else: print( "\nupdateLine response:\n" ) print( resp,"\n" )
Hint: To remove the forwarding, you just set the forwarding to an empty string ''
09-20-2019 02:02 PM
@Anthony Holloway wrote:Why wouldn't you just do this from CCMAdmin, as opposed to self care?
Because our subcontractor/partner told us to go to that "self care portal" to do so ... -_-" Reading your post makes me realize how incompetent they were.
What is CCMAdmin? Is that equal to CUCM (Cisco Unified Communications Manager)? There are so many components and so many names that I feel quite lost @_@@
Are you not the Admin? I would think you are, based on your previous posts.
At any rate, yes, this is possible. Check the following:
https://github.com/CiscoDevNet/axl-python-zeep-samples
Yes, I'm admin. I have just took a look at that web site. Hmm, not really clear (in addition to the errors that you've spotted). If there's any video, that might help.
But first of all, I really appreciate your help! If your solution works, I would invite you to a dinner! Well, if you are in Paris :)
09-20-2019 02:12 PM
09-23-2019 10:28 AM
I've done similar tasks with iMacros. See https://imacros.net/
09-24-2019 07:36 AM
@omihut wrote:I've done similar tasks with iMacros. See https://imacros.net/
You are using recorded actions on web interface. Do you have anything which is free?
09-24-2019 10:20 AM
09-25-2019 06:01 AM
Please try job scheduler in CM Administration. You can have reoccurring weekly tasks too. Setup 4 of those and you're done.
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