cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
910
Views
1
Helpful
7
Replies

AXL getPhone 500 Server Error - until "Save"

bretsfu6g3
Level 1
Level 1

Cross-posting from support communities:

Using Cisco Call Manager 8.5

We have a homegrown AXL solution that provisions phones via addPhone, and is doing so successfully. However, seemingly without a consistent pattern, some of the phones subsequently fail a getPhone request. The publisher replies with a 500 Internal Server Error, empty faultstring and axlcode -1. But after going into CUCM admin, drilling down to the device, and simply clicking "Save" suddenly it starts working. No changes were made, just the Save button was clicked. I have tried sending all manner of AXL reset requests to the device via doDeviceReset to no avail - those requests themselves are successful and the phone does reset, but the getPhone requests are still "stuck" until the Save button is manually clicked. I have also sent updatePhone requests, which are also successful in applying whatever updates were sent and if applicable causes a restart, but still the getPhone returns a 500.

What function is the Save button within CUCM admin performing that phone resets are not and why is this happening?

1 Accepted Solution

Accepted Solutions

bretsfu6g3
Level 1
Level 1

Solution update! I found that the offending tools were building SOAP objects for each individual vendorConfig element, e.g. (with Perl):

SOAP::Data->name('vendorConfig' => \SOAP::Data->value(
  SOAP::Data->name('elementOne')->value('valueOne')->type('xsd:XVendorConfig'),
  SOAP::Data->name('elementTwo')->value('valueTwo')->type('xsd:XVendorConfig'),
  ...
))

Changing this code to just send the raw XML string worked:

SOAP::Data->name('vendorConfig')->value('<elementOne>valueOne</elementOne><elementTwo>valueTwo</elementTwo>')->type('axlapi:XVendorConfig')


View solution in original post

7 Replies 7

npetrele
Cisco Employee
Cisco Employee

Does your addPhone include product-specific information (data in <vendorConfig>)?

Could you post a sanitized example of your addPhone and getPhone requests (and updatePhone if used)?

Thanks

Hi Nicholas,

