diff options
author | matteo <matteo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-03-09 06:00:18 +0000 |
---|---|---|
committer | matteo <matteo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-03-09 06:00:18 +0000 |
commit | a5b75bca3546f01dbcf717e036fb85da8a8a8a88 (patch) | |
tree | 55b729e56a44996fffed585a06617bfd8b0602ac /rtp.c | |
parent | fe1433baf16899179f3c88d94b825af48b000880 (diff) |
Sun Mar 9 07:00:01 CET 2003
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@636 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'rtp.c')
-rwxr-xr-x | rtp.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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]); |