Velthoen, Arie wrote: > Hi, > > > Function pjsua_media_transports_create fails when called with a > pjsua_transport_config in which bound_addr is set to the IP-address of a > local interface. Thanks for patch, I've applied it in http://www.pjsip.org/trac/ticket/429. Thanks again, -benny > > > I am using release 0.8.0 without ICE. > > > > It appears that the bound_addr is converted twice from host byte order > to network byte order: > > The first conversion is in create_rtp_rtcp_sock calling via > pj_sockaddr_in_set_str_addr (calling pj_inet_addr etc.) > > The second conversion is in create_rtp_rtcp_sock calling pj_sock_bind_in > (calling pj_htonl). > > *Proposed solution* > > I propose the following solution (copied from create_sip_udp_sock > calling pj_sock_bind_in) : > > > > In pjsua_media.c - create_rtp_rtcp_sock : > > > > Replace: > > 259 status = pj_sock_bind_in(sock[0], bound_addr.sin_addr.s_addr, > > 260 next_rtp_port); > > . > > . > > 275: status = pj_sock_bind_in(sock[1], bound_addr.sin_addr.s_addr, > > 276: (pj_uint16_t)(next_rtp_port+1)); > > > > By: > > 259 status = pj_sock_bind_in(sock[0], > *pj_ntohl(*bound_addr.sin_addr.s_addr*)*, > > 260 next_rtp_port); > > . > > . > > 275: status = pj_sock_bind_in(sock[1], > *pj_ntohl(*bound_addr.sin_addr.s_addr*)*, > > 276: (pj_uint16_t)(next_rtp_port+1)); > > > > > > Regards, > > > > Arie Velthoen > > > ------------------------------------------------------------------------ > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip at lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org -- Benny Prijono http://www.pjsip.org