Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecated functions in Asterisk v21 #609

Open
2br-2b opened this issue Feb 15, 2024 · 3 comments
Open

Deprecated functions in Asterisk v21 #609

2br-2b opened this issue Feb 15, 2024 · 3 comments

Comments

@2br-2b
Copy link

2br-2b commented Feb 15, 2024

While I can't find the exact documentation, ast_channel_macroexten is deprecated in Asterisk v21. The sources I have for this are I-tried-it and this commit: asterisk/asterisk@e8f548c

I haven't confirmed that it still works on v20, but it looks like that commit is only in the v21 tags, so I assume it still works fine there

Reproduction Steps:

  1. Try to install chan-sccp on Asterisk v21
  2. Get an error

chan-sccp version: v4.3.5

asterisk version: v21+

@lachesis
Copy link

Confirmed, doesn't build for me on Asterisk 21 either. I guess the right answer is to remove all of the macro related code?

@lachesis
Copy link

It built for me with this patch:

diff --git a/src/pbx_impl/ast116/ast116.c b/src/pbx_impl/ast116/ast116.c
index c162e755..f6364dca 100644
--- a/src/pbx_impl/ast116/ast116.c
+++ b/src/pbx_impl/ast116/ast116.c
@@ -3065,10 +3065,6 @@ DECLARE_PBX_CHANNEL_STRGET(name)
     DECLARE_PBX_CHANNEL_STRGET(linkedid)
     DECLARE_PBX_CHANNEL_STRGET(context)
     DECLARE_PBX_CHANNEL_STRSET(context)
-    DECLARE_PBX_CHANNEL_STRGET(macroexten)
-    DECLARE_PBX_CHANNEL_STRSET(macroexten)
-    DECLARE_PBX_CHANNEL_STRGET(macrocontext)
-    DECLARE_PBX_CHANNEL_STRSET(macrocontext)
     DECLARE_PBX_CHANNEL_STRGET(call_forward)
     DECLARE_PBX_CHANNEL_STRSET(call_forward)

@@ -3536,10 +3532,6 @@ const PbxInterface iPbx = {
        setChannelExten: sccp_astwrap_set_channel_exten,
        getChannelContext: sccp_astwrap_get_channel_context,
        setChannelContext: sccp_astwrap_set_channel_context,
-       getChannelMacroExten: sccp_astwrap_get_channel_macroexten,
-       setChannelMacroExten: sccp_astwrap_set_channel_macroexten,
-       getChannelMacroContext: sccp_astwrap_get_channel_macrocontext,
-       setChannelMacroContext: sccp_astwrap_set_channel_macrocontext,
        getChannelCallForward: sccp_astwrap_get_channel_call_forward,
        setChannelCallForward: sccp_astwrap_set_channel_call_forward,

@@ -3687,10 +3679,6 @@ const PbxInterface iPbx = {
        .setChannelExten = sccp_astwrap_set_channel_exten,
        .getChannelContext = sccp_astwrap_get_channel_context,
        .setChannelContext = sccp_astwrap_set_channel_context,
-       .getChannelMacroExten = sccp_astwrap_get_channel_macroexten,
-       .setChannelMacroExten = sccp_astwrap_set_channel_macroexten,
-       .getChannelMacroContext = sccp_astwrap_get_channel_macrocontext,
-       .setChannelMacroContext = sccp_astwrap_set_channel_macrocontext,
        .getChannelCallForward = sccp_astwrap_get_channel_call_forward,
        .setChannelCallForward = sccp_astwrap_set_channel_call_forward,

The module that it build loaded. I have not tested further yet. Will report back once my first SCCP phone is here and I test it out later today.

@lachesis
Copy link

lachesis commented Apr 2, 2024

Reporting back as promised. I've been running with this simple patch for over a month now, with no major issues. This probably breaks macro support on older Asterisk. I would guess the correct answer is to add some new entries to the pbx_impl then do the right autotools magic to make it select those for 21+.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants