自动重新连接到ODBC源?

我正在使用Asterisk 1.8.10.1和通过ODBC连接的MySQL数据库来存储CDR。 当Asterisk启动或Asterisk运行中断时,我的MySQL数据库不可用时,我希望Asterisk重试连接到数据库,但这不会发生! 任何人都知道在哪里我可以启用一些自动重新连接到Asterisk的数据库?

我的res_odbc.conf如下所示:

[asterisk] enabled => yes dsn => asterisk-connector username => user password => pass pre-connect => yes pooling => no limit => 1 idlecheck => 1 negative_connection_cache => 1 

Usualy它会重新连接下一个实时请求。

尝试这一套

 idlecheck => 300; ( will check connection in pool every 5 minutes) connect_timeout => 5; ( how long to wait on reconnect) negative_connection_cache=>10 ;( how long wait before reconnect) pre-connect = yes; will allow you check if connection ok by issue "realtime show odbc status" 

另外我build议设置限制更多然后1。