<p style="white-space: pre-wrap; word-wrap: break-word;">There is a private clone_tdata() function in pjsip/src/pjsip-ua/sip_100rel.c that we'd need to use to clone tdata for similar things in a normal invite transaction to fix this deadlock.</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Comment where clone_tdata() is called:<br>    /* Clone tdata.<br>     * We need to clone tdata because we may need to keep it in our<br>     * retransmission list, while the original dialog may modify it<br>     * if it wants to send another response.<br>     */</pre><p style="white-space: pre-wrap; word-wrap: break-word;"><br>-> INVITE<br><- 100 Trying<br><- 183 Progress<br><- 200 OK<br><- 200 OK retransmission<br>-> ACK</p><p style="white-space: pre-wrap; word-wrap: break-word;">Though a better question is why is a retransmission timer firing to re-send a 183 response?  That timer shouldn't even be started at this time in an INVITE transaction.  We would need to retransmit a final response if we don't receive an ACK.  However, we shouldn't be trying to send another response.</p><p><a href="https://gerrit.asterisk.org/9477">View Change</a></p><ul style="list-style: none; padding: 0;"></ul><p>To view, visit <a href="https://gerrit.asterisk.org/9477">change 9477</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/9477"/><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: Ic381004a3a212fe1d8eca0e707fe09dba4a6ab4e </div>
<div style="display:none"> Gerrit-Change-Number: 9477 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </div>
<div style="display:none"> Gerrit-Owner: Torrey Searle <tsearle@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: Richard Mudgett <rmudgett@digium.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 18 Jul 2018 21:01:35 +0000 </div>
<div style="display:none"> Gerrit-HasComments: No </div>
<div style="display:none"> Gerrit-HasLabels: No </div>