Hello,
We have a scenario like this:
SUA -> Kamailio with registrar module -> Asterisk
A call from the SUA is set up with SIP timers, and after 15 minutes Asterisk sends a re-INVITE to Kamailio to forward on to the SUA. That re-INVITE has a RURI with the address and port of the SUA at the time the call started.
Now if the SUA re-registers after the call starts and before the re-INVITE, and is on a new address or port number, then the re-INVITE never gets to the phone.
Obviously Kamailio should send the re-INVITE to the new address/port, but is not. The re-INVITE is routed using the lookup() function.