06-18-2022 08:47 AM
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)
07-06-2022 09:43 AM
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
07-06-2022 11:10 AM
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...
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