Hello,
the CSeq diff variable is for increasing/decrising the CSeq when authentication to next hop is done by Kamailio with uac module/uac_auth().
Only the current CSeq is not enough, because the value has to be set back in reply (I don't remember exactly right now, this might be done with some Via trick) but also readjusted for requests within dialog.
So it would be required to keep incoming cseq and outgoing cseq for each direection, but this would be bit tricky to deal with on network races of subsequent requests sent quickly one after the other and the second arrive first.
If you need to track differences on both directions, not only towards callee, in my opinion the best is still to have the current incoming cseq and the difference to outgoing to be able to adjust without worrying much about network transmission re-ordering. But I am open to consider other options if people think of better ideas.
Then, if it becomes more like a common functionality for the dialog module, the cseq diffs for caller and callee can be made fields in dialog table, not kept as variables.
Cheers, Daniel
On 20.02.23 12:26, Carsten Bock wrote:
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 https://github.com/kamailio/kamailio/compare/master...carstenbock/dialog_cse...
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 http://www.ng-voice.com/
Registry Office at Local Court Hamburg, HRB 120189 Managing Directors: Dr. David Bachmann, Carsten Bock
Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-leave@lists.kamailio.org