mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 11:25:35 +00:00
ACN: Changes specific to the core
Allow passing a topology from the called channel back to the calling channel. * Added a new function ast_queue_answer() that accepts a stream topology and queues an ANSWER CONTROL frame with it as the data. This allows the called channel to indicate its resolved topology. * Added a new virtual function to the channel tech structure answer_with_stream_topology() that allows the calling channel to receive the called channel's topology. Added ast_raw_answer_with_stream_topology() that invokes that virtual function. * Modified app_dial.c and features.c to grab the topology from the ANSWER frame queued by the answering channel and send it to the calling channel with ast_raw_answer_with_stream_topology(). * Modified frame.c to automatically cleanup the reference to the topology on ANSWER frames. Added a few debugging messages to stream.c. Change-Id: I0115d2ed68d6bae0f87e85abcf16c771bdaf992c
This commit is contained in:
committed by
Joshua Colp
parent
543f936147
commit
6faf76308d
@@ -76,6 +76,7 @@
|
||||
#include "asterisk/stasis_channels.h"
|
||||
#include "asterisk/features_config.h"
|
||||
#include "asterisk/max_forwards.h"
|
||||
#include "asterisk/stream.h"
|
||||
|
||||
/*** DOCUMENTATION
|
||||
<application name="Bridge" language="en_US">
|
||||
@@ -558,12 +559,17 @@ static int pre_bridge_setup(struct ast_channel *chan, struct ast_channel *peer,
|
||||
set_config_flags(chan, config);
|
||||
|
||||
/* Answer if need be */
|
||||
|
||||
res = 0;
|
||||
|
||||
if (ast_channel_state(chan) != AST_STATE_UP) {
|
||||
if (ast_raw_answer(chan)) {
|
||||
res = ast_raw_answer_with_stream_topology(chan, config->answer_topology);
|
||||
if (res != 0) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifdef FOR_DEBUG
|
||||
/* show the two channels and cdrs involved in the bridge for debug & devel purposes */
|
||||
ast_channel_log("Pre-bridge CHAN Channel info", chan);
|
||||
|
Reference in New Issue
Block a user