We are seeing an issue with ACKs to failure responses.
Our config is set up to forward an INVITE to another destination. It replies with a 407 Auth Required. Kamailio sends an ACK to the destination and relays the 407 back to the source. The source sends an ACK, but this always fails the transaction match, so kamailio keeps retransmitting the 407 (when using UDP)
UA KAM UA
-- INVITE --> -- INVITE --> <-- 407 -- -- ACK --> <-- 407 -- -- ACK --> ... <-- 407 -- (retrans) -- ACK -->
I wondered if it was the same issue as the stateless reply (Flyspray #154), but this happens when we do a t_relay.
Basically, when t_check_trans() is called for the ACK, it does not terminate the script. I have worked my way into the t_check_trans() code and found that it does not find a matching transaction; matching_3261() in t_lookup.c returns 0 because there are no entries in that hash bucket.
Does anyone understand why this may be happening?
Regards, Hugh