Hi Carsten,
the CSeq tracking (cseq_diff dlg_var) related implementation is a bit older; it was added in 2014. I am not the author of this code, but some remarks from my side.
The CSeq tracking functionality works only for a certain direction and only when it’s enabled with a module parameter right now, as you also noticed. This was probably one of the reasons
of using a dialog variable for that.
I think it should be fine to store it directly internally, after this functionality was generalized to work in both directions and also support more cases. The cseq_diff variable is
not used from other modules, afaik.
Cheers,
Henning
From: Carsten Bock <carsten@ng-voice.com>
Sent: Montag, 20. Februar 2023 12:26
To: Kamailio (SER) - Devel Mailing List <sr-dev@lists.kamailio.org>
Subject: [sr-dev] Dialog-Module and CSeq tracking
Hi,
Quick question:
Looking at the Dialog module and CSeq tracking functionality, I've noticed the following:
- on the one hand, we are storing the current CSeq for each direction in the Dialog structure
- on the other hand, we are storing a "Delta" of the received vs. updated CSeq as a Dialog Variable
Does replacing the Delta with the CSeq already stored with the Dialog structure make sense?
I am asking because of my latest changes, where there may be more sources for an updated CSeq (e.g., when sending a Request from script within the Dialog) and more use cases for an updated CSeq (Up and Downstream).
I've updated the dialog module for my use already accordingly
I wanted to hear other opinions and possible pitfalls as well...
Thanks,
Carsten
--
Carsten Bock I CTO & Founder
ng-voice GmbH
Trostbrücke 1 I 20457 Hamburg I Germany
T +49 179 2021244 I www.ng-voice.com
Registry Office at Local Court Hamburg, HRB 120189
Managing Directors: Dr. David Bachmann, Carsten Bock