<p><a href="https://gerrit.asterisk.org/9984">View Change</a></p><p>1 comment:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.asterisk.org/#/c/9984/4/res/res_pjsip_transport_websocket.c">File res/res_pjsip_transport_websocket.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/9984/4/res/res_pjsip_transport_websocket.c@296">Patch Set #4, Line 296:</a> <code style="font-family:monospace,monospace">  pj_ansi_strcpy(rdata->pkt_info.src_name, ast_sockaddr_stringify_addr(ast_websocket_remote_address(session)));</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">> PJPROJECT might also have a problem converting the IPv6 address to […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">True but that doesn't mean they don't screw up when using it with an IPv6 address.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Out of the 19 places they directly reference the string, only one must not have the []'s.  That place is where they set the address for the receive parameter on the Via header.  One place is to determine if it is a private address which doesn't care if there are []'s or not as it can only return true with IPv4 addresses.  All the other places are for log messages where they output the address with a port which should have the []'s so you don't confuse the address with the port; which is admittedly strange but livable.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Asterisk on the other hand has several places where it calls ast_sockaddr_parse() with that string which must have the []'s to function.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Asterisk feeds that string to pjsip_tpmgr_find_local_addr2() in res_hep_pjsip.c which I don' t know if it needs []'s or not.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Asterisk uses that value in log messages with a port just like PJPROJECT.</p><p style="white-space: pre-wrap; word-wrap: break-word;"><br>All of this is saying that to change Asterisk to properly use the string without [] everywhere is going to be rather invasive.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/9984">change 9984</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/9984"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: I8ea9d289901b837512bee2ca2535e3dc14f04d77 </div>
<div style="display:none"> Gerrit-Change-Number: 9984 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </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>
<div style="display:none"> Gerrit-Comment-Date: Wed, 22 Aug 2018 20:45:46 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: No </div>