cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
460
Views
5
Helpful
2
Replies

queueCalls configurations lost after alertingName is updated

Young2020
Level 1
Level 1

I used the following python code to update the queueCalls configurations and it worked ok

 

dn='7'+siteID + '1920'
resp = axl_service.getHuntPilot(pattern=dn, routePartitionName='PT-INTERNAL')
rtn=resp['return']
hp=rtn['huntPilot']
qCals=hp['queueCalls']
qCals['maxWaitTimeDestination']='72198920'
resp=axl_service.updateHuntPilot(pattern=dn, routePartitionName='PT-INTERNAL', queueCalls=qCals)

 

But later, I used the following code to update alertingName of the hunt pilot but all the queueCalls configurations were lost. Why? Did I do something wrong?

 

dn='7'+siteID + '1920'
resp = axl_service.getHuntPilot(pattern=dn, routePartitionName='PT-INTERNAL')
rtn=resp['return']
hp=rtn['huntPilot']
aln=siteID+ ' '+ hp['alertingName']
ascAln=siteID+ ' '+hp['asciiAlertingName']
resp=axl_service.updateHuntPilot(pattern=dn, routePartitionName='PT-INTERNAL', alertingName=aln, asciiAlertingName=ascAln)

 

2 Replies 2

davidn#
Cisco Employee
Cisco Employee

Hi Young2020,

Try include queueCalls=qCals with qCals=hp['queueCalls'] as another parameter in the update even though you didn't change any queueCalls config.

 

David

dstaudt
Cisco Employee
Cisco Employee

If you look at the actual XML being sent to CUCM, I suspect Zeep is including an empty <queueCalls/> element - you didn't specify it, but Zeep may be including it (and other non-specified elements) anyway because it's in the schema.

If so, you can try forcing Zeep to skip including the element entirely via xsd:SkipValue:

 

resp=axl_service.updateHuntPilot(pattern=dn, routePartitionName='PT-INTERNAL', 
alertingName=aln, asciiAlertingName=ascAln, queueCalls=xsd:SkipValue)

Note: you will need to import the zeep xsd module:

from zeep import xsd

The other workaround is to always retrieve/copy/return the queueCalls element when updating, though not sure why that would be necessary here...