MS-SQL and Sybase support for Kannel via FreeTDS
UPDATE: This patch has been officially accepted into the main tree. Just download the latest CVS and you’re all set.
The following article is now old news:
I’ve been working integrating Kannel with FreeTDS, an open source project that provides a free, open source driver for the tabular data system protocol used on MS-SQL and Sybase DB Engines.
The result is a DBPool module that makes Kannel capable of talking with MS-SQL and Sybase DB’s.
To use this module you need to have FreeTDS installed on your kannel box (either by compiling the source code or installing binary packages). If you’re installing from packages, do not forget to install the development packages as well (otherwise you won’t be able to compile Kannel).
Once you’ve installed FreeTDS, configure the freetds.conf and make sure that everything works properly. Hint: use the tsql command line utility and try connecting to your DB server).
To compile this into Kannel, you need to download and apply this patch. Since it touches the configure template, you need to bootstrap the code afterwards. In short:
1. Download the patch kannel-dbpool-mssql to Kannel’s source root directory
2. Apply the patch: patch -p0 < kannel-dbpool-mssql.patch
3. ./bootstrap.sh (only the first time after applying the patch)
4. ./configure –with-mssql=[optional path] [–other-switches]
5. make
6. sudo make install
Now, to configure the DB-Link, you need to add a dbpool group to kannel’s configuration files. It should look similar to this:
group = mssql-connection
id = mssql-db
username = myuser
password = mypass
server = server_name
database =my_db_name
Note: server_name should match the [server_name] group for the DB link on your freetds.conf file.
Right now, this patch only adds the functionality to make Kannel FreeTDS-capable. I’m adding support for DLR’s and SqlBox soon, so stay tuned!
Here’s the patch: kannel-dbpool-mssql
As usual, please try it and let me know how it goes.
Regards,
Alex