cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1348
Views
0
Helpful
1
Replies

Get the device IP using AXLAPIService

aaronngan
Level 1
Level 1

I am using CUCM 8.5, trying to retrieve the user device IP address from his/her extension number. I have called the AXLAPIService.executeSQLQuery(), using this function and the following SQL query, I can successfully retrieve the device name (d.name).

select d.name

from DeviceNumPlanMap dn, device d, NumPlan n 
where dn.fkDevice = d.pkid and dn.fkNumPlan = n.pkid and n.DNOrPattern='3345'

 

I want to alter the query to find the user device's IP address, but after a few hours research, I have no clue which table and column contains that information. Would any expert share your experience to me, please?

1 Reply 1

Andrey Kuchuk
Level 1
Level 1

 

<?php
////////////////////////////////////////
//  Author : Kanishka Thilakabandara          //
//  All rights reserved                               //
/////////////////////////////////////
$client = new SoapClient(
"https://cucm-ip/realtimeservice/services/RisPort?wsdl",
array(
"exceptions"=>true,
"location"=>"https://cucm-ip:8443/realtimeservice/services/RisPort",
"login" => "admin",
"password"=> "ciscocisco",
"trace" => true
)
);  //here we create a soap client to communicate with the cisco call manager's soap/axl interface.

$array['SelectBy'] = "DirNumber";  //you can use a criteria to select
$array['Status'] = "Registered";  //select only the registered user

$array['SelectItems']['SelectItem[0]']['Item'] = "3345";  //select phone with any description


$devices = $client->SelectCmDevice( "", $array );  //fetch all devices which matches criteria mentioned above

//print_r($devices->TotalDevicesFound);