]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Don't overwrite caller ID name on a trunk with the configured fullname when using...
authorJoshua Colp <jcolp@digium.com>
Fri, 6 Nov 2009 18:32:58 +0000 (18:32 +0000)
committerJoshua Colp <jcolp@digium.com>
Fri, 6 Nov 2009 18:32:58 +0000 (18:32 +0000)
(issue ABE-1989)

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

channels/chan_sip.c

index 0477aa0ad0b3054ac4224863286d8fb7a8c78b04..80300ceb9ee2edb4fa618295c0a42d37c5e6e81f 100644 (file)
@@ -17741,6 +17741,9 @@ static struct sip_user *build_user(const char *name, struct ast_variable *v, str
                        ast_callerid_split(v->value, user->cid_name, sizeof(user->cid_name), user->cid_num, sizeof(user->cid_num));
                } else if (!strcasecmp(v->name, "fullname")) {
                        ast_copy_string(user->cid_name, v->value, sizeof(user->cid_name));
+               } else if (!strcasecmp(v->name, "trunkname")) {
+                       /* This is actually for a trunk, so we don't want to override callerid */
+                       ast_copy_string(user->cid_name, "", sizeof(user->cid_name));
                } else if (!strcasecmp(v->name, "cid_number")) {
                        ast_copy_string(user->cid_num, v->value, sizeof(user->cid_num));
                } else if (!strcasecmp(v->name, "callgroup")) {
@@ -17959,6 +17962,9 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, str
                                ast_callerid_split(v->value, peer->cid_name, sizeof(peer->cid_name), peer->cid_num, sizeof(peer->cid_num));
                        } else if (!strcasecmp(v->name, "fullname")) {
                                ast_copy_string(peer->cid_name, v->value, sizeof(peer->cid_name));
+                       } else if (!strcasecmp(v->name, "trunkname")) {
+                               /* This is actually for a trunk, so we don't want to override callerid */
+                               ast_copy_string(peer->cid_name, "", sizeof(peer->cid_name));
                        } else if (!strcasecmp(v->name, "cid_number")) {
                                ast_copy_string(peer->cid_num, v->value, sizeof(peer->cid_num));
                        } else if (!strcasecmp(v->name, "context")) {