Skip to content

Commit

Permalink
app_voicemail: Disable ADSI if unavailable.
Browse files Browse the repository at this point in the history
If ADSI is available on a channel, app_voicemail will repeatedly
try to use ADSI, even if there is no CPE that supports it. This
leads to many unnecessary delays during the session. If ADSI is
available but ADSI setup fails, we now disable it to prevent
further attempts to use ADSI during the session.

Resolves: #354
  • Loading branch information
InterLinked1 authored and asterisk-org-access-app[bot] committed Oct 5, 2023
1 parent 91e368c commit d60c3c3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/app_voicemail.c
Expand Up @@ -7422,8 +7422,11 @@ static void adsi_begin(struct ast_channel *chan, int *useadsi)
if (!ast_adsi_available(chan))
return;
x = ast_adsi_load_session(chan, adsifdn, adsiver, 1);
if (x < 0)
if (x < 0) {
*useadsi = 0;
ast_channel_adsicpe_set(chan, AST_ADSI_UNAVAILABLE);
return;
}
if (!x) {
if (adsi_load_vmail(chan, useadsi)) {
ast_log(AST_LOG_WARNING, "Unable to upload voicemail scripts\n");
Expand Down

0 comments on commit d60c3c3

Please sign in to comment.