I incremented sess-version w/ value 2147483648 via $sdp(sess_version) = -1 as well as $sdp(sess_version) = 2147483648.
sess-version in SDP should be 2147483649 but is -1941279658.

Troubleshooting

RFC4566 5.2. Origin ("o=")

   <sess-version> is a version number for this session description.  Its
      usage is up to the creating tool, so long as <sess-version> is
      increased when a modification is made to the session data.  Again,
      it is RECOMMENDED that an NTP format timestamp is used.

Wikipedia NTP Timestamps

The 64-bit binary fixed-point timestamps used by NTP consist of a 32-bit part for seconds and a 32-bit part for fractional second, giving a time scale that rolls over every 232 seconds (136 years) and a theoretical resolution of 2−32 seconds (233 picoseconds). NTP uses an epoch of January 1, 1900. Therefore, the first rollover occurs on February 7, 2036.[28][29]

Reproduction

Receive SDP w/ sess-version greater equal 2^31 (2147483648) and increase version via $sdp(sess-version) = -1 or setting a value greater than 2^31.

Log Messages

May 02 06:43:20.578496 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317@127.0.0.1} <core> [core/parser/sdp/sdp_helpr_funcs.c:622]: extract_sess_version(): oline(46): >o=user1 53655765 2147483648 IN IP4 127.0.0.1
                                                            <
May 02 06:43:20.578501 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317@127.0.0.1} <core> [core/parser/sdp/sdp_helpr_funcs.c:651]: extract_sess_version(): end 10: >2147483648<
May 02 06:43:20.578508 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317@127.0.0.1} <core> [core/parser/sdp/sdp_helpr_funcs.c:506]: extract_mediaip(): located IP address [127.0.0.1] in `o=' field
May 02 06:43:20.578512 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317@127.0.0.1} <core> [core/parser/sdp/sdp_helpr_funcs.c:506]: extract_mediaip(): located IP address [127.0.0.1] in `c=' field
May 02 06:43:20.578532 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317@127.0.0.1} sdpops [sdpops_mod.c:1918]: sdp_get_sess_version(): sdp_session_num 0 sess-version: 2147483648
May 02 06:43:20.578536 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317@127.0.0.1} sdpops [sdpops_mod.c:1923]: sdp_get_sess_version(): sdp_session_num 1
May 02 06:43:20.578576 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317@127.0.0.1} sdpops [sdpops_mod.c:1918]: sdp_get_sess_version(): sdp_session_num 0 sess-version: 2147483648
May 02 06:43:20.578581 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317@127.0.0.1} sdpops [sdpops_mod.c:1923]: sdp_get_sess_version(): sdp_session_num 1
May 02 06:43:20.578695 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317@127.0.0.1} sdpops [sdpops_mod.c:2111]: pv_set_sdp(): res->flags: 24
May 02 06:43:20.578702 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317@127.0.0.1} sdpops [sdpops_mod.c:2112]: pv_set_sdp(): PV_TYPE_INT: 16
May 02 06:43:20.578705 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317@127.0.0.1} sdpops [sdpops_mod.c:2113]: pv_set_sdp(): PV_VAL_INT: 8
May 02 06:43:20.578708 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317@127.0.0.1} sdpops [sdpops_mod.c:2116]: pv_set_sdp(): param.pvn.u.isname.name.n = 1
May 02 06:43:20.578710 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317@127.0.0.1} sdpops [sdpops_mod.c:2125]: pv_set_sdp(): do $sdp(sess_version) = -1941279658
May 02 06:43:20.578713 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317@127.0.0.1} sdpops [sdpops_mod.c:1918]: sdp_get_sess_version(): sdp_session_num 0 sess-version: 2147483648
May 02 06:43:20.578716 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317@127.0.0.1} sdpops [sdpops_mod.c:1923]: sdp_get_sess_version(): sdp_session_num 1
May 02 06:43:20.578750 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317@127.0.0.1} sdpops [sdpops_mod.c:1971]: sdp_set_sess_version(): old_sess_version_num: -2147483648  autoincrement: 0
May 02 06:43:20.578756 debian11 /usr/sbin/kamailio[121163]: DEBUG: {1 2 INVITE 1-121317@127.0.0.1} sdpops [sdpops_mod.c:1972]: sdp_set_sess_version(): *new_sess_version_num: -1941279658  autoincrement: 0

Possible Solutions

Additional Information

version: kamailio 5.5.4 (x86_64/linux)
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled with gcc 10.2.1
Distributor ID: Debian
Description:    Debian GNU/Linux 11 (bullseye)
Release:        11
Codename:       bullseye
Linux debian11 5.10.0-13-amd64 #1 SMP Debian 5.10.106-1 (2022-03-17) x86_64 GNU/Linux


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <kamailio/kamailio/issues/3099@github.com>