Add compile-time flag to disable dialog event package#4810
Merged
Conversation
- Added PJSIP_HAS_DLG_EVENT_PKG macro in sip_config.h (default: 1) - Wrapped pjsip_dlg_event_init_module() call with conditional compilation - Allows users to disable dialog event package if they have their own implementation Co-authored-by: sauwming <17044930+sauwming@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add compile-time setting for dialog event client implementation
Add compile-time flag to disable dialog event package
Feb 20, 2026
sauwming
reviewed
Feb 20, 2026
pjsip/include/pjsip/sip_config.h
Outdated
| */ | ||
| #ifndef PJSIP_HAS_DLG_EVENT_PKG | ||
| # define PJSIP_HAS_DLG_EVENT_PKG 1 | ||
| #endif |
Member
There was a problem hiding this comment.
@copilot: The setting should be at pjsua level (i.e. in pjsua.h)
Member
There was a problem hiding this comment.
@copilot: The setting should be at pjsua level (i.e. in pjsua.h)
Contributor
Author
There was a problem hiding this comment.
Done. Moved the configuration macro from sip_config.h to pjsua.h and renamed it to PJSUA_HAS_DLG_EVENT_PKG. (commit 6a2dfba)
- Moved configuration macro from pjsip/include/pjsip/sip_config.h to pjsip/include/pjsua-lib/pjsua.h - Updated conditional compilation in pjsua_core.c to use PJSUA_HAS_DLG_EVENT_PKG - Tested both enabled (default) and disabled configurations successfully Co-authored-by: sauwming <17044930+sauwming@users.noreply.github.com>
nanangizz
approved these changes
Feb 20, 2026
Member
|
The failed CI test seems to be unrelated to the PR:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Introduces
PJSUA_HAS_DLG_EVENT_PKGcompile-time configuration to conditionally enable/disable RFC 4235 dialog event package initialization.Changes:
PJSUA_HAS_DLG_EVENT_PKGmacro inpjsip/include/pjsua-lib/pjsua.h(default: 1)pjsip_dlg_event_init_module()call inpjsip/src/pjsua-lib/pjsua_core.cwith#if PJSUA_HAS_DLG_EVENT_PKGUsage:
Users with existing dialog event server implementations can disable the built-in client:
Motivation and Context
Dialog event package (RFC 4235) client support added in #3754 conflicts with existing user implementations of the server side. This flag allows users to opt-out while maintaining backward compatibility (enabled by default).
The configuration is placed at the PJSUA level (in pjsua.h) following the pattern of other PJSUA configuration macros like
PJSUA_HAS_VIDEOandPJSUA_HAS_SIPREC, making it consistent with the high-level API architecture.How Has This Been Tested?
PJSUA_HAS_DLG_EVENT_PKG=0(disabled)mod-dlg_eventmodule registration reflects configuration stateScreenshots (if appropriate):
N/A
Types of changes
Checklist:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.