aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_privacy.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-10-02 00:58:31 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-10-02 00:58:31 +0000
commit6868babd229a635c5fd89c7b284025a92e0a3f9d (patch)
tree25a4ee6dff29d18acfdfbbc42485333db7aa5311 /apps/app_privacy.c
parentb201da1a3eb1cae654cdd3fe89ef8f9e55dd0b83 (diff)
Huge callerid rework (might break H.323, others)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3874 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_privacy.c')
-rwxr-xr-xapps/app_privacy.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/apps/app_privacy.c b/apps/app_privacy.c
index 7628ea0e7..2972ee73a 100755
--- a/apps/app_privacy.c
+++ b/apps/app_privacy.c
@@ -3,9 +3,9 @@
*
* Block all calls without Caller*ID, require phone # to be entered
*
- * Copyright (C) 1999, Mark Spencer
+ * Copyright (C) 1999-2004, Digium, Inc.
*
- * Mark Spencer <markster@linux-support.net>
+ * Mark Spencer <markster@digium.com>
*
* This program is free software, distributed under the terms of
* the GNU General Public License
@@ -62,7 +62,7 @@ privacy_exec (struct ast_channel *chan, void *data)
struct ast_config *cfg;
LOCAL_USER_ADD (u);
- if (chan->callerid)
+ if (chan->cid.cid_num)
{
if (option_verbose > 2)
ast_verbose (VERBOSE_PREFIX_3 "CallerID Present: Skipping\n");
@@ -118,13 +118,12 @@ privacy_exec (struct ast_channel *chan, void *data)
res = ast_streamfile(chan, "privacy-thankyou", chan->language);
if (!res)
res = ast_waitstream(chan, "");
- snprintf (new_cid, sizeof (new_cid), "\"%s\" <%s>", "Privacy Manager", phone);
- ast_set_callerid (chan, new_cid, 0);
+ ast_set_callerid (chan, phone, "Privacy Manager", NULL);
if (option_verbose > 2)
ast_verbose (VERBOSE_PREFIX_3 "Changed Caller*ID to %s\n",new_cid);
} else {
/*Send the call to n+101 priority, where n is the current priority*/
- if (ast_exists_extension(chan, chan->context, chan->exten, chan->priority + 101, chan->callerid))
+ if (ast_exists_extension(chan, chan->context, chan->exten, chan->priority + 101, chan->cid.cid_num))
chan->priority+=100;
}
if (cfg)