I currently don't see this as a bug that needs to be fixed in 1.4/1.2 too,
but feel free to backport if you see it that way. RTCP now binds to
ALL IP addresses on the host, RTP to a specific address.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46409
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
return buf;
}
+/*! \brief Open RTP or RTCP socket for a session */
static int rtp_socket(void)
{
int s;
/* Must be an even port number by RTP spec */
rtp->us.sin_port = htons(x);
rtp->us.sin_addr = addr;
+
/* If there's rtcp, initialize it as well. */
- if (rtp->rtcp)
+ if (rtp->rtcp) {
rtp->rtcp->us.sin_port = htons(x + 1);
+ rtp->rtcp->us.sin_addr = addr;
+ }
/* Try to bind it/them. */
if (!(first = bind(rtp->s, (struct sockaddr *)&rtp->us, sizeof(rtp->us))) &&
(!rtp->rtcp || !bind(rtp->rtcp->s, (struct sockaddr *)&rtp->rtcp->us, sizeof(rtp->rtcp->us))))