<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div class="gmail_default"><div class="gmail_default" style="color:rgb(7,55,99)">Hello,</div><div class="gmail_default" style="color:rgb(7,55,99)"><br></div><div class="gmail_default" style="color:rgb(7,55,99)">We are working on a project that's using two active-active <span class="gmail-m_6411249386169963595gmail-il">Kamailio</span> 5.2 instances that redirect traffic to several Asterisk 15.4 instances. Kamailio is acting as a registrar and should store the location information of the registered terminals. The backend database is db_redis.</div><div class="gmail_default" style="color:rgb(7,55,99)"><br></div><div class="gmail_default" style="color:rgb(7,55,99)">Phone terminals get registered and the information gets looked up from the subscriber schema in redis (That's cool) but we are having problems with the locations. This is the related code:</div><div class="gmail_default" style="color:rgb(7,55,99)"><br></div><div class="gmail_default"><font color="#073763">modparam("db_redis", "keys", "location=entry:ruid&usrdom:username,domain&timer:partition,keepalive")</font><br></div><div class="gmail_default" style="color:rgb(7,55,99)"><br></div><div class="gmail_default"><div class="gmail_default"><div class="gmail_default" style="color:rgb(7,55,99)">if(ds_is_from_list("1", "2", "sip:$fd:5080")) {</div><div class="gmail_default" style="color:rgb(7,55,99)">    record_route();</div><div class="gmail_default" style="color:rgb(7,55,99)">    route(INVITE_ASTERISK);</div><div class="gmail_default" style="color:rgb(7,55,99)">    exit;</div><div class="gmail_default" style="color:rgb(7,55,99)">}</div><div class="gmail_default" style="color:rgb(7,55,99)"><br></div><div class="gmail_default"><div class="gmail_default" style="color:rgb(7,55,99)">route[INVITE_ASTERISK] {</div><div class="gmail_default" style="color:rgb(7,55,99)">    xlog("L_INFO", "[R-INVITE-RESOLVER:$ci] Entering ASTERISK INVITE resolver\n");</div><div class="gmail_default" style="color:rgb(7,55,99)">    if (!lookup("location")) {</div><div class="gmail_default" style="color:rgb(7,55,99)"><span style="white-space:pre">               </span>sl_send_reply("404", "User Not Found");</div><div class="gmail_default" style="color:rgb(7,55,99)"><span style="white-space:pre">              </span>return;</div><div class="gmail_default" style="color:rgb(7,55,99)"><span style="white-space:pre">  </span>}</div><div class="gmail_default" style="color:rgb(7,55,99)">    route(INVITE_POSTROUTE);</div><div class="gmail_default" style="color:rgb(7,55,99)">}</div><div style="color:rgb(7,55,99)"><br></div><div><div><font color="#073763">route[INVITE_POSTROUTE] {</font></div><div><font color="#073763">   rtpproxy_manage();</font></div><div><font color="#073763">   t_on_reply("MAIN_REPLY");</font></div><div><font color="#073763"><br></font></div><div><font color="#073763">    if(!t_relay()) </font></div><div><font color="#073763"><span style="white-space:pre">             </span>sl_reply_error();</font></div><div><font color="#073763">}</font></div></div><div style="color:rgb(7,55,99)"><br></div><div style="color:rgb(7,55,99)">When looking up the location schema this errors appear:</div><div style="color:rgb(7,55,99)"><br></div><div style="color:rgb(7,55,99)"><div>9(39) WARNING: db_redis [redis_dbase.c:1098]: db_redis_perform_query(): performing full table scan on table 'location' while performing query</div><div> 9(39) WARNING: db_redis [redis_dbase.c:1101]: db_redis_perform_query():   scan key 0 is 'expires'</div><div> 9(39) WARNING: db_redis [redis_dbase.c:1101]: db_redis_perform_query():   scan key 1 is 'expires'</div><div> 9(39) ERROR: <core> [db_ut.c:92]: db_str2int(): Unexpected characters: [-03-29 18:16:36]</div><div> 9(39) ERROR: <core> [db_val.c:76]: db_str2val(): error while converting integer value from string</div><div> 9(39) ERROR: db_redis [redis_dbase.c:1062]: db_redis_convert_row(): Failed to convert redis column 'expires' to db value</div><div> 9(39) ERROR: db_redis [redis_dbase.c:1231]: db_redis_perform_query(): Failed to convert redis reply for row</div><div> 9(39) ERROR: db_redis [redis_dbase.c:1243]: db_redis_perform_query(): failed to perform the query</div><div> 9(39) ERROR: db_redis [redis_dbase.c:1829]: db_redis_query(): failed to do the query</div><div> 9(39) ERROR: usrloc [udomain.c:981]: udomain_contact_expired_cb(): db_query failed</div></div></div></div></div><div class="gmail_default" style="color:rgb(7,55,99)"><br></div><div class="gmail_default" style="color:rgb(7,55,99)">Any hints?</div><div class="gmail_default" style="color:rgb(7,55,99)"><br></div><div class="gmail_default" style="color:rgb(7,55,99)">Thanks and regards,</div></div></div></div></div></div></div></div></div>