Hi Daniel,RPC flush is not setting the flag, but im not sure that is where the issue is, as I stated, we are not setting any memory-only flags with save()But here is the flush function (FL_MEM not set)static void ul_rpc_flush(rpc_t* rpc, void* ctx){synchronize_all_udomains(0, 1);return;}Any ideas?
Thanks,/VOn Fri, Jan 13, 2017 at 9:24 AM, Vik Killa <vipkilla@gmail.com> wrote:Hi,We have tried using these flags:save("location")save("location", "0x00")save("location", "0x04")And still memory does not get flushed to DB.I will test the RPC command.Thanks,/VOn Fri, Jan 13, 2017 at 9:12 AM, Daniel-Constantin Mierla <miconda@gmail.com> wrote:Hello,
that flag is used to mark a contact for storage only in memory. The save() function has a parameter with flags where this kind of storage can be set. Can you check the RPC command is setting this flag?
Cheers,
Daniel
On 13/01/2017 15:06, Vik Killa wrote:
following up herei found if we comment out a single line of code, kamcmd ul.flush works
here is the git diff
diff --git a/src/modules/usrloc/ucontact.c b/src/modules/usrloc/ucontact. c index 47f3c2f..633ca81 100644--- a/src/modules/usrloc/ucontact.c +++ b/src/modules/usrloc/ucontact.c @@ -474,7 +474,7 @@ int db_insert_ucontact(ucontact_t* _c)int nr_cols;if (_c->flags & FL_MEM) {- return 0;+ //return 0;}if(unlikely(_c->ruid.len<=0)) {LM_ERR("invalid ruid for aor: %.*s\n",
I don't quite understand the logic in that code.Does anyone have an idea of why ` if (_c->flags & FL_MEM) {` returns?
Thanks,/V
On Thu, Jan 12, 2017 at 4:34 PM, Vik Killa <vipkilla@gmail.com> wrote:
Hello,we've noticed that the usrloc module does not "sync" all the records from memory into the database.I use a bash script to generate in-memory AoRs (http://paste.debian.net/plain/908521 )then i performkamcmd ul.flushand no records are inserted.We have tried various usrloc parameters but none seem to workHere is our basic setup
# ----- usrloc params -----modparam("usrloc", "db_url", DBURL)modparam("usrloc", "db_mode", 2)modparam("usrloc", "use_domain", 1)modparam("usrloc", "timer_interval", 120)modparam("usrloc", "timer_procs", 4)
We are using postgresql.are we missing something?
Thanks/V
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cg i-bin/mailman/listinfo/sr-user s
-- Daniel-Constantin Mierla www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-user s