You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Team,
I am using kamailio as load balancer in my organization and I want to manipulate the cancel request from and to headers.
But kamailio is changing the requests when it sends out and its still using the one it receives from other end.
How do I change the kamailio to change the to domain when it sends the cancel request out?
Troubleshooting
Code to handle cancel
if (is_method("CANCEL")) {
if (ends_with($td, "incoming.req.com")) {
xinfo("Updating CANCEL request");
uac_replace_to("sip:@manipulated.to.domain.com");
$uac_req(turi)="sip:@manipulated.to.domain.com";
append_hf("To: <"sip:@manipulated.to.domain.com">");
#uac_req_send();
xinfo("Updating CANCEL request TD: $td");
}
if (t_check_trans()) {
route(RELAY);
}
exit;
}
To discuss about kamailio usage and its configuration file actions, use sr-users mailing list. The tracker is only for reporting bugs in the C source code.
@miconda , Can we reopen this tcket as I am not getting any answer on the query posted to sr-users mailing list and have already sent out multiple reminders
Reopening the ticket will not give you more answers...
The CANCEL have to match the INVITE sent by Kamailio. It may be different to the incoming INVITE.
Let's keep this on the list.
kamailio
locked as off-topic and limited conversation to collaborators
Apr 5, 2023
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
Hi Team,
I am using kamailio as load balancer in my organization and I want to manipulate the cancel request from and to headers.
But kamailio is changing the requests when it sends out and its still using the one it receives from other end.
How do I change the kamailio to change the to domain when it sends the cancel request out?
Troubleshooting
Code to handle cancel
if (is_method("CANCEL")) {
if (ends_with($td, "incoming.req.com")) {
xinfo("Updating CANCEL request");
uac_replace_to("sip:@manipulated.to.domain.com");
$uac_req(turi)="sip:@manipulated.to.domain.com";
append_hf("To: <"sip:@manipulated.to.domain.com">");
#uac_req_send();
xinfo("Updating CANCEL request TD: $td");
}
if (t_check_trans()) {
route(RELAY);
}
exit;
}
SIP message:
CANCEL sip:@mycompany.net SIP/2.0
Via: SIP/2.0/UDP ;branch=z9hG4bK787.76dc73a7e90664fa84d8571e1281161d.0
Max-Forwards: 69
From: <sip:@incoming.req.com>;tag=QQ8NBSygKDa0c
To: <sip:@incoming.req.com>
Call-ID: 1cc67943-bb08-4e52-9694-cb33210e7b3b
CSeq: 65568792 CANCEL
Content-Length: 0
Reason: Q.850;cause=16;text="NORMAL_CLEARING"
Reproduction
Debugging Data
Log Messages
SIP Traffic
Possible Solutions
Additional Information
kamailio -v
The text was updated successfully, but these errors were encountered: