aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-05-24 19:44:26 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-05-24 19:44:26 +0000
commit4a32b8e28ddd975fa839cd9dcae7645997567e81 (patch)
tree572dae659a5a8749c4e12586e413c73ef8f9c356
parent28f103ab4627c9fab8f834136aa9269f8b4e08f9 (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/branches/1.2@30035 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--apps/app_dial.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index 3bfa91165..4481910fb 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -939,20 +939,26 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
}
if( privdb_val == AST_PRIVACY_DENY ) {
+ strcpy(status, "NOANSWER");
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);
+ strcpy(status, "DONTCALL");
+ if (option_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);
+ strcpy(status, "TORTURE");
+ if (option_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,
@@ -1310,6 +1316,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);
}
+ strcpy(status,"NOANSWER");
if (ast_test_flag(&opts, OPT_MUSICBACK)) {
ast_moh_stop(chan);
} else if (ast_test_flag(&opts, OPT_RINGBACK)) {