################################################## #!/usr/bin/perl $cucm_ip = "10.74.7.52"; $user_axl = "user"; $password_axl = "password"; $path_file=$path."input.txt"; ############################################################################################### $ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0; use SOAP::Lite; BEGIN { sub SOAP::Transport::HTTP::Client::get_basic_credentials { return ($user_axl => $password_axl) } } my $CUCM = SOAP::Lite ->uri("http://schemas.cisco.com/ast/soap") ->proxy("https://$cucm_ip:8443/realtimeservice2/services/RISService70?wsdl"); if (-e $path_file) { print "File exits\n"; print ON "File exits\n"; open(IN,"$path_file"); while () { print "==\n"; $devname=""; $line=$_; chomp($line); @values=split(/\;/,$line,1); $devname=(shift @values); print "Input:".$devname."\n"; ################################################################################################## my $xmlCode = "1000Any255AnyName$devnameAnyAny"; $elem = SOAP::Data->type('xml' => $xmlCode); my $sRes = $CUCM->selectCmDevice($elem); my @devStat = $sRes->valueof('//return/row/Status'); print "Device Status:";print join (',' , @devStat);print "\n"; #print "Device Type:".$_device_pkid."\n"; #print "Device Desc:".$_device_description."\n"; print "---\n"; ##################################################################################################### } } else { print "File not found\n"; } ###End############################################################################################# #### 1000 Any 255 Any DirNumber 6961 Any Any