Hello,
you probably want to look into adding a B2BUA component or fix your UAC.
Kamailio will generate a random To tag by default, as required by the RFC 3261, section
19.3. This way the UAC can differentiate between the response from the UAS part before and
the Kamailio proxy server.
Cheers,
Henning
--
Henning Westerholt -
https://skalatan.de/blog/
Kamailio services -
https://gilawa.com
-----Original Message-----
From: sadik.oualla.mohamed--- via sr-users <sr-users(a)lists.kamailio.org>
Sent: Dienstag, 9. Juli 2024 18:07
To: sr-users(a)lists.kamailio.org
Cc: sadik.oualla.mohamed(a)gmail.com
Subject: [SR-Users] Change the To Header in the failure_route
Hello,
I need help with modifying the "To" header in the
"failure_route[ID]{...}".
Specifically, I want to add the "to tag" parameter from the previous SIP
messages of the current dialog(e.g., 180 Ringing, PRACK or final responses).
Here's the scenario:
1. Kamailio receives and relays the SIP messages: INVITE, 180 Ringing, PRACK,
200 OK, 486 Busy Here.
2. In my case, the 180 Ringing includes the "to tag" parameter.
3. When Kamailio receives the 486 response, it triggers "failure_route[ID]"
using "t_on_failure(ID)" method.
4. I extract the SIP response code and reason from the final response of the
INVITE transcation in this failure_route.
5. After processing and applying some instructions, I send a reply using
"t_send_reply" with the code and reason extracted.
The problem:
- The failure_route[ID] holds the initial INVITE, which has no "to tag"
parameter.
- When I send a reply using "t_send_reply()", Kamailio generates a random
"to
tag" different from the previous SIP messages, which confuses my UAC.
I think adding the "to tag" parameter manually might be a solution, but
I'm
not sure if I'm doing it correctly or if there is a better approach. I also tried
using uac_replace_to() method, but it doesn't work in the failure_route[ID].
How can I make sure the reply in failure_route[ID] uses the correct "to tag"
from the previous SIP messages? Are there any other possibilities to achieve
this?
Any assistance would be appreciated.
Thank you!
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe
send an email to sr-users-leave(a)lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the
sender!
Edit mailing list options or unsubscribe: