ARI: Ensure managing application receives ChannelEnteredBridge messages

This fixes an issue where a Stasis application running over ARI and
subscribed to ari/events could miss the ChannelEnteredBridge event
because it did not subscribe to the new bridge fast enough.

To accomplish this, it subscribes the application controlling the
channel to the new bridge before adding it to that bridge which
required the stasis_app_control structure to maintain a reference to
the stasis_app.

(closes issue ASTERISK-23295)
Review: https://reviewboard.asterisk.org/r/3336/
........

Merged revisions 410527 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410528 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kinsey Moore
2014-03-13 19:33:22 +00:00
parent 1b5c098976
commit 5247a0d990
3 changed files with 22 additions and 4 deletions

View File

@@ -258,7 +258,7 @@ static void cleanup(void)
struct stasis_app_control *stasis_app_control_create(struct ast_channel *chan)
{
return control_create(chan);
return control_create(chan, NULL);
}
struct stasis_app_control *stasis_app_control_find_by_channel(
@@ -742,7 +742,7 @@ int stasis_app_exec(struct ast_channel *chan, const char *app_name, int argc,
return -1;
}
control = control_create(chan);
control = control_create(chan, app);
if (!control) {
ast_log(LOG_ERROR, "Allocated failed\n");
return -1;