diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 274e9787df..58dd23acf5 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -16797,11 +16797,12 @@ static enum check_auth_result check_peer_ok(struct sip_pvt *p, char *of, } if (!ast_strlen_zero(peer->cid_name)) ast_string_field_set(p, cid_name, peer->cid_name); - if (!ast_strlen_zero(peer->cid_tag)) - ast_string_field_set(p, cid_tag, peer->cid_tag); if (peer->callingpres) p->callingpres = peer->callingpres; } + if (!ast_strlen_zero(peer->cid_tag)) { + ast_string_field_set(p, cid_tag, peer->cid_tag); + } ast_string_field_set(p, fullcontact, peer->fullcontact); if (!ast_strlen_zero(peer->context)) { ast_string_field_set(p, context, peer->context);