<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Another patch was pushed to kamcli to fix the access rights for
use of unix domain sockets.</p>
<p>Testing and reporting if works would be appreciated in order to
close this issue.</p>
<p>Cheers,<br>
Daniel<br>
</p>
<br>
<div class="moz-cite-prefix">On 06.04.17 11:39, Daniel-Constantin
Mierla wrote:<br>
</div>
<blockquote
cite="mid:54d441f6-b74e-0754-8da8-414c2f18624c@gmail.com"
type="cite">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<p>I just tested with udp sockets and after fixing some small
bits, seems to work. You have to fetch the latest kamcli from
gihub.com/kamailio/kamcli</p>
<p>Next I will check with unixsocket files, it seems to be some
access rights issues.</p>
<p>Cheers,<br>
Daniel<br>
</p>
<br>
<div class="moz-cite-prefix">On 06.04.17 11:22, Daniel-Constantin
Mierla wrote:<br>
</div>
<blockquote
cite="mid:49ecdcd6-c915-bf7b-eaf7-e19fe091b061@gmail.com"
type="cite">
<meta content="text/html; charset=utf-8"
http-equiv="Content-Type">
<p>Hello,</p>
<p>I will look at kamcli with unixsockets. Can you try by using
UDP sockets? <br>
</p>
<p>You need to change also the kamailio.cfg parameter for
jsonrpcs socket.</p>
<p>Should be bound to loopback for security, like <a
moz-do-not-send="true" class="moz-txt-link-freetext"
href="udp:127.0.0.1:9062">udp:127.0.0.1:9062</a> for
kamailio and <a moz-do-not-send="true"
class="moz-txt-link-freetext" href="udp:127.0.0.1:9064">udp:127.0.0.1:9064</a>
for kamcli.<br>
</p>
<p>Cheers,<br>
Daniel<br>
</p>
<br>
<div class="moz-cite-prefix">On 27.03.17 22:13, Marko Tirs
wrote:<br>
</div>
<blockquote
cite="mid:1658102847.4012620.1490645636596@mail.yahoo.com"
type="cite">
<div style="color:#000; background-color:#fff;
font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande,
sans-serif;font-size:16px">
<div id="yui_3_16_0_1_1490630646664_12746"><span
id="yui_3_16_0_1_1490630646664_14038">Hi Daniel,</span></div>
<div id="yui_3_16_0_1_1490630646664_14039" dir="ltr"><span
id="yui_3_16_0_1_1490630646664_14038">no, I haven't
changed anything in kamcli.ini, it seems to be the same
like this one behind your link.</span></div>
<div dir="ltr" id="yui_3_16_0_1_1490630646664_14365"><span
id="yui_3_16_0_1_1490630646664_14038">I'm running both
kamailio and kamcli as root.</span></div>
<div dir="ltr" id="yui_3_16_0_1_1490630646664_16180"><span
id="yui_3_16_0_1_1490630646664_14038">Any other ideas
for running of kamcli?<br>
</span></div>
<div dir="ltr" id="yui_3_16_0_1_1490630646664_14677"><span
id="yui_3_16_0_1_1490630646664_14038">Regards</span></div>
<div dir="ltr" id="yui_3_16_0_1_1490630646664_15945"><span
id="yui_3_16_0_1_1490630646664_14038">Marko</span></div>
<div dir="ltr" id="yui_3_16_0_1_1490630646664_15938"><span
id="yui_3_16_0_1_1490630646664_14038"><br>
</span></div>
<div dir="ltr" id="yui_3_16_0_1_1490630646664_16134"><span
id="yui_3_16_0_1_1490630646664_14038">Last part of my
kamcli.ini:</span></div>
<div dir="ltr" id="yui_3_16_0_1_1490630646664_16022"><span
id="yui_3_16_0_1_1490630646664_14038">------------------------------------<br>
</span></div>
<div dir="ltr" id="yui_3_16_0_1_1490630646664_14215"><span
id="yui_3_16_0_1_1490630646664_14038">### jsonrpc
settings<br id="yui_3_16_0_1_1490630646664_15889">
[jsonrpc]<br id="yui_3_16_0_1_1490630646664_15890">
; transport - can be: fifo, socket<br
id="yui_3_16_0_1_1490630646664_15891">
transport=socket<br
id="yui_3_16_0_1_1490630646664_15892">
; path - where kamailio is listening for JSONRPC FIFO
commands<br id="yui_3_16_0_1_1490630646664_15893">
path=/var/run/kamailio/kamailio_rpc.fifo<br
id="yui_3_16_0_1_1490630646664_15894">
rplnamebase=kamailio_rpc_reply.fifo<br
id="yui_3_16_0_1_1490630646664_15895">
rpldir=/tmp<br id="yui_3_16_0_1_1490630646664_15896">
; srvaddr - where kamailio is listening for JSONRPC
socket commands<br id="yui_3_16_0_1_1490630646664_15897">
; - it has to be a path to unix socket file or <a
moz-do-not-send="true" class="moz-txt-link-freetext"
href="udp:ipaddr:port">udp:ipaddr:port</a><br
id="yui_3_16_0_1_1490630646664_15898">
srvaddr=/var/run/kamailio/kamailio_rpc.sock<br
id="yui_3_16_0_1_1490630646664_15899">
; rcvaddr - where kamclie is listening for the JSONRPC
responses<br id="yui_3_16_0_1_1490630646664_15900">
; - it has to be a path to unix socket file or <a
moz-do-not-send="true" class="moz-txt-link-freetext"
href="udp:ipaddr:port">udp:ipaddr:port</a><br
id="yui_3_16_0_1_1490630646664_15901">
; - pid of kamcli is added at the end to allow
multiple use at same time<br
id="yui_3_16_0_1_1490630646664_15902">
rcvaddr=/var/run/kamailio/kamailio_rpc.sock<br
id="yui_3_16_0_1_1490630646664_15903">
; outformat - how RPC result is printed, can be: json or
yaml<br id="yui_3_16_0_1_1490630646664_15904">
; - yaml is more compact output<br
id="yui_3_16_0_1_1490630646664_15905">
outformat=yaml<br id="yui_3_16_0_1_1490630646664_15906">
<br>
</span></div>
<div class="qtdSeparateBR"><br>
<br>
</div>
<div class="yahoo_quoted"
id="yui_3_16_0_1_1490630646664_12750" style="display:
block;">
<div style="font-family: Helvetica Neue, Helvetica, Arial,
Lucida Grande, sans-serif; font-size: 16px;"
id="yui_3_16_0_1_1490630646664_12749">
<div style="font-family: HelveticaNeue, Helvetica Neue,
Helvetica, Arial, Lucida Grande, sans-serif;
font-size: 16px;"
id="yui_3_16_0_1_1490630646664_12748">
<div dir="ltr" id="yui_3_16_0_1_1490630646664_12747">
<font id="yui_3_16_0_1_1490630646664_12751"
face="Arial" size="2"> <br>
----- Forwarded Message -----<br>
<b><span style="font-weight:bold;">From:</span></b>
Daniel-Constantin Mierla <a
moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:miconda@gmail.com"><miconda@gmail.com></a><br>
<b><span style="font-weight: bold;">To:</span></b>
Marko Tirs <a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:marko.tirs@yahoo.com"><marko.tirs@yahoo.com></a>;
Kamailio (SER) - Users Mailing List <a
moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:sr-users@lists.sip-router.org"><sr-users@lists.sip-router.org></a>
<br>
<b><span style="font-weight: bold;">Sent:</span></b>
Monday, March 27, 2017 2:18 PM<br>
<b><span style="font-weight: bold;">Subject:</span></b>
Re: [SR-Users] kamcli doesn't function<br>
</font> </div>
<div class="y_msg_container"
id="yui_3_16_0_1_1490630646664_12752"><br>
<div id="yiv7049393965">
<div id="yui_3_16_0_1_1490630646664_12754">
<div id="yui_3_16_0_1_1490630646664_12753">Hello,</div>
<div id="yui_3_16_0_1_1490630646664_12755">have
you changed the rpldir in any way for kamcli?</div>
<div id="yui_3_16_0_1_1490630646664_15840"><a
moz-do-not-send="true" rel="nofollow"
shape="rect"
class="yiv7049393965moz-txt-link-freetext"
target="_blank"
href="https://github.com/kamailio/kamcli/blob/master/kamcli/kamcli.ini#L43"
id="yui_3_16_0_1_1490630646664_15839">https://github.com/kamailio/kamcli/blob/master/kamcli/kamcli.ini#L43</a></div>
<div id="yui_3_16_0_1_1490630646664_14364">Cheers,<br
clear="none">
Daniel<br clear="none">
</div>
<br clear="none">
<div class="yiv7049393965yqt1772485842"
id="yiv7049393965yqt05333">
<div class="yiv7049393965moz-cite-prefix">On
24/03/2017 00:10, Marko Tirs wrote:<br
clear="none">
</div>
<blockquote type="cite"
id="yui_3_16_0_1_1490630646664_14126">
<div
style="color:#000;background-color:#fff;font-family:Helvetica
Neue, Helvetica, Arial, Lucida Grande,
sans-serif;font-size:16px;"
id="yui_3_16_0_1_1490630646664_14125">
<div
id="yiv7049393965yui_3_16_0_ym19_1_1490310341835_3031"><span
id="yiv7049393965yui_3_16_0_ym19_1_1490310341835_3268">Hi Daniel,</span></div>
<div
id="yiv7049393965yui_3_16_0_ym19_1_1490310341835_3265"><span
id="yiv7049393965yui_3_16_0_ym19_1_1490310341835_3264"><br clear="none">
</span></div>
<div
id="yiv7049393965yui_3_16_0_ym19_1_1490310341835_3295"><span
id="yiv7049393965yui_3_16_0_ym19_1_1490310341835_3264">Kamailio is
running as root.</span></div>
<div
id="yiv7049393965yui_3_16_0_ym19_1_1490310341835_3221"><span
id="yiv7049393965yui_3_16_0_ym19_1_1490310341835_3234">How to solve the
socket problem?</span></div>
<div
id="yiv7049393965yui_3_16_0_ym19_1_1490310341835_3247"><span
id="yiv7049393965yui_3_16_0_ym19_1_1490310341835_3234"><br clear="none">
</span></div>
<div
id="yiv7049393965yui_3_16_0_ym19_1_1490310341835_3296"><span
id="yiv7049393965yui_3_16_0_ym19_1_1490310341835_3234">Regards</span></div>
<div
id="yiv7049393965yui_3_16_0_ym19_1_1490310341835_3267"><span
id="yiv7049393965yui_3_16_0_ym19_1_1490310341835_3234">Marko</span></div>
<div class="yiv7049393965qtdSeparateBR"
id="yiv7049393965yui_3_16_0_ym19_1_1490310341835_3030"><br
clear="none">
<br clear="none">
</div>
<div class="yiv7049393965yahoo_quoted"
id="yiv7049393965yui_3_16_0_ym19_1_1490310341835_3013"
style="display:block;">
<div
id="yiv7049393965yui_3_16_0_ym19_1_1490310341835_3012"
style="font-family:Helvetica Neue,
Helvetica, Arial, Lucida Grande,
sans-serif;font-size:16px;">
<div
id="yiv7049393965yui_3_16_0_ym19_1_1490310341835_3011"
style="font-family:HelveticaNeue,
Helvetica Neue, Helvetica, Arial,
Lucida Grande,
sans-serif;font-size:16px;">
<div dir="ltr"
id="yiv7049393965yui_3_16_0_ym19_1_1490310341835_3010">
<font
id="yiv7049393965yui_3_16_0_ym19_1_1490310341835_3014"
face="Arial" size="2"> </font>
<hr size="1"> <b
id="yiv7049393965yui_3_16_0_ym19_1_1490310341835_3355"><span
id="yiv7049393965yui_3_16_0_ym19_1_1490310341835_3354"
style="font-weight:bold;">From:</span></b>
Daniel-Constantin Mierla <a
moz-do-not-send="true"
rel="nofollow" shape="rect"
class="yiv7049393965moz-txt-link-rfc2396E"
ymailto="mailto:daniel@kamailio.org" target="_blank"
href="mailto:daniel@kamailio.org"
id="yui_3_16_0_1_1490630646664_14247"><daniel@kamailio.org></a><br
clear="none">
<b><span style="font-weight:bold;">To:</span></b>
Marko Tirs <a
moz-do-not-send="true"
rel="nofollow" shape="rect"
class="yiv7049393965moz-txt-link-rfc2396E"
ymailto="mailto:marko.tirs@yahoo.com" target="_blank"
href="mailto:marko.tirs@yahoo.com"><marko.tirs@yahoo.com></a>;
Kamailio (SER) - Users Mailing
List <a moz-do-not-send="true"
rel="nofollow" shape="rect"
class="yiv7049393965moz-txt-link-rfc2396E"
ymailto="mailto:sr-users@lists.sip-router.org" target="_blank"
href="mailto:sr-users@lists.sip-router.org"><sr-users@lists.sip-router.org></a>
<br clear="none">
<b><span style="font-weight:bold;">Sent:</span></b>
Thursday, March 23, 2017 1:46 PM<br
clear="none">
<b><span style="font-weight:bold;">Subject:</span></b>
Re: [SR-Users] kamcli doesn't
function<br clear="none">
</div>
<div
class="yiv7049393965y_msg_container"
id="yiv7049393965yui_3_16_0_ym19_1_1490310341835_3142"><br clear="none">
<div dir="ltr"
id="yiv7049393965yui_3_16_0_ym19_1_1490310341835_3141">Hello,<br
clear="none">
<br clear="none">
kamcli is creating its own
(temporary) socket file in order
to retrieve the response from
kamailio. I guess there is a
problem with access rights to
it. Is kamailio running as root
or other user?<br clear="none">
<br clear="none">
Cheers,<br clear="none">
Daniel<br clear="none">
<div
class="yiv7049393965yqt5303680413"
id="yiv7049393965yqtfd58294"><br
clear="none">
March 22, 2017 3:53 PM, "Marko
Tirs" <<a
moz-do-not-send="true"
rel="nofollow" shape="rect"
ymailto="mailto:marko.tirs@yahoo.com" target="_blank"
href="mailto:marko.tirs@yahoo.com">marko.tirs@yahoo.com</a>>
wrote:<br clear="none">
<br clear="none">
> Hello all,<br
clear="none">
> <br clear="none">
> I can't find any answer
why my kamcli doesn't
function.<br clear="none">
> <br clear="none">
> I'm using Kamailio 5.0.0
at the Debian Jessy 8.7 and it
functions well.<br
clear="none">
> <br clear="none">
> # kamctl ul show<br
clear="none">
> <br clear="none">
> functions well but when I
use kamcli I get error:<br
clear="none">
> <br clear="none">
> # kamcli ul show<br
clear="none">
> 13(7452) ERROR: jsonrpcs
[jsonrpcs_sock.c:542]:
jsonrpc_dgram_send_data():
failed to send the<br
clear="none">
> response - ret: -1, len:
2443 (131072), err: 1 -
Operation not permitted)<br
clear="none">
> (log): Timeout receiving
response on unix sock<br
clear="none">
> <br clear="none">
> The relevant parts of
kamailio.cfg:<br clear="none">
> <br clear="none">
>
#------------------------------------------------------------------------<br
clear="none">
> <br clear="none">
> #!define WITH_DEBUG<br
clear="none">
> #!define WITH_NAT<br
clear="none">
> #!define WITH_MYSQL<br
clear="none">
> #!define WITH_AUTH<br
clear="none">
> #!define WITH_USRLOCDB<br
clear="none">
> <br clear="none">
> loadmodule "jsonrpcs.so"<br
clear="none">
> <br clear="none">
> # ----- jsonrpcs params
-----<br clear="none">
> modparam("jsonrpcs",
"pretty_format", 1)<br
clear="none">
> /* set the path to RPC
fifo control file */<br
clear="none">
> modparam("jsonrpcs",
"fifo_name",
"/var/run/kamailio/kamailio_rpc.fifo")<br
clear="none">
> /* set the path to RPC
unix socket control file */<br
clear="none">
> modparam("jsonrpcs",
"dgram_socket",
"/var/run/kamailio/kamailio_rpc.sock")<br
clear="none">
> <br clear="none">
> # ----- ctl params -----<br
clear="none">
> modparam("ctl", "binrpc",
"unix:/var/run/kamailio/kamailio_ctl")<br clear="none">
>
#--------------------------------------------------------------------------<br
clear="none">
> <br clear="none">
> # ll /var/run/kamailio/<br
clear="none">
> total 0<br clear="none">
> srw------- 1 root root 0
Mar 22 11:36 kamailio_ctl<br
clear="none">
> prw-rw---- 1 root root 0
Mar 22 12:30 kamailio_rpc.fifo<br
clear="none">
> srw-rw---- 1 root root 0
Mar 22 11:36 kamailio_rpc.sock<br
clear="none">
> <br clear="none">
> Can somebody tell me what
is the problem?<br
clear="none">
> <br clear="none">
> Thank you!<br
clear="none">
> Regards<br clear="none">
> Marko</div>
<br clear="none">
> <br clear="none">
>
_______________________________________________<br
clear="none">
> SIP Express Router (SER)
and Kamailio (OpenSER) -
sr-users mailing list<br
clear="none">
> <a moz-do-not-send="true"
rel="nofollow" shape="rect"
ymailto="mailto:sr-users@lists.sip-router.org"
target="_blank"
href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br
clear="none">
> <a moz-do-not-send="true"
rel="nofollow" shape="rect"
target="_blank"
href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br
clear="none">
<br clear="none">
--<br clear="none">
Daniel-Constantin Mierla<br
clear="none">
<a moz-do-not-send="true"
rel="nofollow" shape="rect"
class="yiv7049393965moz-txt-link-abbreviated"
target="_blank"
href="http://www.kamailio.org/">www.kamailio.org</a>
-- <a moz-do-not-send="true"
rel="nofollow" shape="rect"
class="yiv7049393965moz-txt-link-abbreviated"
target="_blank"
href="http://www.asipto.com/">www.asipto.com</a></div>
<br clear="none">
<br clear="none">
</div>
</div>
</div>
</div>
</div>
<br clear="none">
<fieldset
class="yiv7049393965mimeAttachmentHeader"></fieldset>
<br clear="none">
<pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" rel="nofollow" shape="rect" class="yiv7049393965moz-txt-link-abbreviated" ymailto="mailto:sr-users@lists.sip-router.org" target="_blank" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" rel="nofollow" shape="rect" class="yiv7049393965moz-txt-link-freetext" target="_blank" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
</div>
<br clear="none">
<pre class="yiv7049393965moz-signature">--
Daniel-Constantin Mierla
<a moz-do-not-send="true" rel="nofollow" shape="rect" class="yiv7049393965moz-txt-link-abbreviated" target="_blank" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a moz-do-not-send="true" rel="nofollow" shape="rect" class="yiv7049393965moz-txt-link-abbreviated" target="_blank" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - <a moz-do-not-send="true" rel="nofollow" shape="rect" class="yiv7049393965moz-txt-link-abbreviated" target="_blank" href="http://www.asipto.com/">www.asipto.com</a>
Kamailio World Conference - May 8-10, 2017 - <a moz-do-not-send="true" rel="nofollow" shape="rect" class="yiv7049393965moz-txt-link-abbreviated" target="_blank" href="http://www.kamailioworld.com/">www.kamailioworld.com</a></pre>
</div>
</div>
<br>
<br>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - May 22-24 (USA) - <a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
Kamailio World Conference - May 8-10, 2017 - <a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - May 22-24 (USA) - <a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
Kamailio World Conference - May 8-10, 2017 - <a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - May 22-24 (USA) - <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
Kamailio World Conference - May 8-10, 2017 - <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
</body>
</html>