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

how to read cdr records from freepbx installation by vb.net

Hi, i want to read cdr records from a freepbx installation. Ho to connect with the mysql database on the freepbx box
which connection string ...
which table to i need to use

what fields are on that table?

thanks,

AJ
0
aatjan
Asked:
aatjan
  • 2
1 Solution
 
Ron MalmsteadInformation Services ManagerCommented:
First you need to install the MySQL client on your the machine you will run your code from.

The connection string is similar to a mssql connection string...

Dim asteriskserveripaddress As String = "192.168.6.2"
    Dim asteriskservermysqllogin As String = "root"
    Dim asteriskservermysqlsecret As String = "secret"
    Dim asteriskserverdbname As String = "asteriskcdr"
Public mysqlconnStr As String = "Database=asterisk;" & _
                        "Data Source=" & asteriskserveripaddress & ";" & _
                        "User Id=" & asteriskservermysqllogin & ";Password=" & asteriskservermysqlsecret


Fields
1.accountcode: What account number to use: Asterisk billing account, (string, 20 characters)
2.src: Caller*ID number (string, 80 characters)
3.dst: Destination extension (string, 80 characters)
4.dcontext: Destination context (string, 80 characters)
5.clid: Caller*ID with text (80 characters)
6.channel: Channel used (80 characters)
7.dstchannel: Destination channel if appropriate (80 characters)
8.lastapp: Last application if appropriate (80 characters)
9.lastdata: Last application data (arguments) (80 characters)
10.start: Start of call (date/time)
11.answer: Answer of call (date/time)
12.end: End of call (date/time)
13.duration: Total time in system, in seconds (integer), from dial to hangup
14.billsec: Total time call is up, in seconds (integer), from answer to hangup
15.disposition: What happened to the call: ANSWERED, NO ANSWER, BUSY, FAILED (on some CDR backends, e.g. ODBC, these may be integers; note that more detailed info can be found in the dialplan variable $HANGUPCAUSE)
16.amaflags: What flags to use: see amaflags: DOCUMENTATION, BILLING, IGNORE etc, specified on a per channel basis like accountcode.
17.user field: A user-defined field, maximum 255 characters

In some cases, uniqueid is appended:

•uniqueid: Unique Channel Identifier (32 characters)

http://www.voip-info.org/wiki/view/Asterisk+cdr+mysql
0
 
Ron MalmsteadInformation Services ManagerCommented:
Imports MySql.Data.MySqlClient
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

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