Hi all, The asterisk book states the following for using ODBC to connect to an MS database. ? The pooling and limit options are quite useful for MS SQL Server and Sybase databases. These permit you to establish multiple connections (up to limit connections) to a database while ensuring that each connection has only one statement executing at once (this is due to a limitation in the protocol used by these database servers). Does anyone know if it is possible to use the same database and single ODBC connection to do both CDR recording with cdr_odbc and dialplan routing based on func_odbc. I have both res_odbc.conf and cdr_odbc.conf pointing to the same DSN in odbc.ini I am starting to think that this limitation in having a single connection would stop this being possible in asterisk - does anyone know otherwise? Thanks Robert McNaught -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20071124/8ad59369/attachment.htm
On Saturday 24 November 2007 14:48:02 Robert McNaught wrote:> Does anyone know if it is possible to use the same database and single > ODBC connection to do both CDR recording with cdr_odbc and dialplan > routing based on func_odbc.In 1.4, no. The reason is, cdr_odbc was written prior to res_odbc and therefore does not use its connections. So cdr_odbc attempts to make its own connection to the database. Of course, if you're using MS SQL Server, that's what you want, because concurrency is what disallows the use of a single connection.> I have both res_odbc.conf and cdr_odbc.conf pointing to the same DSN in > odbc.ini > > I am starting to think that this limitation in having a single > connection would stop this being possible in asterisk - does anyone know > otherwise?There is no limitation in 1.4 of having a single connection, as long as you set pooling=yes. So I don't understand your question. Please understand that odbc.ini doesn't set up a connection, only the connection parameters. res_odbc can (and does) create multiple connections based upon those parameters. -- Tilghman
On Monday 26 November 2007 01:01:06 Bhrugu Mehta wrote:> I want to create connection using odbc for mysql > i have used cdr_odbc module for that. > but when asterisk insert record to my mysql database arise "segfault > error". any suggetion, pls give mePlease upgrade your Mysql-ODBC-connector package to the latest version at http://dev.mysql.com/downloads/connector/odbc/3.51.html -- Tilghman