users.conf: Remove deprecated users.conf integration.

users.conf was deprecated in Asterisk 21 and is now being removed
for Asterisk 23, in accordance with the Asterisk deprecation policy.

This consists of:
* Removing integration with app_directory, app_voicemail, chan_dahdi,
  chan_iax2, and AMI.
* users.conf was also partially used for res_phoneprov, and this remaining
  functionality is consolidated to a separate phoneprov_users.conf,
  used only by res_phoneprov.

Resolves: #1292

UpgradeNote: users.conf has been removed and all channel drivers must
be configured using their specific configuration files. The functionality
previously in users.conf for res_phoneprov is now in phoneprov_users.conf.
This commit is contained in:
Naveen Albert
2025-07-09 09:30:43 -04:00
committed by github-actions[bot]
parent 5963e624e2
commit 415daae95f
13 changed files with 82 additions and 728 deletions

View File

@@ -1777,7 +1777,7 @@ pickupgroup=1
; ~~~~~~~~~~~~~~~~~~~~~~
; You can also configure channels in a separate chan_dahdi.conf section. In
; this case the keyword 'channel' is not used. Instead the keyword
; 'dahdichan' is used (as in users.conf) - configuration is only processed
; 'dahdichan' is used - configuration is only processed
; in a section where the keyword dahdichan is used. It will only be
; processed in the end of the section. Thus the following section:
;
@@ -1795,8 +1795,7 @@ pickupgroup=1
;
; When starting a new section almost all of the configuration values are
; copied from their values at the end of the section [channels] in
; chan_dahdi.conf and [general] in users.conf - one section's configuration
; does not affect another one's.
; chan_dahdi.conf - one section's configuration does not affect another one's.
;
; Instead of letting common configuration values "slide through" you can
; use configuration templates to easily keep the common part in one

View File

@@ -1,5 +1,5 @@
[general]
; This section applies only to the default users.conf config provider
; This section applies only to the default phoneprov_users.conf config provider
; embedded in res_phoneprov. Other providers may provide their own default settings.
; The default behavior of res_phoneprov will be to set the SERVER template variable to
@@ -11,7 +11,7 @@
; Useful for when the interface uses DHCP and the asterisk http
; server listens on a different IP than sip.
;serverport=5060 ; Override port to send to the phone to use as server port.
default_profile=polycom ; The default profile to use if none specified in users.conf
default_profile=polycom ; The default profile to use if none specified in phoneprov_users.conf
; You can define profiles for different phones specifying what files to register
; with the provisioning server. You can define either static files, or dynamically
@@ -29,10 +29,10 @@ default_profile=polycom ; The default profile to use if none specified in users.
; Dynamically generated files have a filename registered with variable substitution
; with variables obtained from various config providers. The default provider
; embedded in res_phoneprov reads users.conf. Other providers will have their own
; embedded in res_phoneprov reads phoneprov_users.conf. Other providers will have their own
; sources for the variables and may provide additional variables not listed here.
; Built in variables and the options in users.conf that they come from
; Built in variables and the options in phoneprov_users.conf that they come from
; MAC (macaddress)
; USERNAME (username)
; DISPLAY_NAME (fullname)

View File

@@ -0,0 +1,40 @@
;
; Device provisioning configuration
;
; This file is used by res_phoneprov to define provisioning entries.
;
[general]
;
; Full name of a user
;
fullname = New User
;
; MAC Address for res_phoneprov
;
;macaddress = 112233445566
;
; Auto provision the phone with res_phoneprov
;
;autoprov = yes
;
; Line Keys for hardphone
;
;LINEKEYS = 1
;
; Line number for hardphone
;
;linenumber = 1
;
; Local Caller ID number used with res_phoneprov and Asterisk GUI
;
;cid_number = 6000
;[6000]
;fullname = Joe User
;secret = 1234
;macaddress = 112233445566
;autoprov = yes
;LINEKEYS = 1
;linenumber = 1
;cid_number = 6000

View File

