日期:2014-05-16  浏览次数:20423 次

freeswitch odbc的配置
freeswitch官方英文说明文档
http://wiki.freeswitch.org/wiki/Using_ODBC_in_the_core

1.安装unixodbc
从这个页面下载unixodbc
http://sourceforge.net/projects/unixodbc/files/unixODBC/2.3.0/

tar xvf unixODBC-2.3.0.tar.gz
cd unixODBC-2.3.0

./configure
make && make install

2.安装postgresql
下载postgresql-8.3.6.tar.bz2

tar xvf postgresql-8.3.6.tar.bz2
cd postgresql-8.3.6
./configure
make && make install

3.让freeswitch支持odbc
打开freeswitch odbc接口,并从新编译,安装
freeswitch-snapshot
./configure --enable-core-odbc-support
make && make install

4.配置odbc.ini

odbc.ini文件的配置如下

/etc/odbc.ini

[ha_fs]
Description         = PostgreSQL
Driver              = PostgreSQL
Trace               = No
TraceFile           = /tmp/psqlodbc.log
Database            = ha_fs
Servername          = 192.168.1.115
UserName            =
Password            =
Port                = 5432
ReadOnly            = No
RowVersioning       = No
ShowSystemTables    = No
ShowOidColumn       = No
FakeOidIndex        = No
ConnSettings        =

5.修改sip_profiles
修改internal.xml这个文件
vim /usr/local/freeswitch/conf/sip_profiles/internal.xml

找到 odbc-dsn这一行,修改如下:

<param name="odbc-dsn" value="ha_fs:root:123456"/>