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
changes/09/3609/1
Alexander Traud 9 years ago
parent b35779c6c6
commit acc5237e91

@ -981,9 +981,8 @@ class Registration:
if hasattr(self, 'secret') and self.secret:
set_value('password', self.secret, auth_section, pjsip, nmapped,
'auth')
if hasattr(self, 'authuser'):
set_value('username', self.authuser or self.user, auth_section,
pjsip, nmapped, 'auth')
set_value('username', self.authuser if hasattr(self, 'authuser')
else self.user, auth_section, pjsip, nmapped, 'auth')
set_value('outbound_auth', auth_section, section, pjsip, nmapped,
'registration')

Loading…
Cancel
Save