diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-01-17 12:37:55 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-01-17 12:37:55 +0000 |
commit | c78d9df51eade074509d76f119780a8fcee35fc9 (patch) | |
tree | 34bc6eb8b0c1666b2821cf4e797a9af81b2477e0 /channel.c | |
parent | 8f16ca10695470c3283716b19816baf7d9f21746 (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-x | channel.c | 24 |
1 files changed, 16 insertions, 8 deletions
@@ -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]; |