addPhone - not recognizing devicePoolName

Version 1
    This document was generated from CDN thread

    Created by: KAREL STADLER on 04-11-2009 12:38:47 PM
    On a CUCM 7.1.2 I try to nail down a problem when adding a phone. This is the code...
     
    $client = new SoapClient("/var/www/html/soaptest/AXLAPI.wsdl",array('trace'=>true,'exceptions'=>true,'location'=>"<a>https://11.12.13.14:8443/axl",'login'=>'axluser','password'=>'axlpw'</a>],));

    try
    {
            $response = $client->addPhone(array("newPhone"=>array("name"=>"BAT113322445566",
                                    "description"=>"Testuser",
                                    "class"=>"Phone",
                                    "protocol"=>"SCCP",
                                    "protocolSide"=>"User",
                                    "devicePoolName"=>"Default",
                                    "model"=>"Cisco 7965",
                                    "product"=>"Cisco 7965",
                                    "securityProfileName"=>"Cisco 7965 - Standard SCCP Non-Secure Profile")));
    }
    catch (SoapFault $soapFault)
    {
            var_dump($soapFault);
            echo "There is an error<br>\n";
            echo "<strong>Request:</strong><br>", htmlentities($client->__getLastRequest()), "<br>";
            echo "<strong>Response:</strong><br>", htmlentities($client->__getLastResponse()), "<br>";
    }

    And this is the Response

    object(SoapFault)#4 (9) { ["message:protected"]=> string(42) "A Device Pool is required for this device." ["string:private"]=> string(0) "" ["code:protected"]=> int(0) ["file:protected"]=> string(32) "/var/www/html/soaptest/index.php" ["line:protected"]=> int(27) ["trace:private"]=> array(2) { [0]=> array(4) { ["function"]=> string(6) "__call" ["class"]=> string(10) "SoapClient" ["type"]=> string(2) "->" ["args"]=> array(2) { [0]=> string(8) "addPhone" [1]=> array(1) { [0]=> array(1) { ["newPhone"]=> array(9) { ["name"]=> string(15) "BAT113322445566" ["description"]=> string(6) "Furrer" ["class"]=> string(5) "Phone" ["protocol"]=> string(4) "SCCP" ["protocolSide"]=> string(4) "User" ["devicePoolName"]=> string(7) "Default" ["model"]=> string(10) "Cisco 7965" ["product"]=> string(10) "Cisco 7965" ["securityProfileName"]=> string(45) "Cisco 7965 - Standard SCCP Non-Secure Profile" } } } } } [1]=> array(6) { ["file"]=> string(32) "/var/www/html/soaptest/index.php" ["line"]=> int(27) ["function"]=> string(8) "addPhone" ["class"]=> string(10) "SoapClient" ["type"]=> string(2) "->" ["args"]=> array(1) { [0]=> array(1) { ["newPhone"]=> array(9) { ["name"]=> string(15) "BAT113322445566" ["description"]=> string(6) "Furrer" ["class"]=> string(5) "Phone" ["protocol"]=> string(4) "SCCP" ["protocolSide"]=> string(4) "User" ["devicePoolName"]=> string(7) "Default" ["model"]=> string(10) "Cisco 7965" ["product"]=> string(10) "Cisco 7965" ["securityProfileName"]=> string(45) "Cisco 7965 - Standard SCCP Non-Secure Profile" } } } } } ["faultstring"]=> string(42) "A Device Pool is required for this device." ["faultcode"]=> string(15) "SOAP-ENV:Client" ["detail"]=> object(stdClass)#2 (1) { ["Error"]=> object(stdClass)#3 (3) { ["code"]=> string(5) "25111" ["message"]=> string(42) "A Device Pool is required for this device." ["request"]=> string(8) "addPhone" } } } There is an error
    Request:
    <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="<a>http://schemas.xmlsoap.org/soap/envelope/</a>]" xmlns:ns1="<a>http://www.cisco.com/AXL/API/7.1"><SOAP-ENV:Body><ns1:addPhone><newPhone><name>BAT113322445566</name><description>Furrer</description><product>Cisco</a>] 7965</product><model>Cisco 7965</model><class>Phone</class><protocol>SCCP</protocol><protocolSide>User</protocolSide></newPhone></ns1:addPhone></SOAP-ENV:Body></SOAP-ENV:Envelope>
    Response:
    <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="<a>http://schemas.xmlsoap.org/soap/encoding/</a>]" xmlns:SOAP-ENV="<a>http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Client</faultcode><faultstring>A</a>] Device Pool is required for this device.</faultstring><detail><axl:Error xmlns:axl="<a>http://www.cisco.com/AXL/API/7.1"><axl:code>25111</axl:code><axl:message>A</a>] Device Pool is required for this device.</axl:message><request>addPhone</request></axl:Error></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
     
    It is not recognizing the "devicePoolName". Do you know how to add a phone successfully. The device pool called "Default" should be okay, shouldn't it ?
     

    Subject: RE: addPhone - not recognizing devicePoolName
    Replied by: Stephan Steiner on 04-11-2009 07:40:34 PM
    I don't have the schema with me... but do a getPhone on an existing phone and look at what it return (and check for syntax... syntax isn't 100% consistent throughout AXL)
    Also.. check the AXL traces that CUCM writes - if default isn't okay you'd see some SQL query on the devicepool table and no result being returned, then probably a bunch of exception lines.

    Subject: RE: addPhone - not recognizing devicePoolName
    Replied by: Karel Stadler on 05-11-2009 07:07:24 AM
    I don't have the schema with me... but do a getPhone on an existing phone and look at what it return (and check for syntax... syntax isn't 100% consistent throughout AXL)




    The getPhone reponse looks fine. It returns exactly "defaultPoolName" and Default.
     
    stdClass Object (  => stdClass Object (  => stdClass Object (  => SEP223344556677  => SEP223344556677  => Cisco 7965  => Cisco 7965  => Phone  => SCCP  => User => Default [commonPhoneConfigName] => Standard Common Phone Profile  => Hub_None [networkHoldMOHAudioSourceId] => 0 [userHoldMOHAudioSourceId] => 0  => stdClass Object ( [_] => SCCP45.8-5-2S  => )  => stdClass Object (  => falsefalse101100001,707:3010:3001:001101005000510000111100000 )  => {1257189570-F20C1389-6B0C-4443-8BBC-188D549AFA89}  =>  => -1 [mlppIndicationStatus] => Default  => Default [useTrustedRelayPoint] => Default [retryVideoCallAsAudio] => 1 [securityProfileName] => Cisco 7965 - Standard SCCP Non-Secure Profile [useDevicePoolCgpnTransformCSS] => 1  => 6  => {E5E30CAF-6EA8-838F-AE02-A2A067698A79}  =>  => stdClass Object (  => stdClass Object (  => Testuser  => Testuser  => Testuser  => stdClass Object (  => {8DD85200-ADE7-1823-EA59-02D23357897D} )  => Use System Default [consecutiveRingSetting] => Use System Default [ringSettingIdlePickupAlert] => Use System Default [ringSettingActivePickupAlert] => Use System Default  => Testuser [e164Mask] =>  => 0  => Use System Policy  => 4  => 2  => stdClass Object (  => 1  =>  =>  => 1 )  => Call Recording Disabled  => Default  =>  => General [missedCallLogging] => 1  => {74B17C46-9C10-D485-1E75-D7C298B9A733}  => 1 ) )  => 6  => stdClass Object (  => {1F1C33EC-E8CB-406C-A0AB-E03B28D5BF7A} )  => stdClass Object ( )  => stdClass Object ( )  => [ringSettingIdleBLFAudibleAlert] => Default [ringSettingBusyBLFAudibleAlert] => Default [alwaysUsePrimeLine] => Default [alwaysUsePrimeLineforVoiceMessage] => Default [blfDirectedCallParks] => stdClass Object ( )  => stdClass Object ( )  => stdClass Object ( ) [softkeyTemplateName] => Standard User  =>  => stdClass Object ( [userHoldMOHAudioSourceId] => 0  => stdClass Object (  => {1F1C33EC-E8CB-406C-A0AB-E03B28D5BF7A} )  => -1 [mlppIndicationStatus] => Default  => Default [softkeyTemplateName] => Standard User [ignorePresentationIndicators] => [singleButtonBarge] => Default  => Default [callInfoPrivacyStatus] => Default  =>  => Use Common Phone Profile Setting ) [singleButtonBarge] => Default  => Default [builtInBridgeStatus] => Default [callInfoPrivacyStatus] => Default  => On  => [ignorePresentationIndicators] => [packetCaptureMode] => None [packetCaptureDuration] => 0 [allowCtiControlFlag] => 1 [presenceGroupName] => Standard Presence group  => [requireDTMFReception] => [RFC2833Disabled] =>  => [certificateOperation] => No Pending Operation [certificateStatus] => None [upgradeFinishTime] => [deviceMobilityMode] => Default  =>  => Use Common Phone Profile Setting  =>  => 1  =>  => Default [phoneServiceDisplay] => Default  =>  =>  => ) ) )
     

    Also.. check the AXL traces that CUCM writes - if default isn't okay you'd see some SQL query on the devicepool table and no result being returned, then probably a bunch of exception lines.


    The AXL trace on the CUCM is not getting the devicePoolName, so I guess the problem is in the AXL request already. But why is it not in the request ?

    Subject: RE: addPhone - not recognizing devicePoolName
    Replied by: Karel Stadler on 05-11-2009 12:31:19 PM
    Now it works. As soon as you add an additional field, like calling search space the request is fine.
     
    "callingSearchSpaceName"=>"",