• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 831
  • Last Modified:

Capturing SMDR data into MySQL


I am trying to put together a basic SMDR logger to record calls made in the office, we are using a mitel 3300, I can view the call data by Telnet on port 1752, how can I record this data to a MySQL db so it can be viewed?
  • 2
1 Solution
Phil DavidsonCommented:
Can the Mitel export data to text?  I would assume it could.

There are applications designed to work with any phone system.  These can extract-transform-load the data into SQL databases.  The ETL process could be developed with a programming language such as Python, Java, or even Bash.  It could then be automated.

The text data from the Mitel 3300 may need to be cleaned and formatted properly.  The MySQL database would need to be designed to have the proper datatypes for the ETL process to run smoothly.  Sometimes data immediately after being exported from a phone system can be anomalous or unusual.  This can cause the automated ETL process to fail unless there is robust exception-handling in the program that does the ETL processing.  I would first figure out how to export the data from the Mitel 3300 to plain text by calling the vendor.  Then I'd develop an in-house ETL solution or find a third party software company that has an application that can do this.

I would figure out how long the Mitel 3300 stores historic data.  You may want to back up the plain text data for historic reasons.  If the data is sensitive, you may not want to store back up copies of it.
hellblazerukAuthor Commented:
the output can be viewed using telnet not saved to a txt file, so I need a way of saving from telnet to the MySQL db?
This thread may be relevant:

Topic: Access SMDR Logs on Mitel 3300

Since you mentioned Perl, the way you would develop a script that performed this transfer would be to use the Expect module to interact with the Mitel over telnet and then send the data to MySQL using module DBD::MySql. I don't think it would be a trivial script to write, however, so it would be wise to look into whatever the Mitel community may already have developed.
Phil DavidsonCommented:
I'm curious how this would be automated without getting the data to a text file or CSV file.  I may not be able to help.  If a telnet session can be established, I would think an SFTP (or possibly an FTP) session could be established.  Do you want the text that is echoed to the telnet console to be written somewhere else as it is streamed?  That would be complex in my opinion.  Good luck.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now