[SR-Users] Add Header on cancel

Klaus Darilion klaus.mailinglists at pernau.at
Thu May 20 17:09:32 CEST 2010


I think in tm mode this not possible. The CANCEL gets autogenerated by 
Kamailio so you can not modify it in script.

sip-router trunk has now support for Reason header, but only generating 
it automatically or copy it from received CANCEL.

A workaround would be to have the proxy running in stateless mode (no 
t_relay() but use forward()[1]) - then you can manipulate the CANCEL and 
then forward it.

regards
Klaus

[1] http://sip-router.org/wiki/cookbooks/core-cookbook/devel#forward

Am 20.05.2010 16:27, schrieb Alex Rendour:
> Hi,
> Is it possible to add an header reason in a cancel?
>
> We receive a CANCEL without header reason and we need to forward to
> another SIP proxy with the reason header?
>
> We use this code in my conf:
> if(is_method("CANCEL"))
> {
> if(!is_present_hf("Reason:"))
> {
> xlog("L_ERR", "reason missing");
> append_hf("reason: Q.850; cause=31\r\n");
> xlog("L_ERR", "add raison");
> }
>
> }
>
> Thanks,
>
> regards,
>



More information about the sr-users mailing list