Hello all,
I am facing an issue with Kamailio when trying to add custom headers to CANCEL requests.
My current configuration adds the "Reason" header perfectly:
```
if(!is_present_hf("Reason")){
$var(cause_request) = 31;
append_hf("Reason: Q.850;cause=$var(cause_request)\r\n", "CSeq");
msg_apply_changes();
}
```
However, when I attempt to add headers like "X-Reason" or
"TestHeader", they are not added:
```
if(!is_present_hf("Reason")){
$var(cause_request) = 31;
append_hf("X-Reason: Q.850;cause=$var(cause_request)\r\n",
"CSeq");
# or
append_hf("TestHeader: Q.850;cause=$var(cause_request)\r\n",
"CSeq");
msg_apply_changes(); #nothing changes in the relayed CANCEL request :-/
}
```
I've read in this discussion
"https://lists.kamailio.org/mailman3/hyperkitty/list/sr-users@lists.kamailio.org/thread/I62U2ET3565GSHNF2K3DLYJWLZR3BRWU/"
that this might work if sending CANCEL in stateless mode, but I want to keep it stateful.
Any suggestions on how to achieve this?
Regards,
Mohamed.