cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
6698
Views
0
Helpful
2
Replies

Trying to get SIP trunk status using XML API

pravi_007
Level 1
Level 1

Hi,

I am trying to get SIP trunk status using XML API query (selectCmDevice RisPort query).

Following is the Cisco documentation

Ref#http://www.cisco.com/c/en/us/td/docs/voice_ip_comm/cucm/devguide/9_1_1/xmldev-911/serviceability.html#wp1079635

Displays the status of SIP trunk. The following options are available:

•InService

•OutOfService

•PartialService

•Unknown


However, when I ran it against my call manager, I couldn't find the SIPStatus attribute.


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:soap="http://schemas.cisco.com/ast/soap">

    <soapenv:Header/>

    <soapenv:Body>

       <soap:selectCmDevice>

          <soap:StateInfo/>

          <soap:CmSelectionCriteria>

             <soap:MaxReturnedDevices>200</soap:MaxReturnedDevices>

             <soap:DeviceClass>SIP Trunk</soap:DeviceClass>

             <soap:Model>255</soap:Model>

             <soap:Status>Any</soap:Status>

             <soap:NodeName></soap:NodeName>

             <soap:SelectBy>Name</soap:SelectBy>

             <soap:SelectItems>               

             </soap:SelectItems>

          </soap:CmSelectionCriteria>

       </soap:selectCmDevice>

    </soapenv:Body>

</soapenv:Envelope>

    <?xml version='1.0' encoding='UTF-8'?>

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

    <soapenv:Body>

    <ns1:selectCmDeviceResponse xmlns:ns1="http://schemas.cisco.com/ast/soap">

    <ns1:selectCmDeviceResponse>

    <ns1:SelectCmDeviceResult>

    <ns1:TotalDevicesFound>2</ns1:TotalDevicesFound>

    <ns1:CmNodes>

    <ns1:CmNode>

    <ns1:ReturnCode>Ok</ns1:ReturnCode>

    <ns1:Name>192.168.200.200</ns1:Name>

    <ns1:NoChange>false</ns1:NoChange>

    <ns1:CmDevices>

    <ns1:CmDevice>

    <ns1:Name>SIP_TRUNK_CUC</ns1:Name>

    <ns1:IpAddress>192.168.200.200</ns1:IpAddress>

    <ns1:DirNumber xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="1" />

    <ns1:DeviceClass>SIP Trunk</ns1:DeviceClass>

    <ns1:Model>131</ns1:Model>

    <ns1:Product>0</ns1:Product>

    <ns1:BoxProduct>0</ns1:BoxProduct>

    <ns1:Httpd>Unknown</ns1:Httpd>

    <ns1:RegistrationAttempts>0</ns1:RegistrationAttempts>

    <ns1:IsCtiControllable>false</ns1:IsCtiControllable>

    <ns1:LoginUserId xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="1" />

    <ns1:Status>Registered</ns1:Status>

    <ns1:StatusReason>0</ns1:StatusReason>

    <ns1:PerfMonObject>0</ns1:PerfMonObject>

    <ns1:DChannel>0</ns1:DChannel>

    <ns1:Description>Unity Connection SIP Trunk</ns1:Description>

    <ns1:H323Trunk>

    <ns1:ConfigName xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="1" />

    <ns1:TechPrefix xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="1" />

    <ns1:Zone xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="1" />

    <ns1:RemoteCmServer1 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="1" />

    <ns1:RemoteCmServer2 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="1" />

    <ns1:RemoteCmServer3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="1" />

    <ns1:AltGkList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="1" />

    <ns1:ActiveGk xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="1" />

    <ns1:CallSignalAddr xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="1" />

    <ns1:RasAddr xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="1" />

    </ns1:H323Trunk>

    <ns1:TimeStamp>0</ns1:TimeStamp>

    </ns1:CmDevice>

    </ns1:CmDevices>

    </ns1:CmNode>

    <ns1:CmNode>

    <ns1:ReturnCode>Ok</ns1:ReturnCode>

    <ns1:Name>192.168.200.201</ns1:Name>

    <ns1:NoChange>false</ns1:NoChange>

    <ns1:CmDevices>

    <ns1:CmDevice>

    <ns1:Name>SIP_TRUNK_CUC</ns1:Name>

    <ns1:IpAddress>192.168.200.201</ns1:IpAddress>

    <ns1:DirNumber xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="1" />

    <ns1:DeviceClass>SIP Trunk</ns1:DeviceClass>

    <ns1:Model>131</ns1:Model>

    <ns1:Product>0</ns1:Product>

    <ns1:BoxProduct>0</ns1:BoxProduct>

    <ns1:Httpd>Unknown</ns1:Httpd>

    <ns1:RegistrationAttempts>0</ns1:RegistrationAttempts>

    <ns1:IsCtiControllable>false</ns1:IsCtiControllable>

    <ns1:LoginUserId xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="1" />

    <ns1:Status>Registered</ns1:Status>

    <ns1:StatusReason>0</ns1:StatusReason>

    <ns1:PerfMonObject>0</ns1:PerfMonObject>

    <ns1:DChannel>0</ns1:DChannel>

    <ns1:Description>Unity Connection SIP Trunk</ns1:Description>

    <ns1:H323Trunk>

    <ns1:ConfigName xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="1" />

    <ns1:TechPrefix xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="1" />

    <ns1:Zone xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="1" />

    <ns1:RemoteCmServer1 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="1" />

    <ns1:RemoteCmServer2 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="1" />

    <ns1:RemoteCmServer3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="1" />

    <ns1:AltGkList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="1" />

    <ns1:ActiveGk xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="1" />

    <ns1:CallSignalAddr xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="1" />

    <ns1:RasAddr xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="1" />

    </ns1:H323Trunk>

    <ns1:TimeStamp>0</ns1:TimeStamp>

    </ns1:CmDevice>

    </ns1:CmDevices>

    </ns1:CmNode>

    </ns1:CmNodes>

    </ns1:SelectCmDeviceResult>

    </ns1:selectCmDeviceResponse>

    </ns1:selectCmDeviceResponse>

    </soapenv:Body>

    </soapenv:Envelope>

2 Replies 2

dstaudt
Cisco Employee
Cisco Employee

I went through that thread....I kind of need an official answer as to what we should expect from the API in terms of status returns in RIS:

I am assuming the conditions are:

a) Dont have options ping set up

b) have options ping set up but get a failure to one peer (partial?)

c) all optons pings return nothing.

Also by setting up options ping, assuming that means from the call manger?  if its set up from the gateway...not sure if that returns status or not to the cm?

We have done some testing but I dont really want to change things based on testing alone because we could be navigating through bugs or setup issues on our side and miinterpret the RIS returns for SIP Trunks.

Also, not sure what the expected status return is of H.323 trunks and H.323 Gateway class RIS returns.

I also am seeing the "Rejected" status on Trunks... not sure if that means something different yet, we are trying to investigate that..

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: