Hi everyone,
I've got a specific case: when the inv_fr times out, I need to add a Reason header to the CANCEL generated by kamailio. I've tried to see if I could do it in the onsend_route, but that one is not triggered for the generated CANCEL. I also checked event_route[tm:local-request], but that one isn't triggered either for the generated CANCEL.
Is there any way to do it? Or maybe to have any pointer about where to look in the code so I may try to trigger event_route[tm:local-request] for these generated CANCELs?
Regards, Alfonso
Hello,
have you tried to use this parameter:
http://kamailio.org/docs/modules/stable/modules/tm.html#local_cancel_reason
Cheers,
Henning
-- Henning Westerholt – https://skalatan.de/blog/ Kamailio services – https://gilawa.comhttps://gilawa.com/
From: sr-users sr-users-bounces@lists.kamailio.org On Behalf Of Alfonso Pinto Sent: Wednesday, January 29, 2020 8:04 PM To: Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Subject: [SR-Users] Add Reason Header to kamailio generated CANCEL
Hi everyone,
I've got a specific case: when the inv_fr times out, I need to add a Reason header to the CANCEL generated by kamailio. I've tried to see if I could do it in the onsend_route, but that one is not triggered for the generated CANCEL. I also checked event_route[tm:local-request], but that one isn't triggered either for the generated CANCEL.
Is there any way to do it? Or maybe to have any pointer about where to look in the code so I may try to trigger event_route[tm:local-request] for these generated CANCELs?
Regards, Alfonso
I understood Alfonso's question to implicitly be: how can I add a dynamic and variable Reason header to outgoing CANCELs?
Perhaps I was mistaken. But if I'm not, as far as I know there is no means of doing that. Right?
On Fri, Jan 31, 2020 at 08:37:48PM +0000, Henning Westerholt wrote:
Hello,
have you tried to use this parameter:
http://kamailio.org/docs/modules/stable/modules/tm.html#local_cancel_reason
Cheers,
Henning
-- Henning Westerholt – https://skalatan.de/blog/ Kamailio services – https://gilawa.comhttps://gilawa.com/
From: sr-users sr-users-bounces@lists.kamailio.org On Behalf Of Alfonso Pinto Sent: Wednesday, January 29, 2020 8:04 PM To: Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Subject: [SR-Users] Add Reason Header to kamailio generated CANCEL
Hi everyone,
I've got a specific case: when the inv_fr times out, I need to add a Reason header to the CANCEL generated by kamailio. I've tried to see if I could do it in the onsend_route, but that one is not triggered for the generated CANCEL. I also checked event_route[tm:local-request], but that one isn't triggered either for the generated CANCEL.
Is there any way to do it? Or maybe to have any pointer about where to look in the code so I may try to trigger event_route[tm:local-request] for these generated CANCELs?
Regards, Alfonso
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
That's exactly what he needs.
Regards,
David Villasmil email: david.villasmil.work@gmail.com phone: +34669448337
On Fri, Jan 31, 2020 at 8:45 PM Alex Balashov abalashov@evaristesys.com wrote:
I understood Alfonso's question to implicitly be: how can I add a dynamic and variable Reason header to outgoing CANCELs?
Perhaps I was mistaken. But if I'm not, as far as I know there is no means of doing that. Right?
On Fri, Jan 31, 2020 at 08:37:48PM +0000, Henning Westerholt wrote:
Hello,
have you tried to use this parameter:
http://kamailio.org/docs/modules/stable/modules/tm.html#local_cancel_reason
Cheers,
Henning
-- Henning Westerholt – https://skalatan.de/blog/ Kamailio services – https://gilawa.comhttps://gilawa.com/
From: sr-users sr-users-bounces@lists.kamailio.org On Behalf Of
Alfonso Pinto
Sent: Wednesday, January 29, 2020 8:04 PM To: Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Subject: [SR-Users] Add Reason Header to kamailio generated CANCEL
Hi everyone,
I've got a specific case: when the inv_fr times out, I need to add a
Reason header to the CANCEL generated by kamailio. I've tried to see if I could do it in the onsend_route, but that one is not triggered for the generated CANCEL. I also checked event_route[tm:local-request], but that one isn't triggered either for the generated CANCEL.
Is there any way to do it? Or maybe to have any pointer about where to
look in the code so I may try to trigger event_route[tm:local-request] for these generated CANCELs?
Regards, Alfonso
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Alex Balashov | Principal | Evariste Systems LLC
Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Hi Alex,
ok, I was reading that he wants to get just one reason header, not one dynamic generated.
Just looked briefly, this seems to be the code:
t_msgbuilder.c /* Build a local request based on a previous request; main * customers of this function are local ACK and local CANCEL */ char *build_local(struct cell *Trans,unsigned int branch, unsigned int *len, char *method, int method_len, str *to , struct cancel_reason* reason )
Cheers,
Henning
Hi guys,
Thanks for your answers. I did try local_cancel_reason and it’s not doing anything for the CANCELs generated by kamailio. Isn’t that parameter intended for the CANCELs received and then relayed?
As Alex and David mentioned, what I need is to add my own reason header. There are some cases that requires to set the Reason header to something specific. IE: terminal supported call waiting in IMS.
Thanks for the piece of code, I will check what can be done here.
Regards, Alfonso
El El vie, 31 ene 2020 a las 22:10, Henning Westerholt hw@skalatan.de escribió:
Hi Alex,
ok, I was reading that he wants to get just one reason header, not one dynamic generated.
Just looked briefly, this seems to be the code:
t_msgbuilder.c /* Build a local request based on a previous request; main
- customers of this function are local ACK and local CANCEL
*/ char *build_local(struct cell *Trans,unsigned int branch, unsigned int *len, char *method, int method_len, str *to , struct cancel_reason* reason )
Cheers,
Henning
-- Henning Westerholt – https://skalatan.de/blog/ Kamailio services – https://gilawa.com
-----Original Message----- From: sr-users sr-users-bounces@lists.kamailio.org On Behalf Of Alex Balashov Sent: Friday, January 31, 2020 9:45 PM To: sr-users@lists.kamailio.org Subject: Re: [SR-Users] Add Reason Header to kamailio generated CANCEL
I understood Alfonso's question to implicitly be: how can I add a dynamic and variable Reason header to outgoing CANCELs?
Perhaps I was mistaken. But if I'm not, as far as I know there is no means of doing that. Right?
On Fri, Jan 31, 2020 at 08:37:48PM +0000, Henning Westerholt wrote:
Hello,
have you tried to use this parameter:
http://kamailio.org/docs/modules/stable/modules/tm.html#local_cancel_r eason
Cheers,
Henning
-- Henning Westerholt – https://skalatan.de/blog/ Kamailio services – https://gilawa.comhttps://gilawa.com/
From: sr-users sr-users-bounces@lists.kamailio.org On Behalf Of Alfonso Pinto Sent: Wednesday, January 29, 2020 8:04 PM To: Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Subject: [SR-Users] Add Reason Header to kamailio generated CANCEL
Hi everyone,
I've got a specific case: when the inv_fr times out, I need to add a
Reason header to the CANCEL generated by kamailio. I've tried to see if I could do it in the onsend_route, but that one is not triggered for the generated CANCEL. I also checked event_route[tm:local-request], but that one isn't triggered either for the generated CANCEL.
Is there any way to do it? Or maybe to have any pointer about where to
look in the code so I may try to trigger event_route[tm:local-request] for these generated CANCELs?
Regards, Alfonso
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Alex Balashov | Principal | Evariste Systems LLC
Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Hello guys,
We have faced almost the same problem adding *Reason: SIP;cause=200;text="Call completed elsewhere"* to the t_relayed CANCEL request. Is there an elegant solution to add this header?
PS. Switching to the stateless mode does not look pretty for us...
сб, 1 февр. 2020 г. в 06:04, Alfonso Pinto alfonso.pinto@gmail.com:
Hi guys,
Thanks for your answers. I did try local_cancel_reason and it’s not doing anything for the CANCELs generated by kamailio. Isn’t that parameter intended for the CANCELs received and then relayed?
As Alex and David mentioned, what I need is to add my own reason header. There are some cases that requires to set the Reason header to something specific. IE: terminal supported call waiting in IMS.
Thanks for the piece of code, I will check what can be done here.
Regards, Alfonso
El El vie, 31 ene 2020 a las 22:10, Henning Westerholt hw@skalatan.de escribió:
Hi Alex,
ok, I was reading that he wants to get just one reason header, not one dynamic generated.
Just looked briefly, this seems to be the code:
t_msgbuilder.c /* Build a local request based on a previous request; main
- customers of this function are local ACK and local CANCEL
*/ char *build_local(struct cell *Trans,unsigned int branch, unsigned int *len, char *method, int method_len, str *to , struct cancel_reason* reason )
Cheers,
Henning
-- Henning Westerholt – https://skalatan.de/blog/ Kamailio services – https://gilawa.com
-----Original Message----- From: sr-users sr-users-bounces@lists.kamailio.org On Behalf Of Alex Balashov Sent: Friday, January 31, 2020 9:45 PM To: sr-users@lists.kamailio.org Subject: Re: [SR-Users] Add Reason Header to kamailio generated CANCEL
I understood Alfonso's question to implicitly be: how can I add a dynamic and variable Reason header to outgoing CANCELs?
Perhaps I was mistaken. But if I'm not, as far as I know there is no means of doing that. Right?
On Fri, Jan 31, 2020 at 08:37:48PM +0000, Henning Westerholt wrote:
Hello,
have you tried to use this parameter:
http://kamailio.org/docs/modules/stable/modules/tm.html#local_cancel_r eason
Cheers,
Henning
-- Henning Westerholt – https://skalatan.de/blog/ Kamailio services – https://gilawa.comhttps://gilawa.com/
From: sr-users sr-users-bounces@lists.kamailio.org On Behalf Of Alfonso Pinto Sent: Wednesday, January 29, 2020 8:04 PM To: Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Subject: [SR-Users] Add Reason Header to kamailio generated CANCEL
Hi everyone,
I've got a specific case: when the inv_fr times out, I need to add a
Reason header to the CANCEL generated by kamailio. I've tried to see if I could do it in the onsend_route, but that one is not triggered for the generated CANCEL. I also checked event_route[tm:local-request], but that one isn't triggered either for the generated CANCEL.
Is there any way to do it? Or maybe to have any pointer about where to
look in the code so I may try to trigger event_route[tm:local-request] for these generated CANCELs?
Regards, Alfonso
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Alex Balashov | Principal | Evariste Systems LLC
Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Hello,
what is exactly the problem? The header is not added if you enable:
* http://kamailio.org/docs/modules/stable/modules/tm.html#local_cancel_reason
Cheers, Daniel
On 16.11.20 20:43, Denys Pozniak wrote:
Hello guys,
We have faced almost the same problem adding *Reason: SIP;cause=200;text="Call completed elsewhere"* to the t_relayed CANCEL request. Is there an elegant solution to add this header?
PS. Switching to the stateless mode does not look pretty for us...
сб, 1 февр. 2020 г. в 06:04, Alfonso Pinto <alfonso.pinto@gmail.com mailto:alfonso.pinto@gmail.com>:
Hi guys, Thanks for your answers. I did try local_cancel_reason and it’s not doing anything for the CANCELs generated by kamailio. Isn’t that parameter intended for the CANCELs received and then relayed? As Alex and David mentioned, what I need is to add my own reason header. There are some cases that requires to set the Reason header to something specific. IE: terminal supported call waiting in IMS. Thanks for the piece of code, I will check what can be done here. Regards, Alfonso El El vie, 31 ene 2020 a las 22:10, Henning Westerholt <hw@skalatan.de <mailto:hw@skalatan.de>> escribió: Hi Alex, ok, I was reading that he wants to get just one reason header, not one dynamic generated. Just looked briefly, this seems to be the code: t_msgbuilder.c /* Build a local request based on a previous request; main * customers of this function are local ACK and local CANCEL */ char *build_local(struct cell *Trans,unsigned int branch, unsigned int *len, char *method, int method_len, str *to , struct cancel_reason* reason ) Cheers, Henning -- Henning Westerholt – https://skalatan.de/blog/ <https://skalatan.de/blog/> Kamailio services – https://gilawa.com <https://gilawa.com> -----Original Message----- From: sr-users <sr-users-bounces@lists.kamailio.org <mailto:sr-users-bounces@lists.kamailio.org>> On Behalf Of Alex Balashov Sent: Friday, January 31, 2020 9:45 PM To: sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org> Subject: Re: [SR-Users] Add Reason Header to kamailio generated CANCEL I understood Alfonso's question to implicitly be: how can I add a dynamic and variable Reason header to outgoing CANCELs? Perhaps I was mistaken. But if I'm not, as far as I know there is no means of doing that. Right? On Fri, Jan 31, 2020 at 08:37:48PM +0000, Henning Westerholt wrote: > Hello, > > have you tried to use this parameter: > > http://kamailio.org/docs/modules/stable/modules/tm.html#local_cancel_r <http://kamailio.org/docs/modules/stable/modules/tm.html#local_cancel_r> > eason > > Cheers, > > Henning > > -- > Henning Westerholt – https://skalatan.de/blog/ <https://skalatan.de/blog/> Kamailio services – > https://gilawa.com <https://gilawa.com><https://gilawa.com/ <https://gilawa.com/>> > > From: sr-users <sr-users-bounces@lists.kamailio.org <mailto:sr-users-bounces@lists.kamailio.org>> On Behalf Of > Alfonso Pinto > Sent: Wednesday, January 29, 2020 8:04 PM > To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org>> > Subject: [SR-Users] Add Reason Header to kamailio generated CANCEL > > Hi everyone, > > I've got a specific case: when the inv_fr times out, I need to add a Reason header to the CANCEL generated by kamailio. I've tried to see if I could do it in the onsend_route, but that one is not triggered for the generated CANCEL. I also checked event_route[tm:local-request], but that one isn't triggered either for the generated CANCEL. > > Is there any way to do it? Or maybe to have any pointer about where to look in the code so I may try to trigger event_route[tm:local-request] for these generated CANCELs? > > Regards, > Alfonso > _______________________________________________ > Kamailio (SER) - Users Mailing List > sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users> -- Alex Balashov | Principal | Evariste Systems LLC Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) Web: http://www.evaristesys.com/ <http://www.evaristesys.com/>, http://www.csrpswitch.com/ <http://www.csrpswitch.com/> _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users> _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users>
--
BR, Denys Pozniak
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Hello!
We need to append our own Reason header for the "relayed" CANCEL message, if it is not on the input. Like below:
*if ( is_method("CANCEL") && !is_present_hf("Reason") ) {* * append_hf("Reason: ....);* * t_relay();* *...*
вт, 17 нояб. 2020 г. в 13:00, Daniel-Constantin Mierla miconda@gmail.com:
Hello,
what is exactly the problem? The header is not added if you enable:
http://kamailio.org/docs/modules/stable/modules/tm.html#local_cancel_reason
Cheers, Daniel On 16.11.20 20:43, Denys Pozniak wrote:
Hello guys,
We have faced almost the same problem adding *Reason: SIP;cause=200;text="Call completed elsewhere"* to the t_relayed CANCEL request. Is there an elegant solution to add this header?
PS. Switching to the stateless mode does not look pretty for us...
сб, 1 февр. 2020 г. в 06:04, Alfonso Pinto alfonso.pinto@gmail.com:
Hi guys,
Thanks for your answers. I did try local_cancel_reason and it’s not doing anything for the CANCELs generated by kamailio. Isn’t that parameter intended for the CANCELs received and then relayed?
As Alex and David mentioned, what I need is to add my own reason header. There are some cases that requires to set the Reason header to something specific. IE: terminal supported call waiting in IMS.
Thanks for the piece of code, I will check what can be done here.
Regards, Alfonso
El El vie, 31 ene 2020 a las 22:10, Henning Westerholt hw@skalatan.de escribió:
Hi Alex,
ok, I was reading that he wants to get just one reason header, not one dynamic generated.
Just looked briefly, this seems to be the code:
t_msgbuilder.c /* Build a local request based on a previous request; main
- customers of this function are local ACK and local CANCEL
*/ char *build_local(struct cell *Trans,unsigned int branch, unsigned int *len, char *method, int method_len, str *to , struct cancel_reason* reason )
Cheers,
Henning
-- Henning Westerholt – https://skalatan.de/blog/ Kamailio services – https://gilawa.com
-----Original Message----- From: sr-users sr-users-bounces@lists.kamailio.org On Behalf Of Alex Balashov Sent: Friday, January 31, 2020 9:45 PM To: sr-users@lists.kamailio.org Subject: Re: [SR-Users] Add Reason Header to kamailio generated CANCEL
I understood Alfonso's question to implicitly be: how can I add a dynamic and variable Reason header to outgoing CANCELs?
Perhaps I was mistaken. But if I'm not, as far as I know there is no means of doing that. Right?
On Fri, Jan 31, 2020 at 08:37:48PM +0000, Henning Westerholt wrote:
Hello,
have you tried to use this parameter:
http://kamailio.org/docs/modules/stable/modules/tm.html#local_cancel_r eason
Cheers,
Henning
-- Henning Westerholt – https://skalatan.de/blog/ Kamailio services – https://gilawa.comhttps://gilawa.com/
From: sr-users sr-users-bounces@lists.kamailio.org On Behalf Of Alfonso Pinto Sent: Wednesday, January 29, 2020 8:04 PM To: Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Subject: [SR-Users] Add Reason Header to kamailio generated CANCEL
Hi everyone,
I've got a specific case: when the inv_fr times out, I need to add a
Reason header to the CANCEL generated by kamailio. I've tried to see if I could do it in the onsend_route, but that one is not triggered for the generated CANCEL. I also checked event_route[tm:local-request], but that one isn't triggered either for the generated CANCEL.
Is there any way to do it? Or maybe to have any pointer about where to
look in the code so I may try to trigger event_route[tm:local-request] for these generated CANCELs?
Regards, Alfonso
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Alex Balashov | Principal | Evariste Systems LLC
Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
BR, Denys Pozniak
Kamailio (SER) - Users Mailing Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda Funding: https://www.paypal.me/dcmierla
And on internally generated CANCELs
On Tue, 17 Nov 2020 at 14:20, Denys Pozniak denys.pozniak@gmail.com wrote:
Hello!
We need to append our own Reason header for the "relayed" CANCEL message, if it is not on the input. Like below:
*if ( is_method("CANCEL") && !is_present_hf("Reason") ) {*
- append_hf("Reason: ....);*
- t_relay();*
*...*
вт, 17 нояб. 2020 г. в 13:00, Daniel-Constantin Mierla <miconda@gmail.com
:
Hello,
what is exactly the problem? The header is not added if you enable:
http://kamailio.org/docs/modules/stable/modules/tm.html#local_cancel_reason
Cheers, Daniel On 16.11.20 20:43, Denys Pozniak wrote:
Hello guys,
We have faced almost the same problem adding *Reason: SIP;cause=200;text="Call completed elsewhere"* to the t_relayed CANCEL request. Is there an elegant solution to add this header?
PS. Switching to the stateless mode does not look pretty for us...
сб, 1 февр. 2020 г. в 06:04, Alfonso Pinto alfonso.pinto@gmail.com:
Hi guys,
Thanks for your answers. I did try local_cancel_reason and it’s not doing anything for the CANCELs generated by kamailio. Isn’t that parameter intended for the CANCELs received and then relayed?
As Alex and David mentioned, what I need is to add my own reason header. There are some cases that requires to set the Reason header to something specific. IE: terminal supported call waiting in IMS.
Thanks for the piece of code, I will check what can be done here.
Regards, Alfonso
El El vie, 31 ene 2020 a las 22:10, Henning Westerholt hw@skalatan.de escribió:
Hi Alex,
ok, I was reading that he wants to get just one reason header, not one dynamic generated.
Just looked briefly, this seems to be the code:
t_msgbuilder.c /* Build a local request based on a previous request; main
- customers of this function are local ACK and local CANCEL
*/ char *build_local(struct cell *Trans,unsigned int branch, unsigned int *len, char *method, int method_len, str *to , struct cancel_reason* reason )
Cheers,
Henning
-- Henning Westerholt – https://skalatan.de/blog/ Kamailio services – https://gilawa.com
-----Original Message----- From: sr-users sr-users-bounces@lists.kamailio.org On Behalf Of Alex Balashov Sent: Friday, January 31, 2020 9:45 PM To: sr-users@lists.kamailio.org Subject: Re: [SR-Users] Add Reason Header to kamailio generated CANCEL
I understood Alfonso's question to implicitly be: how can I add a dynamic and variable Reason header to outgoing CANCELs?
Perhaps I was mistaken. But if I'm not, as far as I know there is no means of doing that. Right?
On Fri, Jan 31, 2020 at 08:37:48PM +0000, Henning Westerholt wrote:
Hello,
have you tried to use this parameter:
http://kamailio.org/docs/modules/stable/modules/tm.html#local_cancel_r
eason
Cheers,
Henning
-- Henning Westerholt – https://skalatan.de/blog/ Kamailio services – https://gilawa.comhttps://gilawa.com/
From: sr-users sr-users-bounces@lists.kamailio.org On Behalf Of Alfonso Pinto Sent: Wednesday, January 29, 2020 8:04 PM To: Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Subject: [SR-Users] Add Reason Header to kamailio generated CANCEL
Hi everyone,
I've got a specific case: when the inv_fr times out, I need to add a
Reason header to the CANCEL generated by kamailio. I've tried to see if I could do it in the onsend_route, but that one is not triggered for the generated CANCEL. I also checked event_route[tm:local-request], but that one isn't triggered either for the generated CANCEL.
Is there any way to do it? Or maybe to have any pointer about where
to look in the code so I may try to trigger event_route[tm:local-request] for these generated CANCELs?
Regards, Alfonso
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Alex Balashov | Principal | Evariste Systems LLC
Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
BR, Denys Pozniak
Kamailio (SER) - Users Mailing Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda Funding: https://www.paypal.me/dcmierla
--
BR, Denys Pozniak
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
It is worth noting that internally generated CANCELs are the only kind of CANCEL; while the function `t_relay_cancel()` exists, it is a misnomer.
-- Alex
Few more remarks ...
On 17.11.20 19:24, Alex Balashov wrote:
It is worth noting that internally generated CANCELs are the only kind of CANCEL; while the function `t_relay_cancel()` exists, it is a misnomer.
Yes, when using tm for sending out.
The stateless forward() is the alternative, but may require more processing of CANCEL in the config to get the address where the INVITE was sent.
Cheers, Daniel
Same question here like in my other reply:
* https://lists.kamailio.org/pipermail/sr-users/2020-November/111123.html
How do you expect to fill the value of the header?
Cheers, Daniel
On 17.11.20 19:20, David Villasmil wrote:
And on internally generated CANCELs
On Tue, 17 Nov 2020 at 14:20, Denys Pozniak <denys.pozniak@gmail.com mailto:denys.pozniak@gmail.com> wrote:
Hello! We need to append our own Reason header for the "relayed" CANCEL message, if it is not on the input. Like below: /if ( is_method("CANCEL") && !is_present_hf("Reason") ) { / / append_hf("Reason: ....);/ / t_relay();/ /.../ / / вт, 17 нояб. 2020 г. в 13:00, Daniel-Constantin Mierla <miconda@gmail.com <mailto:miconda@gmail.com>>: Hello, what is exactly the problem? The header is not added if you enable: * http://kamailio.org/docs/modules/stable/modules/tm.html#local_cancel_reason <http://kamailio.org/docs/modules/stable/modules/tm.html#local_cancel_reason> Cheers, Daniel On 16.11.20 20:43, Denys Pozniak wrote:
Hello guys, We have faced almost the same problem adding *Reason: SIP;cause=200;text="Call completed elsewhere"* to the t_relayed CANCEL request. Is there an elegant solution to add this header? PS. Switching to the stateless mode does not look pretty for us... сб, 1 февр. 2020 г. в 06:04, Alfonso Pinto <alfonso.pinto@gmail.com <mailto:alfonso.pinto@gmail.com>>: Hi guys, Thanks for your answers. I did try local_cancel_reason and it’s not doing anything for the CANCELs generated by kamailio. Isn’t that parameter intended for the CANCELs received and then relayed? As Alex and David mentioned, what I need is to add my own reason header. There are some cases that requires to set the Reason header to something specific. IE: terminal supported call waiting in IMS. Thanks for the piece of code, I will check what can be done here. Regards, Alfonso El El vie, 31 ene 2020 a las 22:10, Henning Westerholt <hw@skalatan.de <mailto:hw@skalatan.de>> escribió: Hi Alex, ok, I was reading that he wants to get just one reason header, not one dynamic generated. Just looked briefly, this seems to be the code: t_msgbuilder.c /* Build a local request based on a previous request; main * customers of this function are local ACK and local CANCEL */ char *build_local(struct cell *Trans,unsigned int branch, unsigned int *len, char *method, int method_len, str *to , struct cancel_reason* reason ) Cheers, Henning -- Henning Westerholt – https://skalatan.de/blog/ <https://skalatan.de/blog/> Kamailio services – https://gilawa.com <https://gilawa.com> -----Original Message----- From: sr-users <sr-users-bounces@lists.kamailio.org <mailto:sr-users-bounces@lists.kamailio.org>> On Behalf Of Alex Balashov Sent: Friday, January 31, 2020 9:45 PM To: sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org> Subject: Re: [SR-Users] Add Reason Header to kamailio generated CANCEL I understood Alfonso's question to implicitly be: how can I add a dynamic and variable Reason header to outgoing CANCELs? Perhaps I was mistaken. But if I'm not, as far as I know there is no means of doing that. Right? On Fri, Jan 31, 2020 at 08:37:48PM +0000, Henning Westerholt wrote: > Hello, > > have you tried to use this parameter: > > http://kamailio.org/docs/modules/stable/modules/tm.html#local_cancel_r <http://kamailio.org/docs/modules/stable/modules/tm.html#local_cancel_r> > eason > > Cheers, > > Henning > > -- > Henning Westerholt – https://skalatan.de/blog/ <https://skalatan.de/blog/> Kamailio services – > https://gilawa.com <https://gilawa.com><https://gilawa.com/ <https://gilawa.com/>> > > From: sr-users <sr-users-bounces@lists.kamailio.org <mailto:sr-users-bounces@lists.kamailio.org>> On Behalf Of > Alfonso Pinto > Sent: Wednesday, January 29, 2020 8:04 PM > To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org>> > Subject: [SR-Users] Add Reason Header to kamailio generated CANCEL > > Hi everyone, > > I've got a specific case: when the inv_fr times out, I need to add a Reason header to the CANCEL generated by kamailio. I've tried to see if I could do it in the onsend_route, but that one is not triggered for the generated CANCEL. I also checked event_route[tm:local-request], but that one isn't triggered either for the generated CANCEL. > > Is there any way to do it? Or maybe to have any pointer about where to look in the code so I may try to trigger event_route[tm:local-request] for these generated CANCELs? > > Regards, > Alfonso > _______________________________________________ > Kamailio (SER) - Users Mailing List > sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users> -- Alex Balashov | Principal | Evariste Systems LLC Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) Web: http://www.evaristesys.com/ <http://www.evaristesys.com/>, http://www.csrpswitch.com/ <http://www.csrpswitch.com/> _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users> _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users> -- BR, Denys Pozniak _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users>
-- Daniel-Constantin Mierla -- www.asipto.com <http://www.asipto.com> www.twitter.com/miconda <http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda <http://www.linkedin.com/in/miconda> Funding: https://www.paypal.me/dcmierla <https://www.paypal.me/dcmierla> -- BR, Denys Pozniak _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users>
-- Regards,
David Villasmil email: david.villasmil.work@gmail.com mailto:david.villasmil.work@gmail.com phone: +34669448337
Hello!
Call flow: FreeSWITCH --> SBC --> Edge Proxy
In my case, the problem is related to the fact that the SBC deletes the Reason header from FreeSWITCH and I am trying to recover it on the Kamailio side (Edge Proxy). It is especially important to recover the message: "Call completed elsewhere" because this disables the missed call notification on the destination phone in case of hunt-groups. The option to forward the call through the stateless loop works well but it complicates the logic unnecessarily.
So would be great to have a tm function to setup custom Reason, like below: *...*
*t_cancel_reason("Reason: SIP ;cause=200 ;text="Call completed elsewhere"\r\n");t_relay();* *....*
ср, 18 нояб. 2020 г. в 11:16, Daniel-Constantin Mierla miconda@gmail.com:
Same question here like in my other reply:
https://lists.kamailio.org/pipermail/sr-users/2020-November/111123.html
How do you expect to fill the value of the header?
Cheers, Daniel On 17.11.20 19:20, David Villasmil wrote:
And on internally generated CANCELs
On Tue, 17 Nov 2020 at 14:20, Denys Pozniak denys.pozniak@gmail.com wrote:
Hello!
We need to append our own Reason header for the "relayed" CANCEL message, if it is not on the input. Like below:
*if ( is_method("CANCEL") && !is_present_hf("Reason") ) { *
- append_hf("Reason: ....);*
- t_relay();*
*...*
вт, 17 нояб. 2020 г. в 13:00, Daniel-Constantin Mierla <miconda@gmail.com
:
Hello,
what is exactly the problem? The header is not added if you enable:
http://kamailio.org/docs/modules/stable/modules/tm.html#local_cancel_reason
Cheers, Daniel On 16.11.20 20:43, Denys Pozniak wrote:
Hello guys,
We have faced almost the same problem adding *Reason: SIP;cause=200;text="Call completed elsewhere"* to the t_relayed CANCEL request. Is there an elegant solution to add this header?
PS. Switching to the stateless mode does not look pretty for us...
сб, 1 февр. 2020 г. в 06:04, Alfonso Pinto alfonso.pinto@gmail.com:
Hi guys,
Thanks for your answers. I did try local_cancel_reason and it’s not doing anything for the CANCELs generated by kamailio. Isn’t that parameter intended for the CANCELs received and then relayed?
As Alex and David mentioned, what I need is to add my own reason header. There are some cases that requires to set the Reason header to something specific. IE: terminal supported call waiting in IMS.
Thanks for the piece of code, I will check what can be done here.
Regards, Alfonso
El El vie, 31 ene 2020 a las 22:10, Henning Westerholt hw@skalatan.de escribió:
Hi Alex,
ok, I was reading that he wants to get just one reason header, not one dynamic generated.
Just looked briefly, this seems to be the code:
t_msgbuilder.c /* Build a local request based on a previous request; main
- customers of this function are local ACK and local CANCEL
*/ char *build_local(struct cell *Trans,unsigned int branch, unsigned int *len, char *method, int method_len, str *to , struct cancel_reason* reason )
Cheers,
Henning
-- Henning Westerholt – https://skalatan.de/blog/ Kamailio services – https://gilawa.com
-----Original Message----- From: sr-users sr-users-bounces@lists.kamailio.org On Behalf Of Alex Balashov Sent: Friday, January 31, 2020 9:45 PM To: sr-users@lists.kamailio.org Subject: Re: [SR-Users] Add Reason Header to kamailio generated CANCEL
I understood Alfonso's question to implicitly be: how can I add a dynamic and variable Reason header to outgoing CANCELs?
Perhaps I was mistaken. But if I'm not, as far as I know there is no means of doing that. Right?
On Fri, Jan 31, 2020 at 08:37:48PM +0000, Henning Westerholt wrote:
Hello,
have you tried to use this parameter:
http://kamailio.org/docs/modules/stable/modules/tm.html#local_cancel_r
eason
Cheers,
Henning
-- Henning Westerholt – https://skalatan.de/blog/ Kamailio services – https://gilawa.comhttps://gilawa.com/
From: sr-users sr-users-bounces@lists.kamailio.org On Behalf Of Alfonso Pinto Sent: Wednesday, January 29, 2020 8:04 PM To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org
Subject: [SR-Users] Add Reason Header to kamailio generated CANCEL
Hi everyone,
I've got a specific case: when the inv_fr times out, I need to add a
Reason header to the CANCEL generated by kamailio. I've tried to see if I could do it in the onsend_route, but that one is not triggered for the generated CANCEL. I also checked event_route[tm:local-request], but that one isn't triggered either for the generated CANCEL.
Is there any way to do it? Or maybe to have any pointer about where
to look in the code so I may try to trigger event_route[tm:local-request] for these generated CANCELs?
Regards, Alfonso
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Alex Balashov | Principal | Evariste Systems LLC
Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
BR, Denys Pozniak
Kamailio (SER) - Users Mailing Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda Funding: https://www.paypal.me/dcmierla
--
BR, Denys Pozniak
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Regards,
David Villasmil email: david.villasmil.work@gmail.com phone: +34669448337
-- Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda Funding: https://www.paypal.me/dcmierla
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Hello,
On 18.11.20 10:39, Denys Pozniak wrote:
Hello!
Call flow: FreeSWITCH --> SBC --> Edge Proxy In my case, the problem is related to the fact that the SBC deletes the Reason header from FreeSWITCH and I am trying to recover it on the Kamailio side (Edge Proxy). It is especially important to recover the message: "Call completed elsewhere" because this disables the missed call notification on the destination phone in case of hunt-groups. The option to forward the call through the stateless loop works well but it complicates the logic unnecessarily.
So would be great to have a tm function to setup custom Reason, like below: /.../ /t_cancel_reason("Reason: SIP ;cause=200 ;text="Call completed elsewhere"\r\n"); t_relay();/ /..../
iirc, the Reason header should be propagated if it is in incoming CANCEL, so for this particular case, it should work if you do:
if(is_method("CANCEL")) {
append_hf("Reason: ...\r\n");
msg_apply_changes();
t_realy();
exit;
}
Cheers, Daniel
ср, 18 нояб. 2020 г. в 11:16, Daniel-Constantin Mierla <miconda@gmail.com mailto:miconda@gmail.com>:
Same question here like in my other reply: * https://lists.kamailio.org/pipermail/sr-users/2020-November/111123.html <https://lists.kamailio.org/pipermail/sr-users/2020-November/111123.html> How do you expect to fill the value of the header? Cheers, Daniel On 17.11.20 19:20, David Villasmil wrote:
And on internally generated CANCELs On Tue, 17 Nov 2020 at 14:20, Denys Pozniak <denys.pozniak@gmail.com <mailto:denys.pozniak@gmail.com>> wrote: Hello! We need to append our own Reason header for the "relayed" CANCEL message, if it is not on the input. Like below: /if ( is_method("CANCEL") && !is_present_hf("Reason") ) { / / append_hf("Reason: ....);/ / t_relay();/ /.../ / / вт, 17 нояб. 2020 г. в 13:00, Daniel-Constantin Mierla <miconda@gmail.com <mailto:miconda@gmail.com>>: Hello, what is exactly the problem? The header is not added if you enable: * http://kamailio.org/docs/modules/stable/modules/tm.html#local_cancel_reason <http://kamailio.org/docs/modules/stable/modules/tm.html#local_cancel_reason> Cheers, Daniel On 16.11.20 20:43, Denys Pozniak wrote:
Hello guys, We have faced almost the same problem adding *Reason: SIP;cause=200;text="Call completed elsewhere"* to the t_relayed CANCEL request. Is there an elegant solution to add this header? PS. Switching to the stateless mode does not look pretty for us... сб, 1 февр. 2020 г. в 06:04, Alfonso Pinto <alfonso.pinto@gmail.com <mailto:alfonso.pinto@gmail.com>>: Hi guys, Thanks for your answers. I did try local_cancel_reason and it’s not doing anything for the CANCELs generated by kamailio. Isn’t that parameter intended for the CANCELs received and then relayed? As Alex and David mentioned, what I need is to add my own reason header. There are some cases that requires to set the Reason header to something specific. IE: terminal supported call waiting in IMS. Thanks for the piece of code, I will check what can be done here. Regards, Alfonso El El vie, 31 ene 2020 a las 22:10, Henning Westerholt <hw@skalatan.de <mailto:hw@skalatan.de>> escribió: Hi Alex, ok, I was reading that he wants to get just one reason header, not one dynamic generated. Just looked briefly, this seems to be the code: t_msgbuilder.c /* Build a local request based on a previous request; main * customers of this function are local ACK and local CANCEL */ char *build_local(struct cell *Trans,unsigned int branch, unsigned int *len, char *method, int method_len, str *to , struct cancel_reason* reason ) Cheers, Henning -- Henning Westerholt – https://skalatan.de/blog/ <https://skalatan.de/blog/> Kamailio services – https://gilawa.com <https://gilawa.com> -----Original Message----- From: sr-users <sr-users-bounces@lists.kamailio.org <mailto:sr-users-bounces@lists.kamailio.org>> On Behalf Of Alex Balashov Sent: Friday, January 31, 2020 9:45 PM To: sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org> Subject: Re: [SR-Users] Add Reason Header to kamailio generated CANCEL I understood Alfonso's question to implicitly be: how can I add a dynamic and variable Reason header to outgoing CANCELs? Perhaps I was mistaken. But if I'm not, as far as I know there is no means of doing that. Right? On Fri, Jan 31, 2020 at 08:37:48PM +0000, Henning Westerholt wrote: > Hello, > > have you tried to use this parameter: > > http://kamailio.org/docs/modules/stable/modules/tm.html#local_cancel_r <http://kamailio.org/docs/modules/stable/modules/tm.html#local_cancel_r> > eason > > Cheers, > > Henning > > -- > Henning Westerholt – https://skalatan.de/blog/ <https://skalatan.de/blog/> Kamailio services – > https://gilawa.com <https://gilawa.com><https://gilawa.com/ <https://gilawa.com/>> > > From: sr-users <sr-users-bounces@lists.kamailio.org <mailto:sr-users-bounces@lists.kamailio.org>> On Behalf Of > Alfonso Pinto > Sent: Wednesday, January 29, 2020 8:04 PM > To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org>> > Subject: [SR-Users] Add Reason Header to kamailio generated CANCEL > > Hi everyone, > > I've got a specific case: when the inv_fr times out, I need to add a Reason header to the CANCEL generated by kamailio. I've tried to see if I could do it in the onsend_route, but that one is not triggered for the generated CANCEL. I also checked event_route[tm:local-request], but that one isn't triggered either for the generated CANCEL. > > Is there any way to do it? Or maybe to have any pointer about where to look in the code so I may try to trigger event_route[tm:local-request] for these generated CANCELs? > > Regards, > Alfonso > _______________________________________________ > Kamailio (SER) - Users Mailing List > sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users> -- Alex Balashov | Principal | Evariste Systems LLC Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) Web: http://www.evaristesys.com/ <http://www.evaristesys.com/>, http://www.csrpswitch.com/ <http://www.csrpswitch.com/> _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users> _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users> -- BR, Denys Pozniak _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users>
-- Daniel-Constantin Mierla -- www.asipto.com <http://www.asipto.com> www.twitter.com/miconda <http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda <http://www.linkedin.com/in/miconda> Funding: https://www.paypal.me/dcmierla <https://www.paypal.me/dcmierla> -- BR, Denys Pozniak _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users> -- Regards, David Villasmil email: david.villasmil.work@gmail.com <mailto:david.villasmil.work@gmail.com> phone: +34669448337
-- Daniel-Constantin Mierla -- www.asipto.com <http://www.asipto.com> www.twitter.com/miconda <http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda <http://www.linkedin.com/in/miconda> Funding: https://www.paypal.me/dcmierla <https://www.paypal.me/dcmierla> _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users>
--
BR, Denys Pozniak
Isn’t “message_apply_changes” applied automatically?
But I think Alfonso is talking specifically about CANCELs generated by Kamailio on timeouts.
On Wed, 18 Nov 2020 at 09:58, Daniel-Constantin Mierla miconda@gmail.com wrote:
Hello, On 18.11.20 10:39, Denys Pozniak wrote:
Hello!
Call flow: FreeSWITCH --> SBC --> Edge Proxy
In my case, the problem is related to the fact that the SBC deletes the Reason header from FreeSWITCH and I am trying to recover it on the Kamailio side (Edge Proxy). It is especially important to recover the message: "Call completed elsewhere" because this disables the missed call notification on the destination phone in case of hunt-groups. The option to forward the call through the stateless loop works well but it complicates the logic unnecessarily.
So would be great to have a tm function to setup custom Reason, like below: *...*
*t_cancel_reason("Reason: SIP ;cause=200 ;text="Call completed elsewhere"\r\n"); t_relay();* *....*
iirc, the Reason header should be propagated if it is in incoming CANCEL, so for this particular case, it should work if you do:
if(is_method("CANCEL")) {
append_hf("Reason: ...\r\n");
msg_apply_changes();
t_realy();
exit;
}
Cheers, Daniel
ср, 18 нояб. 2020 г. в 11:16, Daniel-Constantin Mierla <miconda@gmail.com
:
Same question here like in my other reply:
https://lists.kamailio.org/pipermail/sr-users/2020-November/111123.html
How do you expect to fill the value of the header?
Cheers, Daniel On 17.11.20 19:20, David Villasmil wrote:
And on internally generated CANCELs
On Tue, 17 Nov 2020 at 14:20, Denys Pozniak denys.pozniak@gmail.com wrote:
Hello!
We need to append our own Reason header for the "relayed" CANCEL message, if it is not on the input. Like below:
*if ( is_method("CANCEL") && !is_present_hf("Reason") ) { *
- append_hf("Reason: ....);*
- t_relay();*
*...*
вт, 17 нояб. 2020 г. в 13:00, Daniel-Constantin Mierla < miconda@gmail.com>:
Hello,
what is exactly the problem? The header is not added if you enable:
http://kamailio.org/docs/modules/stable/modules/tm.html#local_cancel_reason
Cheers, Daniel On 16.11.20 20:43, Denys Pozniak wrote:
Hello guys,
We have faced almost the same problem adding *Reason: SIP;cause=200;text="Call completed elsewhere"* to the t_relayed CANCEL request. Is there an elegant solution to add this header?
PS. Switching to the stateless mode does not look pretty for us...
сб, 1 февр. 2020 г. в 06:04, Alfonso Pinto alfonso.pinto@gmail.com:
Hi guys,
Thanks for your answers. I did try local_cancel_reason and it’s not doing anything for the CANCELs generated by kamailio. Isn’t that parameter intended for the CANCELs received and then relayed?
As Alex and David mentioned, what I need is to add my own reason header. There are some cases that requires to set the Reason header to something specific. IE: terminal supported call waiting in IMS.
Thanks for the piece of code, I will check what can be done here.
Regards, Alfonso
El El vie, 31 ene 2020 a las 22:10, Henning Westerholt hw@skalatan.de escribió:
Hi Alex,
ok, I was reading that he wants to get just one reason header, not one dynamic generated.
Just looked briefly, this seems to be the code:
t_msgbuilder.c /* Build a local request based on a previous request; main
- customers of this function are local ACK and local CANCEL
*/ char *build_local(struct cell *Trans,unsigned int branch, unsigned int *len, char *method, int method_len, str *to , struct cancel_reason* reason )
Cheers,
Henning
-- Henning Westerholt – https://skalatan.de/blog/ Kamailio services – https://gilawa.com
-----Original Message----- From: sr-users sr-users-bounces@lists.kamailio.org On Behalf Of Alex Balashov Sent: Friday, January 31, 2020 9:45 PM To: sr-users@lists.kamailio.org Subject: Re: [SR-Users] Add Reason Header to kamailio generated CANCEL
I understood Alfonso's question to implicitly be: how can I add a dynamic and variable Reason header to outgoing CANCELs?
Perhaps I was mistaken. But if I'm not, as far as I know there is no means of doing that. Right?
On Fri, Jan 31, 2020 at 08:37:48PM +0000, Henning Westerholt wrote:
> Hello, > > have you tried to use this parameter: > > http://kamailio.org/docs/modules/stable/modules/tm.html#local_cancel_r > eason > > Cheers, > > Henning > > -- > Henning Westerholt – https://skalatan.de/blog/ Kamailio services – > https://gilawa.comhttps://gilawa.com/ > > From: sr-users sr-users-bounces@lists.kamailio.org On Behalf Of > Alfonso Pinto > Sent: Wednesday, January 29, 2020 8:04 PM > To: Kamailio (SER) - Users Mailing List < sr-users@lists.kamailio.org> > Subject: [SR-Users] Add Reason Header to kamailio generated CANCEL > > Hi everyone, > > I've got a specific case: when the inv_fr times out, I need to add a Reason header to the CANCEL generated by kamailio. I've tried to see if I could do it in the onsend_route, but that one is not triggered for the generated CANCEL. I also checked event_route[tm:local-request], but that one isn't triggered either for the generated CANCEL. > > Is there any way to do it? Or maybe to have any pointer about where to look in the code so I may try to trigger event_route[tm:local-request] for these generated CANCELs? > > Regards, > Alfonso
> _______________________________________________ > Kamailio (SER) - Users Mailing List > sr-users@lists.kamailio.org > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Alex Balashov | Principal | Evariste Systems LLC
Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
BR, Denys Pozniak
Kamailio (SER) - Users Mailing Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda Funding: https://www.paypal.me/dcmierla
--
BR, Denys Pozniak
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Regards,
David Villasmil email: david.villasmil.work@gmail.com phone: +34669448337
-- Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda Funding: https://www.paypal.me/dcmierla
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
BR, Denys Pozniak
-- Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda Funding: https://www.paypal.me/dcmierla
--
Regards,
David Villasmil email: david.villasmil.work@gmail.com phone: +34669448337
Hello! Thanks! *msg_apply_changes()* works for me!
PS. Maybe it is worth adding this to the documentation, as it is not entirely trivial?
ср, 18 нояб. 2020 г. в 12:46, David Villasmil < david.villasmil.work@gmail.com>:
Isn’t “message_apply_changes” applied automatically?
But I think Alfonso is talking specifically about CANCELs generated by Kamailio on timeouts.
On Wed, 18 Nov 2020 at 09:58, Daniel-Constantin Mierla miconda@gmail.com wrote:
Hello, On 18.11.20 10:39, Denys Pozniak wrote:
Hello!
Call flow: FreeSWITCH --> SBC --> Edge Proxy
In my case, the problem is related to the fact that the SBC deletes the Reason header from FreeSWITCH and I am trying to recover it on the Kamailio side (Edge Proxy). It is especially important to recover the message: "Call completed elsewhere" because this disables the missed call notification on the destination phone in case of hunt-groups. The option to forward the call through the stateless loop works well but it complicates the logic unnecessarily.
So would be great to have a tm function to setup custom Reason, like below: *...*
*t_cancel_reason("Reason: SIP ;cause=200 ;text="Call completed elsewhere"\r\n"); t_relay();* *....*
iirc, the Reason header should be propagated if it is in incoming CANCEL, so for this particular case, it should work if you do:
if(is_method("CANCEL")) {
append_hf("Reason: ...\r\n");
msg_apply_changes();
t_realy();
exit;
}
Cheers, Daniel
ср, 18 нояб. 2020 г. в 11:16, Daniel-Constantin Mierla <miconda@gmail.com
:
Same question here like in my other reply:
https://lists.kamailio.org/pipermail/sr-users/2020-November/111123.html
How do you expect to fill the value of the header?
Cheers, Daniel On 17.11.20 19:20, David Villasmil wrote:
And on internally generated CANCELs
On Tue, 17 Nov 2020 at 14:20, Denys Pozniak denys.pozniak@gmail.com wrote:
Hello!
We need to append our own Reason header for the "relayed" CANCEL message, if it is not on the input. Like below:
*if ( is_method("CANCEL") && !is_present_hf("Reason") ) { *
- append_hf("Reason: ....);*
- t_relay();*
*...*
вт, 17 нояб. 2020 г. в 13:00, Daniel-Constantin Mierla < miconda@gmail.com>:
Hello,
what is exactly the problem? The header is not added if you enable:
http://kamailio.org/docs/modules/stable/modules/tm.html#local_cancel_reason
Cheers, Daniel On 16.11.20 20:43, Denys Pozniak wrote:
Hello guys,
We have faced almost the same problem adding *Reason: SIP;cause=200;text="Call completed elsewhere"* to the t_relayed CANCEL request. Is there an elegant solution to add this header?
PS. Switching to the stateless mode does not look pretty for us...
сб, 1 февр. 2020 г. в 06:04, Alfonso Pinto alfonso.pinto@gmail.com:
Hi guys,
Thanks for your answers. I did try local_cancel_reason and it’s not doing anything for the CANCELs generated by kamailio. Isn’t that parameter intended for the CANCELs received and then relayed?
As Alex and David mentioned, what I need is to add my own reason header. There are some cases that requires to set the Reason header to something specific. IE: terminal supported call waiting in IMS.
Thanks for the piece of code, I will check what can be done here.
Regards, Alfonso
El El vie, 31 ene 2020 a las 22:10, Henning Westerholt < hw@skalatan.de> escribió:
> Hi Alex, > > ok, I was reading that he wants to get just one reason header, not > one dynamic generated. > > Just looked briefly, this seems to be the code: > > t_msgbuilder.c > /* Build a local request based on a previous request; main > * customers of this function are local ACK and local CANCEL > */ > char *build_local(struct cell *Trans,unsigned int branch, > unsigned int *len, char *method, int method_len, str *to > , struct cancel_reason* reason > ) > > Cheers, > > Henning > > -- > Henning Westerholt – https://skalatan.de/blog/ > Kamailio services – https://gilawa.com > > -----Original Message----- > From: sr-users sr-users-bounces@lists.kamailio.org On Behalf Of > Alex Balashov > Sent: Friday, January 31, 2020 9:45 PM > To: sr-users@lists.kamailio.org > Subject: Re: [SR-Users] Add Reason Header to kamailio generated > CANCEL > > I understood Alfonso's question to implicitly be: how can I add a > dynamic and variable Reason header to outgoing CANCELs? > > Perhaps I was mistaken. But if I'm not, as far as I know there is no > means of doing that. Right? > > On Fri, Jan 31, 2020 at 08:37:48PM +0000, Henning Westerholt wrote: > > > Hello, > > > > have you tried to use this parameter: > > > > > http://kamailio.org/docs/modules/stable/modules/tm.html#local_cancel_r > > eason > > > > Cheers, > > > > Henning > > > > -- > > Henning Westerholt – https://skalatan.de/blog/ Kamailio services > – > > https://gilawa.comhttps://gilawa.com/ > > > > From: sr-users sr-users-bounces@lists.kamailio.org On Behalf Of > > Alfonso Pinto > > Sent: Wednesday, January 29, 2020 8:04 PM > > To: Kamailio (SER) - Users Mailing List < > sr-users@lists.kamailio.org> > > Subject: [SR-Users] Add Reason Header to kamailio generated CANCEL > > > > Hi everyone, > > > > I've got a specific case: when the inv_fr times out, I need to add > a Reason header to the CANCEL generated by kamailio. I've tried to see if I > could do it in the onsend_route, but that one is not triggered for the > generated CANCEL. I also checked event_route[tm:local-request], but that > one isn't triggered either for the generated CANCEL. > > > > Is there any way to do it? Or maybe to have any pointer about > where to look in the code so I may try to trigger > event_route[tm:local-request] for these generated CANCELs? > > > > Regards, > > Alfonso > > > _______________________________________________ > > Kamailio (SER) - Users Mailing List > > sr-users@lists.kamailio.org > > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > > > -- > Alex Balashov | Principal | Evariste Systems LLC > > Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) > Web: http://www.evaristesys.com/, http://www.csrpswitch.com/ > > _______________________________________________ > Kamailio (SER) - Users Mailing List > sr-users@lists.kamailio.org > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
BR, Denys Pozniak
Kamailio (SER) - Users Mailing Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda Funding: https://www.paypal.me/dcmierla
--
BR, Denys Pozniak
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Regards,
David Villasmil email: david.villasmil.work@gmail.com phone: +34669448337
-- Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda Funding: https://www.paypal.me/dcmierla
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
BR, Denys Pozniak
-- Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda Funding: https://www.paypal.me/dcmierla
--
Regards,
David Villasmil email: david.villasmil.work@gmail.com phone: +34669448337
Hello,
how do you expect to fill the value of the header?
Typically it is build based on the response of the INVITE, probably the reason it was implemented inside the tm module. I need some example of possible cases you want to be covered to see what's possible now or what can be added to enable them.
Cheers, Daniel
On 17.11.20 15:17, Denys Pozniak wrote:
Hello!
We need to append our own Reason header for the "relayed" CANCEL message, if it is not on the input. Like below:
/if ( is_method("CANCEL") && !is_present_hf("Reason") ) { / / append_hf("Reason: ....);/ / t_relay();/ /.../ / /
вт, 17 нояб. 2020 г. в 13:00, Daniel-Constantin Mierla <miconda@gmail.com mailto:miconda@gmail.com>:
Hello, what is exactly the problem? The header is not added if you enable: * http://kamailio.org/docs/modules/stable/modules/tm.html#local_cancel_reason <http://kamailio.org/docs/modules/stable/modules/tm.html#local_cancel_reason> Cheers, Daniel On 16.11.20 20:43, Denys Pozniak wrote:
Hello guys, We have faced almost the same problem adding *Reason: SIP;cause=200;text="Call completed elsewhere"* to the t_relayed CANCEL request. Is there an elegant solution to add this header? PS. Switching to the stateless mode does not look pretty for us... сб, 1 февр. 2020 г. в 06:04, Alfonso Pinto <alfonso.pinto@gmail.com <mailto:alfonso.pinto@gmail.com>>: Hi guys, Thanks for your answers. I did try local_cancel_reason and it’s not doing anything for the CANCELs generated by kamailio. Isn’t that parameter intended for the CANCELs received and then relayed? As Alex and David mentioned, what I need is to add my own reason header. There are some cases that requires to set the Reason header to something specific. IE: terminal supported call waiting in IMS. Thanks for the piece of code, I will check what can be done here. Regards, Alfonso El El vie, 31 ene 2020 a las 22:10, Henning Westerholt <hw@skalatan.de <mailto:hw@skalatan.de>> escribió: Hi Alex, ok, I was reading that he wants to get just one reason header, not one dynamic generated. Just looked briefly, this seems to be the code: t_msgbuilder.c /* Build a local request based on a previous request; main * customers of this function are local ACK and local CANCEL */ char *build_local(struct cell *Trans,unsigned int branch, unsigned int *len, char *method, int method_len, str *to , struct cancel_reason* reason ) Cheers, Henning -- Henning Westerholt – https://skalatan.de/blog/ <https://skalatan.de/blog/> Kamailio services – https://gilawa.com <https://gilawa.com> -----Original Message----- From: sr-users <sr-users-bounces@lists.kamailio.org <mailto:sr-users-bounces@lists.kamailio.org>> On Behalf Of Alex Balashov Sent: Friday, January 31, 2020 9:45 PM To: sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org> Subject: Re: [SR-Users] Add Reason Header to kamailio generated CANCEL I understood Alfonso's question to implicitly be: how can I add a dynamic and variable Reason header to outgoing CANCELs? Perhaps I was mistaken. But if I'm not, as far as I know there is no means of doing that. Right? On Fri, Jan 31, 2020 at 08:37:48PM +0000, Henning Westerholt wrote: > Hello, > > have you tried to use this parameter: > > http://kamailio.org/docs/modules/stable/modules/tm.html#local_cancel_r <http://kamailio.org/docs/modules/stable/modules/tm.html#local_cancel_r> > eason > > Cheers, > > Henning > > -- > Henning Westerholt – https://skalatan.de/blog/ <https://skalatan.de/blog/> Kamailio services – > https://gilawa.com <https://gilawa.com><https://gilawa.com/ <https://gilawa.com/>> > > From: sr-users <sr-users-bounces@lists.kamailio.org <mailto:sr-users-bounces@lists.kamailio.org>> On Behalf Of > Alfonso Pinto > Sent: Wednesday, January 29, 2020 8:04 PM > To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org>> > Subject: [SR-Users] Add Reason Header to kamailio generated CANCEL > > Hi everyone, > > I've got a specific case: when the inv_fr times out, I need to add a Reason header to the CANCEL generated by kamailio. I've tried to see if I could do it in the onsend_route, but that one is not triggered for the generated CANCEL. I also checked event_route[tm:local-request], but that one isn't triggered either for the generated CANCEL. > > Is there any way to do it? Or maybe to have any pointer about where to look in the code so I may try to trigger event_route[tm:local-request] for these generated CANCELs? > > Regards, > Alfonso > _______________________________________________ > Kamailio (SER) - Users Mailing List > sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users> -- Alex Balashov | Principal | Evariste Systems LLC Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) Web: http://www.evaristesys.com/ <http://www.evaristesys.com/>, http://www.csrpswitch.com/ <http://www.csrpswitch.com/> _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users> _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users> -- BR, Denys Pozniak _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users>
-- Daniel-Constantin Mierla -- www.asipto.com <http://www.asipto.com> www.twitter.com/miconda <http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda <http://www.linkedin.com/in/miconda> Funding: https://www.paypal.me/dcmierla <https://www.paypal.me/dcmierla>
--
BR, Denys Pozniak