[asterisk-dev] Deprecating users.conf
asterisk at phreaknet.org
asterisk at phreaknet.org
Fri Jun 30 06:45:34 CDT 2023
Hi folks,
I've put up a PR to deprecate users.conf[1], following a
discussion earlier this year about this, but I think that was on IRC so
wanted to discuss here as well.
Mark introduced users.conf at some point in the early 2000s with the
idea of it being a "simple" way to configure certain things, but I think
time has shown that to be its primary weakness. New modules haven't
supported users.conf in a long time (such as PJSIP), and now that
chan_sip is already gone, there is basically no point in keeping
users.conf around anymore. The main two modules that still "support" it
(if you can call the hack job parsing they do "support") are chan_dahdi
and chan_iax2, and the configuration for both of these is almost
entirely non-overlapping and really needs to be configured in the
appropriate module config file anyways.
Therefore, I am proposing this be deprecated in 21 so that it can be
removed in 23, in accordance with the Asterisk deprecation policy:
* Support for users.conf has dwindled as new modules no longer support
it and modules that did support it (e.g. chan_sip) have been largely
removed
* No real functionality has been added to the users.conf mechanism
since it was introduced. New features are added to specific modules,
but these are not supported in users.conf
* users.conf was a super simplistic mechanism that in practice did not
pan out. It's something that really should never have been added in
the first place. Use of it has been widely discouraged since it was
introduction, and caused confusion for Asterisk newcomers,
particularly with a default install where users see warnings about
users.conf. Users should not be using it and the fact that the
sample config still exists continues to create confusion
* Removing users.conf will help eliminate technical debt, allowing for
simplification of the codebase and easier maintenance going forward
This is somewhat different as users.conf is not any single module, and
there's no real process for deprecating a config file, but a warning
message is added when the PBX loads here so that users will see a notice
about it, just like with deprecated modules. It's also in the upgrade
notes. This is a master only change, so it won't be removed until late
2025 at the earliest.
Any objections or other thoughts on this matter?
[1] https://github.com/asterisk/asterisk/pull/184
More information about the asterisk-dev
mailing list