@jonasswiatek I too have the similar setup and same issue while migration.
For some reason chan_sip asterisk 17, doesn’t send ACK and BYE based on Record-route, but uses contact header. So it was working earlier.
My kamailio is stateless and depends on rr
@david551 thanks for the RFC link, I migrated to chan_pjsip only. I tried saying the same setup was working in chan_sip but not in chan_pjsip. chan_sip ignored the RR header and used only contact header path.
My setup is docker containerised kamailio and asterisk in same machine. Now i’m moved Kamailio out of the asterisk host machine and given a separate Public IP to solve this issue with asterisk chan_pjsip