<p>Joshua Colp <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/9986">View Change</a></p><div style="white-space:pre-wrap">Approvals:
George Joseph: Looks good to me, but someone else must approve
Richard Mudgett: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, approved; Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_transport_websocket: Properly set src_name for IPv6<br><br>SIP responses over WebSockets when the client is using IPv6 have invalid<br>Via headers according to RFC 3261. The 'received' header parameter<br>should not be wrapped in brackets if it is an IPv6 address.<br><br>When src_name is populated by the built-in PJSIP transports, the code<br>uses pj_sockaddr_print() with 'flags' set to 0, meaning that the<br>brackets are not rendered around IPv6 addresses.<br><br>This may be related to ASTERISK~27101.<br><br>See also: https://github.com/onsip/SIP.js/pull/594<br><br>ASTERISK-28020 #close<br><br>Change-Id: I8ea9d289901b837512bee2ca2535e3dc14f04d77<br>---<br>M res/res_pjsip_transport_websocket.c<br>1 file changed, 1 insertion(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_pjsip_transport_websocket.c b/res/res_pjsip_transport_websocket.c</span><br><span>index 6335943..75869f5 100644</span><br><span>--- a/res/res_pjsip_transport_websocket.c</span><br><span>+++ b/res/res_pjsip_transport_websocket.c</span><br><span>@@ -293,7 +293,7 @@</span><br><span> pj_sockaddr_parse(pj_AF_UNSPEC(), 0, pj_cstr(&buf, ast_sockaddr_stringify(ast_websocket_remote_address(session))), &rdata->pkt_info.src_addr);</span><br><span> rdata->pkt_info.src_addr_len = sizeof(rdata->pkt_info.src_addr);</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- pj_ansi_strcpy(rdata->pkt_info.src_name, ast_sockaddr_stringify_host(ast_websocket_remote_address(session)));</span><br><span style="color: hsl(120, 100%, 40%);">+ pj_ansi_strcpy(rdata->pkt_info.src_name, ast_sockaddr_stringify_addr(ast_websocket_remote_address(session)));</span><br><span> rdata->pkt_info.src_port = ast_sockaddr_port(ast_websocket_remote_address(session));</span><br><span> </span><br><span> recvd = pjsip_tpmgr_receive_packet(rdata->tp_info.transport->tpmgr, rdata);</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/9986">change 9986</a>. To unsubscribe, or for help writing mail filters, 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/9986"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I8ea9d289901b837512bee2ca2535e3dc14f04d77 </div>
<div style="display:none"> Gerrit-Change-Number: 9986 </div>
<div style="display:none"> Gerrit-PatchSet: 7 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Matthew Fredrickson <creslin@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>