[Asterisk-bsd] func_odbc hanging
    Tim St. Pierre 
    tim at communicatefreely.net
       
    Tue Mar  3 21:04:49 CST 2009
    
    
  
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello all,
Just a quick question to see if anyone else has had this problem.  I can't find anything about it on
the web at all.
I have been trying to use func_odbc to do realtime routing from a database.  Everything worked great
on the test machine, but when I take it to production I get stuck channels.
When I look at the channels, they always seem to get stuck on a line that has an ODBC function in
it.  Below is an example of the most common line it gets stuck on:
exten => s,n,Set(DID_CONTEXT=${DB_DID(context)})
Here's the bit in func_odbc.conf that runs the query.  It should be pretty straight forward.
[DID]
prefix=DB
dsn=asterisk
read=SELECT ${ARG1} from DID where DID='${SQL_ESC(${DBDID})}'
The database server is local.  I haven't had any problems with connectivity that I am aware of.  I
used to use app_mysql and did the whole connection and query on the dialplan.  I didn't have any
problems, but went to ODBC to eliminate the overhead of connecting and disconnecting 3 times each call.
The only way to clear the channel is to restart.  I can't soft hangup the channels that stick.
I'm passing a few thousand calls per day, and I usually get 1 or two stuck channels.  I can't find a
pattern to it.
Asterisk 1.4.19.2
FreeBSD 6.2
MySQL 5.0
Any suggestions?  Is there a way to debug why this application is getting stuck?
Let me know if there is any other information I should provide.
Thanks,
- -Tim
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFJre/QI1xz6nMGzusRArctAKCZ9Lz6dOtkTlDex4XGOFfElQKBngCdE6er
qbuVdzzmExad6eYlu7ZBLQs=
=oNcA
-----END PGP SIGNATURE-----
    
    
More information about the Asterisk-BSD
mailing list