]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
one-way-audio problem on multihomed host with bind to secondary address. Bug #4505
authorJeremy McNamara <jj@nufone.net>
Wed, 27 Jul 2005 04:39:53 +0000 (04:39 +0000)
committerJeremy McNamara <jj@nufone.net>
Wed, 27 Jul 2005 04:39:53 +0000 (04:39 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6233 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_h323.c

index e306131d4386601799f08d0c0c96337bac62883b..8d4373d9c2c192a333bde4d305167d2912b164b5 100755 (executable)
@@ -782,7 +782,7 @@ static struct oh323_pvt *oh323_alloc(int callid)
                return NULL;
        }
        memset(pvt, 0, sizeof(struct oh323_pvt));
-       pvt->rtp = ast_rtp_new(sched, io, 1, 0);
+       pvt->rtp = ast_rtp_new_with_bindaddr(sched, io, 1, 0,bindaddr.sin_addr);
        if (!pvt->rtp) {
                ast_log(LOG_WARNING, "Unable to create RTP session: %s\n", strerror(errno));
                free(pvt);
@@ -1108,8 +1108,8 @@ struct rtp_info *external_rtp_create(unsigned call_reference, const char * token
        /* figure out our local RTP port and tell the H.323 stack about it */
        ast_rtp_get_us(pvt->rtp, &us);
        ast_mutex_unlock(&pvt->lock);
-       /* evil hack, until I (or someone?) figures out a better way */
-       ast_inet_ntoa(info->addr, sizeof(info->addr), bindaddr.sin_addr);
+
+       ast_inet_ntoa(info->addr, sizeof(info->addr), us.sin_addr);
        info->port = ntohs(us.sin_port);
        if (h323debug)
                ast_log(LOG_DEBUG, "Sending RTP 'US' %s:%d\n", info->addr, info->port);