11-29-2018 07:16 AM
Hi Team!
Could you help me, i have tried to create a new phone om my CUCM 11.5. via Python. There is my function:
resp = service.addPhone(phone={"name": 000100020003,
"description": "AXL Test Phone",
"product": "Cisco 8845",
"class": "Phone",
"protocol": "SIP",
"protocolSide": "User",
"callingSearchSpaceName": "CSS_MSK_FullAccess",
"devicePoolName": "DP_MSK",
"lines": {"line": {"index": 1,
"label": "AXL Test Phone",
"display": "AXL Test Phone",
"dirn": {"pattern": 94952374,
"routePartitionName": "Pt_Internal"}}},
"commonDeviceConfigName": "None",
"commonPhoneConfigName": "Standard Common Phone Profile",
"locationName": "Hub_None",
"useTrustedRelayPoint": "Default",
"phoneTemplateName": "Standard 8845 SIP",
"primaryPhoneName": "None",
"softkeyTemplateName": "Standard User PickUp",
"securityProfileName": "Cisco 8845 - Standard SIP Non-Secure Profile",
"builtInBridgeStatus": "Default",
"packetCaptureMode" : "None",
"certificateOperation": "No Pending Operation",
"deviceMobilityMode": "Default"})
I know that, the Line should be created before the the Phone, I have already done it with "rest = service.add Line(...)". However when i try to add a new phone, i get a message
"<axlmessage>Item not valid: The specified None was not found</axlmessage>"
There is my request:
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<soap-env:Body>
<ns0:addPhone xmlns:ns0="http://www.cisco.com/AXL/API/11.5">
<phone>
<name>000100020003</name>
<description>AXL Test Phone</description>
<product>Cisco 8845</product>
<class>Phone</class>
<protocol>SIP</protocol>
<protocolSide>User</protocolSide>
<callingSearchSpaceName>CSS_MSK_FullAccess</callingSearchSpaceName>
<devicePoolName>DP_MSK</devicePoolName>
<commonDeviceConfigName>None</commonDeviceConfigName>
<commonPhoneConfigName>Standard Common Phone Profile</commonPhoneConfigName>
<locationName>Hub_None</locationName>
<useTrustedRelayPoint>Default</useTrustedRelayPoint>
<securityProfileName>Cisco 8845 - Standard SIP Non-Secure Profile</securityProfileName>
<lines>
<line>
<index>1</index>
<label>AXL Test Phone</label>
<display>AXL Test Phone</display>
<dirn>
<pattern>94952374</pattern>
<routePartitionName>Pt_Internal</routePartitionName>
</dirn>
</line>
</lines>
<phoneTemplateName>Standard 8845 SIP</phoneTemplateName>
<primaryPhoneName>None</primaryPhoneName>
<softkeyTemplateName>Standard User PickUp</softkeyTemplateName>
<builtInBridgeStatus>Default</builtInBridgeStatus>
<packetCaptureMode>None</packetCaptureMode>
<certificateOperation>No Pending Operation</certificateOperation>
<deviceMobilityMode>Default</deviceMobilityMode>
</phone>
</ns0:addPhone>
</soap-env:Body>
</soap-env:Envelope>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server</faultcode>
<faultstring>Item not valid: The specified None was not found</faultstring>
<detail>
<axlError>
<axlcode>5007</axlcode>
<axlmessage>Item not valid: The specified None was not found</axlmessage>
<request>addPhone</request>
</axlError>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
Process finished with exit code 0