[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2308
  • Last Modified:

Asterisk CDR database? schema?

Anyone know what database Asterisk uses for their CDR database?  Anyone know what the schema is?  Fields, etc.?
0
Tim Titus
Asked:
Tim Titus
  • 2
  • 2
2 Solutions
 
kode99Commented:
Usually you would find it going to a CSV file or MySQL database.  Here is the field list for the CSV,

http://www.voip-info.org/wiki/view/Asterisk+cdr+csv

And there is an example of the table creating with a SQL command here,

http://www.voip-info.org/wiki-Asterisk+cdr+mysql

In general voip-info.org has tons of useful Asterisk info and is often a good place to start.
0
 
Tim TitusCTOAuthor Commented:
Excellent site!  Thanks!  One quick questions before I awared you the points:

It looks like there is no SourceIP or DestinationIP for the phone IP that was used in the call -- is this true, or is this in a different table?

From how the table is formatted, it looks like it only records external to internal calls -- not internal to internal calls, true?
0
 
grbladesCommented:
There is no IP information recorded and there is also no separate table.
All attempted calls are logged regardless of the source or destination.
0
 
Tim TitusCTOAuthor Commented:
So there's no ability to track which phone's IP address connected to which gateway for a call?
0
 
grbladesCommented:
If its an unauthenticated incoming call then the IP address will normally be recorded in the channel name which is in the call records.
If its authenticated then only the authenticated user name is mentioned.  You will have to look up the ${CHANNEL} variable to find the username and then query the built in asterisk database unser SIP/Registry/username to pull out the IP address and put that into the custom accountcode or user field.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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