<h4>Pre-Submission Checklist</h4>



<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Commit message has the format required by CONTRIBUTING guide</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Commits are split per component (core, individual modules, libs, utils, ...)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Each component has a single commit (if not, squash them into one commit)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> No commits to README files for modules (changes must be done to docbook files<br>
in <code>doc/</code> subfolder, the README file is autogenerated)</li>
</ul>
<h4>Type Of Change</h4>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Small bug fix (non-breaking change which fixes an issue)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> New feature (non-breaking change which adds new functionality)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Breaking change (fix or feature that would change existing functionality)</li>
</ul>
<h4>Checklist:</h4>

<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> PR should be backported to stable branches</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Tested changes locally</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Related to issue #XXXX (replace XXXX with an open issue number)</li>
</ul>
<h4>Description</h4>
<p>When doing t_reply/send_reply stateful, the ACC module will not add the to-tag to the ACC events.<br>
This patch will fix this and ensure that we get the to-tag that was locally generated used in the reply.</p>
<p>example :</p>
<pre><code>modparam("acc", "acc_prepare_always", 1)
modparam("acc_json", "acc_missed_flag", 6)

failure_route[test] {
    setflag(6); // MISSED_ACC, the failure will be recorded by ACC
    t_flush_flags(); // This will set the flags in the newly created transaction
    t_reply("500", "Service Unavailable");
}
</code></pre>
<p>This does generate an ACC event, however the to-tag is not populated, my guess this is because the TM callback is done before the to-tag is generated.</p>
<p>This patch will populate the to-tag immediately.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/kamailio/kamailio/pull/2422'>https://github.com/kamailio/kamailio/pull/2422</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>acc: add to-tag for locally generated replies</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/2422/files#diff-feea3e72b435c5db7c3e7571127f6a58">src/modules/acc/acc.c</a>
    (7)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/2422/files#diff-c308b3339c0f4a415185f9d7f53879d0">src/modules/acc/acc_api.h</a>
    (1)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/2422/files#diff-3a3e99adedb70c50b4624dfdde8af1b5">src/modules/acc/acc_logic.c</a>
    (20)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/kamailio/kamailio/pull/2422.patch'>https://github.com/kamailio/kamailio/pull/2422.patch</a></li>
  <li><a href='https://github.com/kamailio/kamailio/pull/2422.diff'>https://github.com/kamailio/kamailio/pull/2422.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/pull/2422">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZK3QB5N64R73ZUXE53R6NNFJANCNFSM4PRD42OQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZK56COBLYH6Z65HV53R6NNFJA5CNFSM4PRD42O2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4J7U7LFQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/pull/2422",
"url": "https://github.com/kamailio/kamailio/pull/2422",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>