I have tested all 3 DB modes with my latest modifications, the results look correct:

=== Test mode 1 ===
modparam("dialog", "db_url", "sqlite:///etc/kamailio/sqlite.db")
modparam("dialog", "db_mode", 1)

# systemctl start kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd dlg.list|grep dflags
dlgs: 0

>> make 2 calls

# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd dlg.list|grep dflags
dlgs: 2
        dflags: 1536
        dflags: 1536

# systemctl stop kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd dlg.list|grep dflags
dlgs: 2
ERROR: connect_unix_sock: connect(/var/run/kamailio//kamailio_ctl): No such file or directory [2]

# systemctl start kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd dlg.list|grep dflags
dlgs: 2
        dflags: 0
        dflags: 0

# systemctl restart kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd dlg.list|grep dflags
dlgs: 2
        dflags: 0
        dflags: 0

# systemctl restart kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd dlg.list|grep dflags
dlgs: 2
        dflags: 0
        dflags: 0

>> terminate calls

# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd dlg.list|grep dflags
dlgs: 0

=== Mode 1 looks good.


=== Test mode 2 ===
modparam("dialog", "db_url", "sqlite:///etc/kamailio/sqlite.db")
modparam("dialog", "db_mode", 2)
modparam("dialog", "db_update_period", 5)


# systemctl start kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd dlg.list|grep dflags
dlgs: 0


>> make 2 calls

# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd dlg.list|grep dflags
dlgs: 1
        dflags: 1538
        dflags: 1667
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd dlg.list|grep dflags
dlgs: 2
        dflags: 1536
        dflags: 1536

# systemctl stop kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd dlg.list|grep dflags
dlgs: 2
ERROR: connect_unix_sock: connect(/var/run/kamailio//kamailio_ctl): No such file or directory [2]

# systemctl start kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd dlg.list|grep dflags
dlgs: 2
        dflags: 0
        dflags: 0

# systemctl restart kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd dlg.list|grep dflags
dlgs: 2
        dflags: 0
        dflags: 0


>> terminate calls

... after 5 seconds

# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd dlg.list|grep dflags
dlgs: 0

=== Mode 2 looks good



=== Test mode 3 ===
modparam("dialog", "db_url", "sqlite:///etc/kamailio/sqlite.db")
modparam("dialog", "db_mode", 3)

# systemctl start kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd dlg.list|grep dflags
dlgs: 0


>> make 2 calls


# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd dlg.list|grep dflags
dlgs: 0
        dflags: 1667
        dflags: 1667

# systemctl stop kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd dlg.list|grep dflags
dlgs: 2
ERROR: connect_unix_sock: connect(/var/run/kamailio//kamailio_ctl): No such file or directory [2]

# systemctl start kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd dlg.list|grep dflags
dlgs: 0
        dflags: 1
        dflags: 1

# systemctl restart kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd dlg.list|grep dflags
dlgs: 0
        dflags: 1
        dflags: 1

# systemctl stop kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd dlg.list|grep dflags
dlgs: 2
ERROR: connect_unix_sock: connect(/var/run/kamailio//kamailio_ctl): No such file or directory [2]

# systemctl start kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd dlg.list|grep dflags
dlgs: 0
        dflags: 1
        dflags: 1

>>terminate calls

# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd dlg.list|grep dflags
dlgs: 0

# systemctl stop kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd dlg.list|grep dflags
dlgs: 0
ERROR: connect_unix_sock: connect(/var/run/kamailio//kamailio_ctl): No such file or directory [2]

# systemctl start kamailio
# echo 'select "dlgs: "||count(*) from dialog'|sqlite3 sqlite.db ; kamcmd dlg.list|grep dflags
dlgs: 0


=== Mode 3 loos good also.


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/3669/1866618262@github.com>