aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/app_voicemail.c25
-rw-r--r--doc/tex/imapstorage.tex4
2 files changed, 29 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"))) {
diff --git a/doc/tex/imapstorage.tex b/doc/tex/imapstorage.tex
index b4b217ff7..3a952ce54 100644
--- a/doc/tex/imapstorage.tex
+++ b/doc/tex/imapstorage.tex
@@ -80,6 +80,10 @@ greetingsfolder=<IMAP folder to store greetings in if imapgreetings is enabled>
expungeonhangup=<yes or no>
authuser=<username>
authpassword=<password>
+opentimeout=<TCP open timeout in seconds>
+closetimeout=<TCP close timeout in seconds>
+readtimeout=<TCP read timeout in seconds>
+writetimeout=<TCP write timeout in seconds>
\end{verbatim}
\end{astlisting}