diff options
author | mattf <mattf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-11-10 19:47:16 +0000 |
---|---|---|
committer | mattf <mattf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-11-10 19:47:16 +0000 |
commit | 474cfe3c88762d22af921f521a3d0a1ffefed717 (patch) | |
tree | 090f7a1fb763ecfe0fe396bd2bb241e364d2bcf6 /channels/chan_zap.c | |
parent | e08b980b0e22b6510ac16074549c746d8bf41972 (diff) |
Fix for #7321. Be able to explicitly hide callerid name for switches that bork
on it.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@47462 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_zap.c')
-rw-r--r-- | channels/chan_zap.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c index b035ec4d6..990a4bdf8 100644 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -238,6 +238,8 @@ static int callwaitingcallerid = 0; static int hidecallerid = 0; +static int hidecalleridname = 0; + static int restrictcid = 0; static int use_callingpres = 0; @@ -576,6 +578,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; @@ -2078,6 +2081,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; @@ -10553,6 +10560,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")) { |