<p>Hey Guys,</p>

<p>I have been playing with jsonrpc-s module and it appears that for some reason it does not properly encapsulate replies containing more than one item.</p>

<p>Sample return via kamcmd:</p>

<pre><code>root@iPBXDev1:~# kamcmd -s tcp:127.0.0.1:2046 uac.reg_dump
{
    l_uuid: rsua2
    l_username: rsua2
    l_domain: 172.16.254.101
    r_username: cust_sua2
    r_domain: 172.16.254.102
    realm: 
    auth_username: cust_sua2
    auth_password: check123
    auth_proxy: sip:172.16.254.102
    expires: 3600
    flags: 12
    diff_expires: 3558
    timer_expires: 1444499546
}
{
    l_uuid: rsua1
    l_username: rsua1
    l_domain: 172.16.254.101
    r_username: cust_sua1
    r_domain: 172.16.254.102
    realm: 
    auth_username: cust_sua1
    auth_password: check123
    auth_proxy: sip:172.16.254.102
    expires: 3600
    flags: 4
    diff_expires: 3558
    timer_expires: 1444499546
}
</code></pre>

<p>Sample return via jsonrpc:</p>

<pre><code>T 2015/10/10 18:49:49.250401 172.16.254.102:35371 -> 172.16.254.101:5090 [AP]
POST /jsonrpc HTTP/1.1.
Host: 172.16.254.101:5090.
User-Agent: Go-http-client/1.1.
Content-Length: 60.
Content-Type: application/json.
Accept-Encoding: gzip.
.
{"jsonrpc":"2.0","method":"uac.reg_dump","params":[],"id":0}
##
T 2015/10/10 18:49:49.251097 172.16.254.101:5090 -> 172.16.254.102:35371 [AP]
HTTP/1.1 200 OK.
Sia: SIP/2.0/TCP 172.16.254.102:35371.
Content-Type: application/json.
Server: Sipean-RP 4.3.2.
Content-Length: 325.
.
{"jsonrpc":"2.0","result":{"l_uuid":"rsua1","l_username":"rsua1","l_domain":"172.16.254.101","r_username":"cust_sua1","r_domain":"172.16.254.102","realm":"","auth_username":"cust_sua1","auth_password":"check123","auth_proxy":"sip:172.16.254.102","expires":3600,"flags":0,"diff_expires":217,"timer_expires":1444496006},"id":0}
</code></pre>

<p>It appears that in second case there is only one item returned (so items overwrite each other).</p>

<p>DanB</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/kamailio/kamailio/issues/368">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZUU1weQ7b2kf8pUOi6ZFMEj06ulFks5o6TsQgaJpZM4GMmaO.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/kamailio/kamailio/issues/368"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>