<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hello,<br>
<br>
On 03/02/2015 09:51 AM, Yuriy Gorlichenko wrote:<br>
</div>
<blockquote
cite="mid:CABSP_VdVOAY1sFA=Y3SxdnV=tahVfAbOsCaSeuJ8NHgJ+eKf2Q@mail.gmail.com"
type="cite">
<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">
</div>
</div>
</blockquote>
You seem to have a problem connecting to your redis server.<br>
<br>
Could you post more of the log? Redis module should try to reconnect
and execute the command again.<br>
<br>
Also, you should study the log in the part where redis module
initializes, etc.<br>
<br>
<br>
<blockquote
cite="mid:CABSP_VdVOAY1sFA=Y3SxdnV=tahVfAbOsCaSeuJ8NHgJ+eKf2Q@mail.gmail.com"
type="cite">
<div dir="ltr">
<div><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">
</div>
</div>
</blockquote>
In the case redis module cannot connect to the server NULL reply is
correct.<br>
<br>
Vicente.<br>
<br>
<blockquote
cite="mid:CABSP_VdVOAY1sFA=Y3SxdnV=tahVfAbOsCaSeuJ8NHgJ+eKf2Q@mail.gmail.com"
type="cite">
<div dir="ltr">
<div><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>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
sr-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a>
</pre>
</blockquote>
<br>
</body>
</html>