cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

AMA-CUCM Troubleshooting: Best Practices for Reading Trace Files

177
Views
15
Helpful
7
Replies
Beginner

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

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

 

Everyone's tags (1)
7 REPLIES 7
VIP Advisor

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

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

Please use the star ratings to help drive great content to the top of searches.
Beginner

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


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

VIP Advisor

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

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.

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.
Beginner

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

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

 

Beginner

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


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

VIP Advisor

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

They have a free version as a browser plugin:

https://chrome.google.com/webstore/detail/imacros-for-chrome/cplklnmnlbnpmjogncfgfijoopmnlemp

https://imacros.net/download/#freeware

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.
Beginner

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

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

CreatePlease to create content
Content for Community-Ad
August's Community Spotlight Awards