aboutsummaryrefslogtreecommitdiffstats
path: root/channel.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-01-17 12:37:55 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-01-17 12:37:55 +0000
commitc78d9df51eade074509d76f119780a8fcee35fc9 (patch)
tree34bc6eb8b0c1666b2821cf4e797a9af81b2477e0 /channel.c
parent8f16ca10695470c3283716b19816baf7d9f21746 (diff)
Merge hold patch (bug #1840)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4823 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channel.c')
-rwxr-xr-xchannel.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/channel.c b/channel.c
index 10e668300..68734d031 100755
--- a/channel.c
+++ b/channel.c
@@ -1478,6 +1478,10 @@ int ast_indicate(struct ast_channel *chan, int condition)
/* ast_playtones_stop(chan); */
} else if (condition == AST_CONTROL_PROCEEDING) {
/* Do nothing, really */
+ } else if (condition == AST_CONTROL_HOLD) {
+ /* Do nothing.... */
+ } else if (condition == AST_CONTROL_UNHOLD) {
+ /* Do nothing.... */
} else {
/* not handled */
ast_log(LOG_WARNING, "Unable to handle indication %d for '%s'\n", condition, chan->name);
@@ -2812,11 +2816,15 @@ int ast_channel_bridge(struct ast_channel *c0, struct ast_channel *c1, struct as
}
if ((f->frametype == AST_FRAME_CONTROL) && !(config->flags & AST_BRIDGE_IGNORE_SIGS)) {
- *fo = f;
- *rc = who;
- res = 0;
- ast_log(LOG_DEBUG, "Got a FRAME_CONTROL (%d) frame on channel %s\n", f->subclass, who->name);
- break;
+ if ((f->subclass == AST_CONTROL_HOLD) || (f->subclass == AST_CONTROL_UNHOLD)) {
+ ast_indicate(who == c0 ? c1 : c0, f->subclass);
+ } else {
+ *fo = f;
+ *rc = who;
+ res = 0;
+ ast_log(LOG_DEBUG, "Got a FRAME_CONTROL (%d) frame on channel %s\n", f->subclass, who->name);
+ break;
+ }
}
if ((f->frametype == AST_FRAME_VOICE) ||
(f->frametype == AST_FRAME_TEXT) ||
@@ -2861,9 +2869,9 @@ tackygoto:
else
ast_write(c0, f);
}
- ast_frfree(f);
- } else
- ast_frfree(f);
+ }
+ ast_frfree(f);
+
/* Swap who gets priority */
cs[2] = cs[0];
cs[0] = cs[1];