diff options
author | George Joseph <gjoseph@digium.com> | 2017-02-15 19:29:52 -0600 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2017-02-15 19:29:52 -0600 |
commit | ca7fa7bbd2d54766f6b5911d7aa046cdcfd0dfe8 (patch) | |
tree | 54d74f4ffaf19eede3f07224526f9922d1eaf9f9 /main/channel.c | |
parent | 11886dea82b2d342c946f669144d5afaa667a26a (diff) | |
parent | bf2f091bbb2b099d6ca87e5fdd76efe45a209eb7 (diff) |
Merge "stream: Add stream topology to channel"
Diffstat (limited to 'main/channel.c')
-rw-r--r-- | main/channel.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/main/channel.c b/main/channel.c index 54db47351..c74e9475f 100644 --- a/main/channel.c +++ b/main/channel.c @@ -73,6 +73,7 @@ #include "asterisk/test.h" #include "asterisk/stasis_channels.h" #include "asterisk/max_forwards.h" +#include "asterisk/stream.h" /*** DOCUMENTATION ***/ @@ -806,6 +807,7 @@ __ast_channel_alloc_ap(int needqueue, int state, const char *cid_num, const char struct ast_timer *timer; struct timeval now; const struct ast_channel_tech *channel_tech; + struct ast_stream_topology *topology; /* If shutting down, don't allocate any new channels */ if (ast_shutting_down()) { @@ -895,6 +897,11 @@ __ast_channel_alloc_ap(int needqueue, int state, const char *cid_num, const char return ast_channel_unref(tmp); } + if (!(topology = ast_stream_topology_create())) { + return ast_channel_unref(tmp); + } + ast_channel_internal_set_stream_topology(tmp, topology); + /* Always watch the alertpipe */ ast_channel_set_fd(tmp, AST_ALERT_FD, ast_channel_internal_alert_readfd(tmp)); /* And timing pipe */ @@ -7083,6 +7090,8 @@ static void channel_do_masquerade(struct ast_channel *original, struct ast_chann ast_channel_tech(clonechan)->type, ast_channel_name(clonechan)); } + ast_channel_internal_swap_stream_topology(original, clonechan); + /* * Now, at this point, the "clone" channel is totally F'd up. * We mark it as a zombie so nothing tries to touch it. |