Howto:Is there any example code or simple scripts/programs in order to put call-information into an MySQL (or similiar) database in order to build CRM-alike solutions towards the MySQL DB?

From innovaphone wiki
Revision as of 18:50, 9 June 2011 by Afi (talk | contribs)
Jump to navigation Jump to search

FAQ:

Is there any example code or simple scripts/programs in order to put call-information into an MySQL (or similiar) database in order to build CRM-alike solutions towards the MySQL DB?

Answer:

Documentation regarding PBX CDR and Gateway CDR format is in the wiki.

Sample Active Server Page

This is somewhat outdated pre-.Net ASP sample code. It may help to get the idea though

This example outlines the storage of CDRs using an ASP-enabled Web Service (tested with MS’s IIS5). The application lives in the URL /cdr. It will by default create logfiles named cdrlog_date_srcip.txt in a subdirectory CDR underneath /cdr. Thus, a logfile may be found e.g. on \\webserver\webroot\cdr\CDR\cdrlog_20010208_195.226.104.135.txt.

The application is made up of 3 files, all located in asp/cdr.

  1. global.asa, initialises system parameter.
  2. Cdrwrite.asp, actually writes the CDR entries to the log file
  3. Cdrform.htm, sample HTML form to debug the installation

To install

  • copy all files into your web servers /cdr position
  • create a subdirectory called CDR
  • make sure your web server processes ASP applications in the /cdr directory
  • Point your browser to the server and open /cdr/cdrform.htm. You should see a form that allows to submit Time and Event
  • Fill in the fields and submit the form. You should see something like
Event: A:Disc
CDR LOG Entry saved to d:\inetpub\wwwroot\cdr\CDR\cdrlog_20010208_127.0.0.1.txt 
Tag: time = 100
Tag: event = A:Disc
CDR ENTRY(082829 time='100' event='A:Disc' ) 
Done.
  • open your Gateways configuration UI
  • set CDR-Logging parameters to log to your web server, using method HTTP, URL /cdr/cdrwrite.asp

Download