]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
func_periodic_hook: Add hangup step to avoid timeout
authorMike Bradeen <mbradeen@sangoma.com>
Tue, 12 Sep 2023 19:24:57 +0000 (13:24 -0600)
committerAsterisk Development Team <asteriskteam@digium.com>
Wed, 21 Feb 2024 13:35:03 +0000 (13:35 +0000)
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 cf623753a9041f6c22238c8b0f91ec7dd4d899d4)

funcs/func_periodic_hook.c

index ebedf39b869d0c4ec3adb89d6b5d207e3b981d5d..fa95dbb5190ef0cb44d61fe86c5b0513fcf87a9d 100644 (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);