<p>I found the this code modification was fixing this problem, with ending the dialog when receiving ACK,<br>
there is probably an explanation I do not understand behind all of this, I guess I can propose the modifications that are working for my test and we can clarify more details by doing a review.</p>
<pre><code>--- a/src/modules/topos/tps_msg.c
+++ b/src/modules/topos/tps_msg.c
@@ -1003,7 +1003,8 @@ int tps_request_sent(sip_msg_t *msg, int dialog, int local)
        }
 
        if(dialog!=0) {
-               tps_storage_end_dialog(msg, &mtsd, ptsd);
+               if(get_cseq(msg)->method_id==METHOD_BYE)
+                       tps_storage_end_dialog(msg, &mtsd, ptsd);
                if(tps_storage_update_dialog(msg, &mtsd, &stsd, TPS_DBU_CONTACT)<0) {
                        goto error;
                }
</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/1848#issuecomment-462859397">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZU_s6XvZRDpQ4CwJqC_V-S2z0_C3ks5vMv0agaJpZM4a0o_2">mute the thread</a>.<img src="https://github.com/notifications/beacon/AF36Zfb_avlj8vIB0eKTF_Cuc3hfa2dfks5vMv0agaJpZM4a0o_2.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://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"PERSON","message":"@jchavanton in #1848: I found the this code modification was fixing this problem, with ending the dialog when receiving ACK,\r\nthere is probably an explanation I do not understand behind all of this, I guess I can propose the modifications that are working for my test and we can clarify more details by doing a review. \r\n\r\n```\r\n--- a/src/modules/topos/tps_msg.c\r\n+++ b/src/modules/topos/tps_msg.c\r\n@@ -1003,7 +1003,8 @@ int tps_request_sent(sip_msg_t *msg, int dialog, int local)\r\n        }\r\n \r\n        if(dialog!=0) {\r\n-               tps_storage_end_dialog(msg, \u0026mtsd, ptsd);\r\n+               if(get_cseq(msg)-\u003emethod_id==METHOD_BYE)\r\n+                       tps_storage_end_dialog(msg, \u0026mtsd, ptsd);\r\n                if(tps_storage_update_dialog(msg, \u0026mtsd, \u0026stsd, TPS_DBU_CONTACT)\u003c0) {\r\n                        goto error;\r\n                }\r\n```"}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1848#issuecomment-462859397"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/1848#issuecomment-462859397",
"url": "https://github.com/kamailio/kamailio/issues/1848#issuecomment-462859397",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>