[Asterisk-cvs] asterisk/apps app_dial.c,1.141,1.142
markster at lists.digium.com
markster at lists.digium.com
Mon Feb 28 00:09:02 CST 2005
Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv22677/apps
Modified Files:
app_dial.c
Log Message:
Fix queue URL passing (bug #3543)
Index: app_dial.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_dial.c,v
retrieving revision 1.141
retrieving revision 1.142
diff -u -d -r1.141 -r1.142
--- app_dial.c 26 Feb 2005 03:57:10 -0000 1.141
+++ app_dial.c 28 Feb 2005 06:06:42 -0000 1.142
@@ -149,6 +149,7 @@
#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 @@
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 @@
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 @@
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 @@
}
}
+ /* 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 @@
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);
More information about the svn-commits
mailing list