cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1972
Views
1
Helpful
6
Replies

Get "Active Load ID" from CUCM via JAX-WS

jialinli
Level 1
Level 1

Hi,

I want to get "Active Load ID" of a specific phone from CUCM via JAX-WS, but I only find the "getLoadInformation()" to get the "Phone Load Name", which is not the "Active Load ID" I need. I searched through the classes under package "com.cisco.axl.api._11" but found nothing helpful.

Are there any written API I could call? And how can I get "Active Load ID" from CUCM if there are no functions related to this?

Thanks,

Jialing

1 Accepted Solution

Accepted Solutions

dstaudt
Cisco Employee
Cisco Employee

The situation should be as follows:

- The default load and inactive load for a particular phone model is persisted in the 'defaults' table of CUCM.  You would need to use the <executeSqlQuery> AXL request to retrieve this information (and it may be tricky to parse the response)

- The administratively configured load (which may not be the actual load on the device) is available via AXL <getPhone>

- There is no concept of an 'administratively configured inactive load' at the device-specific level

- The _actual_ active/inactive loads on the phone (as reported by the device at the time of last registration) is available via a different API: Serviceability XML RisPort: https://developer.cisco.com/site/sxml/documents/api-reference/risport/#risport70-selectcmdeviceext.  Note there are some caveats with this API, e.g. the API may not have any record of the device if it has not registered since the last restart of the CUCM system...

View solution in original post

6 Replies 6

dstaudt
Cisco Employee
Cisco Employee

The situation should be as follows:

- The default load and inactive load for a particular phone model is persisted in the 'defaults' table of CUCM.  You would need to use the <executeSqlQuery> AXL request to retrieve this information (and it may be tricky to parse the response)

- The administratively configured load (which may not be the actual load on the device) is available via AXL <getPhone>

- There is no concept of an 'administratively configured inactive load' at the device-specific level

- The _actual_ active/inactive loads on the phone (as reported by the device at the time of last registration) is available via a different API: Serviceability XML RisPort: https://developer.cisco.com/site/sxml/documents/api-reference/risport/#risport70-selectcmdeviceext.  Note there are some caveats with this API, e.g. the API may not have any record of the device if it has not registered since the last restart of the CUCM system...

Hi, David


Thank you for your detailed suggestions. But for your 4th recommendation, we actually use this method to get the active loads on the phone via TCL at first, but blocked by "MaxReturnedDevices"  as it can read about 2000 devices at most even if I changed the value to more than 2000, like 5000,10000 and so on, so we start to search other ways to get phone info. Do you know about this problem? Why we could only read 2000 records of phone info at most?


Following is the value we tried to change long time ago:

<soap:MaxReturnedDevices>1000</soap:MaxReturnedDevices>


If we could solve this problem, then we can continue to use TCL method as at the beginning, and there's no need to use JAX-WS anymore.


Thanks,

Jialing

Can you expand on how you are using TCL to query for phone load info?

The RisPort APIs are limited to returning a max of 1000 devices records.  See the Using RisPort70 With Bulk Requests section of the guide here for more details and suggestions on bulk requests: https://developer.cisco.com/site/sxml/documents/api-reference/risport/#selectcmdevice-request-format

Are there any methods to change the max returning devices number to more than 1000?

About using TCL,

1. We first setup the automation environment test bed according to:

https://wiki.cisco.com/display/CEDT/Automation%20Environment%20Setup%20Guide .

2. Use Ris to getMultipleDeviceStatus.

3. We change the <soap:MaxReturnedDevices> value in file "RISUtils.itcl" which is under the folder: auto/modena_11_5_build_150623/ipcbu/lib/ccmcon/utils (we get the "auto" folder after step1).

Part of our script is (get MAC address and IP adress):

foreach returnType $returnList {

    oRIS1 configure  -serverName $cucm_serverName -returnField $returnType

    oRIS1 getMultipleDeviceStatus  "$deviceList" result

    if {[llength $result] > 0 } { 

        set index 0

        foreach value $result {

            set name [lindex [split $returnType ":"] 1]

            #puts "$name and $value"

            set phoneInfo($index,$name) $value

            incr index

        }

        set phoneCount $index

    }

}

Part of our upgrade script is (use the methods under modena and ceaa lib):

#-----------------------------------------------------------------------------

# Common Setup

#-----------------------------------------------------------------------------

aetest::section common_setup {   

    logInfo "@REPORT::COMMONSETUP BEGIN"

   # Script setup

    set phonenum [cfgGet tb_info Registered_Phone_num]

    scriptInit -numPhones $phonenum

    #puts $phoneObjectList

    set loadServerName [cfgGet ts_info load_server]

    if { $loadServerName == "" } {

        set loadServerName "10.74.55.199"   

    }

    set downLoadName [lindex [cfgGet ts_info downgrade_load] 0]   

    logInfo "@REPORT::COMMONSETUP END"

} ;# End section common_setup   

#-----------------------------------------------------------------------------

# Test Case Start

#-----------------------------------------------------------------------------

aetest::testcase -tc_id "$logical_id" {

    logInfo "@REPORT::TESTCASE START"

        # Main test block--------------------------------------

        # Step 1 Set phone load information

        logStep 1 ENTER "Set load information"

        foreach phone $phoneObjectList {

        set oriLoad [oUCM1 phoneGetParameter -object $phone \

            -parameter loadInformation]

           oAction ac_cucmUpgradePhoneLoad \

            -phoneObj $phone \

            -loadName $downLoadName \

            -loadServer $loadServerName \

            -resetType restart \

            -waitTime 1 \

          -restoreConn 0

        logStep 1 EXIT "SUCCESS"   

}

        logStep 2 EXIT "SUCCESS"    

    # If test go here, give the subtest a pass

    ats_results -result pass

    logInfo "@REPORT::TESTCASE END"

} ;# End aetest::section -  testcase

And actually we get the load name info from the log after the phone upgraded sucessfully. As you said, using TCL to realize our requirement has many drawbacks, such as it must has phone's IP address to ssh before doing upgrade. So if possible, I found that we'd better still choose to use JAX-WS.

Thanks,

Jialing

**About this recommendation:

- The default load and inactive load for a particular phone model is persisted in the 'defaults' table of CUCM.  You would need to use the <executeSqlQuery> AXL request to retrieve this information (and it may be tricky to parse the response).

I found "ExecuteSQLQueryReq.java" and "ExecuteSQLQueryRes.java" under package "com.cisco.axl.api._11", and also found a similar discussion created 2 years ago: ExecuteSQL returning row:null with JAX-WS

I saw the following sql query:

String sSQLQuery = "select processnodeservice.servername from processnodeservice,typeservice where processnodeservice.tkservice = typeservice.enum and typeservice.processname='ctftp'";

and also found "CUCM 10.5(1) Database Dictionary", is it compatible with CUCM 11.5? I saw a link once provided by you http://developer.cisco.com/web/axl/docs, but it is blank now.

And I also wonder how to find the related tables which can help me get active load ID from CUCM

Looking forward to your advice, thank you~

Thanks,

Jialing

FYI the 1000 record return limit is a fixed limitation of the Risport API.