[asterisk-commits] mattf: branch 1.4 r47462 - /branches/1.4/channels/chan_zap.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Nov 10 12:47:16 MST 2006


Author: mattf
Date: Fri Nov 10 13:47:16 2006
New Revision: 47462

URL: http://svn.digium.com/view/asterisk?view=rev&rev=47462
Log:
Fix for #7321.  Be able to explicitly hide callerid name for switches that bork 
on it.

Modified:
    branches/1.4/channels/chan_zap.c

Modified: branches/1.4/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_zap.c?view=diff&rev=47462&r1=47461&r2=47462
==============================================================================
--- branches/1.4/channels/chan_zap.c (original)
+++ branches/1.4/channels/chan_zap.c Fri Nov 10 13:47:16 2006
@@ -237,6 +237,8 @@
 static int callwaitingcallerid = 0;
 
 static int hidecallerid = 0;
+
+static int hidecalleridname = 0;
 
 static int restrictcid = 0;
 
@@ -576,6 +578,7 @@
 	unsigned int hanguponpolarityswitch:1;
 	unsigned int hardwaredtmf:1;
 	unsigned int hidecallerid;
+	unsigned int hidecalleridname;      /*!< Hide just the name not the number for legacy PBX use */
 	unsigned int ignoredtmf:1;
 	unsigned int immediate:1;			/*!< Answer before getting digits? */
 	unsigned int inalarm:1;
@@ -2078,6 +2081,10 @@
 			c++;
 		else
 			c = dest;
+		if (!p->hidecalleridname)
+			n = ast->cid.cid_name;
+		else
+			n = NULL;
 		if (!p->hidecallerid) {
 			l = ast->cid.cid_num;
 			n = ast->cid.cid_name;
@@ -10553,6 +10560,8 @@
 				echotraining = 0;
 		} else if (!strcasecmp(v->name, "hidecallerid")) {
 			hidecallerid = ast_true(v->value);
+		} else if (!strcasecmp(v->name, "hidecalleridname")) {
+			hidecalleridname = ast_true(v->value);
  		} else if (!strcasecmp(v->name, "pulsedial")) {
  			pulse = ast_true(v->value);
 		} else if (!strcasecmp(v->name, "callreturn")) {



More information about the asterisk-commits mailing list