aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_privacy.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-05-02 02:24:58 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-05-02 02:24:58 +0000
commitf6d234dd971464593c0ec81dd8b58925934483f8 (patch)
tree41bce2175322e66cb820c13d9135a2dd45ce02b5 /apps/app_privacy.c
parent56d722900553ca4f53e49b8b961136ac3da60807 (diff)
Merged revisions 24097 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r24097 | tilghman | 2006-05-01 21:12:52 -0500 (Mon, 01 May 2006) | 2 lines Prompt does not request '#' to end input, so the application should not require it ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@24098 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_privacy.c')
-rw-r--r--apps/app_privacy.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/apps/app_privacy.c b/apps/app_privacy.c
index eb722e5a3..00af9fc27 100644
--- a/apps/app_privacy.c
+++ b/apps/app_privacy.c
@@ -189,13 +189,21 @@ static int privacy_exec (struct ast_channel *chan, void *data)
}
/*Got a number, play sounds and send them on their way*/
- if ((retries < maxretries) && !res ) {
+ if ((retries < maxretries) && res >= 0 ) {
res = ast_streamfile(chan, "privacy-thankyou", chan->language);
if (!res)
res = ast_waitstream(chan, "");
- ast_set_callerid (chan, phone, "Privacy Manager", NULL);
- if (option_verbose > 2)
- ast_verbose (VERBOSE_PREFIX_3 "Changed Caller*ID to %s\n",phone);
+
+ ast_set_callerid (chan, phone, "Privacy Manager", NULL);
+
+ /* Clear the unavailable presence bit so if it came in on PRI
+ * the caller id will now be passed out to other channels
+ */
+ chan->cid.cid_pres &= (AST_PRES_UNAVAILABLE ^ 0xFF);
+
+ if (option_verbose > 2) {
+ ast_verbose (VERBOSE_PREFIX_3 "Changed Caller*ID to %s, callerpres to %d\n",phone,chan->cid.cid_pres);
+ }
pbx_builtin_setvar_helper(chan, "PRIVACYMGRSTATUS", "SUCCESS");
} else {
if (priority_jump || ast_opt_priority_jumping)