aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/app_dial.c66
-rw-r--r--apps/app_macro.c4
-rw-r--r--apps/app_queue.c16
3 files changed, 33 insertions, 53 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index fa4ee7a4b..831a708e5 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -2215,14 +2215,9 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
res = ast_bridge_call(chan, peer, &config);
}
- if (res != AST_PBX_NO_HANGUP_PEER_PARKED && ast_test_flag64(&opts, OPT_PEER_H)) {
- ast_log(LOG_NOTICE, "PEER context: %s; PEER exten: %s; PEER priority: %d\n",
- peer->context, peer->exten, peer->priority);
- }
- if (res != AST_PBX_NO_HANGUP_PEER_PARKED)
- strcpy(peer->context, chan->context);
+ strcpy(peer->context, chan->context);
- if (res != AST_PBX_NO_HANGUP_PEER_PARKED && ast_test_flag64(&opts, OPT_PEER_H) && ast_exists_extension(peer, peer->context, "h", 1, peer->cid.cid_num)) {
+ if (ast_test_flag64(&opts, OPT_PEER_H) && ast_exists_extension(peer, peer->context, "h", 1, peer->cid.cid_num)) {
int autoloopflag;
int found;
int res9;
@@ -2242,41 +2237,34 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
}
ast_set2_flag(peer, autoloopflag, AST_FLAG_IN_AUTOLOOP); /* set it back the way it was */
}
- if (res != AST_PBX_NO_HANGUP_PEER && res != AST_PBX_NO_HANGUP_PEER_PARKED) {
- if (!ast_check_hangup(peer) && ast_test_flag64(&opts, OPT_CALLEE_GO_ON) && !ast_strlen_zero(opt_args[OPT_ARG_CALLEE_GO_ON])) {
- replace_macro_delimiter(opt_args[OPT_ARG_CALLEE_GO_ON]);
- ast_parseable_goto(peer, opt_args[OPT_ARG_CALLEE_GO_ON]);
- ast_pbx_start(peer);
- } else {
- if (!ast_check_hangup(chan))
- chan->hangupcause = peer->hangupcause;
- ast_hangup(peer);
- }
+ if (!ast_check_hangup(peer) && ast_test_flag64(&opts, OPT_CALLEE_GO_ON) && !ast_strlen_zero(opt_args[OPT_ARG_CALLEE_GO_ON])) {
+ replace_macro_delimiter(opt_args[OPT_ARG_CALLEE_GO_ON]);
+ ast_parseable_goto(peer, opt_args[OPT_ARG_CALLEE_GO_ON]);
+ ast_pbx_start(peer);
+ } else {
+ if (!ast_check_hangup(chan))
+ chan->hangupcause = peer->hangupcause;
+ ast_hangup(peer);
}
}
out:
- /* cleaning up chan is not a good idea here if AST_PBX_KEEPALIVE
- is returned; chan will get the love it needs from another
- thread */
- if (res != AST_PBX_KEEPALIVE) {
- if (moh) {
- moh = 0;
- ast_moh_stop(chan);
- } else if (sentringing) {
- sentringing = 0;
- ast_indicate(chan, -1);
- }
- ast_channel_early_bridge(chan, NULL);
- hanguptree(outgoing, NULL, 0); /* In this case, there's no answer anywhere */
- pbx_builtin_setvar_helper(chan, "DIALSTATUS", pa.status);
- senddialendevent(chan, pa.status);
- ast_debug(1, "Exiting with DIALSTATUS=%s.\n", pa.status);
-
- if ((ast_test_flag64(peerflags, OPT_GO_ON)) && !ast_check_hangup(chan) && (res != AST_PBX_KEEPALIVE) && (res != AST_PBX_INCOMPLETE)) {
- if (!ast_tvzero(calldurationlimit))
- memset(&chan->whentohangup, 0, sizeof(chan->whentohangup));
- res = 0;
- }
+ if (moh) {
+ moh = 0;
+ ast_moh_stop(chan);
+ } else if (sentringing) {
+ sentringing = 0;
+ ast_indicate(chan, -1);
+ }
+ ast_channel_early_bridge(chan, NULL);
+ hanguptree(outgoing, NULL, 0); /* In this case, there's no answer anywhere */
+ pbx_builtin_setvar_helper(chan, "DIALSTATUS", pa.status);
+ senddialendevent(chan, pa.status);
+ ast_debug(1, "Exiting with DIALSTATUS=%s.\n", pa.status);
+
+ if ((ast_test_flag64(peerflags, OPT_GO_ON)) && !ast_check_hangup(chan) && (res != AST_PBX_INCOMPLETE)) {
+ if (!ast_tvzero(calldurationlimit))
+ memset(&chan->whentohangup, 0, sizeof(chan->whentohangup));
+ res = 0;
}
done:
diff --git a/apps/app_macro.c b/apps/app_macro.c
index c90432a62..9d6599963 100644
--- a/apps/app_macro.c
+++ b/apps/app_macro.c
@@ -406,10 +406,6 @@ static int _macro_exec(struct ast_channel *chan, void *data, int exclusive)
case MACRO_EXIT_RESULT:
res = 0;
goto out;
- case AST_PBX_KEEPALIVE:
- ast_debug(2, "Spawn extension (%s,%s,%d) exited KEEPALIVE in macro %s on '%s'\n", chan->context, chan->exten, chan->priority, macro, chan->name);
- ast_verb(2, "Spawn extension (%s, %s, %d) exited KEEPALIVE in macro '%s' on '%s'\n", chan->context, chan->exten, chan->priority, macro, chan->name);
- goto out;
default:
ast_debug(2, "Spawn extension (%s,%s,%d) exited non-zero on '%s' in macro '%s'\n", chan->context, chan->exten, chan->priority, chan->name, macro);
ast_verb(2, "Spawn extension (%s, %s, %d) exited non-zero on '%s' in macro '%s'\n", chan->context, chan->exten, chan->priority, chan->name, macro);
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 5b6c43932..1d86d3df6 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -4069,24 +4069,21 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
/* If the queue member did an attended transfer, then the TRANSFER already was logged in the queue_log
* when the masquerade occurred. These other "ending" queue_log messages are unnecessary
*/
- if (bridge != AST_PBX_KEEPALIVE && !attended_transfer_occurred(qe->chan)) {
+ if (!attended_transfer_occurred(qe->chan)) {
struct ast_datastore *tds;
if (strcasecmp(oldcontext, qe->chan->context) || strcasecmp(oldexten, qe->chan->exten)) {
ast_queue_log(queuename, qe->chan->uniqueid, member->membername, "TRANSFER", "%s|%s|%ld|%ld|%d",
qe->chan->exten, qe->chan->context, (long) (callstart - qe->start),
(long) (time(NULL) - callstart), qe->opos);
- if (bridge != AST_PBX_NO_HANGUP_PEER && bridge != AST_PBX_NO_HANGUP_PEER_PARKED)
- send_agent_complete(qe, queuename, peer, member, callstart, vars, sizeof(vars), TRANSFER);
+ send_agent_complete(qe, queuename, peer, member, callstart, vars, sizeof(vars), TRANSFER);
} else if (ast_check_hangup(qe->chan)) {
ast_queue_log(queuename, qe->chan->uniqueid, member->membername, "COMPLETECALLER", "%ld|%ld|%d",
(long) (callstart - qe->start), (long) (time(NULL) - callstart), qe->opos);
- if (bridge != AST_PBX_NO_HANGUP_PEER && bridge != AST_PBX_NO_HANGUP_PEER_PARKED)
- send_agent_complete(qe, queuename, peer, member, callstart, vars, sizeof(vars), CALLER);
+ send_agent_complete(qe, queuename, peer, member, callstart, vars, sizeof(vars), CALLER);
} else {
ast_queue_log(queuename, qe->chan->uniqueid, member->membername, "COMPLETEAGENT", "%ld|%ld|%d",
(long) (callstart - qe->start), (long) (time(NULL) - callstart), qe->opos);
- if (bridge != AST_PBX_NO_HANGUP_PEER && bridge != AST_PBX_NO_HANGUP_PEER_PARKED)
- send_agent_complete(qe, queuename, peer, member, callstart, vars, sizeof(vars), AGENT);
+ send_agent_complete(qe, queuename, peer, member, callstart, vars, sizeof(vars), AGENT);
}
ast_channel_lock(qe->chan);
if ((tds = ast_channel_datastore_find(qe->chan, &queue_transfer_info, NULL))) {
@@ -4099,8 +4096,7 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
if (transfer_ds) {
ast_datastore_free(transfer_ds);
}
- if (bridge != AST_PBX_NO_HANGUP_PEER && bridge != AST_PBX_NO_HANGUP_PEER_PARKED)
- ast_hangup(peer);
+ ast_hangup(peer);
res = bridge ? bridge : 1;
ao2_ref(member, -1);
}
@@ -5065,7 +5061,7 @@ stop:
}
/* Don't allow return code > 0 */
- if (res >= 0 && res != AST_PBX_KEEPALIVE) {
+ if (res >= 0) {
res = 0;
if (ringing) {
ast_indicate(chan, -1);