Who can tell me how to get the ip phone directory number info?

Version 1
    This document was generated from CDN thread

    Created by: Xiao Lv on 25-02-2009 08:05:58 AM
    i'm work at CCM 4.1(3) platform, using PHP script language.
     
    i had use getPhone command by SOAP interface. i had get follow infos but directory number.
     
    here is my code:
     <?php
     $login = 'xxxxx;
     $password = 'xxxxxx';
     
     $ccm = new SoapClient('http://xxx.xxx.xxx.xxx/CCMApi/AXL/V1/AXLAPI.wsdl',
                 array(
                      'login' => $login,
                      'password' => $password
                   ));
      $params->phoneName = 'SEPXXXXXXXXXXX';
      
      $result = $ccm->getPhone($params);
     
      echo 'Device Name: '. $result->return->device->name.'<br>';
      echo 'Description: '. $result->return->device->description.'<br>';
      echo 'Model: '.    $result->return->device->model.'<br>';
      echo 'Class: '.    $result->return->device->class.'<br>';
      echo 'Protocol: '.  $result->return->device->protocol.'<br>';
      echo 'protocolSide: '.$result->return->device->protocolSide.'<br>'; 
      echo 'CSS: '.     $result->return->device->callingSearchSpaceName.'<br>';
      echo 'Device Pool: '. $result->return->device->devicePoolName.'<br>';
      echo 'UUID: '.    $result->return->device->uuid.'<br>';
      echo 'Line INDEX: '. $result->return->device->lines->line->index.'<br>';
      echo 'Line DIRN UUID: '.  $result->return->device->lines->line->dirn->uuid.'<br>';
    ?>
     
    Who can tell me how to get directory number ?

    Subject: RE: Who can tell me how to get the ip phone directory number info?
    Replied by: David Staudt on 25-02-2009 02:19:05 PM
    Use the line/dirn/uuid returned above with AXL getLine request to retrieve the specifics about the line, including the pattern (DN).

    Subject: RE: Who can tell me how to get the ip phone directory number info?
    Replied by: Xiao Lv on 26-02-2009 04:40:50 AM
    very thanks. i got it. and i have another question about phone & line.
     
    i need to add a new phone to ccm though axl.
     
    i had add a new line and need to add phone.
     
    what steps i need to do?  and if i need add multi-lines to a phone so what?

    Subject: RE: Who can tell me how to get the ip phone directory number info?
    Replied by: David Staudt on 26-02-2009 05:49:09 AM
    addLine returns the UUID of the new line.
     
    With addPhone, create a line element under lines for each line appearance.  In the line element itself, put the UUID returned from addLine in as an attribute of dirn.  Like:
     
    <lines>
      <line>
        <label>Accounting</label>
        <dirn uuid="{6D057752-9267-7F4D-7F96-D6677D528710}">
    ...

    Subject: RE: Who can tell me how to get the ip phone directory number info?
    Replied by: Xiao Lv on 26-02-2009 08:17:41 AM
    Very thanks your help!! i had add a new phone with one line successfully.

    Subject: RE: Who can tell me how to get the ip phone directory number info?
    Replied by: kaiser cheng on 20-08-2009 02:42:28 PM
    In CM4.x we can have SOAP access like this :
     
     
     <?php
     $login = 'xxxxx;
     $password = 'xxxxxx';
     
     $ccm = new SoapClient('http://xxx.xxx.xxx.xxx/CCMApi/AXL/V1/AXLAPI.wsdl', 
                 array(
                      'login' => $login,
                      'password' => $password
                   ));
     
     
     
    How do we do this in CM 7?
     
    Thanks
     
    kaiser 

    Subject: RE: Who can tell me how to get the ip phone directory number info?
    Replied by: David Staudt on 24-09-2009 05:15:30 AM
    An AXL PHP how-to is available here: http://developer.cisco.com/web/axl/wikidocs?src=/wiki/display/AXL/how-to_PHP