Hello list, Hope you all doing well!
I am using the ACC module and using the setflag() function as done in several examples. It works fine. However, I've added the t_newtran() function almost in the begging of the INVITE handler to help the retransmission detection and after that I noticed the ACC was not saving anything in DB. So after debugging I discovered that if I call the t_newtran() before setting the ACC flags, the module will not save the calls in DB, but if I call it after setting the ACC flags, it works.... So my question is, is this a bug or it is a expected side effect so when one is using t_newtran you must be careful and set all your transaction flags before? (ACC are the only transaction flags I am using so can't tell if other modules have the same problem) This is happening in Kamailio 5.2.2.
Thank you! Kind regards, Patrick Wakano
Hello,
usually it is not needed anymore to do this t_newtran early in the cfg. Check this discussion from 2015 out:
http://sip-router.1086192.n5.nabble.com/Transaction-good-practices-with-t-re...
There is also another function in tmx, t_precheck_trans which can be used to detect re-transmissions without actually creating a new one.
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 Patrick Wakano Sent: Wednesday, November 27, 2019 3:26 AM To: Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Subject: [SR-Users] Possible conflict between t_newtran and setflag for ACC
Hello list, Hope you all doing well!
I am using the ACC module and using the setflag() function as done in several examples. It works fine. However, I've added the t_newtran() function almost in the begging of the INVITE handler to help the retransmission detection and after that I noticed the ACC was not saving anything in DB. So after debugging I discovered that if I call the t_newtran() before setting the ACC flags, the module will not save the calls in DB, but if I call it after setting the ACC flags, it works.... So my question is, is this a bug or it is a expected side effect so when one is using t_newtran you must be careful and set all your transaction flags before? (ACC are the only transaction flags I am using so can't tell if other modules have the same problem) This is happening in Kamailio 5.2.2.
Thank you! Kind regards, Patrick Wakano
Thanks for your reply Henning!
I also removed it from my script. The only thing is that when using it there is this nasty side effect, so I think if the function is meaningless it can be removed. I will create a ticket for it, so it can be evaluated what is the best approach.
Thank you, Kind regards, Patrick Wakano
On Thu, 28 Nov 2019 at 06:12, Henning Westerholt hw@skalatan.de wrote:
Hello,
usually it is not needed anymore to do this t_newtran early in the cfg. Check this discussion from 2015 out:
http://sip-router.1086192.n5.nabble.com/Transaction-good-practices-with-t-re...
There is also another function in tmx, t_precheck_trans which can be used to detect re-transmissions without actually creating a new one.
Cheers,
Henning
--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com
*From:* sr-users sr-users-bounces@lists.kamailio.org *On Behalf Of *Patrick Wakano *Sent:* Wednesday, November 27, 2019 3:26 AM *To:* Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org *Subject:* [SR-Users] Possible conflict between t_newtran and setflag for ACC
Hello list,
Hope you all doing well!
I am using the ACC module and using the setflag() function as done in several examples. It works fine. However, I've added the t_newtran() function almost in the begging of the INVITE handler to help the retransmission detection and after that I noticed the ACC was not saving anything in DB.
So after debugging I discovered that if I call the t_newtran() before setting the ACC flags, the module will not save the calls in DB, but if I call it after setting the ACC flags, it works....
So my question is, is this a bug or it is a expected side effect so when one is using t_newtran you must be careful and set all your transaction flags before? (ACC are the only transaction flags I am using so can't tell if other modules have the same problem)
This is happening in Kamailio 5.2.2.
Thank you!
Kind regards,
Patrick Wakano
On 11/27/19 3:26 AM, Patrick Wakano wrote:
I am using the ACC module and using the setflag() function as done in several examples. It works fine. However, I've added the t_newtran() function almost in the begging of the INVITE handler to help the retransmission detection and after that I noticed the ACC was not saving anything in DB. So after debugging I discovered that if I call the t_newtran() before setting the ACC flags, the module will not save the calls in DB, but if I call it after setting the ACC flags, it works.... So my question is, is this a bug or it is a expected side effect so when one is using t_newtran you must be careful and set all your transaction flags before? (ACC are the only transaction flags I am using so can't tell if other modules have the same problem) This is happening in Kamailio 5.2.2.
Hi Patrick,
just wanted to point out there is a function t_flush_flags, and it did the trick for me when I observed the same as you a couple of versions/years ago: http://www.kamailio.org/docs/modules/5.1.x/modules/tmx.html#tmx.f.t_flush_fl...
Regards,
Andrew
Thanks Andrew! Daniel also pointed me out to this function. I just think it is probably needed to add a note in the t_newtran docs that flags will be lost and the t_flush_flags should be used and not the other way around as it is today, specially because one function is in the TM module and the other in the TMX....
Kind regards, Patrick Wakano
On Fri, 29 Nov 2019 at 01:08, Andrew Pogrebennyk apogrebennyk@sipwise.com wrote:
On 11/27/19 3:26 AM, Patrick Wakano wrote:
I am using the ACC module and using the setflag() function as done in several examples. It works fine. However, I've added the t_newtran() function almost in the begging of the INVITE handler to help the retransmission detection and after that I noticed the ACC was not saving anything in DB. So after debugging I discovered that if I call the t_newtran() before setting the ACC flags, the module will not save the calls in DB, but if I call it after setting the ACC flags, it works.... So my question is, is this a bug or it is a expected side effect so when one is using t_newtran you must be careful and set all your transaction flags before? (ACC are the only transaction flags I am using so can't tell if other modules have the same problem) This is happening in Kamailio 5.2.2.
Hi Patrick,
just wanted to point out there is a function t_flush_flags, and it did the trick for me when I observed the same as you a couple of versions/years ago:
http://www.kamailio.org/docs/modules/5.1.x/modules/tmx.html#tmx.f.t_flush_fl...
Regards,
Andrew
Hello,
a note has been added.
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 Patrick Wakano Sent: Thursday, November 28, 2019 11:14 PM To: Andrew Pogrebennyk apogrebennyk@sipwise.com Cc: Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Subject: Re: [SR-Users] Possible conflict between t_newtran and setflag for ACC
Thanks Andrew! Daniel also pointed me out to this function. I just think it is probably needed to add a note in the t_newtran docs that flags will be lost and the t_flush_flags should be used and not the other way around as it is today, specially because one function is in the TM module and the other in the TMX....
Kind regards, Patrick Wakano
On Fri, 29 Nov 2019 at 01:08, Andrew Pogrebennyk <apogrebennyk@sipwise.commailto:apogrebennyk@sipwise.com> wrote: On 11/27/19 3:26 AM, Patrick Wakano wrote:
I am using the ACC module and using the setflag() function as done in several examples. It works fine. However, I've added the t_newtran() function almost in the begging of the INVITE handler to help the retransmission detection and after that I noticed the ACC was not saving anything in DB. So after debugging I discovered that if I call the t_newtran() before setting the ACC flags, the module will not save the calls in DB, but if I call it after setting the ACC flags, it works.... So my question is, is this a bug or it is a expected side effect so when one is using t_newtran you must be careful and set all your transaction flags before? (ACC are the only transaction flags I am using so can't tell if other modules have the same problem) This is happening in Kamailio 5.2.2.
Hi Patrick,
just wanted to point out there is a function t_flush_flags, and it did the trick for me when I observed the same as you a couple of versions/years ago: http://www.kamailio.org/docs/modules/5.1.x/modules/tmx.html#tmx.f.t_flush_fl...
Regards,
Andrew
Much appreciated Henning! It will be really helpful!
Thank you, Patrick Wakano
On Sat, 30 Nov 2019 at 05:41, Henning Westerholt hw@skalatan.de wrote:
Hello,
a note has been added.
Cheers,
Henning
--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com
*From:* sr-users sr-users-bounces@lists.kamailio.org *On Behalf Of *Patrick Wakano *Sent:* Thursday, November 28, 2019 11:14 PM *To:* Andrew Pogrebennyk apogrebennyk@sipwise.com *Cc:* Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org *Subject:* Re: [SR-Users] Possible conflict between t_newtran and setflag for ACC
Thanks Andrew!
Daniel also pointed me out to this function.
I just think it is probably needed to add a note in the t_newtran docs that flags will be lost and the t_flush_flags should be used and not the other way around as it is today, specially because one function is in the TM module and the other in the TMX....
Kind regards,
Patrick Wakano
On Fri, 29 Nov 2019 at 01:08, Andrew Pogrebennyk apogrebennyk@sipwise.com wrote:
On 11/27/19 3:26 AM, Patrick Wakano wrote:
I am using the ACC module and using the setflag() function as done in several examples. It works fine. However, I've added the t_newtran() function almost in the begging of the INVITE handler to help the retransmission detection and after that I noticed the ACC was not saving anything in DB. So after debugging I discovered that if I call the t_newtran() before setting the ACC flags, the module will not save the calls in DB, but if I call it after setting the ACC flags, it works.... So my question is, is this a bug or it is a expected side effect so when one is using t_newtran you must be careful and set all your transaction flags before? (ACC are the only transaction flags I am using so can't tell if other modules have the same problem) This is happening in Kamailio 5.2.2.
Hi Patrick,
just wanted to point out there is a function t_flush_flags, and it did the trick for me when I observed the same as you a couple of versions/years ago:
http://www.kamailio.org/docs/modules/5.1.x/modules/tmx.html#tmx.f.t_flush_fl...
Regards,
Andrew