Hello,
the $ct pseudo-variable is for accessing the Contact header, I don't understand how
this is related to retrieving a To tag.
Cheers,
Henning
-----Original Message-----
From: Maria Jonas via sr-users <sr-users(a)lists.kamailio.org>
Sent: Friday, July 12, 2024 11:24 AM
To: sr-users(a)lists.kamailio.org
Cc: Maria Jonas <mariajonas345(a)outlook.com>
Subject: [SR-Users] Re: Change the To Header in the failure_route
To ensure the reply in failure_route[ID] uses the correct "to tag" from previous
SIP messages, you need to manually add the "to tag" parameter from the 180
Ringing or other related responses. Since uac_replace_to() doesn't work in
failure_route, you can use the $ct variable to access and modify the "To"
header. Here's an example:
failure_route[ID] {
# Extract the to-tag from the previous response (e.g., 180 Ringing)
$avp(to_tag) = $(ct{uri.param,tag});
# Process and send a reply with the extracted to-tag
append_to_reply("To: $ct{uri.param.tag}\r\n");
t_send_reply(486, "Busy Here");
}
Make sure you adjust the script according to your specific requirements and the context of
your SIP message handling.
__________________________________________________________
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: