mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 04:30:28 +00:00
sip_to_pjsip: Write username even without authname.
When using the migration script sip_to_pjsip.py, now the (mandatory) username is written to pjsip.conf, even if there was no (optional) authname in the register string in sip.conf. ASTERISK-22374 Change-Id: Ie53e1997104cd2674821688b8a8247249f5e156f
This commit is contained in:
@@ -981,9 +981,8 @@ class Registration:
|
|||||||
if hasattr(self, 'secret') and self.secret:
|
if hasattr(self, 'secret') and self.secret:
|
||||||
set_value('password', self.secret, auth_section, pjsip, nmapped,
|
set_value('password', self.secret, auth_section, pjsip, nmapped,
|
||||||
'auth')
|
'auth')
|
||||||
if hasattr(self, 'authuser'):
|
set_value('username', self.authuser if hasattr(self, 'authuser')
|
||||||
set_value('username', self.authuser or self.user, auth_section,
|
else self.user, auth_section, pjsip, nmapped, 'auth')
|
||||||
pjsip, nmapped, 'auth')
|
|
||||||
set_value('outbound_auth', auth_section, section, pjsip, nmapped,
|
set_value('outbound_auth', auth_section, section, pjsip, nmapped,
|
||||||
'registration')
|
'registration')
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user