diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-03-05 22:32:10 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-03-05 22:32:10 +0000 |
commit | 277beb94a0f5aa85eeb0603f6d11319cce02c3cd (patch) | |
tree | 32a4e75de52a4d00eb32bb5917c271f775d0743e /main/channel.c | |
parent | 1de0d5b8308435068cf5a04314bfd98cc712c8ee (diff) |
Add a control frame to indicate the source of media has changed. Depending on the underlying technology it may need to change some things.
(closes issue #12148)
Reported by: jcomellas
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@106235 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/channel.c')
-rw-r--r-- | main/channel.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/main/channel.c b/main/channel.c index 16881a3d5..73c7db603 100644 --- a/main/channel.c +++ b/main/channel.c @@ -2372,6 +2372,8 @@ int ast_indicate_data(struct ast_channel *chan, int condition, const void *data, /* Do nothing.... */ } else if (condition == AST_CONTROL_VIDUPDATE) { /* Do nothing.... */ + } else if (condition == AST_CONTROL_SRCUPDATE) { + /* Do nothing... */ } else { /* not handled */ ast_log(LOG_WARNING, "Unable to handle indication %d for '%s'\n", condition, chan->name); @@ -2890,6 +2892,7 @@ struct ast_channel *__ast_request_and_dial(const char *type, int format, void *d case AST_CONTROL_HOLD: case AST_CONTROL_UNHOLD: case AST_CONTROL_VIDUPDATE: + case AST_CONTROL_SRCUPDATE: case -1: /* Ignore -- just stopping indications */ break; @@ -3774,6 +3777,7 @@ static enum ast_bridge_result ast_generic_bridge(struct ast_channel *c0, struct case AST_CONTROL_HOLD: case AST_CONTROL_UNHOLD: case AST_CONTROL_VIDUPDATE: + case AST_CONTROL_SRCUPDATE: ast_indicate_data(other, f->subclass, f->data, f->datalen); break; default: @@ -3907,6 +3911,10 @@ enum ast_bridge_result ast_channel_bridge(struct ast_channel *c0, struct ast_cha if (!c1->tech->send_digit_begin) ast_set_flag(c0, AST_FLAG_END_DTMF_ONLY); + /* Before we enter in and bridge these two together tell them both the source of audio has changed */ + ast_indicate(c0, AST_CONTROL_SRCUPDATE); + ast_indicate(c1, AST_CONTROL_SRCUPDATE); + for (/* ever */;;) { struct timeval now = { 0, }; int to; @@ -4070,6 +4078,10 @@ enum ast_bridge_result ast_channel_bridge(struct ast_channel *c0, struct ast_cha ast_clear_flag(c0, AST_FLAG_END_DTMF_ONLY); ast_clear_flag(c1, AST_FLAG_END_DTMF_ONLY); + /* Now that we have broken the bridge the source will change yet again */ + ast_indicate(c0, AST_CONTROL_SRCUPDATE); + ast_indicate(c1, AST_CONTROL_SRCUPDATE); + c0->_bridge = NULL; c1->_bridge = NULL; |