<p>I tried the same with stable Kamailio version</p>
<pre><code># kamailio -v
version: kamailio 5.1.4 (x86_64/linux) 
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown 
compiled on 08:12:48 Jun 20 2018 with gcc 6.3.0
</code></pre>
<p>And noticed a small difference. Kamailio is trying to find <code>[b:x:INVITE:1e004b4343c496750f1de6f156c779e8@pbx.example.com:as34fa3a8d]</code><br>
but when using kamailio 5.1.4 there is only <code>b:x:INVITE:1e004b4343c496750f1de6f156c779e8@pbx.example.com:h7g4Esbg_07000304592032</code>.</p>
<p>The difference between 5.2 and 5.1 is that in 5.2 there is nothing even close to that on redis and in 5.1 the tags seems to be switched.</p>
<p>On 183 Session progress and 180 Ringing:</p>
<pre><code>Jun 20 13:09:53 edge3 /usr/local/sbin/kamailio[3686]: DEBUG: topos_redis [topos_redis_storage.c:363]: tps_redis_insert_invite_branch(): inserting branch record for [b:x:INVITE:1e004b4343c496750f1de6f156c779e8@pbx.example.com:h7g4Esbg_07000304592032] with argc 6
</code></pre>
<p>On BYE:</p>
<pre><code>Jun 20 13:10:11 edge3 /usr/local/sbin/kamailio[3689]: DEBUG: topos_redis [topos_redis_storage.c:610]: tps_redis_load_invite_branch(): loading branch record for [b:x:INVITE:1e004b4343c496750f1de6f156c779e8@pbx.example.com:as34fa3a8d]
Jun 20 13:10:11 edge3 /usr/local/sbin/kamailio[3689]: DEBUG: ndb_redis [redis_client.c:878]: redisc_exec_argv(): rsrv->ctxRedis = 0x564c726d7e90
Jun 20 13:10:11 edge3 /usr/local/sbin/kamailio[3689]: DEBUG: topos_redis [topos_redis_storage.c:628]: tps_redis_load_invite_branch(): hmap with key [b:x:INVITE:1e004b4343c496750f1de6f156c779e8@pbx.example.comas34fa3a8d] not found
</code></pre>
<p>On SIP messages tags are as follows:<br>
Initial INVITE:</p>
<pre><code> From: "UserName" <sip:sip:user@domain.tld>;tag=as34fa3a8d.
 To: <sip:user@domain.tld>.
</code></pre>
<p>183 Session Progess:</p>
<pre><code> From: "UserName" <sip:sip:user@domain.tld>;tag=as34fa3a8d.
 To: <sip:user@domain.tld>;tag=h7g4Esbg_07000304592032.
</code></pre>
<p>BYE message from receiving end:</p>
<pre><code> From: <sip:user@domain.tld>;tag=h7g4Esbg_07000304592032.
 To: "UserName" <sip:sip:user@domain.tld>;tag=as34fa3a8d.
</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/1569#issuecomment-398707074">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZZ8SIcVs8LtAYHgymLeNHwwiVPoSks5t-ih9gaJpZM4Uuu6-">mute the thread</a>.<img src="https://github.com/notifications/beacon/AF36ZZa4rk9o-ILStyu1EeqKHg7AG-IGks5t-ih9gaJpZM4Uuu6-.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/issues/1569#issuecomment-398707074","url":"https://github.com/kamailio/kamailio/issues/1569#issuecomment-398707074","name":"View Issue"},"description":"View this Issue on GitHub","publisher":{"@type":"Organization","name":"GitHub","url":"https://github.com"}}</script>
<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":"PERSON","message":"@Joonake in #1569: I tried the same with stable Kamailio version\r\n```\r\n# kamailio -v\r\nversion: kamailio 5.1.4 (x86_64/linux) \r\nflags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES\r\nADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB\r\npoll method support: poll, epoll_lt, epoll_et, sigio_rt, select.\r\nid: unknown \r\ncompiled on 08:12:48 Jun 20 2018 with gcc 6.3.0\r\n```\r\n\r\nAnd noticed a small difference. Kamailio is trying to find `[b:x:INVITE:1e004b4343c496750f1de6f156c779e8@pbx.example.com:as34fa3a8d]`\r\nbut when using kamailio 5.1.4 there is only `b:x:INVITE:1e004b4343c496750f1de6f156c779e8@pbx.example.com:h7g4Esbg_07000304592032`.\r\n\r\nThe difference between 5.2 and 5.1 is that in 5.2 there is nothing even close to that on redis and in 5.1 the tags seems to be switched.\r\n\r\nOn 183 Session progress and 180 Ringing:\r\n```\r\nJun 20 13:09:53 edge3 /usr/local/sbin/kamailio[3686]: DEBUG: topos_redis [topos_redis_storage.c:363]: tps_redis_insert_invite_branch(): inserting branch record for [b:x:INVITE:1e004b4343c496750f1de6f156c779e8@pbx.example.com:h7g4Esbg_07000304592032] with argc 6\r\n```\r\nOn BYE:\r\n```\r\nJun 20 13:10:11 edge3 /usr/local/sbin/kamailio[3689]: DEBUG: topos_redis [topos_redis_storage.c:610]: tps_redis_load_invite_branch(): loading branch record for [b:x:INVITE:1e004b4343c496750f1de6f156c779e8@pbx.example.com:as34fa3a8d]\r\nJun 20 13:10:11 edge3 /usr/local/sbin/kamailio[3689]: DEBUG: ndb_redis [redis_client.c:878]: redisc_exec_argv(): rsrv-\u003ectxRedis = 0x564c726d7e90\r\nJun 20 13:10:11 edge3 /usr/local/sbin/kamailio[3689]: DEBUG: topos_redis [topos_redis_storage.c:628]: tps_redis_load_invite_branch(): hmap with key [b:x:INVITE:1e004b4343c496750f1de6f156c779e8@pbx.example.comas34fa3a8d] not found\r\n```\r\n\r\nOn SIP messages tags are as follows:\r\nInitial INVITE:\r\n```\r\n From: \"UserName\" \u003csip:sip:user@domain.tld\u003e;tag=as34fa3a8d.\r\n To: \u003csip:user@domain.tld\u003e.\r\n```\r\n183 Session Progess:\r\n```\r\n From: \"UserName\" \u003csip:sip:user@domain.tld\u003e;tag=as34fa3a8d.\r\n To: \u003csip:user@domain.tld\u003e;tag=h7g4Esbg_07000304592032.\r\n```\r\nBYE message from receiving end:\r\n```\r\n From: \u003csip:user@domain.tld\u003e;tag=h7g4Esbg_07000304592032.\r\n To: \"UserName\" \u003csip:sip:user@domain.tld\u003e;tag=as34fa3a8d.\r\n```\r\n\r\n"}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1569#issuecomment-398707074"}}}</script>
<script type="application/ld+json">{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "Re: [kamailio/kamailio] TOPOS with event_route filter fails with BYE message (#1569)",
"sections": [
{
"text": "",
"activityTitle": "**Joonas Keskitalo**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@Joonake",
"facts": [

]
}
],
"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\": 1569,\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\": 1569\n}"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/kamailio/kamailio/issues/1569#issuecomment-398707074"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 347795134\n}"
}
],
"themeColor": "26292E"
}</script>