Hi, Can somebody tell me what I've been doing wrong for the res_config_odbc not to work properly. I already looked on the mailing list for some answer but I can't find one. The closes subject I found is "res_odbc not working". Btw, I already followed BKW reply on that subject. I guessed the log below can tell us res_odbc.so is succefully loaded, so it easy to presumed it succesfully connected to the database. The only problem I can see is the "SQL select error" it encountered when it's loading sip.conf. But I have tried that sql statement on isql, PhpMyAdmin and it's succesfully executed. So, why the res_config_odbc.so is returning such error? [res_odbc.so] => (ODBC Resource) Aug 7 16:38:43 DEBUG[16384]: config.c:779 __ast_load: Parsing /etc/asterisk/res_odbc.conf Aug 7 16:38:43 NOTICE[16384]: res_odbc.c:131 load_odbc_config: registered database handle 'mysql1' dsn->[MySQL-asterisk] Aug 7 16:38:43 NOTICE[16384]: res_odbc.c:375 load_module: res_odbc loaded. [res_config_odbc.so] => (ODBC Configuration) Aug 7 16:38:43 NOTICE[16384]: config.c:880 ast_config_register: Registered Config Engine odbc Aug 7 16:38:43 DEBUG[16384]: config.c:779 __ast_load: Parsing /etc/asterisk/extconfig.conf Aug 7 16:38:43 NOTICE[16384]: config.c:1084 read_ast_cust_config: Binding: sip.conf to odbc Aug 7 16:38:43 NOTICE[16384]: config.c:1084 read_ast_cust_config: Binding: localsip.conf to odbc Aug 7 16:38:43 NOTICE[16384]: config.c:1084 read_ast_cust_config: Binding: buzzuser.conf to odbc Aug 7 16:38:43 NOTICE[16384]: res_config_odbc.c:190 load_module: res_config_odbc loaded. [chan_sip.so]Aug 7 16:38:43 DEBUG[16384]: config.c:779 __ast_load: Parsing /etc/asterisk/modules.conf => (Session Initiation Protocol (SIP)) Aug 7 16:38:43 NOTICE[16384]: config.c:756 __ast_load: Loading Config sip.conf via odbc engine Aug 7 16:38:43 DEBUG[16384]: config.c:779 __ast_load: Parsing /etc/asterisk/res_config_odbc.conf Aug 7 16:38:43 WARNING[16384]: res_config_odbc.c:103 config_odbc: SQL select error! [select * from ast_config where filename='sip.conf' and commented=0 order by filename,cat_metric desc,var_metric asc,id] Aug 7 16:38:43 DEBUG[16384]: config.c:810 __ast_load: No file to parse: /etc/asterisk/sip.conf Aug 7 16:38:43 NOTICE[16384]: chan_sip.c:8249 reload_config: Unable to load config sip.conf, SIP disabled Aug 7 16:38:43 DEBUG[16384]: channel.c:198 ast_channel_register_ex: Registered handler for 'SIP' (Session Initiation Protocol (SIP)) Thanks -Dennis __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail
--- Dennis Nacino <starisk11@yahoo.com> wrote: Hi, I just made it worked. The problem is brought about by the placing of odbc.ini and odbcinst.ini on /usr/local/etc. Anyway, I noticed with res_config_odbc in used, the * will only parse the first #include file it encounters. To illustrate; my extconfig.conf has the following lines lastsip.conf => odbc firstsip.conf => odbc my sip.conf has the following lines #include lastsip.conf #include firstsip.conf Once the * parses sip.conf, it will only parse "#include firtsip.conf" but not "#include lastsip.conf". The workaround I did was to issue INSERT INTO `ast_config` ( `id` , `cat_metric` , `var_metric` , `commented` , `filename` , `category` , `var_name` , `var_val` ) VALUES ( '', '0', '0', '0', 'firstsip.conf', '', '#include ', 'lastsip.conf' ); so that * can parse whatever "lastsip.conf" has in the database or table. But without using res_config_odbc.so the * will parse all the #include line inside the sip.conf Any idea why * behaving like this when res_config_odbc.so is in use? -Dennis> Hi, > > Can somebody tell me what I've been doing wrong for the res_config_odbc not to work properly. I > already looked on the mailing list for some answer but I can't find one. The closes subject I > found is "res_odbc not working". Btw, I already followed BKW reply on that subject. I guessed > the > log below can tell us res_odbc.so is succefully loaded, so it easy to presumed it succesfully > connected to the database. The only problem I can see is the "SQL select error" it encountered > when it's loading sip.conf. But I have tried that sql statement on isql, PhpMyAdmin and it's > succesfully executed. So, why the res_config_odbc.so is returning such error? > > >__________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail