diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-02 02:12:52 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-02 02:12:52 +0000 |
commit | d939d18a09b99b1d7c53461eb2165dee4333ae43 (patch) | |
tree | b860b0b3fe9fc09bf7a20d52822d4369aa6d405f | |
parent | d9e331795d943442bafe16e25cd75d907dc4c397 (diff) |
Prompt does not request '#' to end input, so the application should not require it
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@24097 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | apps/app_privacy.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/apps/app_privacy.c b/apps/app_privacy.c index 04ebf247b..09b1c1556 100644 --- a/apps/app_privacy.c +++ b/apps/app_privacy.c @@ -193,13 +193,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 || option_priority_jumping) |