JAMES DEPHILLIP II | So after quite some time I have figured it out. For those of you who wish to export an array of IP address of registered phones from CM using PHP here it is. If anyone have a way to clean this up feel free. <?php define('CUCM_SERVER_IP', 'x.x.x.x'); define('CUCM_SERVER_PORT','8443'); define('CUCM_AXL_USER', 'xxxxxxx'); define('CUCM_AXL_PASS', 'xxxxxxx'); define('CUCM_AXL_API', '/Library/WebServer/Documents/RisportIP.wsdl'); $client = new SoapClient(CUCM_AXL_API, array('trace'=>true, 'exceptions'=>true, 'location'=>"https://".CUCM_SERVER_IP.":".CUCM_SERVER_PORT."/realtimeservice/services/RisPort", 'login'=>CUCM_AXL_USER, 'password'=>CUCM_AXL_PASS)); $devices = $client->SelectCmDevice( "", array( "SelectBy" => "Name", "Status" => "Registered", "Class" => "Phone" ) ); $RegPhoneIP = array( ); foreach( $devices as $first){ if( is_array($first->CmNodes) ){ $CmNodes = $first->CmNodes; foreach( $CmNodes as $second){ if( is_array($second->CmDevices) ){ $CmDevices = $second->CmDevices; foreach( $CmDevices as $third){ $RegPhoneIP = array_merge_recursive($RegPhoneIP, array($third->IpAddress)); } } } } } print_r ($RegPhoneIP); ?> |