aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-05-24 20:00:10 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-05-24 20:00:10 +0000
commit9c7558d281abc483971f9718ccc3dd39cd69bf94 (patch)
tree85a0f92c52a122809c04846930e297776b5dba0c
parent5a97785f12a5ff3e1085219d8bc5517a85785889 (diff)
Merge branch for bug 6264 (Privacy option 2 returns dial-status ANSWER / option_priority_jumping not respected) (reported by jkoopmann and branch by murf)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@30040 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--apps/app_dial.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index 5c2aec511..421c7cf8e 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -959,21 +959,27 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
}
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,
@@ -1000,6 +1006,8 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
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, "");
}
}
}
@@ -1312,6 +1320,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
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;