<p>Hi<br>
Using kamailio with http jsonrpcs<br>
found next trouble</p>
<p>When i making request like</p>
<p>curl -s -H 'Content-Type: application/json' --data-binary '{"method":"htable.get","params":{<strong>"name":"mytable"</strong>,"key":"myparam"},"jsonrpc":"2.0"}' <a href="http://127.0.0.1:5060/jsonrpc" rel="nofollow">http://127.0.0.1:5060/jsonrpc</a></p>
<p>all fine. I getting good response</p>
<p>But when I making<br>
curl -s -H 'Content-Type: application/json' --data-binary '{"method":"htable.get","params":{"key":"myparam",<strong>"name":"mytable"</strong>},"jsonrpc":"2.0"}' <a href="http://127.0.0.1:5060/jsonrpc" rel="nofollow">http://127.0.0.1:5060/jsonrpc</a><br>
i.e keys of object on different places</p>
<p>It gives me</p>
<p>curl -s -H 'Content-Type: application/json' --data-binary '{"jsonrpc":"2.0", "method": "htable.get","params":{"key":"mykey","name": "mytable"}}' <a href="http://127.0.0.1:5060/jsonrpc" rel="nofollow">http://127.0.0.1:5060/jsonrpc</a><br>
{<br>
"jsonrpc":      "2.0",<br>
"error":        {<br>
"code": 500,<br>
"message":      "No such htable"<br>
}<br>
}</p>
<p>Means kamailio cant find needed htable</p>
<p>I supposed that position of the key should't have a matter for the JSON objects parsers<br>
But here is looks like different</p>
<p>May be it is not a bug bug feature request because of it is just an unexpected behaivor</p>
<p>Im using kamailio 5.1.3 on the Debian 9</p>
<p>version: kamailio 5.1.3 (x86_64/linux)<br>
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES<br>
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB<br>
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.<br>
id: unknown<br>
compiled on 00:25:48 May  9 2018 with gcc 6.3.0</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/1550">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZSq3eL-QgHTi-Ix6-CRon_pLceMcks5t3YttgaJpZM4UR8u7">mute the thread</a>.<img src="https://github.com/notifications/beacon/AF36ZUHaP7nknj-9bxXAl7bcmFfYUV4eks5t3YttgaJpZM4UR8u7.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","potentialAction":{"@type":"ViewAction","target":"https://github.com/kamailio/kamailio/issues/1550","url":"https://github.com/kamailio/kamailio/issues/1550","name":"View Issue"},"description":"View this Issue on GitHub","publisher":{"@type":"Organization","name":"GitHub","url":"https://github.com"}}</script>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"JSONRPCS replacing keys in params gives unexpected behaivor (#1550)"}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1550"}}}</script>
<script type="application/ld+json">{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "37567f93-e2a7-4e2a-ad37-a9160fc62647",
"title": "JSONRPCS replacing keys in params gives unexpected behaivor (#1550)",
"sections": [
{
"text": "",
"activityTitle": "**ovoshlook**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@ovoshlook",
"facts": [
{
"name": "Repository: ",
"value": "kamailio/kamailio"
},
{
"name": "Issue #: ",
"value": 1550
}
]
}
],
"potentialAction": [
{
"name": "Add a comment",
"@type": "ActionCard",
"inputs": [
{
"isMultiLine": true,
"@type": "TextInput",
"id": "IssueComment",
"isRequired": false
}
],
"actions": [
{
"name": "Comment",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"kamailio/kamailio\",\n\"issueId\": 1550,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}"
}
]
},
{
"name": "Close issue",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueClose\",\n\"repositoryFullName\": \"kamailio/kamailio\",\n\"issueId\": 1550\n}"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/kamailio/kamailio/issues/1550"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 340249531\n}"
}
],
"themeColor": "26292E"
}</script>