[Home]

Summary:ASTERISK-19061: Wiki Documentation on Realtime Database Connector possible incorrect syntax for extconfig.conf file.
Reporter:Brynjolfur Thorvardsson (binni)Labels:
Date Opened:2011-12-18 05:55:57.000-0600Date Closed:2011-12-19 11:47:56.000-0600
Priority:MinorRegression?
Status:Closed/CompleteComponents:Documentation
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Syntax for extconfig.conf file states <db name>, which in context can only imply database name in the RD system.

<family> => <realtime driver>,<db name>[,<table>]

Page https://wiki.asterisk.org/wiki/display/AST/Realtime+Database+Configuration

In my 1.14 installation, this did not work. I have found the solution and I believe that the problem would be identical in 1.18 and other versions of Asterisk. Instead of <db name> I use the class (or category) name in the res_odbc.conf file. My setup is as follows:

1) MySQL has
  database: asterisk_development
  table:    asterisk_files
  user:     asterisk

2) /etc/odbc.ini has

  [asterisk-connector]
  Database = asterisk_files
  username = asterisk
    ...

3) /etc/asterisk/res_odbc.conf has

  [asterisk-class]
  connector => asterisk-connector
    ...

4) /etc/asterisk/extconfig.conf has

  [default]
  musiconhold.conf => odbc,asterisk-class,asterisk_files


The syntax (appropriate for 1.14) is therefore:
  <filename> => <driver>,<res_<driver>.conf class name>[,<table>]

This is much more logical than using <db name>, given the existence of the res_odbc.conf file and the definitions therein, which leads me to believe that this is a problem with the documentation which may have gone unnoticed discovered if one uses the same name for the database and the class/category name in res_odbc.conf (perhaps not uncommon).

I am aware that the Realtime Access has changed in version 1.8, with extconfig.conf now using <family> instead of <filename>. I do however find it unlikely that the new version uses the database name, instead of the Asterisk-defined connection name, which leads me to suspect that there is an issue with the documentation for 1.8.
Comments:By: Leif Madsen (lmadsen) 2011-12-19 11:47:57.005-0600

Thanks! Fixed.