From 8a6379f36be83f2def0d2f994a94b9e2f4562df2 Mon Sep 17 00:00:00 2001 From: alex2grad Date: Mon, 5 Jun 2023 14:23:03 -0400 Subject: [PATCH] app_followme: fix issue with enable_callee_prompt=no (#88) * app_followme: fix issue with enable_callee_prompt=no If the FollowMe option 'enable_callee_prompt' is set to 'no' then Asterisk incorrectly sets a winner channel to the channel from which any control frame was read. This fix sets the winner channel only to the answered channel. Resolves: #87 ASTERISK-30326 --- apps/app_followme.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/apps/app_followme.c b/apps/app_followme.c index 4b7862d03f..31ba9b8a56 100644 --- a/apps/app_followme.c +++ b/apps/app_followme.c @@ -836,8 +836,9 @@ static struct ast_channel *wait_for_winner(struct findme_user_listptr *findme_us } } } else { - ast_verb(3, "Skip playback of caller name / norecording\n"); - tmpuser->state = 2; + ast_debug(1, "Taking call with no prompt\n"); + ast_frfree(f); + return tmpuser->ochan; } break; case AST_CONTROL_BUSY: @@ -964,11 +965,6 @@ static struct ast_channel *wait_for_winner(struct findme_user_listptr *findme_us break; } } - if (!tpargs->enable_callee_prompt && tmpuser) { - ast_debug(1, "Taking call with no prompt\n"); - ast_frfree(f); - return tmpuser->ochan; - } if (tmpuser && tmpuser->state == 3 && f->frametype == AST_FRAME_DTMF) { int cmp_len;