summaryrefslogtreecommitdiff
path: root/main/rtp_engine.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2009-08-16 19:27:39 +0000
committerJoshua Colp <jcolp@digium.com>2009-08-16 19:27:39 +0000
commit606112e234e1604b7998b54648cd02966bf959b6 (patch)
treedd96d1ed16eb906be7b474035036fc89ff8992b7 /main/rtp_engine.c
parent6f63f3eb8d14258aa0117b14a243335f4ca0c2ac (diff)
Add two more API calls for getting the current glue and channel in bridging code.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@212390 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/rtp_engine.c')
-rw-r--r--main/rtp_engine.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/main/rtp_engine.c b/main/rtp_engine.c
index 5d4bdac10..ee45bfc07 100644
--- a/main/rtp_engine.c
+++ b/main/rtp_engine.c
@@ -63,6 +63,10 @@ struct ast_rtp_instance {
int holdtimeout;
/*! DTMF mode in use */
enum ast_rtp_dtmf_mode dtmf_mode;
+ /*! Glue currently in use */
+ struct ast_rtp_glue *glue;
+ /*! Channel associated with the instance */
+ struct ast_channel *chan;
};
/*! List of RTP engines that are currently registered */
@@ -1233,6 +1237,11 @@ enum ast_bridge_result ast_rtp_instance_bridge(struct ast_channel *c0, struct as
goto done;
}
+ instance0->glue = glue0;
+ instance1->glue = glue1;
+ instance0->chan = c0;
+ instance1->chan = c1;
+
/* Depending on the end result for bridging either do a local bridge or remote bridge */
if (audio_glue0_res == AST_RTP_GLUE_RESULT_LOCAL || audio_glue1_res == AST_RTP_GLUE_RESULT_LOCAL) {
ast_verbose(VERBOSE_PREFIX_3 "Locally bridging %s and %s\n", c0->name, c1->name);
@@ -1244,6 +1253,11 @@ enum ast_bridge_result ast_rtp_instance_bridge(struct ast_channel *c0, struct as
fo, rc, c0->tech_pvt, c1->tech_pvt);
}
+ instance0->glue = NULL;
+ instance1->glue = NULL;
+ instance0->chan = NULL;
+ instance1->chan = NULL;
+
unlock_chans = 0;
done:
@@ -1620,3 +1634,13 @@ struct ast_rtp_engine *ast_rtp_instance_get_engine(struct ast_rtp_instance *inst
{
return instance->engine;
}
+
+struct ast_rtp_glue *ast_rtp_instance_get_active_glue(struct ast_rtp_instance *instance)
+{
+ return instance->glue;
+}
+
+struct ast_channel *ast_rtp_instance_get_chan(struct ast_rtp_instance *instance)
+{
+ return instance->chan;
+}