From 7f4b351d32fabe39ffe3b7c525c9a2012ac66004 Mon Sep 17 00:00:00 2001 From: Saleh Khazaei Date: Thu, 22 Dec 2022 15:16:45 +0330 Subject: [PATCH] fix: Fixes persian say module on zero minutes in time --- src/mod/say/mod_say_fa/mod_say_fa.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/mod/say/mod_say_fa/mod_say_fa.c b/src/mod/say/mod_say_fa/mod_say_fa.c index 536d4f10d3..b3b2ee857f 100644 --- a/src/mod/say/mod_say_fa/mod_say_fa.c +++ b/src/mod/say/mod_say_fa/mod_say_fa.c @@ -409,8 +409,12 @@ static switch_status_t fa_say_time(switch_core_session_t *session, char *tosay, } say_file("time/hour-e.wav"); - say_file("digits/%do.wav",hour); - play_group(SSM_PRONOUNCED, 0, (tm.tm_min - tm.tm_min % 10) / 10, tm.tm_min % 10, "time/minutes-e.wav", session, args); + if (tm.tm_min == 0) { + say_file("digits/%d.wav",hour); + } else { + say_file("digits/%do.wav",hour); + play_group(SSM_PRONOUNCED, 0, (tm.tm_min - tm.tm_min % 10) / 10, tm.tm_min % 10, "time/minutes-e.wav", session, args); + } say_file("time/%s.wav", pm ? "p-m" : "a-m"); }