summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2005-02-28 06:06:42 +0000
committerMark Spencer <markster@digium.com>2005-02-28 06:06:42 +0000
commit34e8ed636d19f6b2dd18abd10cf9a75f8e01bf56 (patch)
treeefbbfc9bc474705fcb007ce58c67f66f6fcdf9df /channels
parent21e6e48a263f3b8ce7d08bba93080079bdc394db (diff)
Fix queue URL passing (bug #3543)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5104 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rwxr-xr-xchannels/chan_local.c22
-rwxr-xr-xchannels/iax2-parser.c6
2 files changed, 24 insertions, 4 deletions
diff --git a/channels/chan_local.c b/channels/chan_local.c
index e6ee96450..288a418c2 100755
--- a/channels/chan_local.c
+++ b/channels/chan_local.c
@@ -139,7 +139,7 @@ static void check_bridge(struct local_pvt *p, int isoutbound)
{
if (p->alreadymasqed || p->nooptimization)
return;
- if (isoutbound && p->chan && p->chan->_bridge /* Not ast_bridged_channel! Only go one step! */ && p->owner) {
+ if (isoutbound && p->chan && p->chan->_bridge /* Not ast_bridged_channel! Only go one step! */ && p->owner && !p->owner->pvt->readq) {
/* Masquerade bridged channel into owner */
/* Lock everything we need, one by one, and give up if
we can't get everything. Remember, we'll get another
@@ -152,7 +152,7 @@ static void check_bridge(struct local_pvt *p, int isoutbound)
}
ast_mutex_unlock(&(p->chan->_bridge)->lock);
}
- } else if (!isoutbound && p->owner && p->owner->_bridge && p->chan) {
+ } else if (!isoutbound && p->owner && p->owner->_bridge && p->chan && !p->chan->pvt->readq) {
/* Masquerade bridged channel into chan */
if (!ast_mutex_trylock(&(p->owner->_bridge)->lock)) {
if (!ast_mutex_trylock(&p->chan->lock)) {
@@ -233,6 +233,22 @@ static int local_digit(struct ast_channel *ast, char digit)
return res;
}
+static int local_sendhtml(struct ast_channel *ast, int subclass, char *data, int datalen)
+{
+ struct local_pvt *p = ast->pvt->pvt;
+ int res = -1;
+ struct ast_frame f = { AST_FRAME_HTML, };
+ int isoutbound;
+ ast_mutex_lock(&p->lock);
+ isoutbound = IS_OUTBOUND(ast, p);
+ f.subclass = subclass;
+ f.data = data;
+ f.datalen = datalen;
+ res = local_queue_frame(p, isoutbound, &f, ast);
+ ast_mutex_unlock(&p->lock);
+ return res;
+}
+
static int local_call(struct ast_channel *ast, char *dest, int timeout)
{
struct local_pvt *p = ast->pvt->pvt;
@@ -436,6 +452,8 @@ static struct ast_channel *local_new(struct local_pvt *p, int state)
tmp2->pvt->pvt = p;
tmp->pvt->send_digit = local_digit;
tmp2->pvt->send_digit = local_digit;
+ tmp->pvt->send_html = local_sendhtml;
+ tmp2->pvt->send_html = local_sendhtml;
tmp->pvt->call = local_call;
tmp2->pvt->call = local_call;
tmp->pvt->hangup = local_hangup;
diff --git a/channels/iax2-parser.c b/channels/iax2-parser.c
index 6adc68445..edc15ec07 100755
--- a/channels/iax2-parser.c
+++ b/channels/iax2-parser.c
@@ -375,7 +375,9 @@ void iax_showframe(struct iax_frame *f, struct ast_iax2_full_hdr *fhi, int rx, s
"NULL ",
"IAX ",
"TEXT ",
- "IMAGE " };
+ "IMAGE ",
+ "HTML ",
+ "CNG " };
char *iaxs[] = {
"(0?)",
"NEW ",
@@ -447,7 +449,7 @@ void iax_showframe(struct iax_frame *f, struct ast_iax2_full_hdr *fhi, int rx, s
/* Don't mess with mini-frames */
return;
}
- if (fh->type > (int)sizeof(frames)/(int)sizeof(frames[0])) {
+ if (fh->type >= (int)sizeof(frames)/(int)sizeof(frames[0])) {
snprintf(class2, (int)sizeof(class2), "(%d?)", fh->type);
class = class2;
} else {