Hello,
I'm executing the following code for both the BYE and CANCEL in request_route:
if (is_method("BYE|CANCEL")) { #finished $var(finished) = $TS; append_hf("X-Finished: $var(finished)\r\n"); }
For some reason, the X-Finished header is appended to the BYE, but not the CANCEL. The CANCEL is forwarded further. I have the setflag(22); set, so all outbound messages are sent to the Capture server.
Does append_hf not work for CANCEL requests?
On 11/20/2013 09:05 AM, Grant Bagdasarian wrote:
Does append_hf not work for CANCEL requests?
Correct: CANCEL is a "hop-by-hop" request where the proxy is a distinct hop, i.e. UAC sends a CANCEL to the proxy, and the proxy sends a separate CANCEL of its own on the branch that it initiated. This is in contrast to something like a BYE, and most requests, which are end-to-end request that the proxy simply relays upstream as received.
-- Alex
I see, so there is no way to append a header to the CANCEL created by Kamailio?
I tried the onsend_route and branch_route, but none of them worked.
-----Original Message----- From: sr-users-bounces@lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Alex Balashov Sent: Wednesday, November 20, 2013 3:09 PM To: sr-users@lists.sip-router.org Subject: Re: [SR-Users] append_hf to CANCEL
On 11/20/2013 09:05 AM, Grant Bagdasarian wrote:
Does append_hf not work for CANCEL requests?
Correct: CANCEL is a "hop-by-hop" request where the proxy is a distinct hop, i.e. UAC sends a CANCEL to the proxy, and the proxy sends a separate CANCEL of its own on the branch that it initiated. This is in contrast to something like a BYE, and most requests, which are end-to-end request that the proxy simply relays upstream as received.
-- Alex
-- Alex Balashov - Principal Evariste Systems LLC 235 E Ponce de Leon Ave Suite 106 Decatur, GA 30030 United States Tel: +1-678-954-0670 Web: http://www.evaristesys.com/, http://www.alexbalashov.com/
_______________________________________________ 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
If there is, I don't know it.
Out of curiosity, why would you want to do that?
On 11/20/2013 09:19 AM, Grant Bagdasarian wrote:
I see, so there is no way to append a header to the CANCEL created by Kamailio?
I tried the onsend_route and branch_route, but none of them worked.
-----Original Message----- From: sr-users-bounces@lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Alex Balashov Sent: Wednesday, November 20, 2013 3:09 PM To: sr-users@lists.sip-router.org Subject: Re: [SR-Users] append_hf to CANCEL
On 11/20/2013 09:05 AM, Grant Bagdasarian wrote:
Does append_hf not work for CANCEL requests?
Correct: CANCEL is a "hop-by-hop" request where the proxy is a distinct hop, i.e. UAC sends a CANCEL to the proxy, and the proxy sends a separate CANCEL of its own on the branch that it initiated. This is in contrast to something like a BYE, and most requests, which are end-to-end request that the proxy simply relays upstream as received.
-- Alex
-- Alex Balashov - Principal Evariste Systems LLC 235 E Ponce de Leon Ave Suite 106 Decatur, GA 30030 United States Tel: +1-678-954-0670 Web: http://www.evaristesys.com/, http://www.alexbalashov.com/
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
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
I want to know when the CANCEL was received by Kamailio, and update the datetime column of the row created by the initial INVITE. It's a custom thing.
-----Original Message----- From: sr-users-bounces@lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Alex Balashov Sent: Wednesday, November 20, 2013 3:21 PM To: sr-users@lists.sip-router.org Subject: Re: [SR-Users] append_hf to CANCEL
If there is, I don't know it.
Out of curiosity, why would you want to do that?
On 11/20/2013 09:19 AM, Grant Bagdasarian wrote:
I see, so there is no way to append a header to the CANCEL created by Kamailio?
I tried the onsend_route and branch_route, but none of them worked.
-----Original Message----- From: sr-users-bounces@lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Alex Balashov Sent: Wednesday, November 20, 2013 3:09 PM To: sr-users@lists.sip-router.org Subject: Re: [SR-Users] append_hf to CANCEL
On 11/20/2013 09:05 AM, Grant Bagdasarian wrote:
Does append_hf not work for CANCEL requests?
Correct: CANCEL is a "hop-by-hop" request where the proxy is a distinct hop, i.e. UAC sends a CANCEL to the proxy, and the proxy sends a separate CANCEL of its own on the branch that it initiated. This is in contrast to something like a BYE, and most requests, which are end-to-end request that the proxy simply relays upstream as received.
-- Alex
-- Alex Balashov - Principal Evariste Systems LLC 235 E Ponce de Leon Ave Suite 106 Decatur, GA 30030 United States Tel: +1-678-954-0670 Web: http://www.evaristesys.com/, http://www.alexbalashov.com/
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
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
-- Alex Balashov - Principal Evariste Systems LLC 235 E Ponce de Leon Ave Suite 106 Decatur, GA 30030 United States Tel: +1-678-954-0670 Web: http://www.evaristesys.com/, http://www.alexbalashov.com/
_______________________________________________ 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
On 11/20/2013 09:26 AM, Grant Bagdasarian wrote:
I want to know when the CANCEL was received by Kamailio, and update the datetime column of the row created by the initial INVITE. It's a custom thing.
What stops you from doing this now? Or do you mean you need to do it on the upstream (and presumably non-Kamailian) UAS?
No, it has to be done in Kamailio. And since there is no way to append a header to a CANCEL, I'm forced to do it another way. I did notice after the CANCEL is sent by the UAC, the UAS generates a 487 Request Terminated. I'm able to append a header to the 487. So, that does solve my problem.
-----Original Message----- From: sr-users-bounces@lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Alex Balashov Sent: Wednesday, November 20, 2013 3:28 PM To: sr-users@lists.sip-router.org Subject: Re: [SR-Users] append_hf to CANCEL
On 11/20/2013 09:26 AM, Grant Bagdasarian wrote:
I want to know when the CANCEL was received by Kamailio, and update the datetime column of the row created by the initial INVITE. It's a custom thing.
What stops you from doing this now? Or do you mean you need to do it on the upstream (and presumably non-Kamailian) UAS?
-- Alex Balashov - Principal Evariste Systems LLC 235 E Ponce de Leon Ave Suite 106 Decatur, GA 30030 United States Tel: +1-678-954-0670 Web: http://www.evaristesys.com/, http://www.alexbalashov.com/
_______________________________________________ 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
Hello,
there is a tm module that allows setting extra parameters for local ACK and CANCEL:
- http://kamailio.org/docs/modules/stable/modules/tm.html#ac_extra_hdrs
But I think it doesn't support variables -- only static string -- but you can give it a try.
I had in my to-do for a while to add an event route for local ack/cancel where to allow adding headers, but it was no time for it. Maybe you can open a feature request on tracker so it gets higher priority and eventually other devs will look at it.
Cheers, Daniel
On 11/20/13 3:53 PM, Grant Bagdasarian wrote:
No, it has to be done in Kamailio. And since there is no way to append a header to a CANCEL, I'm forced to do it another way. I did notice after the CANCEL is sent by the UAC, the UAS generates a 487 Request Terminated. I'm able to append a header to the 487. So, that does solve my problem.
-----Original Message----- From: sr-users-bounces@lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Alex Balashov Sent: Wednesday, November 20, 2013 3:28 PM To: sr-users@lists.sip-router.org Subject: Re: [SR-Users] append_hf to CANCEL
On 11/20/2013 09:26 AM, Grant Bagdasarian wrote:
I want to know when the CANCEL was received by Kamailio, and update the datetime column of the row created by the initial INVITE. It's a custom thing.
What stops you from doing this now? Or do you mean you need to do it on the upstream (and presumably non-Kamailian) UAS?
-- Alex Balashov - Principal Evariste Systems LLC 235 E Ponce de Leon Ave Suite 106 Decatur, GA 30030 United States Tel: +1-678-954-0670 Web: http://www.evaristesys.com/, http://www.alexbalashov.com/
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
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
I tried to create an account, and I thought it went okay, but the page says my username does not exist.
-----Original Message----- From: sr-users-bounces@lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Daniel-Constantin Mierla Sent: Wednesday, November 20, 2013 4:20 PM To: Kamailio (SER) - Users Mailing List Subject: Re: [SR-Users] append_hf to CANCEL
Hello,
there is a tm module that allows setting extra parameters for local ACK and CANCEL:
- http://kamailio.org/docs/modules/stable/modules/tm.html#ac_extra_hdrs
But I think it doesn't support variables -- only static string -- but you can give it a try.
I had in my to-do for a while to add an event route for local ack/cancel where to allow adding headers, but it was no time for it. Maybe you can open a feature request on tracker so it gets higher priority and eventually other devs will look at it.
Cheers, Daniel
On 11/20/13 3:53 PM, Grant Bagdasarian wrote:
No, it has to be done in Kamailio. And since there is no way to append a header to a CANCEL, I'm forced to do it another way. I did notice after the CANCEL is sent by the UAC, the UAS generates a 487 Request Terminated. I'm able to append a header to the 487. So, that does solve my problem.
-----Original Message----- From: sr-users-bounces@lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Alex Balashov Sent: Wednesday, November 20, 2013 3:28 PM To: sr-users@lists.sip-router.org Subject: Re: [SR-Users] append_hf to CANCEL
On 11/20/2013 09:26 AM, Grant Bagdasarian wrote:
I want to know when the CANCEL was received by Kamailio, and update the datetime column of the row created by the initial INVITE. It's a custom thing.
What stops you from doing this now? Or do you mean you need to do it on the upstream (and presumably non-Kamailian) UAS?
-- Alex Balashov - Principal Evariste Systems LLC 235 E Ponce de Leon Ave Suite 106 Decatur, GA 30030 United States Tel: +1-678-954-0670 Web: http://www.evaristesys.com/, http://www.alexbalashov.com/
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
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
-- Daniel-Constantin Mierla - http://www.asipto.com http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Trainings - Berlin, Nov 25-28 - more details about Kamailio trainings at http://www.asipto.com -
_______________________________________________ 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
A hack would be to loop the CANCEL to Kamailio again and forward it then stateless. When forwarding the CANCEL stateless, you can add headers. regards Klaus
Am 20.11.2013 15:19, schrieb Grant Bagdasarian:
I see, so there is no way to append a header to the CANCEL created by Kamailio?
I tried the onsend_route and branch_route, but none of them worked.
-----Original Message----- From: sr-users-bounces@lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Alex Balashov Sent: Wednesday, November 20, 2013 3:09 PM To: sr-users@lists.sip-router.org Subject: Re: [SR-Users] append_hf to CANCEL
On 11/20/2013 09:05 AM, Grant Bagdasarian wrote:
Does append_hf not work for CANCEL requests?
Correct: CANCEL is a "hop-by-hop" request where the proxy is a distinct hop, i.e. UAC sends a CANCEL to the proxy, and the proxy sends a separate CANCEL of its own on the branch that it initiated. This is in contrast to something like a BYE, and most requests, which are end-to-end request that the proxy simply relays upstream as received.
-- Alex
-- Alex Balashov - Principal Evariste Systems LLC 235 E Ponce de Leon Ave Suite 106 Decatur, GA 30030 United States Tel: +1-678-954-0670 Web: http://www.evaristesys.com/, http://www.alexbalashov.com/
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
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