AXL - Get Extension from MAC address

Version 1
    This document was generated from CDN thread

    Created by: Siva Thirunavukarasu on 20-09-2010 04:38:22 PM
    Hi,
     
    I need help to get the following information:
     
    1. How to get the extenion number of the phone given the MAC address?
     
    2. C++/windows sample code for the above ( or pointers on using AXL on c++/Windows)
       The sample code for Linux/Unix would not compile under windows  
     
    Thanks

    Subject: RE: AXL - Get Extension from MAC address
    Replied by: Siva Thirunavukarasu on 01-10-2010 03:20:08 PM
    For anyone's interest :
     
    Did not proceed much with using AXL under C++/Windows...... rather used c# instead.
     
     
    Used the WSDL.exe to generate the c# proxy class and then complied it using CSC to get AXLAPIService.dll 
    ************************ 
    C#  code extract :
    **********************
     
    AXLAPIService axlWS = new AXLAPIService("Your CallManager IP  address", "user name", "password");
     
    GetPhoneReq oGetPhoneReq = new GetPhoneReq();
    oGetPhoneReq.ItemElementName = ItemChoiceType8.phoneName;
    oGetPhoneReq.Item = "SEP001AA1D04888";   // your phone name
    GetPhoneRes oGetPhoneRes = axlWS.getPhone(oGetPhoneReq);
    lblResult.Text = oGetPhoneRes.@return.device.description;
    txtResult.Text = "Extension Numbers( i.e Lines)\n\n";
     
    foreach (XLine line in oGetPhoneRes.@return.device.lines.Items)
    {
     
           GetLineReq oGetLineReq = new GetLineReq();
           oGetLineReq.sequence = 1;
           oGetLineReq.uuid = line.Item.uuid; 
           GetLineRes oGetLineRes = axlWS.getLine(oGetLineReq);<font size="2">
           txtResult.Text = txtResult.Text + oGetLineRes.@return.directoryNumber.description +
                                " : " +oGetLineRes.@return.directoryNumber.pattern + "\n";
    }