<p style="white-space: pre-wrap; word-wrap: break-word;">There is a comment in sip_send_mwi_to_peer():</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">/* If we don't set the socket type to 0, then create_addr_from_peer will fail immediately if the peer<br> * uses any transport other than UDP. We set the type to 0 here and then let create_addr_from_peer copy<br> * the peer's socket information to the sip_pvt we just allocated<br> */<br>set_socket_transport(&p->socket, 0);<br>if (create_addr_from_peer(p, peer)) {<br>}</pre><p style="white-space: pre-wrap; word-wrap: break-word;">As best I can figure, this gives the best clue to what the create_addr() newdialog parameter is supposed to do. That and I don't understand why any caller would want to pass nonzero for the newdialog parameter even though some of those callers seem to setup the p->socket.type. Maybe they expect that a peer won't be found so the newdialog parameter won't be used.</p><p style="white-space: pre-wrap; word-wrap: break-word;"><br>This needs to be cherry-picked to 15, 16, and master.</p><p>Patch set 2:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #d4ffd4;">Code-Review +1</span></p><p><a href="https://gerrit.asterisk.org/10176">View Change</a></p><ul style="list-style: none; padding: 0;"></ul><p>To view, visit <a href="https://gerrit.asterisk.org/10176">change 10176</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/10176"/><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: Ib43315aba1f2c14ba077b52d8c5b00be0006656e </div>
<div style="display:none"> Gerrit-Change-Number: 10176 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Peter Katzmann <peter.katzmann@edag.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Tue, 18 Sep 2018 21:58:36 +0000 </div>
<div style="display:none"> Gerrit-HasComments: No </div>
<div style="display:none"> Gerrit-HasLabels: Yes </div>