summaryrefslogtreecommitdiff
path: root/apps/app_voicemail.c
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2008-01-07 21:04:09 +0000
committerMark Michelson <mmichelson@digium.com>2008-01-07 21:04:09 +0000
commit905fc559d1deeaedd827f818053eba5871a094c8 (patch)
tree4d6c8d0fb1d023257f01c76a16b36cfa4db6272e /apps/app_voicemail.c
parentef0dd2e184eece49afd24a78109006352787896e (diff)
Adding user-configurable TCP timeout settings to IMAP voicemail. This could
go a long way towards preventing unexplainable hangs experienced by people. In the case of MWI hangs, this also will mean that the SIP port isn't blocked anymore. (closes issue #11665, reported by yehavi) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@96934 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_voicemail.c')
-rw-r--r--apps/app_voicemail.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index b3c687a29..a9202f1ac 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -8213,6 +8213,31 @@ static int load_config(int reload)
ast_copy_string(greetingfolder, imapfolder, sizeof(greetingfolder));
}
+ /* Handle the timeouts */
+ if ((val = ast_variable_retrieve(cfg, "general", "imapreadtimeout"))) {
+ mail_parameters(NIL, SET_READTIMEOUT, (void *) (atol(val)));
+ } else {
+ mail_parameters(NIL, SET_READTIMEOUT, (void *) 60);
+ }
+
+ if ((val = ast_variable_retrieve(cfg, "general", "imapwritetimeout"))) {
+ mail_parameters(NIL, SET_WRITETIMEOUT, (void *) (atol(val)));
+ } else {
+ mail_parameters(NIL, SET_WRITETIMEOUT, (void *) 60);
+ }
+
+ if ((val = ast_variable_retrieve(cfg, "general", "imapopentimeout"))) {
+ mail_parameters(NIL, SET_OPENTIMEOUT, (void *) (atol(val)));
+ } else {
+ mail_parameters(NIL, SET_OPENTIMEOUT, (void *) 60);
+ }
+
+ if ((val = ast_variable_retrieve(cfg, "general", "imapclosetimeout"))) {
+ mail_parameters(NIL, SET_CLOSETIMEOUT, (void *) (atol(val)));
+ } else {
+ mail_parameters(NIL, SET_CLOSETIMEOUT, (void *) 60);
+ }
+
#endif
/* External voicemail notify application */
if ((val = ast_variable_retrieve(cfg, "general", "externnotify"))) {