<div dir="ltr">Hello. I use this version of kamailio<br><br><div> kamailio -v</div><div>version: kamailio 4.3.0-dev4 (x86_64/linux) a6510b</div><div>flags: STATS: Off, USE_TCP, USE_TLS, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, F_MALLOC, DBG_F_MALLOC, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES</div><div>ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB</div><div>poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.</div><div>id: a6510b</div><div>compiled on 05:30:34 Feb 18 2015 with gcc 4.8.2</div><div><br><br>Now i Have some problems with redis.<br><br><span style="color:rgb(0,0,0);font-family:Arial,Tahoma,Verdana,sans-serif;font-size:13px;line-height:18.2000007629395px"> I try to get some replies from redis. Time after time redis request give me null result.<br></span><br>I see this error at log when this reply received<br><br style="color:rgb(0,0,0);font-family:Arial,Tahoma,Verdana,sans-serif;font-size:13px;line-height:18.2000007629395px"><div style="color:rgb(0,0,0);font-family:Arial,Tahoma,Verdana,sans-serif;font-size:13px;line-height:18.2000007629395px">                 redisc_exec(): Redis error: Server closed the connection</div><br style="color:rgb(0,0,0);font-family:Arial,Tahoma,Verdana,sans-serif;font-size:13px;line-height:18.2000007629395px"><span style="color:rgb(0,0,0);font-family:Arial,Tahoma,Verdana,sans-serif;font-size:13px;line-height:18.2000007629395px">This happens only with websocket endpoints. My queries is:</span><br style="color:rgb(0,0,0);font-family:Arial,Tahoma,Verdana,sans-serif;font-size:13px;line-height:18.2000007629395px"><br style="color:rgb(0,0,0);font-family:Arial,Tahoma,Verdana,sans-serif;font-size:13px;line-height:18.2000007629395px"><span style="color:rgb(0,0,0);font-family:Arial,Tahoma,Verdana,sans-serif;font-size:13px;line-height:18.2000007629395px">redis_cmd("srv1", "EXISTS $si", "s");</span><br style="color:rgb(0,0,0);font-family:Arial,Tahoma,Verdana,sans-serif;font-size:13px;line-height:18.2000007629395px"><br style="color:rgb(0,0,0);font-family:Arial,Tahoma,Verdana,sans-serif;font-size:13px;line-height:18.2000007629395px"><span style="color:rgb(0,0,0);font-family:Arial,Tahoma,Verdana,sans-serif;font-size:13px;line-height:18.2000007629395px">So at xLOG i see that $si correctly sended, but result is null. At db I keep key IP with value TIMESTAMP</span><br style="color:rgb(0,0,0);font-family:Arial,Tahoma,Verdana,sans-serif;font-size:13px;line-height:18.2000007629395px"><br style="color:rgb(0,0,0);font-family:Arial,Tahoma,Verdana,sans-serif;font-size:13px;line-height:18.2000007629395px"><font color="#000000" face="Arial, Tahoma, Verdana, sans-serif"><span style="line-height:18.2000007629395px">Intresting that route, that gives me this result idependend of WS or UDP endpoint. IT does not know about it anything.</span></font><br><br><font color="#000000" face="Arial, Tahoma, Verdana, sans-serif"><span style="line-height:18.2000007629395px">I try to cach redis-cli: monitor log, but this answered me nothing.</span></font><br><br><font color="#000000" face="Arial, Tahoma, Verdana, sans-serif"><span style="line-height:18.2000007629395px">I Logging $si before redis replies and it is ok.</span></font><br><br><font color="#000000" face="Arial, Tahoma, Verdana, sans-serif"><span style="line-height:18.2000007629395px">My exaple of ROUTE that takes this walues from redis is:</span></font><br><br><div style><font color="#000000" face="Arial, Tahoma, Verdana, sans-serif"><span style="line-height:18.2000007629395px">route[TOASTERISK] {</span></font></div><div style><font color="#000000" face="Arial, Tahoma, Verdana, sans-serif"><span style="line-height:18.2000007629395px"><span class="" style="white-space:pre">  </span></span></font></div><div style><font color="#000000" face="Arial, Tahoma, Verdana, sans-serif"><span style="line-height:18.2000007629395px"><span class="" style="white-space:pre">    </span>redis_cmd("srv1", "EXISTS $si", "s");</span></font></div><div style><font color="#000000" face="Arial, Tahoma, Verdana, sans-serif"><span style="line-height:18.2000007629395px"><span class="" style="white-space:pre"> </span>xlog("L_INFO","ASTERISK with ip $si is {$redis(s=>value)}");</span></font></div><div style><font color="#000000" face="Arial, Tahoma, Verdana, sans-serif"><span style="line-height:18.2000007629395px"><br></span></font></div><div style><font color="#000000" face="Arial, Tahoma, Verdana, sans-serif"><span style="line-height:18.2000007629395px">}<br><br>Asterisk sends me option method requests every 10 seconds and I set it to redis with key <br>$si  and value $TS<br><br>IT lives at redis 20 seconds and rewrites with every new request<br><br>so when invite come to kamailio it just check - does this key exists (ROUTE TOASTERISK)<br><br></span></font></div>When I catch this error (null) I look at redis and see that key exisit. But it does not mateer. If it not exisit redis myst reply with 0. Now with null.</div></div>