[Asterisk-cvs] asterisk/apps app_dial.c,1.94.2.6,1.94.2.7
russell at lists.digium.com
russell at lists.digium.com
Mon May 9 23:21:48 CDT 2005
Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv788/apps
Modified Files:
Tag: v1-0
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.94.2.6
retrieving revision 1.94.2.7
diff -u -d -r1.94.2.6 -r1.94.2.7
--- app_dial.c 27 Feb 2005 01:40:43 -0000 1.94.2.6
+++ app_dial.c 10 May 2005 03:28:01 -0000 1.94.2.7
@@ -113,6 +113,7 @@
int allowdisconnect_in;
int allowdisconnect_out;
int forcecallerid;
+ int noforwardhtml;
struct localuser *next;
};
@@ -134,7 +135,7 @@
#define AST_MAX_WATCHERS 256
-static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localuser *outgoing, int *to, int *allowredir_in, int *allowredir_out, int *allowdisconnect_in, int *allowdisconnect_out, int *sentringing, char *status, size_t statussize)
+static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localuser *outgoing, int *to, int *allowredir_in, int *allowredir_out, int *allowdisconnect_in, int *allowdisconnect_out, int *noforwardhtml, int *sentringing, char *status, size_t statussize)
{
struct localuser *o;
int found;
@@ -207,6 +208,7 @@
*allowredir_out = o->allowredirect_out;
*allowdisconnect_in = o->allowdisconnect_in;
*allowdisconnect_out = o->allowdisconnect_out;
+ *noforwardhtml = o->noforwardhtml;
}
} else if (o->chan && (o->chan == winner)) {
if (!ast_strlen_zero(o->chan->call_forward)) {
@@ -301,6 +303,7 @@
*allowredir_out = o->allowredirect_out;
*allowdisconnect_in = o->allowdisconnect_in;
*allowdisconnect_out = o->allowdisconnect_out;
+ *noforwardhtml = o->noforwardhtml;
}
break;
case AST_CONTROL_BUSY:
@@ -343,7 +346,7 @@
/* Ignore going off hook */
break;
case -1:
- if (!outgoing->ringbackonly && !outgoing->musiconhold) {
+ if (!outgoing->ringbackonly || !outgoing->musiconhold) {
if (option_verbose > 2)
ast_verbose( VERBOSE_PREFIX_3 "%s stopped sounds\n", o->chan->name);
ast_indicate(in, -1);
@@ -361,7 +364,10 @@
!(outgoing->ringbackonly || outgoing->musiconhold)) {
if (ast_write(in, f))
ast_log(LOG_WARNING, "Unable to forward image\n");
+ } else if (single && (f->frametype == AST_FRAME_HTML) && !outgoing->noforwardhtml) {
+ ast_channel_sendhtml(in, f->subclass, f->data, f->datalen);
}
+
ast_frfree(f);
} else {
in->hangupcause = o->chan->hangupcause;
@@ -397,6 +403,10 @@
ast_frfree(f);
return NULL;
}
+
+ if (single && f && (f->frametype == AST_FRAME_HTML) && !outgoing->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");
@@ -425,6 +435,7 @@
int allowredir_out=0;
int allowdisconnect_in=0;
int allowdisconnect_out=0;
+ int noforwardhtml=0;
int hasmacro = 0;
int privacy=0;
int announce=0;
@@ -730,6 +741,9 @@
if (strchr(transfer, 'f'))
tmp->forcecallerid = 1;
else tmp->forcecallerid = 0;
+ if (url)
+ tmp->noforwardhtml = 1;
+ else tmp->noforwardhtml = 0;
}
strncpy(numsubst, number, sizeof(numsubst)-1);
/* If we're dialing by extension, look at the extension to know what to dial */
@@ -884,7 +898,7 @@
strncpy(status, "CHANUNAVAIL", sizeof(status) - 1);
time(&start_time);
- peer = wait_for_answer(chan, outgoing, &to, &allowredir_in, &allowredir_out, &allowdisconnect_in, &allowdisconnect_out, &sentringing, status, sizeof(status));
+ peer = wait_for_answer(chan, outgoing, &to, &allowredir_in, &allowredir_out, &allowdisconnect_in, &allowdisconnect_out, &sentringing, &noforwardhtml, status, sizeof(status));
if (!peer) {
if (to)
More information about the svn-commits
mailing list