summaryrefslogtreecommitdiff
path: root/rtp.c
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2004-03-14 22:49:26 +0000
committerMark Spencer <markster@digium.com>2004-03-14 22:49:26 +0000
commit9e83daa3bb922c63f68af0713b314837836df361 (patch)
tree7b157a03e8683d7ecb14787500811598d2567260 /rtp.c
parentea92b714f293e3779cd0942e350acf11d096dfd0 (diff)
If an RTP peer hasn't been set, ignore audio from it (Plexus workaround)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2425 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'rtp.c')
-rwxr-xr-xrtp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/rtp.c b/rtp.c
index 10178bb6b..a4061779a 100755
--- a/rtp.c
+++ b/rtp.c
@@ -409,6 +409,11 @@ struct ast_frame *ast_rtp_read(struct ast_rtp *rtp)
ast_log(LOG_DEBUG, "RTP NAT: Using address %s:%d\n", inet_ntoa(rtp->them.sin_addr), ntohs(rtp->them.sin_port));
}
}
+ /* Ignore if the other side hasn't been given an address
+ yet. */
+ if (!rtp->them.sin_addr.s_addr || !rtp->them.sin_port)
+ return &null_frame;
+
/* Get fields */
seqno = ntohl(rtpheader[0]);
payloadtype = (seqno & 0x7f0000) >> 16;