sig_analog: Add Call Waiting Deluxe support.

Adds support for Call Waiting Deluxe options to enhance
the current call waiting feature.

As part of this change, a mechanism is also added that
allows a channel driver to queue an audio file for Dial()
to play, which is necessary for the announcement function.

ASTERISK-30373 #close

Resolves: #271

UserNote: Call Waiting Deluxe can now be enabled for FXS channels
by enabling its corresponding option.

(cherry picked from commit 876c25a953)
This commit is contained in:
Naveen Albert
2023-08-24 14:07:06 +00:00
committed by George Joseph
parent 07fd8b5ad3
commit ccdcc18dec
10 changed files with 294 additions and 0 deletions

View File

@@ -1728,6 +1728,15 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in,
case AST_CONTROL_PVT_CAUSE_CODE:
ast_indicate_data(in, AST_CONTROL_PVT_CAUSE_CODE, f->data.ptr, f->datalen);
break;
case AST_CONTROL_PLAYBACK_BEGIN:
if (!f->data.ptr) {
ast_log(LOG_WARNING, "Got playback begin directive without filename on %s\n", ast_channel_name(c));
} else {
const char *filename = f->data.ptr;
ast_verb(3, "Playing audio file %s on %s\n", filename, ast_channel_name(in));
ast_streamfile(in, filename, ast_channel_language(in));
}
break;
case -1:
if (single && !caller_entertained) {
ast_verb(3, "%s stopped sounds\n", ast_channel_name(c));