[asterisk-commits] file: branch 1.4 r228547 - /branches/1.4/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Nov 6 12:33:01 CST 2009


Author: file
Date: Fri Nov  6 12:32:58 2009
New Revision: 228547

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=228547
Log:
Don't overwrite caller ID name on a trunk with the configured fullname when using users.conf

(issue ABE-1989)

Modified:
    branches/1.4/channels/chan_sip.c

Modified: branches/1.4/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/channels/chan_sip.c?view=diff&rev=228547&r1=228546&r2=228547
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Fri Nov  6 12:32:58 2009
@@ -17741,6 +17741,9 @@
 			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 @@
 				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")) {




More information about the asterisk-commits mailing list