Skip to content

New PR: Asterisk 22 compatibility (no legacy code removed)#2

Open
mambursoft wants to merge 1 commit into
pjalbrecht:mainfrom
mambursoft:asterisk22-compat
Open

New PR: Asterisk 22 compatibility (no legacy code removed)#2
mambursoft wants to merge 1 commit into
pjalbrecht:mainfrom
mambursoft:asterisk22-compat

Conversation

@mambursoft
Copy link
Copy Markdown

Hi Paul,

I've taken a different approach this time.

The new branch asterisk22-compat makes a single minimal change: wrapping ast_register_application() with a version conditional to use ast_register_application_xml() for Asterisk >= 16. All legacy code for older Asterisk versions is fully preserved.

I verified that all other existing version conditionals (channel accessors, frame API, format API, CLI) already have #else branches for >= 1300 that work correctly with Asterisk 22 (ASTERISK_SRC_VERSION=2200). So the only thing missing was the ast_register_application_xml call, which was introduced in Asterisk 16 as a replacement for the 4-argument variant.

The diff is just 4 lines added, 0 removed:

+#if ASTERISK_SRC_VERSION < 1600
res |= ast_register_application(app, app_konference_main, synopsis, descrip);
+#else

  • res |= ast_register_application_xml(app, app_konference_main);
    +#endif
    Tested on FreeBSD 14 with Asterisk 22. The module loads, registers, and works correctly.

PR: https://github.com/mambursoft/appkonference29-asterisk22/pull/new/asterisk22-compat

Best regards, Olexiy

- Use ast_register_application_xml() for ASTERISK_SRC_VERSION >= 1600
- Keep ast_register_application() for older versions
- All other code already supports Asterisk 22 via existing >= 1300 branches
- No legacy code removed - full backward compatibility maintained
- Tested on FreeBSD 14 with Asterisk 22 (ASTERISK_SRC_VERSION=2200)
@pjalbrecht
Copy link
Copy Markdown
Owner

pjalbrecht commented May 5, 2026

Hi Olexiy,

Don't understand this change. Does the compilation of the module fail with the latest Asterisk? Or, does the compilation succeed and the module load fails at runtime? Suspect the latter is the case. Can you load the module with the latest Asterisk if you disable xml docs?

You can disable xml docs when you configure Asterisk with a switch: ./configure --disable-xmldoc

--Paul

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

Successfully merging this pull request may close these issues.

2 participants