aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-02-28 06:06:42 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-02-28 06:06:42 +0000
commit44ee08e9d996b1825bcdd386cd1d1f16fb5e7439 (patch)
treeefbbfc9bc474705fcb007ce58c67f66f6fcdf9df /apps
parent4bb33e3192f01d1f467a0f8a1af285c7db0837a4 (diff)
Fix queue URL passing (bug #3543)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5104 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rwxr-xr-xapps/app_dial.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index 3920ba4e1..ed2979eed 100755
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -149,6 +149,7 @@ static char *rdescrip =
#define DIAL_GO_ON (1 << 10)
#define DIAL_HALT_ON_DTMF (1 << 11)
#define DIAL_PRESERVE_CALLERID (1 << 12)
+#define DIAL_NOFORWARDHTML (1 << 13)
struct localuser {
struct ast_channel *chan;
@@ -328,7 +329,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
if (option_verbose > 2)
ast_verbose( VERBOSE_PREFIX_3 "%s answered %s\n", o->chan->name, in->name);
peer = o->chan;
- ast_copy_flags(peerflags, o, DIAL_ALLOWREDIRECT_IN|DIAL_ALLOWREDIRECT_OUT|DIAL_ALLOWDISCONNECT_IN|DIAL_ALLOWDISCONNECT_OUT);
+ ast_copy_flags(peerflags, o, DIAL_ALLOWREDIRECT_IN|DIAL_ALLOWREDIRECT_OUT|DIAL_ALLOWDISCONNECT_IN|DIAL_ALLOWDISCONNECT_OUT|DIAL_NOFORWARDHTML);
}
} else if (o->chan && (o->chan == winner)) {
if (!ast_strlen_zero(o->chan->call_forward)) {
@@ -440,7 +441,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
if (option_verbose > 2)
ast_verbose( VERBOSE_PREFIX_3 "%s answered %s\n", o->chan->name, in->name);
peer = o->chan;
- ast_copy_flags(peerflags, o, DIAL_ALLOWREDIRECT_IN|DIAL_ALLOWREDIRECT_OUT|DIAL_ALLOWDISCONNECT_IN|DIAL_ALLOWDISCONNECT_OUT);
+ ast_copy_flags(peerflags, o, DIAL_ALLOWREDIRECT_IN|DIAL_ALLOWREDIRECT_OUT|DIAL_ALLOWDISCONNECT_IN|DIAL_ALLOWDISCONNECT_OUT|DIAL_NOFORWARDHTML);
}
/* If call has been answered, then the eventual hangup is likely to be normal hangup */
in->hangupcause = AST_CAUSE_NORMAL_CLEARING;
@@ -504,14 +505,16 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
ast_log(LOG_DEBUG, "Dunno what to do with control type %d\n", f->subclass);
}
} else if (single && (f->frametype == AST_FRAME_VOICE) &&
- !(ast_test_flag(outgoing, DIAL_RINGBACKONLY) || ast_test_flag(outgoing, DIAL_MUSICONHOLD))) {
+ !(ast_test_flag(outgoing, DIAL_RINGBACKONLY|DIAL_MUSICONHOLD))) {
if (ast_write(in, f))
ast_log(LOG_WARNING, "Unable to forward frame\n");
} else if (single && (f->frametype == AST_FRAME_IMAGE) &&
- !(ast_test_flag(outgoing, DIAL_RINGBACKONLY) || ast_test_flag(outgoing, DIAL_MUSICONHOLD))) {
+ !(ast_test_flag(outgoing, DIAL_RINGBACKONLY|DIAL_MUSICONHOLD))) {
if (ast_write(in, f))
ast_log(LOG_WARNING, "Unable to forward image\n");
- }
+ } else if (single && (f->frametype == AST_FRAME_HTML) && !ast_test_flag(outgoing, DIAL_NOFORWARDHTML))
+ ast_channel_sendhtml(in, f->subclass, f->data, f->datalen);
+
ast_frfree(f);
} else {
in->hangupcause = o->chan->hangupcause;
@@ -564,6 +567,11 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
}
}
+ /* Forward HTML stuff */
+ if (single && f && (f->frametype == AST_FRAME_HTML) && !ast_test_flag(outgoing, DIAL_NOFORWARDHTML))
+ ast_channel_sendhtml(outgoing->chan, f->subclass, f->data, f->datalen);
+
+
if (single && ((f->frametype == AST_FRAME_VOICE) || (f->frametype == AST_FRAME_DTMF))) {
if (ast_write(outgoing->chan, f))
ast_log(LOG_WARNING, "Unable to forward voice\n");
@@ -906,6 +914,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
ast_set2_flag(tmp, strchr(transfer, 'h'), DIAL_ALLOWDISCONNECT_IN);
ast_set2_flag(peerflags, strchr(transfer, 'h'), DIAL_ALLOWDISCONNECT_IN);
ast_set2_flag(tmp, strchr(transfer, 'f'), DIAL_FORCECALLERID);
+ ast_set2_flag(tmp, url, DIAL_NOFORWARDHTML);
ast_set2_flag(peerflags, strchr(transfer, 'w'), DIAL_MONITOR_IN);
ast_set2_flag(peerflags, strchr(transfer, 'W'), DIAL_MONITOR_OUT);
ast_set2_flag(peerflags, strchr(transfer, 'd'), DIAL_HALT_ON_DTMF);