Post

Call Statistics from Sonus UX 1000/2000 using the RESTful API

Introduction

Challenged to collect call statistics from our Sonus UX 1000 SBC the first thought was to use SNMP. After enabling SNMP and pointing an SNMPwalk tool with MIB to the SBC, I struggled to find anything useful that could be used by our monitoring software with its native SNMP sensor. Why taunt me with your call counters in the web administration interface and not expose them through SNMP?

My colleagues have been using the Sonus UX REST API and PowerShell to load up configurations when deploying so thought I’d give it a go. Not much browsing time later and I had the API calls needed:

This is what I ended up with.

The Script

Nothing much to it.

1
.\Get-SonusUxCallCounters.ps1 -Username "restuser" -Password "restpassword" -ServerFqdn "sbc.contoso.com" -Type SIP -Id 1

Type can be SIP, ISDN or CAS.

PRTG

Choose the “EXE/Script Advanced” sensor type and fill in the settings:

PRTG

I’ve used the Linux username and password of the parent device to pass through the REST credentials.

A little while later…

Stats!

Stats!

Guess everyone went home around 5.30 :)

Happy Boss

That’ll keep the boss entertained.

Download

Downoad Get-SonusUxCallCounters.ps1

This post is licensed under CC BY 4.0 by the author.