cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1760
Views
15
Helpful
7
Replies

Is it possible to automate the change of call forwarding number in self care portal?

fmt_cisco1
Level 1
Level 1

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

cucm-self-care-portal-fwd.png

 

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

 

7 Replies 7

Anthony Holloway
Cisco Employee
Cisco Employee

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 '' 


@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 :)

CCMAdmin is the URL you use to access the CUCM Administration page.

E.g., https://your-server.your-domain.com/ccmadmin

I don't think there is a video companion for those samples. That would be nice.

If you follow the instructions on that page I linked, make the corrections to the creds.py file, then do what I showed you for the callforwardall, it will work. I tested it out before posting it, so I know it's valid.

omihut
Level 1
Level 1

I've done similar tasks with iMacros.  See https://imacros.net/

 


@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?

omihut
Level 1
Level 1

Please try job scheduler in CM Administration.  You can have reoccurring weekly tasks too.  Setup 4 of those and you're done.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: