mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 04:30:28 +00:00
Sun Mar 9 07:00:01 CET 2003
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@636 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
6
rtp.c
6
rtp.c
@@ -282,7 +282,11 @@ struct ast_frame *ast_rtp_read(struct ast_rtp *rtp)
|
||||
}
|
||||
if (rtp->nat) {
|
||||
/* Send to whoever sent to us */
|
||||
memcpy(&rtp->them, &sin, sizeof(rtp->them));
|
||||
if ((rtp->them.sin_addr.s_addr != sin.sin_addr.s_addr) ||
|
||||
(rtp->them.sin_port != sin.sin_port)) {
|
||||
memcpy(&rtp->them, &sin, sizeof(rtp->them));
|
||||
ast_log(LOG_DEBUG, "RTP NAT: Using address %s:%d\n", inet_ntoa(rtp->them.sin_addr), ntohs(rtp->them.sin_port));
|
||||
}
|
||||
}
|
||||
/* Get fields */
|
||||
seqno = ntohl(rtpheader[0]);
|
||||
|
Reference in New Issue
Block a user