summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorMatthew Fredrickson <creslin@digium.com>2006-11-10 19:35:41 +0000
committerMatthew Fredrickson <creslin@digium.com>2006-11-10 19:35:41 +0000
commit554902f070e6da4ccfd986dfd08d6d6c012ad8eb (patch)
tree9a0e234ef2eb9d7530d235777231f0488953ee0c /channels
parentd53979523c2d2651fb570f25dbce81800103874a (diff)
Add fix for 7321. Ability to hide calleridname from zapata.conf
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47456 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_zap.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c
index 13088f86d..94809af79 100644
--- a/channels/chan_zap.c
+++ b/channels/chan_zap.c
@@ -247,6 +247,8 @@ static int callwaitingcallerid = 0;
static int hidecallerid = 0;
+static int hidecalleridname = 0;
+
static int restrictcid = 0;
static int use_callingpres = 0;
@@ -613,6 +615,7 @@ static struct zt_pvt {
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;
@@ -2239,6 +2242,10 @@ static int zt_call(struct ast_channel *ast, char *rdest, int timeout)
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;
@@ -8337,7 +8344,7 @@ static void ss7_inservice(struct zt_ss7 *linkset, int startcic, int endcic)
}
}
-static int ss7_reset_linkset(struct zt_ss7 *linkset)
+static void ss7_reset_linkset(struct zt_ss7 *linkset)
{
int i, startcic = -1, endcic;
@@ -11820,6 +11827,8 @@ static int process_zap(struct ast_variable *v, int reload, int skipchannels)
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")) {