func_periodic_hook: Add hangup step to avoid timeout

func_periodic_hook does not hangup after playback, relying on hangup
which keeps the channel alive longer than necessary.

Resolves: #325
(cherry picked from commit 2265eafb3a)
This commit is contained in:
Mike Bradeen 2023-09-12 13:24:57 -06:00 committed by Asterisk Development Team
parent fd7a35fad8
commit 4799c0eda3
1 changed files with 2 additions and 0 deletions

View File

@ -487,6 +487,8 @@ static int load_module(void)
"Answer", "", NULL, AST_MODULE);
res |= ast_add_extension(context_name, 1, beep_exten, 2, "", "",
"Playback", "beep", NULL, AST_MODULE);
res |= ast_add_extension(context_name, 1, beep_exten, 3, "", "",
"Hangup", "", NULL, AST_MODULE);
res |= ast_custom_function_register_escalating(&hook_function, AST_CFE_BOTH);