As a matter of fact it does. I'm hopeful that this is a lead, if you're asking! Here is an addPhone example. I have replaced a few arbitrary fields with ALL_CAPS but left the vendorConfig section alone. Eager to hear your thoughts - thanks!

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:axl="http://www.cisco.com/AXL/API/8.5">

  <soap:Body>

    <axl:addPhone xmlns="" xmlns:axl="http://www.cisco.com/AXL/API/8.5">

      <phone>

        <useTrustedRelayPoint xsi:type="xsd:string">Default</useTrustedRelayPoint>

        <protocol xsi:type="xsd:string">SCCP</protocol>

        <ownerUserName xsi:type="xsd:string">U6G3</ownerUserName>

        <joinAcrossLines xsi:type="xsd:string">Default</joinAcrossLines>

        <enableExtensionMobility xsi:type="xsd:string">f</enableExtensionMobility>

        <softkeyTemplateName xsi:type="xsd:string">SOFTKEY_TEMPLATE_NAME</softkeyTemplateName>

        <mtpRequired xsi:type="xsd:string">f</mtpRequired>

        <primaryPhoneName xsi:type="xsd:string" />

        <commonPhoneConfigName xsi:type="xsd:string">Standard Common Phone Profile</commonPhoneConfigName>

        <networkLocale xsi:type="xsd:string">United States</networkLocale>

        <packetCaptureDuration xsi:type="xsd:XInteger">0</packetCaptureDuration>

        <isProtected xsi:type="xsd:string">f</isProtected>

        <allowCtiControlFlag xsi:type="xsd:string">t</allowCtiControlFlag>

        <packetCaptureMode xsi:type="xsd:string">None</packetCaptureMode>

        <name xsi:type="xsd:string">SEP123456789012</name>

        <description xsi:type="xsd:string">PHONE_DESCRIPTION</description>

        <subscribeCallingSearchSpaceName xsi:type="xsd:string">CSS_NAME</subscribeCallingSearchSpaceName>

        <mtpPreferedCodec xsi:type="xsd:string">711ulaw</mtpPreferedCodec>

        <hotlineDevice xsi:type="xsd:string">f</hotlineDevice>

        <rfc2833Disabled xsi:type="xsd:string">f</rfc2833Disabled>

        <locationName xsi:type="xsd:string">LOCATION_NAME</locationName>

        <class xsi:type="xsd:string">Phone</class>

        <userlocale xsi:type="xsd:string">English United States</userlocale>

        <requireDtmfReception xsi:type="xsd:string">f</requireDtmfReception>

        <protocolSide xsi:type="xsd:string">User</protocolSide>

        <deviceTrustMode xsi:type="xsd:string">Not Trusted</deviceTrustMode>

        <preemption xsi:type="xsd:string">Default</preemption>

        <dndOption xsi:type="xsd:string">Use Common Phone Profile Setting</dndOption>

        <unattendedPort xsi:type="xsd:string">f</unattendedPort>

        <phoneTemplateName xsi:type="xsd:string">PBT_NAME</phoneTemplateName>

        <callInfoPrivacyStatus xsi:type="xsd:string">Off</callInfoPrivacyStatus>

        <automatedAlternateRoutingCssName xsi:type="xsd:string">CSS_NAME</automatedAlternateRoutingCssName>

        <ignorePresentationIndicators xsi:type="xsd:string">f</ignorePresentationIndicators>

        <mlppIndicationStatus xsi:type="xsd:string">Default</mlppIndicationStatus>

        <retryVideoCallAsAudio xsi:type="xsd:string">t</retryVideoCallAsAudio>

        <builtInBridgeStatus xsi:type="xsd:string">On</builtInBridgeStatus>

        <singleButtonBarge xsi:type="xsd:string">Default</singleButtonBarge>

        <remoteDevice xsi:type="xsd:string">f</remoteDevice>

        <mobileSmartClientProfileName xsi:type="xsd:string" />

        <aarNeighborhoodName xsi:type="xsd:string">AAR_NAME</aarNeighborhoodName>

        <presenceGroupName xsi:type="xsd:string">Standard Presence group</presenceGroupName>

        <deviceMobilityMode xsi:type="xsd:string">Default</deviceMobilityMode>

        <outboundCallRollover xsi:type="xsd:string">No Rollover</outboundCallRollover>

        <sipProfileName xsi:type="xsd:string" />

        <devicePoolName xsi:type="xsd:string">DP_NAME</devicePoolName>

        <callingSearchSpaceName xsi:type="xsd:string">CSS_NAME</callingSearchSpaceName>

        <product xsi:type="xsd:string">Cisco 7975</product>

        <certificateOperation xsi:type="xsd:string">No Pending Operation</certificateOperation>

        <vendorConfig>

          <recordingToneRemoteVolume xsi:type="xsd:XVendorConfig">50</recordingToneRemoteVolume>

          <minimumRingVolume xsi:type="xsd:XVendorConfig">0</minimumRingVolume>

          <pcPort xsi:type="xsd:XVendorConfig">0</pcPort>

          <webProtocol xsi:type="xsd:XVendorConfig">0</webProtocol>

          <ehookEnable xsi:type="xsd:XVendorConfig">1</ehookEnable>

          <headsetWidebandEnable xsi:type="xsd:XVendorConfig">0</headsetWidebandEnable>

          <peerFirmwareSharing xsi:type="xsd:XVendorConfig">0</peerFirmwareSharing>

          <forwardingDelay xsi:type="xsd:XVendorConfig">1</forwardingDelay>

          <recordingToneLocalVolume xsi:type="xsd:XVendorConfig">100</recordingToneLocalVolume>

          <disableSpeakerAndHeadset xsi:type="xsd:XVendorConfig">false</disableSpeakerAndHeadset>

          <autoCallSelect xsi:type="xsd:XVendorConfig">1</autoCallSelect>

          <useEnblocDialing xsi:type="xsd:XVendorConfig">1</useEnblocDialing>

          <displayOnWhenIncomingCall xsi:type="xsd:XVendorConfig">0</displayOnWhenIncomingCall>

          <disableSpeaker xsi:type="xsd:XVendorConfig">false</disableSpeaker>

          <recordingTone xsi:type="xsd:XVendorConfig">0</recordingTone>

          <settingsAccess xsi:type="xsd:XVendorConfig">1</settingsAccess>

          <handsetHeadsetMonitor xsi:type="xsd:XVendorConfig">1</handsetHeadsetMonitor>

          <g722CodecSupport xsi:type="xsd:XVendorConfig">0</g722CodecSupport>

          <moreKeyReversionTimer xsi:type="xsd:XVendorConfig">5</moreKeyReversionTimer>

          <garp xsi:type="xsd:XVendorConfig">1</garp>

          <powerPriority xsi:type="xsd:XVendorConfig">0</powerPriority>

          <voiceVlanAccess xsi:type="xsd:XVendorConfig">1</voiceVlanAccess>

          <detectCMConnectionFailure xsi:type="xsd:XVendorConfig">0</detectCMConnectionFailure>

          <headsetWidebandUIControl xsi:type="xsd:XVendorConfig">0</headsetWidebandUIControl>

          <webAccess xsi:type="xsd:XVendorConfig">0</webAccess>

          <autoSelectLineEnable xsi:type="xsd:XVendorConfig">0</autoSelectLineEnable>

          <loggingDisplay xsi:type="xsd:XVendorConfig">1</loggingDisplay>

          <spanToPCPort xsi:type="xsd:XVendorConfig">1</spanToPCPort>

        </vendorConfig>

        <lines>

          <line>

            <ringSetting xsi:type="xsd:string">Use System Default</ringSetting>

            <maxNumCalls xsi:type="xsd:int">4</maxNumCalls>

            <displayAscii xsi:type="xsd:string">Bret Swanson</displayAscii>

            <consecutiveRingSetting xsi:type="xsd:string">Flash Only</consecutiveRingSetting>

            <display xsi:type="xsd:string">Bret Swanson</display>

            <index xsi:type="xsd:int">1</index>

            <busyTrigger xsi:type="xsd:int">2</busyTrigger>

            <label xsi:type="xsd:long">DIRNUM</label>

            <asciiLabel xsi:type="xsd:long">DIRNUM</asciiLabel>

            <e164Mask xsi:type="xsd:string">1XXXXXXXXXX</e164Mask>

            <dirn>

              <pattern xsi:type="xsd:long">DIRNUM</pattern>

              <routePartitionName xsi:type="xsd:string">PT_NAME</routePartitionName>

            </dirn>

            <associatedEndUsers>

              <enduser>

                <userId xsi:type="xsd:string">U6G3</userId>

              </enduser>

            </associatedEndUsers>

          </line>

        </lines>

      </phone>

    </axl:addPhone>

  </soap:Body>

