Cisco Unified Call Manager AXL Methods Collection.
Project description
tinyCUCM
Cisco Unified Call Manager AXL Methods Collection.
Table of Contents
About The Project
This project is for informational purposes only and is intended to study the capabilities of the Cisco Unified Call Manager's API.
Methods have been tested on CUCM ver. 11.5.
Cisco UCM AXL Schemas & SQL Data Dictionaries Documentation
Installation
Installation is as simple as:
pip install tinyCUCM
Usage
Cisco UCM WSDL Services:
WSDL File | Path |
---|---|
SOAPMonitorService | https://x.x.x.x:8443/realtimeservice/services/SOAPMonitorService?wsdl |
RisPort | https://x.x.x.x:8443/realtimeservice/services/RisPort?wsdl |
RisPort70 | https://x.x.x.x:8443/realtimeservice/services/RisPort70?wsdl |
RisService70 | https://x.x.x.x:8443/realtimeservice2/services/RISService70?wsdl |
PerfmonPort | https://x.x.x.x:8443/perfmonservice/services/PerfmonPort?wsdl |
ControlCenterServices | https://x.x.x.x:8443/controlcenterservice/services/ControlCenterServicesPort?wsdl |
LogCollectionService | https://x.x.x.x:8443/logcollectionservice/services/LogCollectionPort?wsdl |
CDRonDemand | https://x.x.x.x:8443/CDRonDemandService/services/CDRonDemand?wsdl |
DimeGetFile | https://x.x.x.x:8443/logcollectionservice/services/DimeGetFileService?wsdl |
Download Cisco AXL Toolkit
from the station (Application
-> Plugins
) and put it into the folder with your project.
Copy RISService70
and create RISService70.xml
file, put file it into axlsqltoolkit
folder.
Create an Cisco UCM application account or local end user with Standard CCM Super Users
privileges
(Assign access control group to Your-CUCM-Account
).
Instance Create
Create a new instance of the CucmAxlClient
class and assigns this object to the local variable cucm
.
Don't store sensitive information in source code. For example use ".env" file.
Code Example:
from pathlib import Path
from tinyCUCM import CucmClient
BASE_DIR = Path(__file__).resolve().parent
settings = {
"pub_fqdn": "cucm.example.com",
"pub_version": "11.5",
"user_login": "Your-CUCM-Account",
"user_password": "You%wILL#&neVeR!gUEss",
"toolkit_path": BASE_DIR / "axlsqltoolkit",
"cert_path": BASE_DIR / "cucm.crt",
"session_verify": False,
"session_timeout": 15,
"ccs_wsdl_filename": "wsdlControlCenterServices_test.xml",
"ris_wsdl_filename": "wsdlRISService70_test.xml",
}
if __name__ == "__main__":
cucm = CucmClient(**settings)
# Get All AXL Method Names
print("Result:", cucm.axlAllMethods())
# Result: (
# 'addAarGroup',
# 'addAdvertisedPatterns',
# 'addAnnouncement',
# 'addAppServerInfo',
# 'addAppUser',
# ...,
# 'updateWifiHotspot',
# 'updateWirelessAccessPointControllers',
# 'updateWlanProfileGroup',
# 'wipePhone'
# )
AXL Collection
Add Methods
-
axlAddCallPickupGroup
keywords args
- required:
callPickupGroup
name
pattern
- expected:
description
routePartitionName
members
pickupNotification
pickupNotificationTimer
callInfoForPickupNotification
- required:
-
axlAddDeviceProfile
keywords args
- required:
deviceProfile
name
product
class
protocol
protocolSide
phoneTemplateName
- expected:
name
description
userHoldMohAudioSourceId
vendorConfig
traceFlag
mlppDomainId
mlppIndicationStatus
preemption
lines
line
- collection of:- required:
index
dirn
pattern
routePartitionName
- expected:
label
display
ringSetting
consecutiveRingSetting
ringSettingIdlePickupAlert
ringSettingActivePickupAlert
displayAscii
e164Mask
mwlPolicy
maxNumCalls
busyTrigger
callInfoDisplay
recordingProfileName
monitoringCssName
recordingFlag
audibleMwi
speedDial
partitionUsage
associatedEndusers
missedCallLogging
recordingMediaSource
- required:
speeddials
busyLampFields
blfDirectedCallParks
addOnModules
userLocale
singleButtonBarge
joinAcrossLines
loginUserId
ignorePresentationIndicators
dndOption
dndRingSetting
dndStatus
emccCallingSearchSpace
alwaysUsePrimeLine
alwaysUsePrimeLineForVoiceMessage
softkeyTemplateName
callInfoPrivacyStatus
services
featureControlPolicy
- required:
-
axlAddLine
keywords args
- required:
line
pattern
usage
- expected:
description
routePartitionName
aarNeighborhoodName
aarDestinationMask
aarKeepCallHistory
aarVoiceMailEnabled
callForwardAll
callForwardBusy
callForwardBusyInt
callForwardNoAnswer
callForwardNoAnswerInt
callForwardNoCoverage
callForwardNoCoverageInt
callForwardOnFailure
callForwardAlternateParty
callForwardNotRegistered
callForwardNotRegisteredInt
callPickupGroupName
autoAnswer
networkHoldMohAudioSourceId
userHoldMohAudioSourceId
alertingName
asciiAlertingName
presenceGroupName
shareLineAppearanceCssName
voiceMailProfileName
patternPrecedence
releaseClause
hrDuration
hrInterval
cfaCssPolicy
defaultActivatedDeviceName
parkMonForwardNoRetrieveDn
parkMonForwardNoRetrieveIntDn
parkMonForwardNoRetrieveVmEnabled
parkMonForwardNoRetrieveIntVmEnabled
parkMonForwardNoRetrieveCssName
parkMonForwardNoRetrieveIntCssName
parkMonReversionTimer
partyEntranceTone
directoryURIs
allowCtiControlFlag
rejectAnonymousCall
patternUrgency
confidentialAccess
externalCallControlProfile
enterpriseAltNum
e164AltNum
pstnFailover
callControlAgentProfile
useEnterpriseAltNum
useE164AltNum
active
- required:
-
axlAddLineGroup
keywords args
- required:
lineGroup
name
distributionAlgorithm
rnaReversionTimeOut
huntAlgorithmNoAnswer
huntAlgorithmBusy
huntAlgorithmNotAvailable
- expected:
members
autoLogOffHunt
- required:
-
axlAddPhone
keywords args
- required:
phone
name
product
class
protocol
protocolSide
devicePoolName
commonPhoneConfigName
locationName
useTrustedRelayPoint
phoneTemplateName
primaryPhoneName
builtInBridgeStatus
packetCaptureMode
certificateOperation
deviceMobilityMode
- expected:
description
callingSearchSpaceName
commonDeviceConfigName
networkLocation
mediaResourceListName
networkHoldMohAudioSourceId
userHoldMohAudioSourceId
automatedAlternateRoutingCssName
aarNeighborhoodName
loadInformation
vendorConfig
versionStamp
traceFlag
mlppDomainId
mlppIndicationStatus
preemption
retryVideoCallAsAudio
securityProfileName
sipProfileName
cgpnTransformationCssName
useDevicePoolCgpnTransformCss
geoLocationName
geoLocationFilterName
sendGeoLocation
lines
line
- collection of:- required:
index
dirn
pattern
routePartitionName
- expected:
label
display
ringSetting
consecutiveRingSetting
ringSettingIdlePickupAlert
ringSettingActivePickupAlert
displayAscii
e164Mask
mwlPolicy
maxNumCalls
busyTrigger
callInfoDisplay
recordingProfileName
monitoringCssName
recordingFlag
audibleMwi
speedDial
partitionUsage
associatedEndusers
missedCallLogging
recordingMediaSource
- required:
speeddials
busyLampFields
ringSettingIdleBlfAudibleAlert
ringSettingBusyBlfAudibleAlert
blfDirectedCallParks
addOnModules
userLocale
networkLocale
idleTimeout
authenticationUrl
directoryUrl
idleUrl
informationUrl
messagesUrl
proxyServerUrl
servicesUrl
services
softkeyTemplateName
defaultProfileName
enableExtensionMobility
singleButtonBarge
joinAcrossLines
callInfoPrivacyStatus
hlogStatus
ownerUserName
ignorePresentationIndicators
packetCaptureDuration
subscribeCallingSearchSpaceName
rerouteCallingSearchSpaceName
allowCtiControlFlag
presenceGroupName
unattendedPort
requireDtmfReception
rfc2833Disabled
authenticationMode
keySize
keyOrder
ecKeySize
authenticationString
upgradeFinishTime
remoteDevice
dndOption
dndRingSetting
dndStatus
isActive
isDualMode
mobilityUserIdName
phoneSuite
phoneServiceDisplay
isProtected
mtpRequired
mtpPreferedCodec
dialRulesName
sshUserId
sshPwd
digestUser
outboundCallRollover
hotlineDevice
secureInformationUrl
secureDirectoryUrl
secureMessageUrl
secureServicesUrl
secureAuthenticationUrl
secureIdleUrl
alwaysUsePrimeLine
alwaysUsePrimeLineForVoiceMessage
featureControlPolicy
deviceTrustMode
earlyOfferSupportForVoiceCall
requireThirdPartyRegistration
blockIncomingCallsWhenRoaming
homeNetworkId
AllowPresentationSharingUsingBfcp
confidentialAccess
requireOffPremiseLocation
allowiXApplicableMedia
cgpnIngressDN
useDevicePoolCgpnIngressDN
msisdn
enableCallRoutingToRdWhenNoneIsActive
wifiHotspotProfile
wirelessLanProfileGroup
elinGroup
- required:
-
axlAddeRemoteDestination
keywords args
- required:
remoteDestination
destination
answerTooSoonTimer
answerTooLateTimer
delayBeforeRingingCell
ownerUserId
remoteDestinationProfileName
- expected:
name
enableUnifiedMobility
enableExtendAndConnect
ctiRemoteDeviceName
dualModeDeviceName
isMobilePhone
enableMobileConnect
lineAssociations
timeZone
todAccessName
mobileSmartClientName
mobilityProfileName
singleNumberReachVoicemail
dialViaOfficeReverseVoicemail
ringSchedule
accessListName
- required:
-
axlAddRemoteDestinationProfile
keywords args
- required:
remoteDestinationProfile
name
product
class
protocol
protocolSide
devicePoolName
callInfoPrivacyStatus
userId
- expected:
description
callingSearchSpaceName
networkHoldMohAudioSourceId
userHoldMohAudioSourceId
lines
line
- collection of:- required:
index
dirn
pattern
routePartitionName
- expected:
label
display
ringSetting
consecutiveRingSetting
ringSettingIdlePickupAlert
ringSettingActivePickupAlert
displayAscii
e164Mask
mwlPolicy
maxNumCalls
busyTrigger
callInfoDisplay
recordingProfileName
monitoringCssName
recordingFlag
audibleMwi
speedDial
partitionUsage
associatedEndusers
missedCallLogging
recordingMediaSource
- required:
ignorePresentationIndicators
rerouteCallingSearchSpaceName
cgpnTransformationCssName
automatedAlternateRoutingCssName
useDevicePoolCgpnTransformCss
userLocale
networkLocale
primaryPhoneName
dndOption
dndStatus
mobileSmartClientProfileName
- required:
-
axlAddTranslationPattern
keywords args
- required:
transPattern
pattern
routePartitionName
usage
- expected:
description
blockEnable
calledPartyTransformationMask
callingPartyTransformationMask
useCallingPartyPhoneMask
callingPartyPrefixDigits
dialPlanName
digitDiscardInstructionName
patternUrgency
prefixDigitsOut
routeFilterName
callingLinePresentationBit
callingNamePresentationBit
connectedLinePresentationBit
connectedNamePresentationBit
patternPrecedence
provideOutsideDialtone
callingPartyNumberingPlan
callingPartyNumberType
calledPartyNumberingPlan
calledPartyNumberType
callingSearchSpaceName
resourcePriorityNamespaceName
routeNextHopByCgpn
routeClass
callInterceptProfileName
releaseClause
useOriginatorCss
dontWaitForIDTOnSubsequentHops
isEmergencyServiceNumber
- required:
-
axlAddUser
keywords args
- required:
user
userid
lastName
presenceGroupName
- expected:
firstName
displayName
middleName
password
pin
mailid
department
manager
userLocale
associatedDevices
primaryExtension
associatedPc
associatedGroups
enableCti
digestCredentials
phoneProfiles
defaultProfile
subscribeCallingSearchSpaceName
enableMobility
enableMobileVoiceAccess
maxDeskPickupWaitTime
remoteDestinationLimit
passwordCredentials
pinCredentials
enableEmcc
ctiControlledDeviceProfiles
patternPrecedence
numericUserId
mlppPassword
customUserFields
homeCluster
imAndPresenceEnable
serviceProfile
lineAppearanceAssociationForPresences
directoryUri
telephoneNumber
title
mobileNumber
homeNumber
pagerNumber
extensionsInfo
selfService
userProfile
calendarPresence
ldapDirectoryName
userIdentity
nameDialing
ipccExtension
convertUserAccount
accountType
authenticationType
enableUserToHostConferenceNow
attendeesAccessCode
zeroHop
- required:
Code Example:
cucm = ...
print("Result:", cucm.axlAddCallPickupGroup(**{"callPickupGroup": {"name": "...", "pattern": "..."}}))
# Result: {'return': '{........-....-....-....-............}', 'sequence': None}
print("Result:", cucm.axlAddLine(**{"line": {"pattern": "...", "usage": "Device"}}))
# Result: {'return': '{........-....-....-....-............}', 'sequence': None}
print("Result:", cucm.axlAddLineGroup(**{
"lineGroup": {
"name": "...",
"distributionAlgorithm": "Broadcast",
"rnaReversionTimeOut": 10,
"huntAlgorithmNoAnswer": "Try next member; then, try next group in Hunt List",
"huntAlgorithmBusy": "Try next member; then, try next group in Hunt List",
"huntAlgorithmNotAvailable": "Try next member; then, try next group in Hunt List",
}
}))
# Result: {'return': '{........-....-....-....-............}', 'sequence': None}
print("Result:", cucm.axlAddPhone(**{
"phone": {
"name": "...",
"product": "Cisco 7821",
"class": "Phone",
"protocol": "SIP",
"protocolSide": "User",
"devicePoolName": "Default",
"commonPhoneConfigName": "Standard Common Phone Profile",
"locationName": "Hub_None",
"useTrustedRelayPoint": "Default",
"phoneTemplateName": "Standard 7821 SIP",
"primaryPhoneName": None,
"builtInBridgeStatus": "Default",
"packetCaptureMode": "None",
"certificateOperation": "No Pending Operation",
"deviceMobilityMode": "Default"
}
}))
# Result: {'return': '{........-....-....-....-............}', 'sequence': None}
print("Result:", cucm.axlAddRemoteDestination(**{
"remoteDestination": {
"destination": "...",
"answerTooSoonTimer": 1500,
"answerTooLateTimer": 19000,
"delayBeforeRingingCell": 4000,
"ownerUserId": "...",
"remoteDestinationProfileName": "..."
}
}))
# Result: <Response [200]>
print("Result:", cucm.axlAddRemoteDestinationProfile(**{
"remoteDestinationProfile": {
"name": "...",
"product": "Remote Destination Profile",
"class": "Remote Destination Profile",
"protocol": "Remote Destination",
"protocolSide": "User",
"devicePoolName": "...",
"callInfoPrivacyStatus": "Default",
"userId": "..."
}
}))
# Result: {'return': '{........-....-....-....-............}', 'sequence': None}
# Pattern without `routePartitionName`
print("Result:", cucm.axlAddTranslationPattern(**{
"transPattern": {"pattern": "...", "routePartitionName": "", "usage": "Translation"}
}))
# Result: {'return': '{........-....-....-....-............}', 'sequence': None}
print("Result:", cucm.axlAddUser(**{
"user": {"userid": "...", "lastName": "...", "presenceGroupName": "Standard Presence group"}
}))
# Result: {'return': '{........-....-....-....-............}', 'sequence': None}
Do Methods
-
axlDoAuthenticateUser
keywords args
- required:
userid
password
orpin
- required:
-
axlDoDeviceLogin
keywords args
- required:
deviceName
loginDuration
"0"
- Logout disabled"36000"
- Logout after 10h (or any other positive value in milliseconds)
profileName
userId
- required:
-
axlDoDeviceLogout
keywords args
- required:
deviceName
- required:
-
axlDoLdapSync
keywords args
- required:
uuid
orname
sync
True
- Start SynchronizationFalse
- Cancel the Synchronization which is currently under process
- required:
Code Example:
cucm = ...
print("Result:", cucm.axlDoAuthenticateUser(userid="...", pin= "..."))
print("Result:", cucm.axlDoAuthenticateUser(**{"userid": "...", "password": "..."}))
# Result: {'return': {'userAuthenticated': 'true', 'code': 0, 'daysToExpiry': 0, 'isWarningNeeded': 'false'}, 'sequence': None}
# Result: {'return': {'userAuthenticated': 'false', 'code': 1, 'daysToExpiry': 0, 'isWarningNeeded': 'false'}, 'sequence': None}
print("Result:", cucm.axlDoDeviceLogin(**{"deviceName": "SEP...", "loginDuration": "...", "profileName":"...", "userid": "..."}))
# Result: {'return': '{........-....-....-....-............}', 'sequence': None}
print("Result:", cucm.axlDoDeviceLogout(**{"deviceName": "SEP..."}))
# Result: {'return': '{........-....-....-....-............}', 'sequence': None}
print("Result:", cucm.axlDoLdapSync(**{"uuid": "........-....-....-....-............", "sync": True}))
# Result: {'return': 'Sync initiated successfully', 'sequence': None}
Get Methods
-
axlGetCallPickupGroup
keywords args
- required:
uuid
orname
orpattern
or (pattern
,routePartitionName
)
- required:
-
axlGetDeviceProfile
keywords args
- required:
uuid
orname
- required:
-
axlGetLine
keywords args
- required:
uuid
orpattern
or (pattern
,routePartitionName
)
- required:
-
axlGetLineGroup
keywords args
- required:
uuid
orname
- required:
-
axlGetPhone
keywords args
- required:
uuid
orname
- required:
-
axlGetRemoteDestination
keywords args
- required:
uuid
ordestination
- required:
-
axlGetRemoteDestinationProfile
keywords args
- required:
uuid
orname
- required:
-
axlGetTranslationPattern
keywords args
- required:
uuid
orpattern
or (pattern
,routePartitionName
)
- required:
-
axlGetUser
keywords args
- required:
uuid
oruserid
- required:
Code Example:
cucm = ...
print("Result:", cucm.axlGetPhone(name="SEP..."))
print("Result:", cucm.axlGetPhone(**{"uuid": "........-....-....-....-............"}))
# Result: {
# 'name': '...',
# ...,
# 'lines': {
# 'line': [
# {
# 'index': 1,
# ...,
# 'dirn': {
# 'pattern': '...',
# 'routePartitionName': {'_value_1': '...', 'uuid': '{........-....-....-....-............}'},
# 'uuid': '{........-....-....-....-............}'
# },
# 'uuid': '{........-....-....-....-............'
# }
# ],
# 'lineIdentifier': None
# },
# 'uuid': '{........-....-....-....-............}'
# }
Remove Methods
-
axlRemoveCallPickupGroup
keywords args
- required:
uuid
orname
orpattern
or (pattern
,routePartitionName
)
- required:
-
axlRemoveDeviceProfile
keywords args
- required:
uuid
orname
- required:
-
axlRemoveLine
keywords args
- required:
uuid
orpattern
or (pattern
,routePartitionName
)
- required:
-
axlRemoveLineGroup
keywords args
- required:
uuid
orname
- required:
-
axlRemovePhone
keywords args
- required:
uuid
orname
- required:
-
axlRemoveRemoteDestination
keywords args
- required:
uuid
ordestination
- required:
-
axlRemoveRemoteDestinationProfile
keywords args
- required:
uuid
orname
- required:
-
axlRemoveTranslationPattern
keywords args
- required:
uuid
orpattern
or (pattern
,routePartitionName
)
- required:
-
axlRemoveUser
keywords args
- required:
uuid
oruserid
- required:
Code Example:
cucm = ...
print("Result:", cucm.axlRemovePhone(name= "SEP..."))
print("Result:", cucm.axlRemovePhone(**{"uuid": "........-....-....-....-............"}))
# Result: {'return': '{........-....-....-....-............}', 'sequence': None}
Reset Methods
-
axlResetPhone
keywords args
- required:
uuid
orname
- required:
Code Example:
cucm = ...
print("Result:", cucm.axlResetPhone(name="SEP..."))
print("Result:", cucm.axlResetPhone(**{"uuid": "........-....-....-....-............"}))
# Result: {'return': '{........-....-....-....-............}', 'sequence': None}
Restart Methods
-
axlRestartPhone
keywords args
- required:
uuid
orname
- required:
Code Example:
cucm = ...
print("Result:", cucm.axlRestartPhone(name="SEP..."))
print("Result:", cucm.axlRestartPhone(**{"uuid": "........-....-....-....-............"}))
# Result: {'return': '{........-....-....-....-............}', 'sequence': None}
Update Methods
-
axlUpdateCallPickupGroup
keywords args
- required:
uuid
orname
orpattern
or (pattern
,routePartitionName
)
- expected:
newPattern
description
newRoutePartitionName
removeMembers
addMembers
members
pickupNotification
pickupNotificationTimer
callInfoForPickupNotification
newName
- required:
-
axlUpdateDeviceProfile
keywords args
- required:
uuid
orname
- expected:
newName
description
userHoldMohAudioSourceId
vendorConfig
mlppDomainId
mlppIndicationStatus
preemption
lines
line
- collection of:- required:
index
dirn
pattern
routePartitionName
- expected:
label
display
ringSetting
consecutiveRingSetting
ringSettingIdlePickupAlert
ringSettingActivePickupAlert
displayAscii
e164Mask
mwlPolicy
maxNumCalls
busyTrigger
callInfoDisplay
recordingProfileName
monitoringCssName
recordingFlag
audibleMwi
speedDial
partitionUsage
associatedEndusers
missedCallLogging
recordingMediaSource
- required:
phoneTemplateName
speeddials
busyLampFields
blfDirectedCallParks
addOnModules
userLocale
singleButtonBarge
joinAcrossLines
loginUserId
ignorePresentationIndicators
dndOption
dndRingSetting
dndStatus
emccCallingSearchSpace
alwaysUsePrimeLine
alwaysUsePrimeLineForVoiceMessage
softkeyTemplateName
callInfoPrivacyStatus
services
featureControlPolicy
- required:
-
`axlUpdateLine
keywords args
- required:
uuid
orpattern
or (pattern
,routePartitionName
)
- expected:
newPattern
description
newRoutePartitionName
aarNeighborhoodName
aarDestinationMask
aarKeepCallHistory
aarVoiceMailEnabled
callForwardAll
callForwardBusy
callForwardBusyInt
callForwardNoAnswer
callForwardNoAnswerInt
callForwardNoCoverage
callForwardNoCoverageInt
callForwardOnFailure
callForwardAlternateParty
callForwardNotRegistered
callForwardNotRegisteredInt
callPickupGroupName
autoAnswer
networkHoldMohAudioSourceId
userHoldMohAudioSourceId
alertingName
asciiAlertingName
presenceGroupName
shareLineAppearanceCssName
voiceMailProfileName
patternPrecedence
releaseClause
hrDuration
hrInterval
cfaCssPolicy
defaultActivatedDeviceName
parkMonForwardNoRetrieveDn
parkMonForwardNoRetrieveIntDn
parkMonForwardNoRetrieveVmEnabled
parkMonForwardNoRetrieveIntVmEnabled
parkMonForwardNoRetrieveCssName
parkMonForwardNoRetrieveIntCssName
parkMonReversionTimer
partyEntranceTone
directoryURIs
allowCtiControlFlag
rejectAnonymousCall
patternUrgency
confidentialAccess
externalCallControlProfile
enterpriseAltNum
e164AltNum
pstnFailover
callControlAgentProfile
useEnterpriseAltNum
useE164AltNum
active
- required:
-
axlUpdateLineGroup
keywords args
- required:
uuid
orname
- expected:
distributionAlgorithm
rnaReversionTimeOut
huntAlgorithmNoAnswer
huntAlgorithmBusy
huntAlgorithmNotAvailable
removeMembers
addMembers
members
newName
autoLogOffHunt
- required:
-
axlUpdatePhone
keywords args
- required:
uuid
orname
- expected:
newName
description
callingSearchSpaceName
devicePoolName
commonDeviceConfigName
commonPhoneConfigName
networkLocation
locationName
mediaResourceListName
networkHoldMohAudioSourceId
userHoldMohAudioSourceId
automatedAlternateRoutingCssName
aarNeighborhoodName
loadInformation
vendorConfig
versionStamp
traceFlag
mlppDomainId
mlppIndicationStatus
preemption
useTrustedRelayPoint
retryVideoCallAsAudio
securityProfileName
sipProfileName
cgpnTransformationCssName
useDevicePoolCgpnTransformCss
geoLocationName
geoLocationFilterName
sendGeoLocation
removeLines
addLines
lines
line
- collection of:- required:
index
dirn
pattern
routePartitionName
- expected:
label
display
ringSetting
consecutiveRingSetting
ringSettingIdlePickupAlert
ringSettingActivePickupAlert
displayAscii
e164Mask
mwlPolicy
maxNumCalls
busyTrigger
callInfoDisplay
recordingProfileName
monitoringCssName
recordingFlag
audibleMwi
speedDial
partitionUsage
associatedEndusers
missedCallLogging
recordingMediaSource
- required:
phoneTemplateName
speeddials
busyLampFields
primaryPhoneName
ringSettingIdleBlfAudibleAlert
ringSettingBusyBlfAudibleAlert
blfDirectedCallParks
addOnModules
userLocale
networkLocale
idleTimeout
authenticationUrl
directoryUrl
idleUrl
informationUrl
messagesUrl
proxyServerUrl
servicesUrl
services
softkeyTemplateName
defaultProfileName
enableExtensionMobility
singleButtonBarge
joinAcrossLines
builtInBridgeStatus
callInfoPrivacyStatus
hlogStatus
ownerUserName
ignorePresentationIndicators
packetCaptureMode
packetCaptureDuration
subscribeCallingSearchSpaceName
rerouteCallingSearchSpaceName
allowCtiControlFlag
presenceGroupName
unattendedPort
requireDtmfReception
rfc2833Disabled
certificateOperation
authenticationMode
keySize
keyOrder
ecKeySize
authenticationString
upgradeFinishTime
deviceMobilityMode
remoteDevice
dndOption
dndRingSetting
dndStatus
isActive
mobilityUserIdName
phoneSuite
phoneServiceDisplay
isProtected
mtpRequired
mtpPreferedCodec
dialRulesName
sshUserId
sshPwd
digestUser
outboundCallRollover
hotlineDevice
secureInformationUrl
secureDirectoryUrl
secureMessageUrl
secureServicesUrl
secureAuthenticationUrl
secureIdleUrl
alwaysUsePrimeLine
alwaysUsePrimeLineForVoiceMessage
featureControlPolicy
deviceTrustMode
earlyOfferSupportForVoiceCall
requireThirdPartyRegistration
blockIncomingCallsWhenRoaming
homeNetworkId
AllowPresentationSharingUsingBfcp
confidentialAccess
requireOffPremiseLocation
allowiXApplicableMedia
cgpnIngressDN
useDevicePoolCgpnIngressDN
msisdn
enableCallRoutingToRdWhenNoneIsActive
wifiHotspotProfile
wirelessLanProfileGroup
elinGroup
- required:
-
axlUpdateRemoteDestination
keywords args
- required:
uuid
ordestination
- expected:
newName
newDestination
answerTooSoonTimer
answerTooLateTimer
delayBeforeRingingCell
ownerUserId
enableUnifiedMobility
remoteDestinationProfileName
enableExtendAndConnect
ctiRemoteDeviceName
dualModeDeviceName
isMobilePhone
enableMobileConnect
lineAssociations
timeZone
todAccessName
mobileSmartClientName
mobilityProfileName
singleNumberReachVoicemail
dialViaOfficeReverseVoicemail
removeRingSchedule
addRingSchedule
ringSchedule
accessListName
- required:
-
axlUpdateRemoteDestinationProfile
keywords args
- required:
uuid
orname
- expected:
newName
description
callingSearchSpaceName
devicePoolName
networkHoldMohAudioSourceId
userHoldMohAudioSourceId
lines
line
- collection of:- required:
index
dirn
pattern
routePartitionName
- expected:
label
display
ringSetting
consecutiveRingSetting
ringSettingIdlePickupAlert
ringSettingActivePickupAlert
displayAscii
e164Mask
mwlPolicy
maxNumCalls
busyTrigger
callInfoDisplay
recordingProfileName
monitoringCssName
recordingFlag
audibleMwi
speedDial
partitionUsage
associatedEndusers
missedCallLogging
recordingMediaSource
- required:
callInfoPrivacyStatus
userId
ignorePresentationIndicators
rerouteCallingSearchSpaceName
cgpnTransformationCssName
automatedAlternateRoutingCssName
useDevicePoolCgpnTransformCss
userLocale
networkLocale
primaryPhoneName
dndOption
dndStatus
mobileSmartClientProfileName
- required:
-
axlUpdateTranslationPattern
keywords args
- required:
uuid
orpattern
or (pattern
,routePartitionName
)
- expected:
dialPlanName
routeFilterName
newPattern
description
newRoutePartitionName
blockEnable
calledPartyTransformationMask
callingPartyTransformationMask
useCallingPartyPhoneMask
callingPartyPrefixDigits
newDialPlanName
digitDiscardInstructionName
patternUrgency
prefixDigitsOut
newRouteFilterName
callingLinePresentationBit
callingNamePresentationBit
connectedLinePresentationBit
connectedNamePresentationBit
patternPrecedence
provideOutsideDialtone
callingPartyNumberingPlan
callingPartyNumberType
calledPartyNumberingPlan
calledPartyNumberType
callingSearchSpaceName
resourcePriorityNamespaceName
routeNextHopByCgpn
routeClass
callInterceptProfileName
releaseClause
useOriginatorCss
dontWaitForIDTOnSubsequentHops
isEmergencyServiceNumber
- required:
-
axlUpdateUser
keywords args
- required:
uuid
oruserid
- expected:
firstName
displayName
middleName
lastName
newUserid
password
pin
mailid
department
manager
userLocale
associatedDevices
primaryExtension
associatedPc
associatedGroups
enableCti
digestCredentials
phoneProfiles
defaultProfile
presenceGroupName
subscribeCallingSearchSpaceName
enableMobility
enableMobileVoiceAccess
maxDeskPickupWaitTime
remoteDestinationLimit
passwordCredentials
pinCredentials
enableEmcc
ctiControlledDeviceProfiles
patternPrecedence
numericUserId
mlppPassword
customUserFields
homeCluster
imAndPresenceEnable
serviceProfile
lineAppearanceAssociationForPresences
directoryUri
telephoneNumber
title
mobileNumber
homeNumber
pagerNumber
removeExtensionsInfo
addExtensionsInfo
extensionsInfo
selfService
userProfile
calendarPresence
ldapDirectoryName
userIdentity
nameDialing
ipccExtension
convertUserAccount
accountType
authenticationType
enableUserToHostConferenceNow
attendeesAccessCode
zeroHop
- required:
Code Example:
cucm = ...
print("Result:", cucm.axlUpdatePhone(name="SEP", description="New Description"))
print("Result:", cucm.axlUpdatePhone(**{"uuid": "........-....-....-....-............", "description": "New Description"}))
# Result: {'return': '{........-....-....-....-............}', 'sequence': None}
CCS Methods
CCS - Control Center Services provides an API Methods used to view status, to restart, to start and stop Cisco CallManager services for a particular server.
-
ccsDoControlServices
keywords args
- required:
control_command
- Control Command:Restart
,Start
orStop
service_names
- Service Names Collection
- optional
node_fqdn
- Specify a node other than the publisher
- required:
-
ccsDoServiceDeployment
keywords args
- required:
deploy_command
- Deploy Command:Deploy
orUnDeploy
service_names
- Service Names Collection
- optional
node_fqdn
- Specify a node other than the publisher
- required:
-
ccsGetProductInfoList
keywords args
- optional
node_fqdn
- Specify a node other than the publisher
- optional
-
ccsGetServiceStatus
keywords args
- optional
service_name
- Specify a specific service namenode_fqdn
- Specify a node other than the publisher
- optional
-
ccsGetStaticServiceList
keywords args
- optional
node_fqdn
- Specify a node other than the publisher
- optional
Code Example:
cucm = ...
print("Result:", cucm.ccsDoControlServices(control_command="Restart", service_names=["Cisco License Manager", "Cisco Tftp"]))
# Result: (
# {'ServiceName': 'Cisco License Manager', 'ServiceStatus': 'Starting', 'ReasonCode': -1, 'ReasonCodeString': ' ', 'StartTime': None, 'UpTime': -1},
# {'ServiceName': 'Cisco Tftp', 'ServiceStatus': 'Started', 'ReasonCode': -1, 'ReasonCodeString': ' ', 'StartTime': 'Tue Mar 5 15:53:19 2024', 'UpTime': 4}
# )
print("Result:", cucm.ccsDoServiceDeployment(deploy_command="Deploy", service_names=["Cisco Tftp"]))
# Result: (
# {'ServiceName': 'Cisco Tftp', 'ServiceStatus': 'Started', 'ReasonCode': -1, 'ReasonCodeString': ' ', 'StartTime': 'Wed Mar 6 13:37:59 2024', 'UpTime': 17},
# )
print("Result:", cucm.ccsGetServiceStatus())
# Result: (
# {'ServiceName': 'A Cisco DB', 'ServiceStatus': 'Started', 'ReasonCode': -1, 'ReasonCodeString': ' ', 'StartTime': 'Tue Mar 5 13:01:39 2024', 'UpTime': 10012},
# ...,
# {'ServiceName': 'Cisco Wireless Controller Synchronization Service', 'ServiceStatus': 'Stopped', 'ReasonCode': -1068, 'ReasonCodeString': 'Service Not Activated ', 'StartTime': None, 'UpTime': -1}
# )
RIS Methods
RIS - Real-time Information Server retrieve information stored in all RIS nodes in the cluster. https://developer.cisco.com/docs/sxml/#!risport70-api
-
risGetCti
keywords args
- required:
collection_name
- values:DevNames
orDirNumbers
items_collection
- Collection of Dictionaries. Depending on the type of collection, dictionaries should contain the keyname
forDevNames
or the keypattern
forDirNumbers
cti_mgr_class
- values:Provider
orDevice
orLine
- required:
-
risGetPhone
keywords args
- required:
phone_name
- required:
-
risGetPhones
keywords args
- required:
devices_collection
- Collection of Dictionaries. Dictionaries should contain the keyname
- required:
Code Example:
cucm = ...
print("Result:", cucm.risGetCti(
collection_name="DirNumbers",
items_collection=({"pattern": "..."}, {"pattern": "..."}, ...),
cti_mgr_class="Line"
))
# Result: {
# 'SelectCtiItemResult': {
# 'TotalItemsFound': 6,
# 'CtiNodes': {...}
# },
# 'StateInfo': '<StateInfo><Node Name="cucm.example.com" ...'
# }
print("Result:", cucm.risGetPhone(phone_name="CSF...", is_raw_resp=False))
# Result: {
# 'DeviceName': 'CSF...',
# 'Status': 'Registered',
# 'Model': 503,
# 'Product': 390,
# 'IP': 'xxx.xxx.xxx.xxx',
# 'NodeName': 'cucm.example.com',
# 'ActiveLoadID': '...',
# 'InactiveLoadID': '...'
# }
print("Result:", cucm.risGetPhones(devices_collection=({"name": "TCT..."}, {"name": "CSF..."}, ...), is_raw_resp=False))
# Result = (
# {
# 'name': 'TCT...',
# 'ris': {
# 'DeviceName': 'TCT...',
# 'Status': 'UnRegistered',
# 'Model': 562,
# 'Product': 449,
# 'IP': 'xxx.xxx.xxx.xxx',
# 'NodeName': 'cucm.example.com',
# 'ActiveLoadID': '...',
# 'InactiveLoadID': '...'
# }
# },
# {
# 'name': 'CSF...',
# 'ris': {
# 'DeviceName': 'CSF...',
# 'Status': 'Registered',
# 'Model': 503,
# 'Product': 390,
# 'IP': 'xxx.xxx.xxx.xxx',
# 'NodeName': 'cucm.example.com',
# 'ActiveLoadID': '...',
# 'InactiveLoadID': '...'
# }
# },
# {
# 'name': 'SEP...',
# 'ris': {'DeviceName': None, 'Status': None, ...}
# },
# {
# 'name': 'RDP...',
# 'ris': {'DeviceName': None, 'Status': None, ...}
# },
# {
# 'name': 'UDP...',
# 'ris': {'DeviceName': None, 'Status': None, ...}
# }
# )
SQL Collection
Execute Query
Code Example:
cucm = ...
sql_query = """
SELECT d.pkid, d.name, d.description
FROM device d
WHERE d.name LIKE '%value%'
"""
print("Result:", cucm.sqlExecuteQuery(sql_query=sql_query))
# Result: (
# {'pkid': '........-....-....-....-............', 'name': 'SEP...', 'description': '...'},
# {'pkid': '........-....-....-....-............', 'name': 'RDP...', 'description': '...'},
# {'pkid': '........-....-....-....-............', 'name': 'UDP...', 'description': '...'},
# {'pkid': '........-....-....-....-............', 'name': 'TCT...', 'description': '...'},
# {'pkid': '........-....-....-....-............', 'name': 'BOT...', 'description': '...'},
# {'pkid': '........-....-....-....-............', 'name': 'CSF...', 'description': '...'},
# {'pkid': '........-....-....-....-............', 'name': 'TAB...', 'description': '...'},
# {'pkid': '........-....-....-....-............', 'name': 'CIPC...', 'description': '...'},
# )
Update Query
Code Example:
cucm = ...
sql_query = """
UPDATE device d
SET d.description = 'New Description via SQL'
WHERE d.name LIKE '%value%'
"""
print("Result:", cucm.sqlUpdateQuery(sql_query=sql_query))
# Result: {
# 'return': {
# 'rowsUpdated': 1
# },
# 'sequence': None
# }
Predefined Queries
Get
Methods:sqlGetDeviceEndUsersRelations
sqlGetEMSession
sqlGetEndUserDefaultDeviceProfile
sqlGetEndUserDevicesRelations
sqlGetLineGroupStatus
sqlGetRemoteDestination
List
Methods:sqlListCallingSearchSpace
sqlListCredentialPolicy
sqlListDevicePool
sqlListDirGroup
sqlListMediaResourceGroup
sqlListMediaResourceList
sqlListPhoneTemplate
sqlListProcessNode
sqlListRecordingProfile
sqlListRegion
sqlListRoutePartition
sqlListSoftkeyTemplate
sqlListTelecasterService
sqlListTypeClass
sqlListTypeCountry
sqlListTypeModel
sqlListTypeUserLocale
sqlListUcServiceProfile
sqlListUcUserProfile
Search
Methods:sqlSearchCallPickupGroup
- required keywords args:criterion
,value
criterion
enum:Name
,Description
,Pattern
,Member Line Number
,Member Line Description
sqlSearchDevice
- required keywords args:criterion
,value
criterion
enum:Name
,Description
,Line Number
,Line Description
,Userid
,Device Pool
,Device Type
sqlSearchEndUser
- required keywords args:criterion
,value
criterion
enum:Userid
,Display Name
,Last Name
,First Name
,Phone Number
,Mobile Number
,Email
,Directory URI
sqlSearchLineGroup
- required keywords args:criterion
,value
criterion
enum:Name
,Member Line Number
,Member Line Description
sqlSearchRemoteDestination
- required keywords args:criterion
,value
criterion
enum:Name
,Destination
sqlSearchTranslationPattern
- required keywords args:criterion
,value
criterion
enum:Pattern
,Description
,Partition
,Calling Search Space
,Called Party Transform Mask
,Prefix Digits Out
Validate
Methods:sqlValidateEndUser
- required keywords args:userid
sqlValidateLine
- required keywords args:pattern
(Type Pattern Usage: Device Only)sqlValidatePattern
- required keywords args:pattern
(Type Pattern Usage: Any)
Create Your Own Methods
Don't store sensitive information in source code. For example use ".env" file.
Code Example:
from pathlib import Path
from typing import Union
from tinyCUCM import CucmClient, cucm_logging
BASE_DIR = Path(__file__).resolve().parent
settings = {
"pub_fqdn": "cucm.example.com",
"pub_version": "11.5",
"user_login": "Your-CUCM-Account",
"user_password": "You%wILL#&neVeR!gUEss",
"toolkit_path": BASE_DIR / "axlsqltoolkit",
"cert_path": BASE_DIR / "cucm.crt",
"session_verify": False,
"session_timeout": 15,
"ris_wsdl_filename": "wsdlRISService70_test.xml",
}
class CucmAxlCustom(CucmClient):
@cucm_logging
def axlYourOwnGetMethod(self, **kwargs: Union[dict, ...]) -> dict:
"""
AXL Your Own `Get` or Any Other Method.
:param kwargs: Required Fields:
`kwargs = {"uuid": "uuid"}`
or
`kwargs = {"name": "name"}`
:return:
"""
return self._axl.getCallManager(**kwargs)["return"]
if __name__ == "__main__":
cucm = CucmAxlCustom(**settings)
print("Result:", cucm.axlYourOwnGetMethod(**{"uuid": "........-....-....-....-............"}))
# Result: {
# 'callManager': {
# 'name': 'CM_...',
# 'description': '...',
# 'autoRegistration': {...},
# 'ports': {...},
# 'processNodeName': {...},
# 'lbmGroup': {...},
# 'ctiid': ...,
# 'uuid': '{........-....-....-....-............}'
# }
# }
License
Distributed under the MIT License. See LICENSE
for more information.
Contact
Luarvick - lu.luarvick@gmail.com
Project Link: https://github.com/luarvick/tinyCUCM
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file tinycucm-0.2.93.tar.gz
.
File metadata
- Download URL: tinycucm-0.2.93.tar.gz
- Upload date:
- Size: 39.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a920160a4f271c9d99e3d2a5fe73e155dc19105d6181363ebbcad4185ac15c0 |
|
MD5 | 663fbb213e8a4145d8f468deec434ce8 |
|
BLAKE2b-256 | 4b67abf83c080f6a7e82572e9d6a3a7cfdcbd8bfef79da83e3332bf999f4b546 |
File details
Details for the file tinyCUCM-0.2.93-py3-none-any.whl
.
File metadata
- Download URL: tinyCUCM-0.2.93-py3-none-any.whl
- Upload date:
- Size: 26.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a64095fd1a109bd9edd21355a0f4d3b428c106dd1a6e70a9041edf5cd6456d5f |
|
MD5 | 3a31cb00ebf79c1fdd01dac8da6957f7 |
|
BLAKE2b-256 | 9d8fd6da6fba85b5a0a32a43a9f5bf3532b1140d36426143505d3831b09fb38c |