@@ -1,113 +0,0 @@
;
; User configuration
;
; WARNING: This configuration file is deprecated and will be removed in
; a future version of Asterisk. It is recommended that you make configurations
; in the appropriate module-specific configuration file for more flexibility.
; Many Asterisk modules already no longer support users.conf.
;
; Creating entries in users.conf is a "shorthand" for creating individual
; entries in each configuration file. Using users.conf is not intended to
; provide you with as much flexibility as using the separate configuration
; files (e.g. iax.conf, etc) but is intended to accelerate the
; simple task of adding users. Note that creating individual items (e.g.
; IAX friends, etc.) will allow you to override specific parameters within
; this file. Parameter names here are the same as they appear in the
; other configuration files. There is no way to change the value of a
; parameter here for just one subsystem.
;
[general]
;
; Full name of a user
;
fullname = New User
;
; Starting point of allocation of extensions
;
userbase = 6000
;
; Create voicemail mailbox
;
hasvoicemail = yes
;
; Set voicemail mailbox 6000 password to 1234
;
vmsecret = 1234
;
; Create IAX friend
;
hasiax = yes
;
; Create H.323 friend
;
;hash323 = yes
;
; Create manager entry
;
hasmanager = no
;
; Set permissions for manager entry (see manager.conf.sample for documentation)
; (defaults to *all* permissions)
;managerread = system,call,log,verbose,command,agent,user,config
;managerwrite = system,call,log,verbose,command,agent,user,config
;
;
; MAC Address for res_phoneprov
;
;macaddress = 112233445566
;
; Auto provision the phone with res_phoneprov
;
;autoprov = yes
;
; Line Keys for hardphone
;
;LINEKEYS = 1
;
; Line number for hardphone
;
;linenumber = 1
;
; Local Caller ID number used with res_phoneprov and Asterisk GUI
;
;cid_number = 6000
;
; Remaining options are not specific to users.conf entries but are general.
;
callwaiting = yes
threewaycalling = yes
callwaitingcallerid = yes
transfer = yes
canpark = yes
cancallforward = yes
callreturn = yes
callgroup = 1
pickupgroup = 1
;nat = no
;[6000]
;fullname = Joe User
;description = Courtesy Phone In Lobby ; Used to provide a description of the
; peer in console output
;email = joe@foo.bar
;secret = 1234
;dahdichan = 1
;hasvoicemail = yes
;vmsecret = 1234
;hasiax = no
;hash323 = no
;hasmanager = no
;callwaiting = no
;context = international
;
; Some administrators choose alphanumeric extensions, but still want their
; users to be reachable by traditional numeric extensions, specified by the
; alternateexts entry.
;
;alternateexts = 7057,3249
;macaddress = 112233445566
;autoprov = yes
;LINEKEYS = 1
;linenumber = 1
;cid_number = 6000

View File

@@ -72,11 +72,6 @@ maxlogins=3
; sender can set the urgency on the envelope of the forwarded message.
;forward_urgent_auto=no
;
; User context is where entries from users.conf are registered. The
; default value is 'default'
;
;userscontext=default
;
; Aliases allow a mailbox to be referenced by an alias. The aliases are
; specified in the special context named here. There is no default.
;aliasescontext=myaliases
@@ -411,7 +406,7 @@ sendvoicemail=yes ; Allow the user to compose and send a voicemail while inside
; Supported options:
; voicemail.conf:
; This is the default option. The secret is read from
; and written to voicemail.conf (or users.conf).
; and written to voicemail.conf.
; spooldir:
; The secret is stored in a separate file in the user's
; voicemail spool directory in a file named secret.conf.
@@ -419,7 +414,7 @@ sendvoicemail=yes ; Allow the user to compose and send a voicemail while inside
; permitted to access Asterisk's spool directory as the
; secret is stored in plain text. If a secret is not
; found in this directory, the password in
; voicemail.conf (or users.conf) will be used.
; voicemail.conf will be used.
; Note that this option does not affect password storage for
; realtime users, which are still stored in the realtime
; backend.