]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
func_periodic_hook: Don't truncate channel name
authorGeorge Joseph <gjoseph@sangoma.com>
Mon, 11 Sep 2023 16:52:05 +0000 (10:52 -0600)
committerAsterisk Development Team <asteriskteam@digium.com>
Fri, 12 Jan 2024 18:29:18 +0000 (18:29 +0000)
func_periodic_hook was truncating long channel names which
causes issues when you need to run other dialplan functions/apps
on the channel.

Resolves: #319
(cherry picked from commit 9e2433f73f0cd1d88a218ebce98e7a953f43d6e8)

funcs/func_periodic_hook.c

index ec4b9ba4de9392b1012b564340e9d8095a63ed76..eeab0ecc777bce60fb23419f32634ce37ea93b41 100644 (file)
@@ -466,7 +466,7 @@ static int load_module(void)
         * Based on a handy recipe from the Asterisk Cookbook.
         */
        res = ast_add_extension(context_name, 1, exten_name, 1, "", "",
-                       "Set", "EncodedChannel=${CUT(HOOK_CHANNEL,-,1-2)}",
+                       "Set", "EncodedChannel=${HOOK_CHANNEL}",
                        NULL, AST_MODULE);
        res |= ast_add_extension(context_name, 1, exten_name, 2, "", "",
                        "Set", "GROUP_NAME=${EncodedChannel}${HOOK_ID}",