app_queue.c: Support for Nordic syntax in announcements

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
This commit is contained in:
Mark Petersen 2021-12-30 14:02:50 +01:00 committed by Joshua Colp
parent 6d7161820e
commit dea71ddbbf
2 changed files with 8 additions and 5 deletions

View File

@ -4178,7 +4178,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) {
@ -4209,7 +4209,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;
}
@ -4227,7 +4227,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;
}
@ -7105,13 +7105,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));
}

View File

@ -0,0 +1,3 @@
Subject: app_queues
adding support for playing the correct en/et for nordic languages