<div dir="auto">Hello,<div dir="auto"><br></div><div dir="auto">I have 2 kam instances using one shared database and both kam servers running the same routing logic code. Kamailio servers are configured to use the same database as dialog backend. </div><div dir="auto"><br></div><div dir="auto">I am limiting the concurrent dialogs in the following way but it seems that kamailio is using its own memory to read profile size rather than the db. Second kam is not aware of the dialog profiles that the first kam wrote to the shared db. Is there a way to get multiple kam instances to read profile size from the same database when calling the get_profile_size function?</div><div dir="auto"><br></div><div dir="auto"><div dir="auto">modparam("dialog", "profiles_with_value", "concurrent_calls")</div><div dir="auto">modparam("dialog", "dlg_flag", 4)</div><div dir="auto">modparam("dialog", "db_url", DBURL)</div><div dir="auto">modparam("dialog", "db_mode", 1)</div><div dir="auto"><br></div></div><div dir="auto"><br></div><div dir="auto"><div dir="auto">route[LIMIT_CALLS] {</div><div dir="auto"><br></div><div dir="auto">if (!dlg_isflagset("1")) { # $td – gateways, $fu - user</div><div dir="auto">        if (get_profile_size("concurrent_calls", "$fu", "$avp(calls)")) {</div><div dir="auto">                if ($avp(calls) >= 3) {</div><div dir="auto">                        xlog("L_INFO", "Concurrent calls $fu at limit");</div><div dir="auto">                        send_reply("503", "Calls limit reached"); exit;</div><div dir="auto">                } else {</div><div dir="auto">                        dlg_manage(); dlg_setflag("1");</div><div dir="auto">                        set_dlg_profile("concurrent_calls", "$fu");</div><div dir="auto">                }</div><div dir="auto">        }</div><div dir="auto">}</div><div dir="auto">}</div><div dir="auto"><br></div></div><div dir="auto">Cheers, </div><div dir="auto">Olli</div><div dir="auto"><br></div></div>