05-18-2018 04:41 AM
Hi,
I'm trying to update the phone using the updatePhone to change the Line configuration to enable call recording (I feel like, categorically, these settings should be in the updateLine request, but whatever). Anyways, here's the SOAP envelope I'm sending:
`<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/11.5">
<soapenv:Header/>
<soapenv:Body>
<ns:updatePhone sequence="?">
<name>SEPAABBCC112233</name>
<line ctiid="?">
<index>1</index>
<recordingFlag>Automatic Call Recording Enabled</recordingFlag>
<recordingProfileName uuid="?">Calabrio</recordingProfileName>
<recordingMediaSource>Phone Preferred</recordingMediaSource>
<monitoringCssName uuid="?">Calabrio-CSS</monitoringCssName>
</line>
</ns:updatePhone>
</soapenv:Body>
</soapenv:Envelope>`
I get a response of 200 and the server returns a GUID, but nothing changes in the line configuration.
I tried to send an applyPhone command and again I get a 200 and a GUID, but no changes are made:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/11.5">
<soapenv:Header/>
<soapenv:Body>
<ns:applyPhone sequence="?">
<name>SEPAABBCC112233</name>
</ns:applyPhone>
</soapenv:Body>
</soapenv:Envelope>
What am I doing wrong?
Thanks!
05-21-2018 03:23 PM
Hi,
Looking at updatePhone in the schema, I see that this requires an XPhoneLine object.
The schema for this is:
<xsd:complexType name="XPhoneLine">
<xsd:sequence minOccurs="0">
<xsd:element maxOccurs="1" minOccurs="1" name="index" type="axlapi:XInteger"/>
<xsd:element maxOccurs="1" minOccurs="0" name="label" type="axlapi:String50"/>
<xsd:element maxOccurs="1" minOccurs="0" name="display" type="axlapi:String50"/>
<xsd:element maxOccurs="1" minOccurs="1" name="dirn" type="axlapi:XDirn">
<xsd:annotation>
<xsd:documentation>Only uuid attribute is returned in response</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element default="Ring" maxOccurs="1" minOccurs="0" name="ringSetting" type="axlapi:XRingSetting"/>
<xsd:element default="Use System Default" maxOccurs="1" minOccurs="0" name="consecutiveRingSetting" nillable="true" type="axlapi:XRingSetting">
<xsd:annotation>
<xsd:documentation>Consecutive Rings Setting. Replaces the consective ring setting on IPPhone.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element default="Use System Default" maxOccurs="1" minOccurs="0" name="ringSettingIdlePickupAlert" nillable="true" type="axlapi:XRingSetting">
<xsd:annotation>
<xsd:documentation>Applicable only for IP Phones</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element default="Use System Default" maxOccurs="1" minOccurs="0" name="ringSettingActivePickupAlert" nillable="true" type="axlapi:XRingSetting">
<xsd:annotation>
<xsd:documentation>Applicable only for IP Phones</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="0" name="displayAscii" type="axlapi:String50"/>
<xsd:element maxOccurs="1" minOccurs="0" name="e164Mask" nillable="true" type="axlapi:String255"/>
<xsd:element default="Use System Policy" maxOccurs="1" minOccurs="0" name="mwlPolicy" type="axlapi:XMWLPolicy"/>
<xsd:element default="2" maxOccurs="1" minOccurs="0" name="maxNumCalls" type="axlapi:XInteger"/>
<xsd:element default="1" maxOccurs="1" minOccurs="0" name="busyTrigger" type="axlapi:XInteger"/>
<xsd:element maxOccurs="1" minOccurs="0" name="callInfoDisplay">
<xsd:complexType>
<xsd:sequence minOccurs="0">
<xsd:element default="true" maxOccurs="1" minOccurs="0" name="callerName" type="axlapi:boolean"/>
<xsd:element default="false" maxOccurs="1" minOccurs="0" name="callerNumber" type="axlapi:boolean"/>
<xsd:element default="false" maxOccurs="1" minOccurs="0" name="redirectedNumber" type="axlapi:boolean"/>
<xsd:element default="true" maxOccurs="1" minOccurs="0" name="dialedNumber" type="axlapi:boolean"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="0" name="recordingProfileName" nillable="true" type="axlapi:XFkType"/>
<xsd:element maxOccurs="1" minOccurs="0" name="monitoringCssName" nillable="true" type="axlapi:XFkType"/>
<xsd:element default="Call Recording Disabled" maxOccurs="1" minOccurs="0" name="recordingFlag" type="axlapi:XRecordingFlag"/>
<xsd:element default="Default" maxOccurs="1" minOccurs="0" name="audibleMwi" type="axlapi:XStatus">
<xsd:annotation>
<xsd:documentation>Not applicable for gatewayEndpointAnalogAccess and CiscoCatalyst600024PortFXSGateway</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="0" name="speedDial" nillable="true" type="xsd:string"/>
<xsd:element default="General" maxOccurs="1" minOccurs="0" name="partitionUsage" type="axlapi:XPartitionUsage">
<xsd:annotation>
<xsd:documentation>This tag cannot be modified. It can only be specified in the add request.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="0" name="associatedEndusers">
<xsd:complexType>
<xsd:sequence minOccurs="0">
<xsd:element maxOccurs="unbounded" minOccurs="0" name="enduser" type="axlapi:XEnduserMember"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element default="true" maxOccurs="1" minOccurs="0" name="missedCallLogging" type="axlapi:boolean"/>
<xsd:element default="Gateway Preferred" maxOccurs="1" minOccurs="0" name="recordingMediaSource" type="axlapi:XPreferredMediaSource"/>
</xsd:sequence>
<xsd:attribute name="ctiid" type="xsd:nonNegativeInteger"/>
</xsd:complexType>
It looks like you're missing this:
<xsd:element maxOccurs="1" minOccurs="1" name="dirn" type="axlapi:XDirn">
Note the minOccurs="1"
Please can you update your update request to include XDirn? Its schema is the standard directory number info:
<xsd:complexType name="XDirn">
<xsd:sequence minOccurs="0">
<xsd:element maxOccurs="1" minOccurs="1" name="pattern" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="1" name="routePartitionName" nillable="true" type="axlapi:XFkType"/>
</xsd:sequence>
<xsd:attribute name="uuid" type="axlapi:XUUID"/>
</xsd:complexType>
If this works after you include this - it's an AXL defect for returning a 200 OK. It's 99% a bug - doesn't follow the schema.
05-25-2018 09:59 AM
I got it to work, but I think it was a combination of two things:
1) As Jonathan Els suggested I did need the <dirn> tags in the request, but that wasn't enough.
2) Even to update an existing line you still need to wrap the request in an <addline>. See this thread for more details: updatePhone Lines not working in AXL 10.5 with PHP
So my updatePhone request ended up looking like this:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/11.5">
<soapenv:Header/>
<soapenv:Body>
<ns:updatePhone sequence="?">
<name>SEPAABBCC112233</name>
<addLines>
<line ctiid="?">
<index>1</index>
<dirn>
<pattern>1234</pattern>
<routePartitionName uuid = "?" >RoutePartition</routePartitionName>
</dirn>
<recordingFlag>Automatic Call Recording Enabled</recordingFlag>
<recordingProfileName uuid="?">Calabrio</recordingProfileName>
<recordingMediaSource>Phone Preferred</recordingMediaSource>
<monitoringCssName uuid="?">Calabrio-CSS</monitoringCssName>
</line>
</addLines>
</ns:updatePhone>
</soapenv:Body>
</soapenv:Envelope>
10-04-2019 12:32 PM
I am having a similar issue but trying to update a setting on a device. When I send the update phone request and include the name of the device, I can only get the description to update and nothing else.. I've tried updating LDAP settings, proximity, etc. I get back a 200 OK..
Here is my request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/11.5">
<soapenv:Header/>
<soapenv:Body>
<ns:updatePhone>
<name>SEP111111111111</name>
<description>Updated from Postman</description>
<Proximity>
<ProximityMode>On</ProximityMode>
</Proximity>
</ns:updatePhone>
</soapenv:Body>
</soapenv:Envelope>
10-18-2019 06:24 AM
What CUCM Version are you trying to update? 11.5?
I had a look n the Schema Refernce there is no Proximity Element listed
Have you tryed making a getPhone and see where the Element should belocated in the XML?
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