Stasis: Allow internal channels directly into bridges

The patch to catch channels being shoehorned into Stasis() via external
mechanisms also happens to catch Announcer and Recorder channels
because they aren't known to be stasis-controlled channels in the usual
sense. This marks those channels as Stasis()-internal channels and
allows them directly into bridges.

Review: https://reviewboard.asterisk.org/r/3903/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@420796 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kinsey Moore
2014-08-11 18:37:14 +00:00
parent ef70c08dc7
commit 406dded64c
4 changed files with 110 additions and 2 deletions

View File

@@ -305,6 +305,7 @@ static void *bridge_channel_control_thread(void *data)
static struct ast_channel *prepare_bridge_media_channel(const char *type)
{
RAII_VAR(struct ast_format_cap *, cap, NULL, ao2_cleanup);
struct ast_channel *chan;
cap = ast_format_cap_alloc(AST_FORMAT_CAP_FLAG_DEFAULT);
if (!cap) {
@@ -313,7 +314,16 @@ static struct ast_channel *prepare_bridge_media_channel(const char *type)
ast_format_cap_append(cap, ast_format_slin, 0);
return ast_request(type, cap, NULL, NULL, "ARI", NULL);
chan = ast_request(type, cap, NULL, NULL, "ARI", NULL);
if (!chan) {
return NULL;
}
if (stasis_app_channel_unreal_set_internal(chan)) {
ast_channel_cleanup(chan);
return NULL;
}
return chan;
}
/*!