System information
Last connection attempt: 1969-12-31 19:00:00
Pooled: No
Connected: Yes
Managing Databases
While it isn’t within the scope of this book to teach you about how to manage your
databases, it is worth at least noting briefly some of the applications you could use to
help with database management. Several exist, some of which are local client applica-
tions running from your computer and connecting to the database, and others of which
are web-based applications that could be served from the same computer running the
database itself, thereby allowing you to connect remotely.
Some of the ones we’ve used include:
• phpMyAdmin (http://www.phpmyadmin.net)
• MySQL Workbench (http://wb.mysql.com)
• pgAdmin (http://www.pgadmin.org)
• Navicat (commercial) (http://www.navicat.com)
Troubleshooting Database Issues
When working with ODBC database connections and Asterisk, it is important to re-
member that the ODBC connection abstracts some of the information passed between
Asterisk and the database. In cases where things are not working as expected, you may
need to enable logging on your database platform to see what Asterisk is sending to the
database (e.g., what SELECT, INSERT, or UPDATE statements are being triggered from
Asterisk), what the database is seeing, and why the database may be rejecting the
statements.
For example, one of the most common problems found with ODBC database integra-
tion is an incorrectly defined table, or a missing column that Asterisk expects to exist.
While great strides have been made in the form of adaptive modules, not all parts of
Asterisk are adaptive. In the case of ODBC voicemail storage, you may have missed a
column such as flag, which is a new column not previously found in versions of Asterisk
prior to 1.8.
§
In order to debug why your data is not being written to the database as
expected, you should enable statement logging on the database side, and then deter-
mine what statement is being executed and why the database is rejecting it.
§ This was actually an issue one of the authors had while working on this book, and the flag column was found
by looking at the statement logging during PostgreSQL testing.
Managing Databases | 353