mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
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 ........ Merged revisions 420796 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@420797 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/*!
|
||||
|
Reference in New Issue
Block a user