[Asterisk-Users] res_config problems

Chris A. Icide chris at netgeeks.net
Fri Nov 5 13:16:29 MST 2004


Hello,

I'm having some issues with res_config.  I've used BKW's perl program to 
take a working sip.config and place it into the database.  Asterisk doesn't 
load in the sip table from the database.  What am I doing wrong?


Here are CLI lines:

   == Parsing '/etc/asterisk/res_odbc.conf': Found
Nov  5 11:53:56 NOTICE[12572]: res_odbc.c:133 load_odbc_config: registered 
database handle 'mysql1' dsn->[MYSQL-asterisk]
Nov  5 11:53:56 NOTICE[12572]: res_odbc.c:345 odbc_obj_connect: Calling 
0x8110d68/0x8110d78
Nov  5 11:53:56 NOTICE[12572]: res_odbc.c:359 odbc_obj_connect: res_odbc: 
Connected to mysql1 [MYSQL-asterisk]
Nov  5 11:53:56 NOTICE[12572]: res_odbc.c:385 load_module: res_odbc loaded.
  [res_config_odbc.so] => (ODBC Configuration)
Nov  5 11:53:56 NOTICE[12572]: config.c:556 ast_config_register: Registered 
Config Engine odbc
   == Parsing '/etc/asterisk/extconfig.conf': Found
   == Binding sip.conf to odbc/asterisk/ast_config
res_config_odbc loaded.
  [chan_sip.so] => (Session Initiation Protocol (SIP))
Nov  5 11:53:56 NOTICE[12572]: config.c:492 __ast_load: Loading Config 
sip.conf via odbc engine
   == Parsing '/etc/asterisk/sip.conf': Not found (No such file or directory)
Nov  5 11:53:56 NOTICE[12572]: chan_sip.c:8477 reload_config: Unable to 
load config sip.conf, SIP disabled


odbc.conf:

[global]
dsn=MySQL-asterisk
username=<username>
password=<password>

where username and password are replaced with functional username and 
password with access to the database/table


res_config_odbc.conf:

[settings]
table => ast_config
connection => mysql1


res_odbc.conf:

;;; odbc setup file
[mysql1]
dsn => MYSQL-asterisk
username => <username>
password => <password>
pre-connect => yes


databse table:

mysql> select * from ast_config;
+----+------------+------------+-----------+----------------+--------------+------------------+--------------------------------------------------------------------------+
| id | cat_metric | var_metric | commented | filename       | 
category     | var_name         | 
var_val                                                                  |
+----+------------+------------+-----------+----------------+--------------+------------------+--------------------------------------------------------------------------+
|  1 |          0 |          0 |         0 | sip.conf       | 
general      | context          | 
default                                                                  |
|  2 |          0 |          1 |         0 | sip.conf       | 
general      | port             | 
5060                                                                     |
|  3 |          0 |          2 |         0 | sip.conf       | 
general      | bindaddr         | 
0.0.0.0                                                                  |
|  4 |          0 |          3 |         0 | sip.conf       | 
general      | srvlookup        | 
no                                                                       |
|  5 |          1 |          0 |         0 | sip.conf       | 
2000         | type             | 
friend                                                                   |
|  6 |          1 |          1 |         0 | sip.conf       | 
2000         | secret           | 
2000                                                                     |
|  7 |          1 |          2 |         0 | sip.conf       | 
2000         | auth             | 
md5                                                                      |
|  8 |          1 |          3 |         0 | sip.conf       | 
2000         | disallow         | 
all                                                                      |
|  9 |          1 |          4 |         0 | sip.conf       | 
2000         | allow            | 
ilbc                                                                     |
| 10 |          1 |          5 |         0 | sip.conf       | 
2000         | allow            | 
ulaw                                                                     |
| 11 |          1 |          6 |         0 | sip.conf       | 
2000         | canreinvite      | 
no                                                                       |
| 12 |          1 |          7 |         0 | sip.conf       | 
2000         | nat              | 
yes                                                                      |
| 13 |          1 |          8 |         0 | sip.conf       | 
2000         | mailbox          | 
2000 at test                                                                |
| 14 |          1 |          9 |         0 | sip.conf       | 
2000         | callerid         | "Test Config" 
<2000>                                                     |
| 15 |          1 |         10 |         0 | sip.conf       | 
2000         | host             | 
dynamic                                                                  |
| 16 |          1 |         11 |         0 | sip.conf       | 
2000         | qualify          | 
200                                                                      |
| 17 |          1 |         12 |         0 | sip.conf       | 
2000         | context          | 
inbound-sip                                                              |
| 18 |          0 |          0 |         0 | voicemail.conf | 
general      | format           | 
wav49|gsm|wav                                                            |
| 19 |          0 |          1 |         0 | voicemail.conf | 
general      | serveremail      | 
asterisk                                                                 |
| 20 |          0 |          2 |         0 | voicemail.conf | 
general      | attach           | 
yes                                                                      |
| 21 |          0 |          3 |         0 | voicemail.conf | 
general      | skipms           | 
3000                                                                     |
| 22 |          0 |          4 |         0 | voicemail.conf | 
general      | maxsilence       | 
10                                                                       |
| 23 |          0 |          5 |         0 | voicemail.conf | 
general      | silencethreshold | 
128                                                                      |
| 24 |          0 |          6 |         0 | voicemail.conf | 
general      | maxlogins        | 
3                                                                        |
| 25 |          0 |          7 |         0 | voicemail.conf | 
general      | sendvoicemail    | 
yes                                                                      |
| 26 |          1 |          0 |         0 | voicemail.conf | zonemessages 
| eastern          | America/New_York|'vm-received' Q 'digits/at' 
IMp                         |
| 27 |          1 |          1 |         0 | voicemail.conf | zonemessages 
| central          | America/Chicago|'vm-received' Q 'digits/at' 
IMp                          |
| 28 |          1 |          2 |         0 | voicemail.conf | zonemessages 
| central24        | America/Chicago|'vm-received' q 'digits/at' H 
'digits/hundred' M 'hours' |
| 29 |          3 |          0 |         0 | voicemail.conf | 
test         | 2000             | 2000,Test 
Config,chris at netgeeks.net                                      |
+----+------------+------------+-----------+----------------+--------------+------------------+--------------------------------------------------------------------------+
29 rows in set (0.00 sec)




More information about the asterisk-users mailing list