aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index d6f513a64..85086d044 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -7922,10 +7922,8 @@ static enum parse_register_result parse_register_contact(struct sip_pvt *pvt, st
/* Save SIP options profile */
peer->sipoptions = pvt->sipoptions;
- if (curi) /* Overwrite the default username from config at registration */
+ if (curi && ast_strlen_zero(peer->username))
ast_copy_string(peer->username, curi, sizeof(peer->username));
- else
- peer->username[0] = '\0';
if (peer->expire > -1) {
ast_sched_del(sched, peer->expire);