Re: Error: ACK without matching transaction

Sergio Charrua via sr-users <[email protected]>
Newsgroups gmane.comp.voip.ser
Message-ID <CALZWR5xco3qt0YSS1TqwPUxpeTe1+6a2p6Ssck-fuFOYJ+Z3Ew@mail.gmail.com>
I assume your ACK is for a 2xx final response to INVITE (same Call-ID, same
CSeq=2, To has a tag).  t_check_trans() only matches ACKs for non-2xx
replies (class 3 to 6 error codes). Hence it returns false

If it’s an ACK for non-2xx then stateful forward using the existing
transaction (t_check_trans() will return true then call t_relay()).
If it’s an ACK for 2xx then loose-route it and relay statelessly (RR/dialog
routing), not via t_check_trans().

This is what my code looks like. Hope this helps!

route[WITHINDLG] {
    if (is_method("ACK")) {
        if (t_check_trans()) {
            # ACK to non-2xx (3xx–6xx) -> stateful
            t_relay();
        } else {
            # ACK to 2xx -> separate transaction -> route via RR set
            if (loose_route()) {
                route(RELAY);
            } else {
                # fallback: if you have dialog module
                # route via dialog or dst_uri as appropriate
                route(RELAY);
            }
        }
        exit;
    }

   [... Do some more voodoo mambo jambo here ...]

    if (loose_route()) {
        route(RELAY);
        exit;
    }

    sl_send_reply("404", "Not here");
    exit;
}




Atenciosamente / Kind Regards / Cordialement / Un saludo,


*Sérgio Charrua*






On Tue, Aug 26, 2025 at 11:55 PM Fernando Lopes via sr-users <
[email protected]> wrote:

> Hello everyone,
>
> Quick question: I have a t_check_trans that is returning false even though
> the ACK should match a SIP message.
>
> Here are my logs:
>
> INVITE sip:[email protected] SIP/2.0
> Via: SIP/2.0/WSS hruuc8uql46h.invalid;branch=z9hG4bK9771396
> To: <sip:[email protected]>
> From: "916c67e8-652f-49ea-b288-2bbbee8dbf21" <sip:[email protected]
> >;tag=cv63sqfvns
> CSeq: 2 INVITE
> Call-ID: pr0ndrr8fd14vekv6k15
> Max-Forwards: 70
> Authorization: Digest algorithm=MD5, username="User1", realm="XXXXXX",
> nonce="1756247832/9dfac95b19496304d744138c5789346f", uri="
> sip:[email protected]", response="8abe90b7e0971cc52ce0a2c6988e0656",
> opaque="370804d3544dc2aa", qop=auth, cnonce="im9losvhkh93", nc=00000001
> Contact: <sip:[email protected]
> ;transport=ws;ob>
> Allow: ACK,CANCEL,INVITE,MESSAGE,BYE,OPTIONS,INFO,NOTIFY,REFER
> Supported: outbound
> User-Agent: SIP.js/0.21.1
> Content-Type: application/sdp
> Content-Length: 2545
>
> ACK sip:10.5.0.2:5060 SIP/2.0
> Via: SIP/2.0/WSS hruuc8uql46h.invalid;branch=z9hG4bK6675132
> To: <sip:[email protected]>;tag=b51c9e70-e71d-4a52-a8a3-07673119e625
> From: "916c67e8-652f-49ea-b288-2bbbee8dbf21" <sip:[email protected]
> >;tag=cv63sqfvns
> CSeq: 2 ACK
> Call-ID: pr0ndrr8fd14vekv6k15
> Max-Forwards: 70
> Supported: outbound
> User-Agent: SIP.js/0.21.1
> Content-Length: 0
>
> Thank you.
> __________________________________________________________
> Kamailio - Users Mailing List - Non Commercial Discussions --
> [email protected]
> To unsubscribe send an email to [email protected]
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
>

__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the sender!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.