<div dir="ltr"><span style="color:rgb(84,84,84)">Many thanks for the prompt reply. Below are requested logs. </span><div><span style="color:rgb(84,84,84)"><br></span></div><div><div><font color="#545454">root@debian:/usr/local/kamailio/sbin# Nov 10 04:56:34 debian ./kamailio[5527]: DEBUG: <core> [ip_addr.c:229]: print_ip(): tcpconn_new: new tcp connection: 127.0.0.1</font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5527]: DEBUG: <core> [tcp_main.c:985]: tcpconn_new(): on port 49396, type 2</font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5527]: DEBUG: <core> [tcp_main.c:1295]: tcpconn_add(): hashes: 395:373:662, 1</font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5527]: DEBUG: <core> [io_wait.h:376]: io_watch_add(): DBG: io_watch_add(0xa1d280, 38, 2, 0x7f5abcd36708), fd_no=31</font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5527]: DEBUG: <core> [io_wait.h:598]: io_watch_del(): DBG: io_watch_del (0xa1d280, 38, -1, 0x0) fd_no=32 called</font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5527]: DEBUG: <core> [tcp_main.c:4131]: handle_tcpconn_ev(): sending to child, events 1</font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5527]: DEBUG: <core> [tcp_main.c:3813]: send2child(): selected tcp worker 0 15(5515) for activity on [tcp:<a href="http://0.0.0.0:5060">0.0.0.0:5060</a>], 0x7f5abcd3670</font></div><div><font color="#545454">8</font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5515]: DEBUG: <core> [tcp_read.c:1566]: handle_io(): received n=8 con=0x7f5abcd36708, fd=10</font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5515]: DEBUG: <core> [tcp_read.c:1366]: tcp_read_req(): content-length=105</font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5515]: DEBUG: <core> [parser/msg_parser.c:608]: parse_msg(): SIP Request:</font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5515]: DEBUG: <core> [parser/msg_parser.c:610]: parse_msg():  method:  <POST></font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5515]: DEBUG: <core> [parser/msg_parser.c:612]: parse_msg():  uri:     </rpc_path/></font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5515]: DEBUG: <core> [parser/msg_parser.c:614]: parse_msg():  version: <HTTP/1.1></font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5515]: DEBUG: <core> [parser/msg_parser.c:187]: get_hdr_field(): DEBUG: get_hdr_body : content_length=105</font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5515]: DEBUG: <core> [parser/msg_parser.c:89]: get_hdr_field(): found end of header</font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5515]: DEBUG: <core> [receive.c:178]: receive_msg(): After parse_msg...</font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5515]: DEBUG: xhttp [xhttp_mod.c:356]: xhttp_handler(): new fake msg created (296 bytes):#012<POST /rpc_path/ HTTP/1.1#015#012Via: SIP</font></div><div><font color="#545454">/2.0/TCP <a href="http://127.0.0.1:49396#015#012User-Agent">127.0.0.1:49396#015#012User-Agent</a>: curl/7.38.0#015#012Host: <a href="http://127.0.0.1:5060#015#012Accept">127.0.0.1:5060#015#012Accept</a>: */*#015#012Content-Type: application/json#015#012Call-ID: abc12#015#0</font></div><div><font color="#545454">12Content-Length: 105#015#012#015#012{"jsonrpc": "2.0", "method": "dlg.profile_get_size","params":{"accountno": "1234567"}, "id": "0deadb33f"}></font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5515]: DEBUG: <core> [parser/msg_parser.c:608]: parse_msg(): SIP Request:</font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5515]: DEBUG: <core> [parser/msg_parser.c:610]: parse_msg():  method:  <POST></font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5515]: DEBUG: <core> [parser/msg_parser.c:612]: parse_msg():  uri:     </rpc_path/></font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5515]: DEBUG: <core> [parser/msg_parser.c:614]: parse_msg():  version: <HTTP/1.1></font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5515]: DEBUG: <core> [parser/parse_via.c:2642]: parse_via(): end of header reached, state=5</font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5515]: DEBUG: <core> [parser/msg_parser.c:496]: parse_headers(): parse_headers: Via found, flags=2</font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5515]: DEBUG: <core> [parser/msg_parser.c:498]: parse_headers(): parse_headers: this is the first via</font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5515]: DEBUG: <core> [parser/msg_parser.c:187]: get_hdr_field(): DEBUG: get_hdr_body : content_length=105</font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5515]: DEBUG: <core> [parser/msg_parser.c:89]: get_hdr_field(): found end of header</font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5515]: DEBUG: sl [sl.c:280]: send_reply(): reply in stateless mode (sl)</font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5515]: DEBUG: <core> [msg_translator.c:158]: check_via_address(): (127.0.0.1, 127.0.0.1, 0)</font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5515]: DEBUG: <core> [tcp_main.c:2196]: tcpconn_send_put(): send from reader (5515 (15)), reusing fd</font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5515]: DEBUG: <core> [tcp_main.c:2430]: tcpconn_do_send(): sending...</font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5515]: DEBUG: <core> [tcp_main.c:2464]: tcpconn_do_send(): after real write: c= 0x7f5abcd36708 n=293 fd=10</font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5515]: DEBUG: <core> [tcp_main.c:2465]: tcpconn_do_send(): buf=#012HTTP/1.1 404 Profile not found: 1234567#015#012Sia: SIP/2.0/TCP <a href="http://127.0.0.1:49396#015#012Call-ID">127.0.0.1:49396#015#012Call-ID</a>: abc12#015#012Content-Type: application/json#015#012Server: kamailio (4.4.1 (x86_64/linux))#015#012Content-Length: 106#015#012#015#012{#012#011"jsonrpc":#011"2.0",#012#011"error":#011{#012#011#011"code":#011-32000,#012#011#011"message":#011"Execution Error"#012#011},#012#011"id":#011"0deadb33f"#012}</font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5515]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil)</font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5515]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil)</font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5515]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil)</font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5515]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil)</font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5515]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil)</font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5515]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil)</font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5515]: DEBUG: <core> [xavp.c:446]: xavp_destroy_list(): destroying xavp list (nil)</font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5515]: DEBUG: <core> [receive.c:322]: receive_msg(): cleaning up</font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5515]: DEBUG: <core> [io_wait.h:376]: io_watch_add(): DBG: io_watch_add(0xa76680, 10, 2, 0x7f5abcd36708), fd_no=1</font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5515]: DEBUG: <core> [tcp_read.c:195]: tcp_make_closed_event(): TCP closed event creation triggered</font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5515]: DEBUG: <core> [tcp_read.c:203]: tcp_make_closed_event(): no callback registering for handling TCP closed event - dropping!</font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5515]: DEBUG: <core> [tcp_read.c:310]: tcp_read_data(): EOF on 0x7f5abcd36708, FD 10 ([127.0.0.1]:49396 -> [127.0.0.1]:5060)</font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5515]: DEBUG: <core> [tcp_read.c:1342]: tcp_read_req(): EOF</font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5515]: DEBUG: <core> [io_wait.h:598]: io_watch_del(): DBG: io_watch_del (0xa76680, 10, -1, 0x10) fd_no=2 called</font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5515]: DEBUG: <core> [tcp_read.c:1490]: release_tcpconn(): releasing con 0x7f5abcd36708, state -1, fd=10, id=1 ([127.0.0.1]:49396 -> [127.0.0.1]:5060)</font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5515]: DEBUG: <core> [tcp_read.c:1491]: release_tcpconn(): extra_data (nil)</font></div><div><font color="#545454">Nov 10 04:56:34 debian ./kamailio[5527]: DEBUG: <core> [tcp_main.c:3243]: handle_tcp_child(): reader response= 7f5abcd36708, -1 from 0</font></div><div style="color:rgb(84,84,84)"><br>Let me know if you need anything else. </div></div><div style="color:rgb(84,84,84)">Best Regards. </div></div><div class="gmail_extra"><br><div class="gmail_quote">On 10 November 2016 at 13:47, Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <p>Hello,</p>
    <p>can you get the log messages with debug=3 in kamailio.cfg for the
      execution of the rpc command?</p>
    <p>Cheers,<br>
      Daniel<br>
    </p><div><div class="h5">
    <br>
    <div class="m_9179590804740913670moz-cite-prefix">On 10/11/16 09:35, Aqs Younas wrote:<br>
    </div>
    </div></div><blockquote type="cite"><div><div class="h5">
      <div dir="ltr">Greetings list, 
        <div><br>
        </div>
        <div>I am trying to get profile size with jsonrpc-s module.
          Below is jsonrpc-s configuration and a curl command to get the
          profile  size. </div>
        <div><br>
        </div>
        <div><span style="font-size:12.8px">listen=tcp:</span><a href="http://0.0.0.0:5060/" rel="noreferrer" style="font-size:12.8px" target="_blank">0.0.0.0:5060</a><br style="font-size:12.8px">
          <br style="font-size:12.8px">
          <span style="font-size:12.8px">loadmodule "xhttp"</span><br style="font-size:12.8px">
          <span style="font-size:12.8px">loadmodule "jsonrpc-s"</span><br style="font-size:12.8px">
          <br style="font-size:12.8px">
          <span style="font-size:12.8px">modparam("xhttp", "url_match",
            "^/rpc_path/")</span><br style="font-size:12.8px">
          <span style="font-size:12.8px">modparam("jsonrpc-s",
            "pretty_format", 1)</span><br style="font-size:12.8px">
          <br style="font-size:12.8px">
          <span style="font-size:12.8px">event_route[xhttp:request] {</span><br style="font-size:12.8px">
          <span style="font-size:12.8px">   if($hu =~ "^/rpc_path")</span><br style="font-size:12.8px">
          <span style="font-size:12.8px">      jsonrpc_dispatch();</span><br style="font-size:12.8px">
          <span style="font-size:12.8px">   else</span><br style="font-size:12.8px">
          <span style="font-size:12.8px">      xhttp_reply("404", "Not
            Found", "text/html", "");</span><br style="font-size:12.8px">
          <span style="font-size:12.8px">}</span><br>
        </div>
        <div><span style="font-size:12.8px"><br>
          </span></div>
        <div><span style="font-size:12.8px">curl -v -H 'Content-Type:
            application/json' -H 'Call-ID: abc12' -d '{"jsonrpc": "2.0",
            "method": "dlg.profile_get_size","<wbr>params":{"accountno":
            "1234567"}, "id": "0deadb33f"}' <a href="http://127.0.0.1:5060/rpc_path/" target="_blank">http://127.0.0.1:5060/rpc_<wbr>path/</a></span><br>
        </div>
        <div><span style="font-size:12.8px"><br>
          </span></div>
        <div><span style="font-size:12.8px">I am getting this in
            respose.</span></div>
        <div><span style="font-size:12.8px"><br>
          </span></div>
        <div><span style="font-size:12.8px"> * Hostname was NOT found in
            DNS cache</span></div>
        <div><span style="font-size:12.8px">*   Trying 127.0.0.1...</span></div>
        <div><span style="font-size:12.8px">* Connected to 127.0.0.1
            (127.0.0.1) port 5060 (#0)</span></div>
        <div><span style="font-size:12.8px">> POST /rpc_path/
            HTTP/1.1</span></div>
        <div><span style="font-size:12.8px">> User-Agent: curl/7.38.0</span></div>
        <div><span style="font-size:12.8px">> Host: <a href="http://127.0.0.1:5060" target="_blank">127.0.0.1:5060</a></span></div>
        <div><span style="font-size:12.8px">> Accept: */*</span></div>
        <div><span style="font-size:12.8px">> Content-Type:
            application/json</span></div>
        <div><span style="font-size:12.8px">> Call-ID: abc12</span></div>
        <div><span style="font-size:12.8px">> Content-Length: 106</span></div>
        <div><span style="font-size:12.8px">></span></div>
        <div><span style="font-size:12.8px">* upload completely sent
            off: 106 out of 106 bytes</span></div>
        <div><span style="font-size:12.8px"><b>< HTTP/1.1 404 Profile
              not found: 1234567</b></span></div>
        <div><span style="font-size:12.8px">< Sia: SIP/2.0/TCP <a href="http://127.0.0.1:49374" target="_blank">127.0.0.1:49374</a></span></div>
        <div><span style="font-size:12.8px">< Call-ID: abc12</span></div>
        <div><span style="font-size:12.8px">< Content-Type:
            application/json</span></div>
        <div><span style="font-size:12.8px">* Server kamailio (4.4.1
            (x86_64/linux)) is not blacklisted</span></div>
        <div><span style="font-size:12.8px">< Server: kamailio (4.4.1
            (x86_64/linux))</span></div>
        <div><span style="font-size:12.8px">< Content-Length: 106</span></div>
        <div><span style="font-size:12.8px"><</span></div>
        <div><span style="font-size:12.8px">{</span></div>
        <div><span style="font-size:12.8px">        "jsonrpc":    
             "2.0",</span></div>
        <div><span style="font-size:12.8px">        "error":        {</span></div>
        <div><span style="font-size:12.8px">                "code":
            -32000,</span></div>
        <div><span style="font-size:12.8px">                "message":  
               "Execution Error"</span></div>
        <div><span style="font-size:12.8px">        },</span></div>
        <div><span style="font-size:12.8px">        "id":   "0deadb33f"</span></div>
        <div><span style="font-size:12.8px">* Connection #0 to host
            127.0.0.1 left intact</span></div>
        <div><br>
        </div>
        <div>Whereas fifo command gives me this. <br>
        </div>
        <div>
          <div>root@debian:/usr/local/<wbr>kamailio/sbin# ./kamctl fifo
            profile_get_size accountno 1234567</div>
          <div>profile::  name=accountno value=1234567 count=2</div>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>Why jsonrpc-s is search for profile 1234567 whereas profile
          should be accountno. <br>
          <br>
          Anyhelp what i am doing wrong here is much appreciated. </div>
        <div><br>
        </div>
        <div>Best Regards. </div>
      </div>
      <br>
      <fieldset class="m_9179590804740913670mimeAttachmentHeader"></fieldset>
      <br>
      </div></div><pre>______________________________<wbr>_________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="m_9179590804740913670moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a class="m_9179590804740913670moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/<wbr>cgi-bin/mailman/listinfo/sr-<wbr>users</a><span class="HOEnZb"><font color="#888888">
</font></span></pre><span class="HOEnZb"><font color="#888888">
    </font></span></blockquote><span class="HOEnZb"><font color="#888888">
    <br>
    <pre class="m_9179590804740913670moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="m_9179590804740913670moz-txt-link-freetext" href="http://twitter.com/#!/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a class="m_9179590804740913670moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/<wbr>miconda</a>
Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - <a class="m_9179590804740913670moz-txt-link-freetext" href="http://www.asipto.com" target="_blank">http://www.asipto.com</a></pre>
  </font></span></div>

<br>______________________________<wbr>_________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">http://lists.sip-router.org/<wbr>cgi-bin/mailman/listinfo/sr-<wbr>users</a><br>
<br></blockquote></div><br></div>