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

(paste your debugging data here)

Log Messages

(paste your log messages here)

SIP Traffic

(paste your sip traffic here)

Possible Solutions

Additional Information

(paste your output here)
(paste your output here)


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <kamailio/kamailio/issues/3409@github.com>