How to Get CDR Data from Yeastar S-Series VoIP PBX

Introduction

Yeastar S-Series Station Message Detail Recording (SMDR) provides a record of the system’s calls, including outgoing calls, incoming calls and internal calls. Typically, the record outputs to a customer-provided terminal or SMDR data collection device. SMDR allows you to monitor the usage at each extension and trunks. This makes charge-back and traffic managements easier.

The SMDR call record outputs when the call completes. SMDR requires a customer-provided data collection device connected to the Yeastar S-Series's  port 5038 through TCP/IP. Below steps will guide you how to activate the SMDR and collect CDR data from Yeastar S-Series VoIP PBX.

We take S100 as an example to explain how to get CDR data in real time.

AMI Settings

Step 1. Enable AMI on S100 and setup the permitted host/IP to access AMI.

PATH: Settings –>System -> Security -> Service

 

Step 2. Connect to S100 AMI through TCP/IP.

Here we will use a third party software tool putty.exe to demonstrate how to connect to S100 AMI through TCP/IP. A customer-provided data collection device will need to connect to S100 within the application and collect the CDR data, stored into its own database and use the CDR data for further purpose.

 

There is a space between ‘action:’ and ‘Login’. Use single CR/LF to change to another line. Use double CR/LF to send and execute the command.

Step3. Collect CDR data.

Once login successfully, S100 will send quite a lot messages to the application. Please ignore those messages that are not related to CDR. The CDR event will be sent when a call finish. The CDR data will in below format:

Event: Cdr
Privilege: cdr,all
AccountCode:
Source: 1005
Destination: 1010
DestinationContext: DLPN_DialPlan1005
CallerID: "1005" <1005>
Channel: PJSIP/1005-00000001
DestinationChannel:
LastApplication: Dial
LastData: PJSIP/1010,30,tTKkWwXx
StartTime: 2016-09-28 17:45:45
AnswerTime: 2016-09-28 17:45:45
EndTime: 2016-09-28 17:45:52
Duration: 6
BillableSeconds: 6
Disposition: ANSWERED
AMAFlags: DOCUMENTATION
UniqueID: 1475113545.2
UserField:

Database Settings

S100 uses MySQL as the database to store the CDR data, another much easier way to get the CDR data from S100 is access to S100 CDR Database directly. See below for detail steps:

Step 1. Setup Database grant on S100 web GUI.

Database Grant settings can be found on Settings -> System -> Security -> Database Grant. We can specify the username and password as we want.

       

Step 2. Access the Database on S100 from external application.

Here we use Navicat (A MySQL client) to access to S100 CDR Database. If you would like to get CDR data from your application, you will need to customize your application to access to S100 database. 


After connect successfully, you will be able to see below CDR table.

 

 

 

Have more questions? Submit a request

5 Comments

  • 0
    Avatar

    Hi Mandy, very informative, good post, thank you.  Can we add FTP as a third method to capture CDRs from S Series?  Regards, Gustavo.

  • 2
    Avatar

    We need grant to blacklist table! Is it realy?

  • 0
    Avatar

    Hi Mandy,

    Very interesting post. As medical practice we went live recently with our s20. Basically all sort of third parties tools are handy to perform all sorts of queries and visualize table structure among the more sophisticated features they offer. But what about integration rather to perform that painful exercise each time I need and adhoc report. For sure I did not invent a new wheel, but good practice recall us to keep code and logic as much you can on one place and not morcelated around your network.

    Now in our case, we use an oracle based Peoplesoft system to deal with centralized patient file including all sort of com gateways as eMail, fax, Web Services and much more. I also connect Oracle to Sql Server and recently to MySql (our s20) to keep development centralized and transparent on the main system. I’m still fascinated about our versatile and trusted technology, perhaps old, being able to incorporate new equipment. Now if someone is interested to know more about Oracle connection to MySql, I’ll be happy to share our experience too.  

  • 0
    Avatar

    Would it be possible to set an export schedule with MySQL in S-Series ?

  • 0
    Avatar

    How can we delete cdr tables? User has no permissions...

Please sign in to leave a comment.