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
No edit summary |
mNo edit summary |
||
Line 14: | Line 14: | ||
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 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>. | The application is made up of 3 files, all located in <code>asp/cdr</code>. | ||
# <code>global.asa</code>, initialises system parameter. | # <code>global.asa</code>, initialises system parameter. | ||
# <code>Cdrwrite.asp</code>, actually writes the CDR entries to the log file | # <code>Cdrwrite.asp</code>, actually writes the CDR entries to the log file | ||
Line 34: | Line 34: | ||
* set CDR-Logging parameters to log to your web server, using method HTTP, URL <code>/cdr/cdrwrite.asp</code> | * set CDR-Logging parameters to log to your web server, using method HTTP, URL <code>/cdr/cdrwrite.asp</code> | ||
[ | == Download == | ||
*[http://download.innovaphone.com/ice/wiki-src#savecdrs http://download.innovaphone.com/ice/wiki-src#SaveCDRs] - download the complete file package of scripts and files described in this article. | |||
[[Category:Faq|{{PAGENAME}}]] | [[Category:Faq|{{PAGENAME}}]] | ||
[[Category:Sample|{{PAGENAME}}]] | [[Category:Sample|{{PAGENAME}}]] |
Revision as of 18:50, 9 June 2011
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
.
global.asa
, initialises system parameter.Cdrwrite.asp
, actually writes the CDR entries to the log fileCdrform.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
- http://download.innovaphone.com/ice/wiki-src#SaveCDRs - download the complete file package of scripts and files described in this article.