aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-08-30 03:16:03 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-08-30 03:16:03 +0000
commit888a9a8bb147c6805e8b00a71e179e8fefae6a76 (patch)
tree45b7b58240ee6153fe6044d3ec6d36d6c9013c93 /main
parent52d9462a7638b509cf5b0fc98df8b7f2c8e16211 (diff)
Use an API call (ast_rtp_get_bridged) to return the RTP stream we are bridged to, and also use it in chan_sip so we know to ignore the no RTP activity checking
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@41316 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/rtp.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/main/rtp.c b/main/rtp.c
index ce81738a0..2ba7ee0de 100644
--- a/main/rtp.c
+++ b/main/rtp.c
@@ -781,7 +781,7 @@ struct ast_frame *ast_rtcp_read(struct ast_rtp *rtp)
}
/* If we are P2P bridged to another RTP stream, send it directly over */
- if (rtp->bridged && !bridge_p2p_rtcp_write(rtp, rtcpheader, res))
+ if (ast_rtp_get_bridged(rtp) && !bridge_p2p_rtcp_write(rtp, rtcpheader, res))
return &ast_null_frame;
if (option_debug)
@@ -939,7 +939,7 @@ static void calc_rxstamp(struct timeval *tv, struct ast_rtp *rtp, unsigned int t
/*! \brief Perform a Packet2Packet RTCP write */
static int bridge_p2p_rtcp_write(struct ast_rtp *rtp, unsigned int *rtcpheader, int len)
{
- struct ast_rtp *bridged = rtp->bridged;
+ struct ast_rtp *bridged = ast_rtp_get_bridged(rtp);
int res = 0;
/* If RTCP is not present on the bridged RTP session, then ignore this */
@@ -962,7 +962,7 @@ static int bridge_p2p_rtcp_write(struct ast_rtp *rtp, unsigned int *rtcpheader,
/*! \brief Perform a Packet2Packet RTP write */
static int bridge_p2p_rtp_write(struct ast_rtp *rtp, unsigned int *rtpheader, int len, int hdrlen)
{
- struct ast_rtp *bridged = rtp->bridged;
+ struct ast_rtp *bridged = ast_rtp_get_bridged(rtp);
int res = 0, payload = 0, bridged_payload = 0, version, padding, mark, ext;
struct rtpPayloadType rtpPT;
unsigned int seqno;
@@ -1084,7 +1084,7 @@ struct ast_frame *ast_rtp_read(struct ast_rtp *rtp)
}
/* If we are bridged to another RTP stream, send direct */
- if (rtp->bridged && !bridge_p2p_rtp_write(rtp, rtpheader, res, hdrlen))
+ if (ast_rtp_get_bridged(rtp) && !bridge_p2p_rtp_write(rtp, rtpheader, res, hdrlen))
return &ast_null_frame;
if (version != 2)
@@ -1846,6 +1846,11 @@ void ast_rtp_get_us(struct ast_rtp *rtp, struct sockaddr_in *us)
*us = rtp->us;
}
+struct ast_rtp *ast_rtp_get_bridged(struct ast_rtp *rtp)
+{
+ return rtp->bridged;
+}
+
void ast_rtp_stop(struct ast_rtp *rtp)
{
if (rtp->rtcp && rtp->rtcp->schedid > 0) {