Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

db_redis hmset of dialog has an empty value #2017

Closed
WhiteyDude opened this issue Jul 28, 2019 · 1 comment
Closed

db_redis hmset of dialog has an empty value #2017

WhiteyDude opened this issue Jul 28, 2019 · 1 comment

Comments

@WhiteyDude
Copy link
Contributor

WhiteyDude commented Jul 28, 2019

Description

When using db_redis for dialog realtime storage, I've found every dialog entry is writing to a single hash with a null value:

1564282556.519166 [7 127.0.0.1:33838] "HMSET" "" "hash_entry" "2461" "hash_id" "4292" "callid" "39d9ba94b0e311e9b879c08c6015a900@10.0.0.2" "from_uri" "sip:61400123123@10.0.0.2:5060;user=phone" "from_tag" "1991956793-3910263728-2361424312-11081056" "to_uri" "sip:61399991234@5.5.5.5;user=phone" "to_tag" "vvFKcF789FU6S" "caller_sock" "udp:10.0.0.2:5060" "callee_sock" "udp:10.0.0.2:5060" "start_time" "1564282556" "state" "3" "timeout" "1486721673" "caller_cseq" "1" "callee_cseq" "0" "caller_contact" "sip:61400123123@10.0.0.2:5060;user=phone" "callee_contact" "sip:10.0.0.3:5060" "caller_route_set" "" "callee_route_set" "" "sflags" "0" "toroute_name" "" "req_uri" "sip:61399991234@kamailio.local" "xdata" "" "iflags" "0"

1564282561.716416 [7 127.0.0.1:33836] "HMSET" "" "hash_entry" "3657" "hash_id" "8250" "callid" "100c26fd-2b86-1238-048a-0cc47a18705a" "from_uri" "sip:61400123123@10.0.0.3:5060" "from_tag" "ye24F58F417BH" "to_uri" "sip:61400123123@kamalio.local" "to_tag" "as2bd0b9fb" "caller_sock" "udp:10.0.0.2:5060" "callee_sock" "udp:10.0.0.2:5060" "start_time" "1564282561" "state" "3" "timeout" "1486721672" "caller_cseq" "7587486" "callee_cseq" "0" "caller_contact" "sip:10.0.0.3:5060" "callee_contact" "sip:5.5.5.5;did=94e.d9ab66d6" "caller_route_set" "" "callee_route_set" "" "sflags" "0" "toroute_name" "" "req_uri" "sip:61400123123@5.5.5.5" "xdata" "" "iflags" "16"

Note that these are two seperate dialogs, however each runs HMSET "", meaning the hash known as "" has the value written.

EDIT:

Just saw these in the logs post BYE:

Jul 28 12:56:12 ip-10-0-0-2 /usr/local/sbin/kamailio[19942]: WARNING: <core> [core/mem/q_malloc.c:480]: qm_free(): WARNING: free(0) called from db_redis: redis_dbase.c: db_redis_build_query_keys(550)
Jul 28 12:56:12 ip-10-0-0-2 /usr/local/sbin/kamailio[19942]: ERROR: db_redis [redis_dbase.c:1352]: db_redis_perform_delete(): Failed to fetch type entry: ERR wrong number of arguments for 'hmget' command
Jul 28 12:56:12 ip-10-0-0-2 /usr/local/sbin/kamailio[19942]: ERROR: db_redis [redis_dbase.c:1460]: db_redis_perform_delete(): failed to perform the delete
Jul 28 12:56:12 ip-10-0-0-2 /usr/local/sbin/kamailio[19942]: ERROR: db_redis [redis_dbase.c:2076]: db_redis_delete(): failed to do the query
Jul 28 12:56:12 ip-10-0-0-2 /usr/local/sbin/kamailio[19942]: ERROR: dialog [dlg_db_handler.c:720]: remove_dialog_from_db(): failed to delete database information
Jul 28 12:56:14 ip-10-0-0-2 /usr/local/sbin/kamailio[19942]: WARNING: <core> [core/mem/q_malloc.c:480]: qm_free(): WARNING: free(0) called from db_redis: redis_dbase.c: db_redis_build_query_keys(550)
Jul 28 12:56:14 ip-10-0-0-2 /usr/local/sbin/kamailio[19942]: ERROR: db_redis [redis_dbase.c:1352]: db_redis_perform_delete(): Failed to fetch type entry: ERR wrong number of arguments for 'hmget' command
Jul 28 12:56:14 ip-10-0-0-2 /usr/local/sbin/kamailio[19942]: ERROR: db_redis [redis_dbase.c:1460]: db_redis_perform_delete(): failed to perform the delete
Jul 28 12:56:14 ip-10-0-0-2 /usr/local/sbin/kamailio[19942]: ERROR: db_redis [redis_dbase.c:2076]: db_redis_delete(): failed to do the query
Jul 28 12:56:14 ip-10-0-0-2 /usr/local/sbin/kamailio[19942]: ERROR: dialog [dlg_db_handler.c:720]: remove_dialog_from_db(): failed to delete database information

Reproduction

modparam("dialog", "dlg_flag", 4)
modparam("dialog", "track_cseq_updates", 1)
modparam("dialog", "event_callback", "ksr_dialog_event")
modparam("dialog", "db_mode", 1) # Real time dump to DB
modparam("dialog", "db_url", "redis://127.0.0.1:6379/7")

Additional Information

5.3.0-dev4

@miconda
Copy link
Member

miconda commented Jul 29, 2019

You need to set the key corresponding for dialog table, see:

If the issue is still there, reopen.

@miconda miconda closed this as completed Jul 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants