From: Joshua Colp Date: Fri, 6 Nov 2009 18:32:58 +0000 (+0000) Subject: Don't overwrite caller ID name on a trunk with the configured fullname when using... X-Git-Tag: 1.4.27-rc4~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0eb5bea8534fe42b1f2bfc2dc649e3dc7cc34ef8;p=thirdparty%2Fasterisk.git Don't overwrite caller ID name on a trunk with the configured fullname when using users.conf (issue ABE-1989) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@228547 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 0477aa0ad0..80300ceb9e 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -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")) {