Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to change $td(to domain) in kamailio cancel requests #3409

Closed
premkumarramasamy opened this issue Mar 31, 2023 · 3 comments
Closed

Unable to change $td(to domain) in kamailio cancel requests #3409

premkumarramasamy opened this issue Mar 31, 2023 · 3 comments

Comments

@premkumarramasamy
Copy link

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

  • Kamailio Version - output of kamailio -v
(paste your output here)
  • Operating System:
(paste your output here)
@miconda
Copy link
Member

miconda commented Mar 31, 2023

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 miconda closed this as completed Mar 31, 2023
@premkumarramasamy
Copy link
Author

@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

@oej
Copy link
Member

oej commented Apr 5, 2023

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 kamailio locked as off-topic and limited conversation to collaborators Apr 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants