Index: apps/app_voicemail.c =================================================================== --- apps/app_voicemail.c (revision 218095) +++ apps/app_voicemail.c (working copy) @@ -577,6 +577,7 @@ static unsigned char adsisec[4] = "\x9B\xDB\xF7\xAC"; static int adsiver = 1; static char emaildateformat[32] = "%A, %B %d, %Y at %r"; +static char pagerdateformat[32] = "%A, %B %d, %Y at %r"; static char *strip_control(const char *input, char *buf, size_t buflen) @@ -3363,6 +3364,9 @@ strftime(date, sizeof(date), "%a, %d %b %Y %H:%M:%S %z", vmu_tm(vmu, &tm)); fprintf(p, "Date: %s\n", date); + /* Reformat for custom pager format */ + strftime(date, sizeof(date), pagerdateformat, &tm); + if (*pagerfromstring) { struct ast_channel *ast; if ((ast = ast_channel_alloc(0, AST_STATE_DOWN, 0, 0, "", "", "", 0, "Substitution/voicemail"))) { @@ -3395,7 +3399,6 @@ } else ast_log(LOG_WARNING, "Cannot allocate the channel for variables substitution\n"); } else fprintf(p, "Subject: New VM\n\n"); - strftime(date, sizeof(date), "%A, %B %d, %Y at %r", &tm); if (pagerbody) { struct ast_channel *ast; if ((ast = ast_channel_alloc(0, AST_STATE_DOWN, 0, 0, "", "", "", 0, "Substitution/voicemail"))) { @@ -8218,6 +8221,7 @@ const char *exitcxt = NULL; const char *extpc; const char *emaildateformatstr; + const char *pagerdateformatstr; const char *volgainstr; int x; int tmpadsi[4]; @@ -8289,6 +8293,11 @@ ast_copy_string(emaildateformat, emaildateformatstr, sizeof(emaildateformat)); } + /* Load date format config for voicemail pager mail */ + if ((pagerdateformatstr = ast_variable_retrieve(cfg, "general", "pagerdateformat"))) { + ast_copy_string(pagerdateformat, pagerdateformatstr, sizeof(pagerdateformat)); + } + /* External password changing command */ if ((extpc = ast_variable_retrieve(cfg, "general", "externpass"))) { ast_copy_string(ext_pass_cmd,extpc,sizeof(ext_pass_cmd)); Index: configs/voicemail.conf.sample =================================================================== --- configs/voicemail.conf.sample (revision 218095) +++ configs/voicemail.conf.sample (working copy) @@ -126,6 +126,11 @@ emaildateformat=%A, %B %d, %Y at %r ; 24h date format ;emaildateformat=%A, %d %B %Y at %H:%M:%S +; +; Default for pager use +pagerdateformat=%A, %B %d, %Y at %r +; Short 24h date format for pager use +;pagerdateformat=%T %D ; ; You can override the default program to send e-mail if you wish, too ;