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?: Difference between revisions

From innovaphone wiki
Jump to navigation Jump to search
(New page: '''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 My...)
 
No edit summary
Line 5: Line 5:
'''Answer:'''
'''Answer:'''


There is some sample code and a detailed description of the call information (CDR) available in each release package. Search for the document "innovaphoneCDRs.doc" in the predoc folder of your release package. There are code samples and also captured cdr's embedded in the document.
Documentation regarding [[Reference7:Call Detail Record CDR PBX|PBX CDR]] and [[Reference:Call Detail Record CDR|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 <code>/cdr</code>. It will by default create logfiles named <code>cdrlog_date_srcip.txt</code> in a subdirectory <code>CDR</code> underneath <code>/cdr</code>. Thus, a logfile may be found e.g. on <code>\\webserver\webroot\cdr\CDR\cdrlog_20010208_195.226.104.135.txt</code>.
 
The application is made up of 3 files, all located in <code>/cdr</code>.
# <code>global.asa</code>, initialises system parameter.
# <code>Cdrwrite.asp</code>, actually writes the CDR entries to the log file
# <code>Cdrform.htm</code>, sample HTML form to debug the installation
 
To install
* copy all files into your web servers <code>/cdr</code> position
* create a subdirectory called <code>CDR</code>
* make sure your web server processes ASP applications in the <code>/cdr</code> directory
* Point your browser to the server and open <code>/cdr/cdrform.htm</code>. 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 <code>/cdr/cdrwrite.asp</code>
 
[[Media:CDRASPAMPLE_CODE.zip|ASP Sample Code]]<br>
[[Media:CDRASPAMPLE_CDRS.zip|Sample Call Detail Records]]
 
 
 


[[Category:Faq|{{PAGENAME}}]]
[[Category:Faq|{{PAGENAME}}]]
[[Category:Sample|{{PAGENAME}}]]

Revision as of 09:42, 14 May 2009

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 /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

ASP Sample Code
Sample Call Detail Records