From 1ea58b45179efd0bc21305091327c8e1b0f2a44b Mon Sep 17 00:00:00 2001
From: "Kevin P. Fleming" <kpfleming@digium.com>
Date: Tue, 12 Jul 2005 02:36:53 +0000
Subject: [PATCH] support military-style time announcing ('hundred' instead of
 'o-clock') (bug #4605)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6098 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 configs/voicemail.conf.sample | 6 ++++--
 say.c                         | 7 ++++++-
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/configs/voicemail.conf.sample b/configs/voicemail.conf.sample
index da00c6fa74..fca780f90f 100755
--- a/configs/voicemail.conf.sample
+++ b/configs/voicemail.conf.sample
@@ -95,7 +95,8 @@ emaildateformat=%A, %B %d, %Y at %r
 ; I or l        Hour, 12 hour clock 
 ; H             Hour, 24 hour clock (single digit hours preceded by "oh") 
 ; k             Hour, 24 hour clock (single digit hours NOT preceded by "oh") 
-; M             Minute 
+; M             Minute, with 00 pronounced as "o'clock" 
+; N             Minute, with 00 pronounced as "hundred" (US military time)
 ; P or p        AM or PM 
 ; Q             "today", "yesterday" or ABdY (*note: not standard strftime value) 
 ; q             "" (for today), "yesterday", weekday, or ABdY (*note: not standard strftime value) 
@@ -146,7 +147,8 @@ sendvoicemail=yes	; Context to Send voicemail from [option 5 from the advanced m
 [zonemessages]
 eastern=America/New_York|'vm-received' Q 'digits/at' IMp
 central=America/Chicago|'vm-received' Q 'digits/at' IMp
-central24=America/Chicago|'vm-received' q 'digits/at' H 'digits/hundred' M 'hours'
+central24=America/Chicago|'vm-received' q 'digits/at' H N 'hours'
+military=Zulu|'vm-received' q 'digits/at' H N 'hours' 'phonetic/z_p'
 
 [default]
 1234 => 4242,Example Mailbox,root@localhost
diff --git a/say.c b/say.c
index 80aad6e036..d04b52d57e 100755
--- a/say.c
+++ b/say.c
@@ -2815,9 +2815,14 @@ int ast_say_date_with_format_en(struct ast_channel *chan, time_t time, const cha
 				}
 				break;
 			case 'M':
+			case 'N':
 				/* Minute */
 				if (tm.tm_min == 0) {
-					res = wait_file(chan,ints, "digits/oclock",lang);
+					if (format[offset] == 'M') {
+						res = wait_file(chan, ints, "digits/oclock", lang);
+					} else {
+						res = wait_file(chan, ints, "digits/hundred", lang);
+					}
 				} else if (tm.tm_min < 10) {
 					res = wait_file(chan,ints, "digits/oh",lang);
 					if (!res) {
-- 
GitLab