[asterisk-commits] branch murf/bug_6264-trunk2 r27182 - /team/murf/bug_6264-trunk2/apps/app_dial.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon May 15 09:32:20 MST 2006


Author: murf
Date: Sat May 13 23:42:53 2006
New Revision: 27182

URL: http://svn.digium.com/view/asterisk?rev=27182&view=rev
Log:
There. I think I've folded the patch into this. Compiles.


Modified:
    team/murf/bug_6264-trunk2/apps/app_dial.c

Modified: team/murf/bug_6264-trunk2/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_6264-trunk2/apps/app_dial.c?rev=27182&r1=27181&r2=27182&view=diff
==============================================================================
--- team/murf/bug_6264-trunk2/apps/app_dial.c (original)
+++ team/murf/bug_6264-trunk2/apps/app_dial.c Sat May 13 23:42:53 2006
@@ -947,21 +947,27 @@
 		}
 		
 		if(privdb_val == AST_PRIVACY_DENY ) {
+			ast_copy_string(status, "NOANSWER", sizeof(status));
 			if (option_verbose > 2)
 				ast_verbose( VERBOSE_PREFIX_3  "Privacy DB reports PRIVACY_DENY for this callerid. Dial reports unavailable\n");
 			res=0;
 			goto out;
 		}
 		else if(privdb_val == AST_PRIVACY_KILL ) {
-			ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 201);
+			ast_copy_string(status, "DONTCALL", sizeof(status));
+			if (ast_opt_priority_jumping || ast_test_flag(&opts, OPT_PRIORITY_JUMP)) {
+				ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 201);
+			}
 			res = 0;
 			goto out; /* Is this right? */
 		}
 		else if(privdb_val == AST_PRIVACY_TORTURE ) {
-			ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 301);
+			ast_copy_string(status, "TORTURE", sizeof(status));
+			if (ast_opt_priority_jumping || ast_test_flag(&opts, OPT_PRIORITY_JUMP)) {
+				ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 301);
+			}
 			res = 0;
 			goto out; /* is this right??? */
-
 		}
 		else if(privdb_val == AST_PRIVACY_UNKNOWN ) {
 			/* Get the user's intro, store it in priv-callerintros/$CID, 
@@ -988,6 +994,8 @@
 				ast_play_and_record(chan, "priv-recordintro", privintro, 4, "gsm", &duration, 128, 2000, 0);  /* NOTE: I've reduced the total time to 4 sec */
 										/* don't think we'll need a lock removed, we took care of
 										   conflicts by naming the privintro file */
+				if( !ast_streamfile(chan, "vm-dialout", chan->language) )
+					ast_waitstream(chan, "");
 			}
 		}
 	}
@@ -1297,6 +1305,7 @@
 							     opt_args[OPT_ARG_PRIVACY], privcid);
 					ast_privacy_set(opt_args[OPT_ARG_PRIVACY], privcid, AST_PRIVACY_DENY);
 				}
+				ast_copy_string(status, "NOANSWER", sizeof(status));
 				ast_hangup(peer); /* hang up on the callee -- he didn't want to talk anyway! */
 				res=0;
 				goto out;



More information about the asterisk-commits mailing list