summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2013-07-09 20:07:21 +0000
committerMark Michelson <mmichelson@digium.com>2013-07-09 20:07:21 +0000
commit0e25d8036ef9f6d21c57791fd6b58179816e6e6c (patch)
tree784ac01a1d9882b054f17c1def784cda6eb03154
parentbb7def1b5b34469bd7cab94529b95af1a9d3960a (diff)
Use correct function for getting bridged peer when doing direct media checks.
(closes issue ASTERISK-21947) reported by Matt Jordan git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393897 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--channels/chan_gulp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/channels/chan_gulp.c b/channels/chan_gulp.c
index 144fb6aaa..b4a53685c 100644
--- a/channels/chan_gulp.c
+++ b/channels/chan_gulp.c
@@ -488,12 +488,14 @@ static int gulp_set_rtp_peer(struct ast_channel *chan,
struct gulp_pvt *pvt = ast_channel_tech_pvt(chan);
struct ast_sip_session *session = pvt->session;
int changed = 0;
+ struct ast_channel *bridge_peer;
- /* BUGBUG - ast_bridged_channel will always return NULL, meaning direct media will never occur */
/* Don't try to do any direct media shenanigans on early bridges */
- if ((rtp || vrtp || tpeer) && !ast_bridged_channel(chan)) {
+ bridge_peer = ast_channel_bridge_peer(chan);
+ if ((rtp || vrtp || tpeer) && !bridge_peer) {
return 0;
}
+ ast_channel_cleanup(bridge_peer);
if (nat_active && session->endpoint->disable_direct_media_on_nat) {
return 0;