]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Even if no CallerID name or number has been provided by the remote party still use...
authorJoshua Colp <jcolp@digium.com>
Tue, 12 Feb 2008 15:09:24 +0000 (15:09 +0000)
committerJoshua Colp <jcolp@digium.com>
Tue, 12 Feb 2008 15:09:24 +0000 (15:09 +0000)
(closes issue #11977)
Reported by: pj

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103385 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index b0ef9bc97e40fa5c664c09ce9ec8f420e201a393..979e5748a33d0d0e45c499589a4a5d7a200b5fc1 100644 (file)
@@ -9380,13 +9380,13 @@ static enum check_auth_result check_user_full(struct sip_pvt *p, struct sip_requ
                                ast_set_flag(&p->flags[0], SIP_CALL_LIMIT);
                        if (!ast_strlen_zero(user->context))
                                ast_string_field_set(p, context, user->context);
-                       if (!ast_strlen_zero(user->cid_num) && !ast_strlen_zero(p->cid_num)) {
+                       if (!ast_strlen_zero(user->cid_num)) {
                                char *tmp = ast_strdupa(user->cid_num);
                                if (ast_is_shrinkable_phonenumber(tmp))
                                        ast_shrink_phone_number(tmp);
                                ast_string_field_set(p, cid_num, tmp);
                        }
-                       if (!ast_strlen_zero(user->cid_name) && !ast_strlen_zero(p->cid_num))
+                       if (!ast_strlen_zero(user->cid_name))
                                ast_string_field_set(p, cid_name, user->cid_name);
                        ast_string_field_set(p, username, user->name);
                        ast_string_field_set(p, peername, user->name);
@@ -9515,13 +9515,13 @@ static enum check_auth_result check_user_full(struct sip_pvt *p, struct sip_requ
                                        /* XXX this takes the name from the caller... can we override ? */
                                        ast_string_field_set(p, authname, peer->username);
                                }
-                               if (!ast_strlen_zero(peer->cid_num) && !ast_strlen_zero(p->cid_num)) {
+                               if (!ast_strlen_zero(peer->cid_num)) {
                                        char *tmp = ast_strdupa(peer->cid_num);
                                        if (ast_is_shrinkable_phonenumber(tmp))
                                                ast_shrink_phone_number(tmp);
                                        ast_string_field_set(p, cid_num, tmp);
                                }
-                               if (!ast_strlen_zero(peer->cid_name) && !ast_strlen_zero(p->cid_name)
+                               if (!ast_strlen_zero(peer->cid_name)) 
                                        ast_string_field_set(p, cid_name, peer->cid_name);
                                ast_string_field_set(p, fullcontact, peer->fullcontact);
                                if (!ast_strlen_zero(peer->context))