<p>George Joseph has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/6872">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_sdp_rtp: Fix setting of address type for rtp_ipv6<br><br>create_outgoing_sdp_stream was setting "addr_type = STR_IP6" only<br>when an ipv6 media_address was specified on the endpoint. If<br>rtp_ipv6 was set and ast_sip_get_host_ip_string returned an ipv6<br>address, we were leaving the addr_type set at the default of<br>STR_IP4. This caused the address type to be set incorrectly on the<br>"o" and "c" SDP attributes even though the address was set<br>correctly. Some clients don't like the mismatch.<br><br> * Removed the test for endpoint/media_address and now check all<br> addresses for ipv6.<br><br>ASTERISK-27198<br>Reported by: Martin Cisárik<br><br>Change-Id: I5214fc31b728117842243807e7927a319cf77592<br>---<br>M res/res_pjsip_sdp_rtp.c<br>1 file changed, 4 insertions(+), 7 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/72/6872/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/res/res_pjsip_sdp_rtp.c b/res/res_pjsip_sdp_rtp.c<br>index 20a219e..604fd42 100644<br>--- a/res/res_pjsip_sdp_rtp.c<br>+++ b/res/res_pjsip_sdp_rtp.c<br>@@ -1335,6 +1335,7 @@<br> RAII_VAR(struct ast_format_cap *, caps, NULL, ao2_cleanup);<br> enum ast_media_type media_type = session_media->type;<br> struct ast_sip_session_media *session_media_transport;<br>+ pj_sockaddr ip;<br> <br> int direct_media_enabled = !ast_sockaddr_isnull(&session_media->direct_media_addr) &&<br> ast_format_cap_count(session->direct_media_cap);<br>@@ -1447,13 +1448,9 @@<br> media->conn->addr_type = STR_IP4;<br> pj_strdup2(pool, &media->conn->addr, hostip);<br> <br>- if (!ast_strlen_zero(session->endpoint->media.address)) {<br>- pj_sockaddr ip;<br>-<br>- if ((pj_sockaddr_parse(pj_AF_UNSPEC(), 0, &media->conn->addr, &ip) == PJ_SUCCESS) &&<br>- (ip.addr.sa_family == pj_AF_INET6())) {<br>- media->conn->addr_type = STR_IP6;<br>- }<br>+ if ((pj_sockaddr_parse(pj_AF_UNSPEC(), 0, &media->conn->addr, &ip) == PJ_SUCCESS) &&<br>+ (ip.addr.sa_family == pj_AF_INET6())) {<br>+ media->conn->addr_type = STR_IP6;<br> }<br> <br> /* Add ICE attributes and candidates */<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6872">change 6872</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/6872"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 15 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I5214fc31b728117842243807e7927a319cf77592 </div>
<div style="display:none"> Gerrit-Change-Number: 6872 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: George Joseph <gjoseph@digium.com> </div>