Hi
š
Looks like you've mixed things up:
š
My examples
š
[nevian@cranz ~]$ cat /etc/odbc.iniš
[freeswitch]
Driver=MySQL
SERVER=localhost
PORT=3306
DATABASE=freeswitch
Socket = /var/lib/mysql/mysql.sock
[nevian@cranz ~]$ cat /etc/odbcinst.ini
# Driver from the mysql-connector-odbc package
# Setup from the unixODBC-libs package
[MySQL]
Description= ODBC for MySQL
Driver= /usr/lib/libmyodbc3_r.so
Setup= /usr/lib/libodbcmyS.so
Driver64= /usr/lib64/libmyodbc3_r.so
Setup64= /usr/lib64/libodbcmyS.so
FileUsage= 1š
š
lcr.conf and switch.conf
š š <param name="odbc-dsn" value="<section name from odbc.ini>:dbuser:dbpassword"/>
š
11.04.2012, 18:55, "Anita Hall" <anita.hall@simmortel.com>:
Hi

I am getting the following error when giving load mod_lcr on the command line.

~~
2012-04-11 20:10:56.346283 [ERR] switch_odbc.c:365 STATE: IM002 CODE 0 ERROR: [unixODBC][Driver Manager]Data source name not found, and no default driver specified
2012-04-11 20:10:56.346283 [CRIT] switch_core_sqldb.c:418 Failure!
2012-04-11 20:10:56.346283 [CRIT] mod_lcr.c:1018 Cannot Open ODBC Database!
2012-04-11 20:10:56.346283 [ERR] mod_lcr.c:2036 Unable to load lcr config file
2012-04-11 20:10:56.346283 [CRIT] switch_loadable_module.c:1290 Error Loading module /usr/local/freeswitch/mod/mod_lcr.so
**Module load routine returned an error**
~~

I followed steps give on
http://wiki.freeswitch.org/wiki/Using_ODBC_in_the_core

I am on Ubuntu 10.04 LTS and I installed unixodbc, unixodbc-dev, libmyodbc packages by using apt-get. Then I did ./configure --enable-core-odbc-support , make, make install on freeswitch and the config.log shows that unixodbc got recognized and compiled.

I configured the ini files and my odbc works with MySQL

# cat /etc/odbc.ini
[freeswitch]
Driverššššššššš = /usr/lib64/odbc/libmyodbc.so
SERVERššššššššš = localhost
PORTššššššššššš = 3306
DATABASEššššššš = freeswitch
OPTIONššššššššš = 3
USERššššššššššš = root
PASSWORDššššššš = password

# cat /etc/odbcinst.ini
[MySQL]
Descriptionšššš = MySQL driver
Driverššššššššš = /usr/lib64/odbc/libmyodbc.so
Setupšššššššššš = /usr/lib64/odbc/libodbcmyS.so
UsageCountššššš = 1
FileUsagešššššš = 1
Threadingšššššš = 0



# isql -v freeswitch
+---------------------------------------+
| Connected!ššššššššššššššššššššššš |
|šššššššššššššššššššššššššššššššššššššššš |
| sql-statementššššššššššššššššššš |
| help [tablename]ššššššššššššššš |
| quitšššššššššššššššššššššššššššššššššš |
|šššššššššššššššššššššššššššššššššššššššš |
+---------------------------------------+
SQL>

My conf/autoload_configs/switch.conf.xml has the line

<param name="core-db-dsn" value="dsn:freeswitch:password" />


My conf/autoload_configs/lcr.conf.xml has the lines

<settings>
ššš <param name="odbc-dsn" value="dsn:freeswitch:password"/>
</settings>


I shutdown and restarted freeswitch after doing all configurations.





regards,
Anita

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org

--
wbr,
Serge