<h3>Description</h3>
<p>I am looking at how to properly handle a problem with duplicate ACC</p>
<p>This is when <code>TMCB_ON_FAILURE</code> and <code>TMCB_RESPONSE_OUT</code> are both called, they are not using the same version of the message.<br>
<code>TMCB_ON_FAILURE</code> is using the cloned version<br>
<code>TMCB_RESPONSE_OUT</code> is using the original version</p>
<p>They are not sharing the message flags and 2 ACC events are generated.</p>
<p>Since this is very sensitive, I want to make sure I can trace the real root cause.<br>
Not sure if this is a regression ...</p>
<h4>Reproduction</h4>
<p>Any failed call</p>
<h4>Debugging Data</h4>
<pre><code> 0(4603) NOTICE: acc [acc_logic.c:686]: tmcb_func(): acc callback called for t(0x7f768b6dac08) event type 2, reply code 404 reqmsg[0x7f768b6dc840] rplmsg[0x7f76d096dee8]
0(4603) ERROR: acc [acc_logic.c:697]: tmcb_func(): [TMCB_RESPONSE_IN][0x7f768b6dc840][0x7f76d096dee8]
// reply route execution
0(4603) ERROR: <core> [core/sip_msg_clone.c:504]: sip_msg_shm_clone(): sip_msg_shm_clone[0x7f768b6dc840]>>[0x7f768b6de738]
0(4603) NOTICE: acc [acc_logic.c:686]: tmcb_func(): acc callback called for t(0x7f768b6dac08) event type 128, reply code 404 reqmsg[0x7f768b6de738] rplmsg[0x7f76d096dee8]
0(4603) ERROR: acc [acc_logic.c:694]: tmcb_func(): [TMCB_ON_FAILURE] run on_missed [0x7f768b6de738][0x7f76d096dee8] // working with the cloned message
0(4603) ERROR: <core> [core/flags.c:59]: isflagset(): isflagset[0x7f768b6de738]
0(4603) ERROR: acc_json [acc_json_mod.c:189]: acc_json_send_request(): missed call flag [7] for this transaction [on]
// failure route execution, we are working with the cloned message
0(4603) NOTICE: <script>: [FAILURE]
0(4603) ERROR: <core> [core/flags.c:46]: setflag(): setflag[0x7f768b6de738]
// failure
0(4603) NOTICE: acc [acc_logic.c:686]: tmcb_func(): acc callback called for t(0x7f768b6dac08) event type 512, reply code 404 reqmsg[0x7f768b6dc840] rplmsg[0x7f76d096dee8]
0(4603) ERROR: acc [acc_logic.c:689]: tmcb_func(): [TMCB_RESPONSE_OUT][0x7f768b6dc840][0x7f76d096dee8] // working with the original message
0(4603) ERROR: <core> [core/flags.c:59]: isflagset(): isflagset[0x7f768b6dc840]
0(4603) ERROR: acc_json [acc_json_mod.c:189]: acc_json_send_request(): missed call flag [7] for this transaction [on]
</code></pre>
<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/issues/1673">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZbOjaEi-RStozjwO9NTeSzyOMA6oks5ujl5lgaJpZM4XWT31">mute the thread</a>.<img src="https://github.com/notifications/beacon/AF36ZfKl3fdcKT8I7Yl_qPwBOB7jxovqks5ujl5lgaJpZM4XWT31.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"acc: generating duplicates on missed / failed calls (#1673)"}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1673"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/1673",
"url": "https://github.com/kamailio/kamailio/issues/1673",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
},
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "acc: generating duplicates on missed / failed calls (#1673)",
"sections": [
{
"text": "",
"activityTitle": "**Julien Chavanton**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@jchavanton",
"facts": [
{
"name": "Repository: ",
"value": "kamailio/kamailio"
},
{
"name": "Issue #: ",
"value": 1673
}
]
}
],
"potentialAction": [
{
"name": "Add a comment",
"@type": "ActionCard",
"inputs": [
{
"isMultiLine": true,
"@type": "TextInput",
"id": "IssueComment",
"isRequired": false
}
],
"actions": [
{
"name": "Comment",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"kamailio/kamailio\",\n\"issueId\": 1673,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}"
}
]
},
{
"name": "Close issue",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueClose\",\n\"repositoryFullName\": \"kamailio/kamailio\",\n\"issueId\": 1673\n}"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/kamailio/kamailio/issues/1673"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 391724533\n}"
}
],
"themeColor": "26292E"
}
]</script>