[asterisk-commits] branch 1.2 r24097 - /branches/1.2/apps/app_privacy.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon May 1 19:12:53 MST 2006


Author: tilghman
Date: Mon May  1 21:12:52 2006
New Revision: 24097

URL: http://svn.digium.com/view/asterisk?rev=24097&view=rev
Log:
Prompt does not request '#' to end input, so the application should not require it

Modified:
    branches/1.2/apps/app_privacy.c

Modified: branches/1.2/apps/app_privacy.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/apps/app_privacy.c?rev=24097&r1=24096&r2=24097&view=diff
==============================================================================
--- branches/1.2/apps/app_privacy.c (original)
+++ branches/1.2/apps/app_privacy.c Mon May  1 21:12:52 2006
@@ -193,13 +193,21 @@
 		}
 		
 		/*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)	



More information about the asterisk-commits mailing list