cannot call doDeviceLogin axl api

Version 1
    This document was generated from CDN thread

    Created by: irfan h on 23-02-2010 06:22:00 AM
    Hi
    I'm tring to call doDeviceLogin method using php. Could anyone help how to call this method using php. I'm trying to call like this
     
    $response = $api->getDeviceProfile(array("profileName" => $api->getUser(array('userid' =>'xxxxxx'))->return->user->phoneProfiles->profileName))->return->profile->uuid;
     
    $api->doDeviceLogin(array('deviceId'=>$response, 'userId'=>'xxxxx', 'loginDuration' => '0'));
    I'm getting the follwoing error:
    SOAP-ENV Client; Item not valid: The specified null was not found.
     
    Could anyone help me
     
    Thanks
    IAH

    Subject: RE: cannot call doDeviceLogin axl api
    Replied by: David Staudt on 24-02-2010 02:43:23 AM
    Looks like you're missing the profileName parameter.  This works on my setup:
     
    $client->doDeviceLogin(array("deviceName"=>"SEP00070EB9C4B4","loginDuration"=>"0","profileName"=>"EM_User-IPC","userId"=>"dstaudt"));

    Subject: RE: cannot call doDeviceLogin axl api
    Replied by: irfan h on 24-02-2010 04:26:55 AM
    Thanks David. It's working now.

    Subject: call forwarding using updateLine
    Replied by: irfan h on 24-02-2010 04:38:29 AM
    Hi David,
     
    I'm trying to do call forwarding using updateLine in php.   I'm trying to call the updateLine axl api and getting back the uuid as response. But the forwarding is not workiing. Thanks.
     
    Request: updateLine :

    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:ns1="http://www.cisco.com/AXL/API/7.0"><SOAP-ENV:Body><ns1:updateLine><uuid>{1DC838D5-2B77-4F60-844B-A0B948D64152}</uuid><callForwardBusy><forwardToVoiceMail>true</forwardToVoiceMail><destination>3702</destination><duration>6</duration></callForwardBusy><callForwardBusyInt><forwardToVoiceMail>true</forwardToVoiceMail><destination>3702</destination><duration>6</duration></callForwardBusyInt><callForwardNoAnswer><forwardToVoiceMail>true</forwardToVoiceMail><destination>3702</destination><duration>6</duration></callForwardNoAnswer><callForwardNoAnswerInt><forwardToVoiceMail>true</forwardToVoiceMail><destination>3702</destination><duration>6</duration></callForwardNoAnswerInt><callForwardNotRegistered><forwardToVoiceMail>true</forwardToVoiceMail><destination>3702</destination><duration>6</duration></callForwardNotRegistered><callForwardNotRegisteredInt><forwardToVoiceMail>false</forwardToVoiceMail><destination>3702</destination><duration>6</duration></callForwardNotRegisteredInt></ns1:updateLine></SOAP-ENV:Body></SOAP-ENV:Envelope>


    Response: updateLine :

    <SOAP-ENV:Envelope
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Header/><SOAP-ENV:Body><axl:updateLineResponse
    xmlns:axl="http://www.cisco.com/AXL/API/7.0"
    xmlns:xsi="http://www.cisco.com/AXL/API/7.0"><return>{1DC838D5-2B77-4F60-844B-A0B948D64152}</return></axl:updateLineResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>

    IAH

    Subject: RE: call forwarding using updateLine
    Replied by: David Staudt on 24-02-2010 09:47:53 PM
    Note that <duration> should only be present for
    <callForwardNoAnswer>, but even with your request as-is it seems
    to work fine on my UCM 6.0(1) setup.  What are the symptoms you are
    seeing?  What version of UCM are you running?
     
    The phone
    (model/firmware?) should be restarting after this request, in order to
    reload its config file.  If that's not happening for some reason,
    perhaps you can use the <doDeviceReset> request to force that to
    happen.  I tested using IP Communicator.

    Subject: RE: call forwarding using updateLine
    Replied by: irfan h on 25-02-2010 12:36:31 AM
    Thanks David. I can see the in the admin panel the call forwarding is ticked but the strange thing is I didnt get any call forwarded to the destination phone when i did a test.  The destination phone did'nt get any call. Any suggestions?
     
    Regards
    IAH

    Subject: RE: call forwarding using updateLine
    Replied by: David Staudt on 25-02-2010 01:35:48 AM
    There are various forwarding flavors, which scenario did you try?  Note, you did not set callForwardAll, so forwarding will only happen in the case of busy, or no answer, etc...

    Subject: RE: call forwarding using updateLine
    Replied by: irfan h on 25-02-2010 02:12:00 AM
    sorry , did'nt mention which type of callforwarding. i'm trying the following:
     
    $callForwardBusy = array('forwardToVoiceMail' => 'false','destination' => $destination);
       $callForwardBusyInt = array('forwardToVoiceMail' =>'false','destination' => $destination);
        $callForwardNoAnswer = array('forwardToVoiceMail' => 'false','destination' => $destination, 'duration' => 6);
        $callForwardNoAnswerInt =  array('forwardToVoiceMail' => 'false', 'destination' => $destination,'duration' => 6);
        $callForwardNotRegistered =array('forwardToVoiceMail' => 'false', 'destination' => $destination, 'duration' => 6);
        $callForwardNotRegisteredInt = array('forwardToVoiceMail' => 'false','destination' => $destination,'duration' => 6);

           $axl->updateLine(array('uuid' =>$lineId,
                                          'callForwardBusy' => $callForwardBusy,
                                          'callForwardBusyInt'=> $callForwardBusyInt,
                                          'callForwardNoAnswer' => $callForwardNoAnswer,
                                          'callForwardNoAnswerInt' =>$callForwardNoAnswerInt,
                                          'callForwardNotRegistered' => $callForwardNotRegistered,
                                          'callForwardNotRegisteredInt' =>$callForwardNotRegisteredInt));

    Subject: RE: call forwarding using updateLine
    Replied by: irfan h on 25-02-2010 06:09:39 AM
    ok got that working. But go another problem. How can I get add a new line to my profile? Could anyone help?

    Subject: RE: call forwarding using updateLine
    Replied by: David Staudt on 25-02-2010 09:22:17 AM
    The first step is to do an <addLine>, filling in the needed parameters.  AXL will return a uuid upon success.
     
    Then do <getPhone> or <getDeviceProfile> to get the current device configuration - you are primarily interested in the <lines> list. 
     
    Finally, submit an <updatePhone> request with the modified <lines> list, including your new <line> data, using the uuid obtained from the <addLine> at the beginning.

    Subject: RE: call forwarding using updateLine
    Replied by: irfan h on 25-02-2010 11:13:36 AM
    Thanks David. I'm very new to Cisco AXL . You've been a great help!

    Subject: RE: call forwarding using updateLine
    Replied by: irfan h on 25-02-2010 10:26:10 PM
    Hi David,
     
    Got  one more problem. Suppose before adding a new line I want to check if the line is present. If present I would like to remove that line and then do the addLine Can you give me a suggestion on how to do this. Thanks!
     
     
    Kind Regards
    IAH

    Subject: RE: cannot call doDeviceLogin axl api
    Replied by: David Staudt on 26-02-2010 12:34:36 AM
    When you do <updatePhone>, if the <lines> list is present, then basically all existing lines are removed and replaced with whatever you provide in the new <lines> list.