]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
app_queue.c: Support for Nordic syntax in announcements
authorMark Petersen <bugs.digium.com@zombie.dk>
Thu, 30 Dec 2021 13:02:50 +0000 (14:02 +0100)
committerFriendly Automation <jenkins2@gerrit.asterisk.org>
Wed, 5 Jan 2022 18:35:42 +0000 (12:35 -0600)
adding support for playing the correct en/et for nordic languages
by adding 'n' for neuter gender in the relevant ast_say_number

ASTERISK-29827

Change-Id: I03ebc827d2f0dc95132ab2f42799893c70edc5b1

apps/app_queue.c
doc/CHANGES-staging/app_queue_nordic_language.txt [new file with mode: 0644]

index 5f524498969f624b2906d0ed308bdbd0f8d2b97c..b862184119e39e2baa3471b48f7e344fa6789d15 100644 (file)
@@ -4181,7 +4181,7 @@ static int say_position(struct queue_ent *qe, int ringing)
                        res = (
                                play_file(qe->chan, qe->parent->sound_thereare) ||
                                ast_say_number(qe->chan, qe->pos, AST_DIGIT_ANY,
-                                               ast_channel_language(qe->chan), NULL) || /* Needs gender */
+                                               ast_channel_language(qe->chan), "n") || /* Needs gender */
                                play_file(qe->chan, qe->parent->sound_calls));
                }
                if (res) {
@@ -4212,7 +4212,7 @@ static int say_position(struct queue_ent *qe, int ringing)
                }
 
                if (avgholdmins >= 1) {
-                       res = ast_say_number(qe->chan, avgholdmins, AST_DIGIT_ANY, ast_channel_language(qe->chan), NULL);
+                       res = ast_say_number(qe->chan, avgholdmins, AST_DIGIT_ANY, ast_channel_language(qe->chan), "n");
                        if (res) {
                                goto playout;
                        }
@@ -4230,7 +4230,7 @@ static int say_position(struct queue_ent *qe, int ringing)
                        }
                }
                if (avgholdsecs >= 1) {
-                       res = ast_say_number(qe->chan, avgholdsecs, AST_DIGIT_ANY, ast_channel_language(qe->chan), NULL);
+                       res = ast_say_number(qe->chan, avgholdsecs, AST_DIGIT_ANY, ast_channel_language(qe->chan), "n");
                        if (res) {
                                goto playout;
                        }
@@ -7108,13 +7108,13 @@ static int try_calling(struct queue_ent *qe, struct ast_flags opts, char **opt_a
                                                holdtime = labs((now - qe->start) / 60);
                                                holdtimesecs = labs((now - qe->start) % 60);
                                                if (holdtime > 0) {
-                                                       ast_say_number(peer, holdtime, AST_DIGIT_ANY, ast_channel_language(peer), NULL);
+                                                       ast_say_number(peer, holdtime, AST_DIGIT_ANY, ast_channel_language(peer), "n");
                                                        if (play_file(peer, qe->parent->sound_minutes) < 0) {
                                                                ast_log(LOG_ERROR, "play_file failed for '%s' on %s\n", qe->parent->sound_minutes, ast_channel_name(peer));
                                                        }
                                                }
                                                if (holdtimesecs > 1) {
-                                                       ast_say_number(peer, holdtimesecs, AST_DIGIT_ANY, ast_channel_language(peer), NULL);
+                                                       ast_say_number(peer, holdtimesecs, AST_DIGIT_ANY, ast_channel_language(peer), "n");
                                                        if (play_file(peer, qe->parent->sound_seconds) < 0) {
                                                                ast_log(LOG_ERROR, "play_file failed for '%s' on %s\n", qe->parent->sound_seconds, ast_channel_name(peer));
                                                        }
diff --git a/doc/CHANGES-staging/app_queue_nordic_language.txt b/doc/CHANGES-staging/app_queue_nordic_language.txt
new file mode 100644 (file)
index 0000000..72efd78
--- /dev/null
@@ -0,0 +1,3 @@
+Subject: app_queues
+
+adding support for playing the correct en/et for nordic languages