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,
On 05/20/2010 10:27 AM, Alex Rendour wrote:
Is it possible to add an header reason in a cancel?
I don't know of anything in RFC 3261 prohibiting additional headers in any initial request.
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"); }
}
Does it work?
The code does not work. The header doesn't appear in the cancel forward.
Thanks,
Alexandre Rendour
Acropolis Telecom http://www.acropolistelecom.net Direct: +33 (0) 181813201 Support: +33 (0) 811 851 851 rendour@acropolistelecom.net mailto:rendour@acropolistelecom.net Adresse : 161-163 avenue Gallieni Paris - Porte de Bagnolet 93170 Bagnolet
Le 20/05/2010 16:40, Alex Balashov a écrit :
On 05/20/2010 10:27 AM, Alex Rendour wrote:
Is it possible to add an header reason in a cancel?
I don't know of anything in RFC 3261 prohibiting additional headers in any initial request.
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"); }
}
Does it work?
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,
When I use forward, it doesnt work! I don't know how to do
*François *
* *
Le 20/05/2010 17:09, Klaus Darilion a écrit :
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,
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hi François!
Am 21.05.2010 09:26, schrieb François BERGANZ:
When I use forward, it doesnt work! I don't know how to do
It works fine for me:
route{
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", "Reason added"); } forward(); exit; }
Note: above code snippet only works if the proxy does not do any parallel forking of the INVITE. It may also be necessary to change the request-URI to forward the request to the same destination as the INVITE.
in: U 2010/05/21 10:29:38.372934 83.136.33.3:16534 -> 88.198.53.113:5060 CANCEL sip:01505641636@83.123.45.165 SIP/2.0 Via: SIP/2.0/UDP 10.10.0.51:16534;branch=z9hG4bK-d8754z-7b591160b17cfc57-1---d8754z-;rport To: "01505641636"sip:01505641636@83.123.45.165 From: sip:klaus@83.123.45.165;tag=7c681960 Call-ID: MzcxYTgzZmIwMGYyMTA4YzVkN2IzZDhjYjhjYjYwNTk. CSeq: 2 CANCEL User-Agent: eyeBeam release 1102q stamp 51814 Content-Length: 0
out: U 2010/05/21 10:29:38.373331 88.198.53.113:5060 -> 83.123.45.165:5060 CANCEL sip:01505641636@83.123.45.165 SIP/2.0 Via: SIP/2.0/UDP 88.198.53.113;branch=z9hG4bK-d8754z-7b591160b17cfc57-1---d8754z- Via: SIP/2.0/UDP 10.10.0.51:16534;received=83.136.33.3;branch=z9hG4bK-d8754z-7b591160b17cfc57-1---d8754z-;rport=16534 To: "01505641636"sip:01505641636@83.123.45.165 From: sip:klaus@83.123.45.165;tag=7c681960 Call-ID: MzcxYTgzZmIwMGYyMTA4YzVkN2IzZDhjYjhjYjYwNTk. CSeq: 2 CANCEL User-Agent: eyeBeam release 1102q stamp 51814 Content-Length: 0 Reason: Q.850; cause=31
regards Klaus