<p></p>
<h3>Description</h3>
<p>When using a combination of TopoS+UACreg+Dialog, Kamailio fails to match received replies to a transaction in a dialog.</p>
<h3>Troubleshooting</h3>
<p>modparam("topos", "storage", "redis")<br>
modparam("topos", "sanity_checks", 0)<br>
modparam("topos", "contact_mode", 0)</p>
<p>modparam("dialog", "track_cseq_updates", 1)</p>
<h4>Reproduction</h4>
<p>Load Topos + UAC + Dialog modules. Enable dialog cseq tracking.<br>
Add some uacrec record. Register with remote peer.<br>
Make a call towards the remote peer.</p>
<p>INVITE</p>
<ul>
<li>Cseq: 1, Branch number: 0. Kamailio will receive a 401 challenge.</li>
<li>Cseq: 2, Branch number: 1, it will include the Digest auth and try again. . The mangled topos Contact username will be slightly different (supposed to be?)</li>
<li>Next, the UAS will reply with 100 Trying. In response to that, Kamailio keeps retransmitting the same INVITE with Cseq 2 over and over again, presumably because it fails to match that reply to an existing transaction.</li>
</ul>
<h4>Debugging Data</h4>
<pre><code>DEBUG: {2 2 INVITE a19dfac7c4a65} tm [t_lookup.c:1009]: t_reply_matching(): failure to match a transaction
</code></pre>
<h4>Log Messages</h4>
<pre><code>(paste your log messages here)
</code></pre>
<h4>SIP Traffic</h4>
<pre><code>2021/02/26 12:10:16.213947 10.10.10.2:5060 -> 10.10.10.1:5060
INVITE sip:8882223333@mypbx.mydomain.net SIP/2.0
Via: SIP/2.0/UDP mysbc.mydomain.com:5060;branch=z9hG4bK4f81.97f17905fe7afced720300fea57ef462.0;i=6a
FROM: Demo Five<sip:2385@mypbx.mydomain.net>;tag=29e99c29147f425f914b73512fc13cf3
TO: <sip:8882223333@mypbx.mydomain.net>
CSEQ: 1 INVITE
CALL-ID: 33c9034c136e57de9c1278daef7d02fb
MAX-FORWARDS: 69
CONTENT-LENGTH: 575
MIN-SE: 300
SUPPORTED: timer
USER-AGENT: UA
CONTENT-TYPE: application/sdp
ALLOW: INVITE,ACK,OPTIONS,CANCEL,BYE,NOTIFY
SESSION-EXPIRES: 3600
Contact: <sip:btpsh-603922bd-3db9-1@mysbc.mydomain.com:5060>
2021/02/26 12:10:16.215650 10.10.10.1:5060 -> 10.10.10.2:5060
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP mysbc.mydomain.com:5060;branch=z9hG4bK4f81.97f17905fe7afced720300fea57ef462.0;i=6a;received=10.10.10.2;rport=5060
From: Demo Five<sip:2385@mypbx.mydomain.net>;tag=29e99c29147f425f914b73512fc13cf3
To: <sip:8882223333@mypbx.mydomain.net>;tag=as7c952f5b
Call-ID: 33c9034c136e57de9c1278daef7d02fb
CSeq: 1 INVITE
Server: B2B
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer, path
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="4f8fcced"
Content-Length: 0
2021/02/26 12:10:16.238191 10.10.10.2:5060 -> 10.10.10.1:5060
ACK sip:8882223333@mypbx.mydomain.net SIP/2.0
FROM: Demo Five<sip:2385@mypbx.mydomain.net>;tag=29e99c29147f425f914b73512fc13cf3
To: <sip:8882223333@mypbx.mydomain.net>;tag=as7c952f5b
CSEQ: 1 ACK
CALL-ID: 33c9034c136e57de9c1278daef7d02fb
MAX-FORWARDS: 69
Via: SIP/2.0/UDP mysbc.mydomain.com:5060;branch=z9hG4bK4f81.97f17905fe7afced720300fea57ef462.0;i=6a
CONTENT-LENGTH: 0
2021/02/26 12:10:16.280455 10.10.10.2:5060 -> 10.10.10.1:5060
INVITE sip:8882223333@mypbx.mydomain.net SIP/2.0
Via: SIP/2.0/UDP mysbc.mydomain.com:5060;branch=z9hG4bK4f81.97f17905fe7afced720300fea57ef462.1.cs1;i=6a
FROM: Demo Five<sip:2385@mypbx.mydomain.net>;tag=29e99c29147f425f914b73512fc13cf3
TO: <sip:8882223333@mypbx.mydomain.net>
CSEQ: 2 INVITE
CALL-ID: 33c9034c136e57de9c1278daef7d02fb
MAX-FORWARDS: 69
CONTENT-LENGTH: 575
MIN-SE: 300
SUPPORTED: timer
USER-AGENT: UA
CONTENT-TYPE: application/sdp
ALLOW: INVITE,ACK,OPTIONS,CANCEL,BYE,NOTIFY
SESSION-EXPIRES: 3600
Authorization: Digest username="2385", realm="asterisk", nonce="4f8fcced", uri="sip:8882223333@mypbx.mydomain.net", response="ec1986d94b9a508c4e9761c3c1cb80eb", algorithm=MD5
Contact: <sip:btpsh-603922bd-3db0-4@mysbc.mydomain.com:5060>
2021/02/26 12:10:16.284672 10.10.10.1:5060 -> 10.10.10.2:5060
SIP/2.0 100 Trying
Via: SIP/2.0/UDP mysbc.mydomain.com:5060;branch=z9hG4bK4f81.97f17905fe7afced720300fea57ef462.1.cs1;i=6a;received=10.10.10.2;rport=5060
From: Demo Five<sip:2385@mypbx.mydomain.net>;tag=29e99c29147f425f914b73512fc13cf3
To: <sip:8882223333@mypbx.mydomain.net>
Call-ID: 33c9034c136e57de9c1278daef7d02fb
CSeq: 2 INVITE
Server: B2B
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer, path
Session-Expires: 900;refresher=uas
Contact: <sip:8882223333@10.10.10.1:5060>
Content-Length: 0
2021/02/26 12:10:16.745320 10.10.10.2:5060 -> 10.10.10.1:5060
INVITE sip:8882223333@mypbx.mydomain.net SIP/2.0
Via: SIP/2.0/UDP mysbc.mydomain.com:5060;branch=z9hG4bK4f81.97f17905fe7afced720300fea57ef462.1.cs1;i=6a
FROM: Demo Five<sip:2385@mypbx.mydomain.net>;tag=29e99c29147f425f914b73512fc13cf3
TO: <sip:8882223333@mypbx.mydomain.net>
CSEQ: 2 INVITE
CALL-ID: 33c9034c136e57de9c1278daef7d02fb
MAX-FORWARDS: 69
CONTENT-LENGTH: 575
MIN-SE: 300
SUPPORTED: timer
USER-AGENT: UA
CONTENT-TYPE: application/sdp
ALLOW: INVITE,ACK,OPTIONS,CANCEL,BYE,NOTIFY
SESSION-EXPIRES: 3600
Authorization: Digest username="2385", realm="asterisk", nonce="4f8fcced", uri="sip:8882223333@mypbx.mydomain.net", response="ec1986d94b9a508c4e9761c3c1cb80eb", algorithm=MD5
Contact: <sip:btpsh-603922bd-3db0-4@mysbc.mydomain.com:5060>
</code></pre>
<h3>Possible Solutions</h3>
<h3>Additional Information</h3>
<ul>
<li><strong>Kamailio Version</strong> - output of <code>kamailio -v</code></li>
</ul>
<pre><code>version: kamailio 5.5.0-dev4 (x86_64/linux) 5ad3bd
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, 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_BLOCKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 5ad3bd
compiled on 15:35:01 Feb 11 2021 with gcc 4.9.2
</code></pre>
<ul>
<li><strong>Operating System</strong>:</li>
</ul>
<pre><code>Debian GNU/Linux 8 (jessie)
</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/2654">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZLGGG3CAI2AFGEYHDDTA7ONPANCNFSM4YI3SOUA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZK2WVEYX2KVJLPIGXDTA7ONPA5CNFSM4YI3SOUKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4MF24N3Q.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/2654",
"url": "https://github.com/kamailio/kamailio/issues/2654",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>