cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2214
Views
5
Helpful
10
Replies

CUCM Real time call statistics over API

razikh
Level 1
Level 1

Hi All,

 

    I'm trying to find an API that will return live call statistics such as calling party, called party, call duration, packet loss, jitter, etc., I looked at perfmon APIs but could not find the relevant methods. Is there a function or endpoint which can return live call statistics? I know the RTMT tool does that but I'm looking for an API endpoint. I appreciate your suggestions & thoughts. 

 

CUCM Version: 11.5 

 

Thanks,
Razikh

1 Accepted Solution

Accepted Solutions

Regarding RTMT

I think that it's not documented as this API is only used by RTMT and Cisco doesn't want users to use it as it may have an impact on CUCM performance.

BTW - found something interesting. Here is a link to old legacy documentation CUCM version 3.X - https://www.cisco.com/en/US/docs/voice_ip_comm/cucm/service/3_1_1/ccmsrv/srtmt.html#wpxref50993. As you can see it looks like this API had a dedicated web portal to pull data.

What I would do to verify the endpoint.

  • Enable the highest trace for the RTMT Web Service on CUCM
  • Run the statistics that you found in RTMT with call counters
  • Download and see what you have in log

It is possible that you will get some more info about the endpoint used to pull the stats,

 

Regarding CDR's and CMR's

You don't need to use the CDR On-Demand WS to get the files. CUCM has a built-in feature that can auto send the CDR files when they are created - the same mechanism that billing systems use.

 

And here is one more idea
If you have WebAccess enabled you can pull the stats directly from endpoints. To try it, simply just enter the IP endpoint to the browser. Then just see the link for the required stats. Here is a sample link that allows you to pull stream stats from endpoint:

http://198.18.133.39/CGI/Java/Serviceability?adapter=device.statistics.streaming.0

The IP address can be determined using CUCM RisPort API.

The disadvantage of this solution is a fact that you will need to pull the counters directly from HTML code.

 

Marek
Web: https://gaman-gt.com

View solution in original post

10 Replies 10

Hi @razikh 

RTMT uses AST endpoint on CUCM to pull the data. You can try the following link to gain some knowledge about this API: https://<ip_or_fqdn_of_cucm_server/ast/

The main problem with this API is that it's not documented and you will need to do some reverse engineering to use it. Probably a good idea is to enable the highest debug level for RTMT Web Service and then based on the logs get the data. Here is a sample of logs:

2020-02-14 22:50:38,998 INFO  [Thread-184] conf.ServerList$2 - ServerList::subscibeToCN: On Process Node Service Update
2020-02-14 22:50:47,091 DEBUG [http-bio-443-exec-1] servlet.AstServlet - From Session the UserMLAStatus is true
2020-02-14 22:50:47,093 DEBUG [http-bio-443-exec-1] servlet.AstServlet - doGet(): request-> GetPreCannedInfo&Items=getCpuAndMemoryRequest;getPartitionInfoRequest
2020-02-14 22:50:47,094 DEBUG [http-bio-443-exec-1] servlet.ServletRequestHandler - requestType=GetPreCannedInfo
2020-02-14 22:51:26,577 DEBUG [http-bio-443-exec-1] servlet.AstServlet - From Session the UserMLAStatus is true
2020-02-14 22:51:26,578 DEBUG [http-bio-443-exec-1] servlet.AstServlet - doGet(): request-> GetPreCannedInfo&Items=getCpuAndMemoryRequest;getPartitionInfoRequest
2020-02-14 22:51:26,578 DEBUG [http-bio-443-exec-1] servlet.ServletRequestHandler - requestType=GetPreCannedInfo
2020-02-14 22:51:26,578 DEBUG [http-bio-443-exec-1] servlet.ServletRequestHandler - GetPreCannedInfo requestType=getCpuAndMemoryRequest;getPartitionInfoRequest

 