</soap:Envelope>

There is nothing special about the getPhone:

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:axl="http://www.cisco.com/AXL/API/8.5">

  <soap:Body>

    <axl:getPhone xmlns="" xmlns:axl="http://www.cisco.com/AXL/API/8.5">

      <name xsi:type="xsd:string">SEP123456789012</name>

    </axl:getPhone>

  </soap:Body>

</soap:Envelope>

Thanks for the samples.

There's a similar-looking bug involving XML and <vendorConfig> which is fixed in 8.6(2.26154.1).  The workaround is basically the same -- go to the phone config page and save it.


Is it possible for you to update your installation? 

Thank you for the confirmation. We are a very large organization and I have no control over the update schedule - what I do have control over is the application(s) that are causing phones to be added via AXL. I will see if adding the phones sans vendorConfig and then sending an updatePhone has any better luck. Barring that I'll document the known issue and wait patiently for an updated version to resolve this issue.

Thanks again!

Glad to help!

If doing the updatePhone doesn't help, try to add delays (sleep) before/after the add, update, and/or reset operations. The bug description implies that there's a race condition somewhere, so a deftly located sleep might work around it.  You'll probably have to play with the sleep duration and location of the sleeps in the code to find out what works. 

bretsfu6g3
Level 1
Level 1

Solution update! I found that the offending tools were building SOAP objects for each individual vendorConfig element, e.g. (with Perl):

SOAP::Data->name('vendorConfig' => \SOAP::Data->value(
  SOAP::Data->name('elementOne')->value('valueOne')->type('xsd:XVendorConfig'),
  SOAP::Data->name('elementTwo')->value('valueTwo')->type('xsd:XVendorConfig'),
  ...
))

Changing this code to just send the raw XML string worked:

SOAP::Data->name('vendorConfig')->value('<elementOne>valueOne</elementOne><elementTwo>valueTwo</elementTwo>')->type('axlapi:XVendorConfig')


Excellent!  I'm so glad you found the problem.  Yes, Soap libraries for various languages are typically poorly documented and can be pretty unpredictable until you stumble on issues like this.  Thanks for reporting back!