]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
automerge commit
authorAutomerge script <automerge@asterisk.org>
Tue, 2 May 2006 03:06:29 +0000 (03:06 +0000)
committerAutomerge script <automerge@asterisk.org>
Tue, 2 May 2006 03:06:29 +0000 (03:06 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@24128 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_privacy.c

index 04ebf247b4b651133b36bfc696664c44609264ac..09b1c1556cef7822898528d2855ae3dd3caf3418 100644 (file)
@@ -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)