As it may be hard to pull the data maybe you can use the option that doesn't give real-time stats but it contains all that you need. I have in ming CDR and CMR files that can be automatically sent to SFTP/FTP location. I may say that those files will give you a semi online stats. What you need to do is to process the data from that file and extract the needed data.

Here is a link to the Cisco doc that describes the CDRs and CMRs: https://www.cisco.com/c/en/us/td/docs/voice_ip_comm/cucm/service/11_5_1/cdrdef/cucm_b_cucm-cdr-administration-guide-1151/cucm_b_cucm-cdr-administration-guide-1151_chapter_01.html

Marek
Web: https://gaman-gt.com

Hi Marek,

Thank you for sharing this endpoint. Definitely a step closer. it displays total call count but doesn't tell much about the call details such as who is calling to whom. Yes, I have enabled CDRs and have tried the API which copies the file to the sftp. Challenge as you rightly said, parsing the file. So, I'm trying to see if there is an API way to get it. Maybe if there is a list of /ast endpoints & methods would have helped. Wonder why it's not documented.

Regards,
Razikh

Regarding RTMT

I think that it's not documented as this API is only used by RTMT and Cisco doesn't want users to use it as it may have an impact on CUCM performance.

BTW - found something interesting. Here is a link to old legacy documentation CUCM version 3.X - https://www.cisco.com/en/US/docs/voice_ip_comm/cucm/service/3_1_1/ccmsrv/srtmt.html#wpxref50993. As you can see it looks like this API had a dedicated web portal to pull data.

What I would do to verify the endpoint.

  • Enable the highest trace for the RTMT Web Service on CUCM
  • Run the statistics that you found in RTMT with call counters
  • Download and see what you have in log

It is possible that you will get some more info about the endpoint used to pull the stats,

 

Regarding CDR's and CMR's

You don't need to use the CDR On-Demand WS to get the files. CUCM has a built-in feature that can auto send the CDR files when they are created - the same mechanism that billing systems use.

 

And here is one more idea
If you have WebAccess enabled you can pull the stats directly from endpoints. To try it, simply just enter the IP endpoint to the browser. Then just see the link for the required stats. Here is a sample link that allows you to pull stream stats from endpoint:

http://198.18.133.39/CGI/Java/Serviceability?adapter=device.statistics.streaming.0

The IP address can be determined using CUCM RisPort API.

The disadvantage of this solution is a fact that you will need to pull the counters directly from HTML code.

 

Marek
Web: https://gaman-gt.com

Thanks, Marek. I found the perfmon CallsActive counter from the /ast endpoint you shared earlier. I'm trying with perfmon endpoint to gather stats. I agree with you on pulling the data from endpoints and it works fine. In my case, we have DX 80s and I use its /status.xml to gets stats. The challenge is, we have to circle through all the DX 80s and it adds to the network traffic. Hence wanted to find a CUCM endpoint that can return the live call data which the DX 80 endpoint does.  

 

I appreciate your help & insights on the topic!

If you have a DX80 you can use a different approach. Those devices are capable to send some data to the monitoring server via HTTP Feedback API (xCommand > HTTP Feedback). All you need to do is to register for specific commands. As far as I remember there the device can send data only during the call. They come as small XML's, but still, they will be pushed through the network.

Marek
Web: https://gaman-gt.com

Thank you! I will explore this option. What is the monitoring server in this case?

Hi Marek,

 

   Do I need TelePresence Management Suite Provisioning Extension application to capture the feedback from DX 80s? I'm reading about that now. 

 

Thanks,
Razikh

You don't need to have the TMS in this case. You can use any HTTP/HTTPS server that will listen for the events that the device will send. You can treat this mechanism as a WebCallback.

Marek
Web: https://gaman-gt.com

Any custom HTTP/HTTPS server that is able to parse the incoming data.

Marek
Web: https://gaman-gt.com

Nice! Thank you for the information.