Hi Henning, thanks for your reply.
I have successfully used PATH before as you describe.
This model, however, I am having Kamailio issue a 302 Redirect, and, I need to take the recorded PATH information and put it into the 302 Redirect Contact field, to send back with sl_send_reply. Sl_send_reply does not seem to do that automatically even after a lookup() and reg_fetch.
I was able to figure out the textops transforms and get the data into a Contact header, though I’m not 100% confident I’m creating a correct Contact, as sometimes the PATH can be quite complex and I’m taking only the host part and reconstructing a contact from that. I guess I will have to scour the RFC and do some learning 😊
I was hoping this particular scenario had been baked into Kamailio previously and I just needed to find the right configuration options to exercise it.
On my second issue:
I am left however with an inability to remove the existing Contact from the reply. I tried remove_hf before sl_send_reply, but either it doesn’t remove the Contact field, or, sl_send_reply adds the Contact field.
From: Henning Westerholt hw@gilawa.com Date: Friday, October 27, 2023 at 10:10 AM To: "Kamailio (SER) - Users Mailing List" sr-users@lists.kamailio.org Cc: Jawaid Bazyar bazyar@gmail.com Subject: RE: Registrar / Path
Hello,
I probably failed to understand your scenario completely.
But basically, if you want to just forward REGISTER message from one Kamailio to the other, you can use “forward()” or “r_relay()” for stateless respectively stateful forwarding.
The path extension was designed to take the same way routing e.g. an INVITE to an user agent as it came through your infrastructure. It will work automatically by setting the destination URI if it path is set and you are using the “lookup(..)” function.
Cheers,
Henning