Administration XML Developer Forums

« Back to Administration XML Questions

List devices and their IP Address

Combination View Flat View Tree View
Threads [ Previous | Next ]
Hi,
 
   I am using Visual Studio 2008 and C# .Net to develop a simple application. I need to get a list of all devices of type 7975 and its IP addresses (So I can then send an HTTP POST request). I can list all the existant 7675's but I'm struggling getting their correspondent IP addresses.
 
Any sugestions on how to archive this?
 
Thanks

I did it.
 
Thanks

HI Francisco ,
 
I have been trying to do the same thing in .NET as well. Actually I need to change a phone partition based on it's extension.
Can you help tell me how you did it. Also if you can help tell me how to reach the above I 'd be very thankfull. Here is my code
up until now:
 
 private void button1_Click(object sender, EventArgs e)
        {
              
            AXLAPIService oAXL = new AXLAPIService("10.2.2.2", "ccmadministrator", "password123");

            ListDeviceByNameAndClassReq phoneByName = new ListDeviceByNameAndClassReq();
            phoneByName.searchString = "SEP*";
            ListDeviceResDevice[] phones = oAXL.listDeviceByNameAndClass(phoneByName).@return;

            foreach (ListDeviceResDevice phone in phones)
            {

                lstResult.Items.Add(phone.uuid);
                lstResult.Items.Add(phone.name);
            }


        }
 
No AXL error but I always end up with empty returned result.

 
Another Method is but this gives an AXL Error:
 
{
    GetPhoneReq req = new GetPhoneReq();
   
    req.ItemElementName = ItemChoiceType29.phoneName;
    req.Item = "SEP0019D2C92685";
   
    GetPhoneRes res = new GetPhoneRes();
   
    try {
        GetPhoneResReturn Phone = oAXL.getPhone(req).@return;
        Console.WriteLine(Phone.device.description);
    }
    catch (Exception ex) {
        Statustext.Text = ex.Message;
    }
}


 

Hi Francisco,
 
How did you do it? I'm trying to do the same thing, I can get the details for the device but cannot find where in the rather large database to obtain the IP Address?
 
Many thanks
 
Jon

For real time info like IP address and registration status, use the Serviceability SOAP API - in this case RisPort: http://developer.cisco.com/web/sxml/home
 
There are a couple of how-to samples in the wiki: http://developer.cisco.com/web/sxml/wikidocs

Hi,
 
   I first did an AXL request for the devices I wanted to get the IP address, then I used RisPort, and passed that list as a parameter (CmSelectionCriteria) to get the IP address information. The link David shared explains it well.
 
   When using RisPort Serviceability SOAP API just be aware that you will only be able to get IP addresses of registered phones (therefore you will probably want to status set to "Registered" ) and that each request is limited to 200 devices.
 
   Let me know if you need any additional information.
 
Francisco

Thank you for your help.
 
I have got this working. My only slight issue is that i'm having to connect using my full administrator account.
 
Does anybody know what permissions i would need to give an Application User to do RisPort requests?
 
Many thanks
 
Jon

The role needed is 'Standard AXL API Access'.  By default, there is no user group with _only_ this permission, so you may want to create one. 

The role needed is 'Standard AXL API Access'.  By default, there is no user group with _only_ this permission, so you may want to create one. 

Thanks for the help, i have tried with 'Standard AXL API Access' but this role does not have enough permissions. I wounder if our CM has been changed to remove this!
 
I'll keep digging and let you know.

Looks like RisPort requires the following minimum Roles (tested on my CM7.0(1) labemoticon
 
- Standard CCM Admin Users (access to web services)
- Standard SERVICEABILITY Read Only (access to the RisPort API)
 

Thank you.
 
I will try adding the standard serviceabilitity and see if that works
 
 

I did it.
 
Thanks

 
Hi emoticon
 
Do you mind sharing the code it self, no reason reinventing the wheel ?
 
Kindest regards