<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hello,</p>
<p>the rpc interface is not matching parameters by name, but by
possition. You can add them with name, but must be at the
right/expected possition.</p>
<p>In your last example, body field is out of parameters structure.
And as it was pointed out before, you need an id in the root
jsonrpc structure.</p>
<p>See some examples at:</p>
<p> -
<a class="moz-txt-link-freetext" href="https://www.kamailio.org/docs/modules/stable/modules/jsonrpcs.html#idm1028042236">https://www.kamailio.org/docs/modules/stable/modules/jsonrpcs.html#idm1028042236</a></p>
<p>Cheers,<br>
Daniel<br>
</p>
<div class="moz-cite-prefix">On 22.01.19 17:58, Володимир Іванець
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAOQgkjY+KNUekaRXFm4DR+uXvTNmX3aD7pW2DTHCgTS3UUDTUQ@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">Hello Serge,
<div><br>
</div>
<div>Thank you for clarifying this for me. But there is
different issue when I change format. It appears that
Kamailio indeed expects <b>body</b> under parameters <a
href="https://www.kamailio.org/docs/modules/5.2.x/modules/pua_rpc.html#pua_rpc.r.pua.publish"
moz-do-not-send="true">https://www.kamailio.org/docs/modules/5.2.x/modules/pua_rpc.html#pua_rpc.r.pua.publish</a>.</div>
<div><br>
</div>
<div>I run:</div>
<div>
<blockquote style="margin:0px 0px 0px
40px;border:none;padding:0px">
<div>
<div><i># curl -H "Content-Type: application/json"
-X POST -d '{"jsonrpc": "2.0", "method":
"pua.publish", "params": {"presentity_uri": "<a
href="mailto:sip%3Ajh@test.tutpro.com"
moz-do-not-send="true">sip:jh@test.tutpro.com</a>",
"expires": "600", "event package":
"message-summary", "content type":
"application/simple-message-summary", "id": "<a
href="mailto:4ce8c647a7b947c@172.16.30.151"
moz-do-not-send="true">4ce8c647a7b947c@172.16.30.151</a>",
"ETag": ".", "outbound proxy":
<a class="moz-txt-link-rfc2396E" href="sip:127.0.0.1:5060;transport=udp">"sip:127.0.0.1:5060;transport=udp"</a>,
"extra_headers": "P-Flags: 0"}, "body": 1}' <a
href="http://172.16.30.151:5060/JSON_RPC"
moz-do-not-send="true">http://172.16.30.151:5060/JSON_RPC</a></i></div>
</div>
</blockquote>
Result:<br>
<blockquote style="margin:0px 0px 0px
40px;border:none;padding:0px">
<div>
<div><i>{</i></div>
<div><i> "jsonrpc": "2.0",</i></div>
<div><i> "error": {</i></div>
<div><i> "code": 400,</i></div>
<div><i> "message": "Body is
missing"</i></div>
<div><i> }</i></div>
<div><i>}</i></div>
</div>
</blockquote>
</div>
<div><br>
</div>
<div>Debug:</div>
</div>
</div>
<blockquote style="margin:0px 0px 0px
40px;border:none;padding:0px">
<div dir="ltr">
<div dir="ltr">
<div>
<div><i>Jan 22 18:41:36 test kamailio: 14(27146)
DEBUG: <script>: == TRACE. xhttp:request</i></div>
<div><i>Jan 22 18:41:36 test kamailio: 14(27146)
DEBUG: <script>: == TRACE. xhttp:request.
/JSON_RPC</i></div>
<div><i>Jan 22 18:41:36 test kamailio: 14(27146)
DEBUG: <core>
[core/parser/msg_parser.c:185]: get_hdr_field():
content_length=355</i></div>
<div><i>Jan 22 18:41:36 test kamailio: 14(27146)
DEBUG: <core> [core/parser/msg_parser.c:89]:
get_hdr_field(): found end of header</i></div>
<div><i>Jan 22 18:41:36 test kamailio: 14(27146)
DEBUG: pua_rpc [pua_rpc.c:155]:
pua_rpc_publish_mode(): rpc publishing ...</i></div>
<div><i>Jan 22 18:41:36 test kamailio: 14(27146)
DEBUG: pua_rpc [pua_rpc.c:178]:
pua_rpc_publish_mode(): presentity uri '<a
href="mailto:sip%3Ajh@test.tutpro.com"
moz-do-not-send="true">sip:jh@test.tutpro.com</a>'</i></div>
<div><i>Jan 22 18:41:36 test kamailio: 14(27146)
DEBUG: pua_rpc [pua_rpc.c:193]:
pua_rpc_publish_mode(): expires '600'</i></div>
<div><i>Jan 22 18:41:36 test kamailio: 14(27146)
DEBUG: pua_rpc [pua_rpc.c:195]:
pua_rpc_publish_mode(): event 'message-summary'</i></div>
<div><i>Jan 22 18:41:36 test kamailio: 14(27146)
DEBUG: pua_rpc [pua_rpc.c:197]:
pua_rpc_publish_mode(): content type
'application/simple-message-summary'</i></div>
<div><i>Jan 22 18:41:36 test kamailio: 14(27146)
DEBUG: pua_rpc [pua_rpc.c:199]:
pua_rpc_publish_mode(): id '<a
href="mailto:4ce8c647a7b947c@172.16.30.151"
moz-do-not-send="true">4ce8c647a7b947c@172.16.30.151</a>'</i></div>
<div><i>Jan 22 18:41:36 test kamailio: 14(27146)
DEBUG: pua_rpc [pua_rpc.c:201]:
pua_rpc_publish_mode(): ETag '.'</i></div>
<div><i>Jan 22 18:41:36 test kamailio: 14(27146)
DEBUG: pua_rpc [pua_rpc.c:203]:
pua_rpc_publish_mode(): outbound_proxy
'<a class="moz-txt-link-freetext" href="sip:127.0.0.1:5060;transport=udp">sip:127.0.0.1:5060;transport=udp</a>'</i></div>
<div><i>Jan 22 18:41:36 test kamailio: 14(27146)
DEBUG: pua_rpc [pua_rpc.c:205]:
pua_rpc_publish_mode(): extra headers 'P-Flags: 0'</i></div>
<div><i>Jan 22 18:41:36 test kamailio: 14(27146)
ERROR: pua_rpc [pua_rpc.c:211]:
pua_rpc_publish_mode(): body is missing, but
content type is not .</i></div>
<div><i>Jan 22 18:41:36 test kamailio: 14(27146)
DEBUG: jsonrpcs [jsonrpcs_mod.c:423]:
jsonrpc_send(): sending response with body:
0x7ffc3b0e2290 - 400 Body is missing</i></div>
<div><i>Jan 22 18:41:36 test kamailio: 14(27146)
DEBUG: xhttp [xhttp_mod.c:429]:
xhttp_send_reply(): response with content-type:
application/json</i></div>
<div><i>Jan 22 18:41:36 test kamailio: 14(27146)
DEBUG: xhttp [xhttp_mod.c:439]:
xhttp_send_reply(): response with body: {</i></div>
<div><i>Jan 22 18:41:36 test kamailio:
"jsonrpc":#011"2.0",</i></div>
<div><i>Jan 22 18:41:36 test kamailio: "error":#011{</i></div>
<div><i>Jan 22 18:41:36 test kamailio: "code":#011400,</i></div>
<div><i>Jan 22 18:41:36 test kamailio:
"message":#011"Body is missing"</i></div>
<div><i>Jan 22 18:41:36 test kamailio: }</i></div>
<div><i>Jan 22 18:41:36 test kamailio: }</i></div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">вт, 22 січ. 2019 о 17:05 Serge
S. Yuriev <<a href="mailto:me@nevian.org"
moz-do-not-send="true">me@nevian.org</a>> пише:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi<br>
<br>
id is not inside params but must to be at top-level.<br>
<br>
You have to read JSONRPC specs %)<br>
<a href="https://www.jsonrpc.org/specification"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://www.jsonrpc.org/specification</a><br>
<br>
On 22/01/2019 13:47, Володимир Іванець wrote:<br>
> Hello Henning,<br>
> <br>
> Thank you for your message. I tried setting *id* too but
got same result.<br>
> <br>
> /# curl -H "Content-Type: application/json" -X POST
-d '{"jsonrpc":<br>
> "2.0", "method": "pua.publish", "params":
{"presentity_uri":<br>
> "<a href="mailto:sip%3Ah@test.tutpro.com"
target="_blank" moz-do-not-send="true">sip:h@test.tutpro.com</a>
<mailto:<a href="mailto:sip%253Ah@test.tutpro.com"
target="_blank" moz-do-not-send="true">sip%3Ah@test.tutpro.com</a>>",
"expires":<br>
> "600", "event package": "message-summary", "content
type":<br>
> "application/simple-message-summary", "id":<br>
> "NmU0MjI0NWM4ZjI3MWI3NTNlMTJhOWNlZWJlMWE0Yzg.",
"ETag": ".",<br>
> "outbound proxy": <a class="moz-txt-link-rfc2396E" href="sip:127.0.0.1:5060;transport=udp">"sip:127.0.0.1:5060;transport=udp"</a>,<br>
> "extra_headers": "P-Flags: 0", "body": "."}}'<br>
> <a href="http://172.16.30.151:5060/JSON_RPC/"
rel="noreferrer" target="_blank" moz-do-not-send="true">http://172.16.30.151:5060/JSON_RPC/</a><br>
> /{/<br>
> / "jsonrpc": "2.0",/<br>
> / "error": {/<br>
> / "code": 500,/<br>
> / "message": "Internal error:
failed to create<br>
> context"/<br>
> / }/<br>
> /}/<br>
> <br>
> <br>
> <br>
> /Jan 22 12:40:54 test kamailio: 16(26145) DEBUG:
<script>: == TRACE.<br>
> xhttp:request/<br>
> /Jan 22 12:40:54 test kamailio: 16(26145) DEBUG:
<script>: == TRACE.<br>
> xhttp:request. /JSON_RPC/<br>
> /Jan 22 12:40:54 test kamailio: 16(26145) DEBUG:
<core><br>
> [core/parser/msg_parser.c:185]: get_hdr_field():
content_length=372/<br>
> /Jan 22 12:40:54 test kamailio: 16(26145) DEBUG:
<core><br>
> [core/parser/msg_parser.c:89]: get_hdr_field(): found
end of header/<br>
> /Jan 22 12:40:54 test kamailio: 16(26145) DEBUG:
pua_rpc<br>
> [pua_rpc.c:155]: pua_rpc_publish_mode(): rpc
publishing .../<br>
> /Jan 22 12:40:54 test kamailio: 16(26145) DEBUG:
pua_rpc<br>
> [pua_rpc.c:178]: pua_rpc_publish_mode(): presentity
uri<br>
> '<a href="mailto:sip%3Ajh@test.tutpro.com"
target="_blank" moz-do-not-send="true">sip:jh@test.tutpro.com</a>
<mailto:<a href="mailto:sip%253Ajh@test.tutpro.com"
target="_blank" moz-do-not-send="true">sip%3Ajh@test.tutpro.com</a>>'/<br>
> /Jan 22 12:40:54 test kamailio: 16(26145) DEBUG:
pua_rpc<br>
> [pua_rpc.c:193]: pua_rpc_publish_mode(): expires
'600'/<br>
> /Jan 22 12:40:54 test kamailio: 16(26145) DEBUG:
pua_rpc<br>
> [pua_rpc.c:195]: pua_rpc_publish_mode(): event
'message-summary'/<br>
> /Jan 22 12:40:54 test kamailio: 16(26145) DEBUG:
pua_rpc<br>
> [pua_rpc.c:197]: pua_rpc_publish_mode(): content type<br>
> 'application/simple-message-summary'/<br>
> /Jan 22 12:40:54 test kamailio: 16(26145) DEBUG:
pua_rpc<br>
> [pua_rpc.c:199]: pua_rpc_publish_mode(): id<br>
> 'NmU0MjI0NWM4ZjI3MWI3NTNlMTJhOWNlZWJlMWE0Yzg.'/<br>
> /Jan 22 12:40:54 test kamailio: 16(26145) DEBUG:
pua_rpc<br>
> [pua_rpc.c:201]: pua_rpc_publish_mode(): ETag '.'/<br>
> /Jan 22 12:40:54 test kamailio: 16(26145) DEBUG:
pua_rpc<br>
> [pua_rpc.c:203]: pua_rpc_publish_mode():
outbound_proxy<br>
> '<a class="moz-txt-link-freetext" href="sip:127.0.0.1:5060;transport=udp'/">sip:127.0.0.1:5060;transport=udp'/</a><br>
> /Jan 22 12:40:54 test kamailio: 16(26145) DEBUG:
pua_rpc<br>
> [pua_rpc.c:205]: pua_rpc_publish_mode(): extra
headers 'P-Flags: 0'/<br>
> /Jan 22 12:40:54 test kamailio: 16(26145) DEBUG:
pua_rpc<br>
> [pua_rpc.c:207]: pua_rpc_publish_mode(): body '.'/<br>
> /Jan 22 12:40:54 test kamailio: 16(26145) ERROR:
jsonrpcs<br>
> [jsonrpcs_mod.c:1010]: jsonrpc_delayed_ctx_new(): id
attribute is<br>
> missing/<br>
> /Jan 22 12:40:54 test kamailio: 16(26145) ERROR:
pua_rpc<br>
> [pua_rpc.c:256]: pua_rpc_publish_mode(): internal
error: failed to<br>
> create context/<br>
> /Jan 22 12:40:54 test kamailio: 16(26145) DEBUG:
jsonrpcs<br>
> [jsonrpcs_mod.c:423]: jsonrpc_send(): sending
response with body:<br>
> 0x7ffd167c0ef0 - 500 Internal error: failed to create
context/<br>
> /Jan 22 12:40:54 test kamailio: 16(26145) DEBUG:
xhttp<br>
> [xhttp_mod.c:429]: xhttp_send_reply(): response with
content-type:<br>
> application/json/<br>
> /Jan 22 12:40:54 test kamailio: 16(26145) DEBUG:
xhttp<br>
> [xhttp_mod.c:439]: xhttp_send_reply(): response with
body: {/<br>
> /Jan 22 12:40:54 test kamailio: "jsonrpc":#011"2.0",/<br>
> /Jan 22 12:40:54 test kamailio: "error":#011{/<br>
> /Jan 22 12:40:54 test kamailio: "code":#011500,/<br>
> /Jan 22 12:40:54 test kamailio:
"message":#011"Internal error:<br>
> failed to create context"/<br>
> /Jan 22 12:40:54 test kamailio: }/<br>
> /Jan 22 12:40:54 test kamailio: }/<br>
> /Jan 22 12:40:54 test kamailio: 16(26145) DEBUG:
xhttp<br>
> [xhttp_mod.c:441]: xhttp_send_reply(): sending out
response: 500<br>
> Internal error: failed to create context/<br>
> /Jan 22 12:40:54 test kamailio: 16(26145) DEBUG:
<core><br>
> [core/msg_translator.c:162]: check_via_address():
(172.16.30.151,<br>
> 172.16.30.151, 0)/<br>
> /Jan 22 12:40:54 test kamailio: 16(26145) DEBUG:
<core><br>
> [core/tcp_main.c:2226]: tcpconn_send_put(): send from
reader (26145<br>
> (16)), reusing fd/<br>
> /Jan 22 12:40:54 test kamailio: 16(26145) DEBUG:
<core><br>
> [core/tcp_main.c:2460]: tcpconn_do_send():
sending.../<br>
> /Jan 22 12:40:54 test kamailio: 16(26145) DEBUG:
<core><br>
> [core/tcp_main.c:2494]: tcpconn_do_send(): after real
write: c=<br>
> 0x7f8b7f314f68 n=297 fd=8/<br>
> /Jan 22 12:40:54 test kamailio: 16(26145) DEBUG:
<core><br>
> [core/tcp_main.c:2495]: tcpconn_do_send(): buf=/<br>
> /Jan 22 12:40:54 test kamailio: HTTP/1.1 500 Internal
error: failed<br>
> to create context/<br>
> /Jan 22 12:40:54 test kamailio: Sia: SIP/2.0/TCP <a
href="http://172.16.30.151:44226" rel="noreferrer"
target="_blank" moz-do-not-send="true">172.16.30.151:44226</a><br>
> <<a href="http://172.16.30.151:44226"
rel="noreferrer" target="_blank" moz-do-not-send="true">http://172.16.30.151:44226</a>>/<br>
> /Jan 22 12:40:54 test kamailio: Content-Type:
application/json/<br>
> /Jan 22 12:40:54 test kamailio: Server: kamailio
(5.2.1 (x86_64/linux))/<br>
> /Jan 22 12:40:54 test kamailio: Content-Length: 108/<br>
> /Jan 22 12:40:54 test kamailio: {/<br>
> /Jan 22 12:40:54 test kamailio: "jsonrpc":#011"2.0",/<br>
> /Jan 22 12:40:54 test kamailio: "error":#011{/<br>
> /Jan 22 12:40:54 test kamailio: "code":#011500,/<br>
> /Jan 22 12:40:54 test kamailio:
"message":#011"Internal error:<br>
> failed to create context"/<br>
> /Jan 22 12:40:54 test kamailio: }/<br>
> /Jan 22 12:40:54 test kamailio: }/<br>
> <br>
> <br>
> пн, 21 січ. 2019 о 23:16 Henning Westerholt <<a
href="mailto:hw@kamailio.org" target="_blank"
moz-do-not-send="true">hw@kamailio.org</a> <br>
> <mailto:<a href="mailto:hw@kamailio.org"
target="_blank" moz-do-not-send="true">hw@kamailio.org</a>>>
пише:<br>
> <br>
> Am Montag, 21. Januar 2019, 19:10:11 CET schrieb
Володимир Іванець:<br>
> > Are you able to generate PUBLISH message with
jsonrpcs? I can<br>
> only do it<br>
> > with xmlrpc. Kamailio version is 5.2.1.<br>
> ><br>
> > When I use jsonrpc:<br>
> <br>
> Hello,<br>
> <br>
> not looked that deep into it, but have you tried to
set an id (as<br>
> reported<br>
> from this error message?<br>
> <br>
> Jan 21 19:37:58 test kamailio: 13(25583) ERROR:
jsonrpcs<br>
> [jsonrpcs_mod.c:<br>
> 1010]: jsonrpc_delayed_ctx_new(): id attribute is
missing<br>
> <br>
> Best regards,<br>
> <br>
> Henning<br>
> <br>
> <br>
> > *# curl -H "Content-Type: application/json" -X
POST -d<br>
> '{"jsonrpc": "2.0",<br>
> > "method": "pua.publish", "params":
{"presentity_uri":<br>
> > "<a href="mailto:sip%3Ajh@test.tutpro.com"
target="_blank" moz-do-not-send="true">sip:jh@test.tutpro.com</a>
<mailto:<a href="mailto:sip%253Ajh@test.tutpro.com"
target="_blank" moz-do-not-send="true">sip%3Ajh@test.tutpro.com</a>><br>
> <<a href="mailto:sip%253Ajh@test.tutpro.com"
target="_blank" moz-do-not-send="true">sip%3Ajh@test.tutpro.com</a>
<mailto:<a href="mailto:sip%25253Ajh@test.tutpro.com"
target="_blank" moz-do-not-send="true">sip%253Ajh@test.tutpro.com</a>>>",<br>
> "expires": "600",<br>
> > "event package": "message-summary", "content
type":<br>
> > "application/simple-message-summary", "id":
".", "ETag": ".",<br>
> "outbound<br>
> > proxy": <a class="moz-txt-link-rfc2396E" href="sip:127.0.0.1:5060;transport=udp">"sip:127.0.0.1:5060;transport=udp"</a>,
"extra_headers":<br>
> "P-Flags: 0",<br>
> > "body": "."}}' <a
href="http://172.16.30.151:5060/JSON_RPC" rel="noreferrer"
target="_blank" moz-do-not-send="true">http://172.16.30.151:5060/JSON_RPC</a><br>
> > <<a
href="http://172.16.30.151:5060/JSON_RPC" rel="noreferrer"
target="_blank" moz-do-not-send="true">http://172.16.30.151:5060/JSON_RPC</a>>*<br>
> ><br>
> > I get:<br>
> ><br>
> > *{*<br>
> > * "jsonrpc": "2.0",*<br>
> > * "error": {*<br>
> > * "code": 500,*<br>
> > * "message": "Internal
error: failed to<br>
> create context"*<br>
> > * }*<br>
> ><br>
> ><br>
> > Debug output:<br>
> ><br>
> > *Jan 21 19:37:58 test kamailio: 13(25583)
DEBUG: <script>: == TRACE.<br>
> > xhttp:request*<br>
> > *Jan 21 19:37:58 test kamailio: 13(25583)
DEBUG: <script>: == TRACE.<br>
> > xhttp:request. /JSON_RPC*<br>
> > *Jan 21 19:37:58 test kamailio: 13(25583)
DEBUG: <core><br>
> > [core/parser/msg_parser.c:185]:
get_hdr_field(): content_length=329*<br>
> > *Jan 21 19:37:58 test kamailio: 13(25583)
DEBUG: <core><br>
> > [core/parser/msg_parser.c:89]: get_hdr_field():
found end of header*<br>
> > *Jan 21 19:37:58 test kamailio: 13(25583)
DEBUG: pua_rpc<br>
> [pua_rpc.c:155]:<br>
> > pua_rpc_publish_mode(): rpc publishing ...*<br>
> > *Jan 21 19:37:58 test kamailio: 13(25583)
DEBUG: pua_rpc<br>
> [pua_rpc.c:178]:<br>
> > pua_rpc_publish_mode(): presentity uri '<a
href="mailto:sip%3Ajh@test.tutpro.com" target="_blank"
moz-do-not-send="true">sip:jh@test.tutpro.com</a><br>
> <mailto:<a
href="mailto:sip%253Ajh@test.tutpro.com" target="_blank"
moz-do-not-send="true">sip%3Ajh@test.tutpro.com</a>><br>
> > <<a href="mailto:sip%253Ajh@test.tutpro.com"
target="_blank" moz-do-not-send="true">sip%3Ajh@test.tutpro.com</a>
<mailto:<a href="mailto:sip%25253Ajh@test.tutpro.com"
target="_blank" moz-do-not-send="true">sip%253Ajh@test.tutpro.com</a>>>'*<br>
> > *Jan 21 19:37:58 test kamailio: 13(25583)
DEBUG: pua_rpc<br>
> [pua_rpc.c:193]:<br>
> > pua_rpc_publish_mode(): expires '600'*<br>
> > *Jan 21 19:37:58 test kamailio: 13(25583)
DEBUG: pua_rpc<br>
> [pua_rpc.c:195]:<br>
> > pua_rpc_publish_mode(): event
'message-summary'*<br>
> > *Jan 21 19:37:58 test kamailio: 13(25583)
DEBUG: pua_rpc<br>
> [pua_rpc.c:197]:<br>
> > pua_rpc_publish_mode(): content type<br>
> 'application/simple-message-summary'*<br>
> > *Jan 21 19:37:58 test kamailio: 13(25583)
DEBUG: pua_rpc<br>
> [pua_rpc.c:199]:<br>
> > pua_rpc_publish_mode(): id '.'*<br>
> > *Jan 21 19:37:58 test kamailio: 13(25583)
DEBUG: pua_rpc<br>
> [pua_rpc.c:201]:<br>
> > pua_rpc_publish_mode(): ETag '.'*<br>
> > *Jan 21 19:37:58 test kamailio: 13(25583)
DEBUG: pua_rpc<br>
> [pua_rpc.c:203]:<br>
> > pua_rpc_publish_mode(): outbound_proxy<br>
> '<a class="moz-txt-link-freetext" href="sip:127.0.0.1:5060;transport=udp'*">sip:127.0.0.1:5060;transport=udp'*</a><br>
> > *Jan 21 19:37:58 test kamailio: 13(25583)
DEBUG: pua_rpc<br>
> [pua_rpc.c:205]:<br>
> > pua_rpc_publish_mode(): extra headers 'P-Flags:
0'*<br>
> > *Jan 21 19:37:58 test kamailio: 13(25583)
DEBUG: pua_rpc<br>
> [pua_rpc.c:207]:<br>
> > pua_rpc_publish_mode(): body '.'*<br>
> > *Jan 21 19:37:58 test kamailio: 13(25583)
ERROR: jsonrpcs<br>
> > [jsonrpcs_mod.c:1010]:
jsonrpc_delayed_ctx_new(): id attribute is<br>
> missing*<br>
> > *Jan 21 19:37:58 test kamailio: 13(25583)
ERROR: pua_rpc<br>
> [pua_rpc.c:256]:<br>
> > pua_rpc_publish_mode(): internal error: failed
to create context*<br>
> > *Jan 21 19:37:58 test kamailio: 13(25583)
DEBUG: jsonrpcs<br>
> > [jsonrpcs_mod.c:423]: jsonrpc_send(): sending
response with body:<br>
> > 0x7fffc28e6e80 - 500 Internal error: failed to
create context*<br>
> > *Jan 21 19:37:58 test kamailio: 13(25583)
DEBUG: xhttp<br>
> [xhttp_mod.c:429]:<br>
> > xhttp_send_reply(): response with content-type:
application/json*<br>
> > *Jan 21 19:37:58 test kamailio: 13(25583)
DEBUG: xhttp<br>
> [xhttp_mod.c:439]:<br>
> > xhttp_send_reply(): response with body: {*<br>
> > *Jan 21 19:37:58 test kamailio:
"jsonrpc":#011"2.0",*<br>
> > *Jan 21 19:37:58 test kamailio: "error":#011{*<br>
> > *Jan 21 19:37:58 test kamailio:
"code":#011500,*<br>
> > *Jan 21 19:37:58 test kamailio:
"message":#011"Internal error:<br>
> failed to<br>
> > create context"*<br>
> > *Jan 21 19:37:58 test kamailio: }*<br>
> > *Jan 21 19:37:58 test kamailio: }*<br>
> > *Jan 21 19:37:58 test kamailio: 13(25583)
DEBUG: xhttp<br>
> [xhttp_mod.c:441]:<br>
> > xhttp_send_reply(): sending out response: 500
Internal error:<br>
> failed to<br>
> > create context*<br>
> > *Jan 21 19:37:58 test kamailio: 13(25583)
DEBUG: <core><br>
> > [core/msg_translator.c:162]:
check_via_address(): (172.16.30.151,<br>
> > 172.16.30.151, 0)*<br>
> > *Jan 21 19:37:58 test kamailio: 13(25583)
DEBUG: <core><br>
> > [core/tcp_main.c:2226]: tcpconn_send_put():
send from reader<br>
> (25583 (13)),<br>
> > reusing fd*<br>
> > *Jan 21 19:37:58 test kamailio: 13(25583)
DEBUG: <core><br>
> > [core/tcp_main.c:2460]: tcpconn_do_send():
sending...*<br>
> > *Jan 21 19:37:58 test kamailio: 13(25583)
DEBUG: <core><br>
> > [core/tcp_main.c:2494]: tcpconn_do_send():
after real write: c=<br>
> > 0x7f7af5a39888 n=297 fd=8*<br>
> > *Jan 21 19:37:58 test kamailio: 13(25583)
DEBUG: <core><br>
> > [core/tcp_main.c:2495]: tcpconn_do_send():
buf=*<br>
> > *Jan 21 19:37:58 test kamailio: HTTP/1.1 500
Internal error:<br>
> failed to<br>
> > create context*<br>
> > *Jan 21 19:37:58 test kamailio: Sia:
SIP/2.0/TCP<br>
> <a href="http://172.16.30.151:44122" rel="noreferrer"
target="_blank" moz-do-not-send="true">172.16.30.151:44122</a>
<<a href="http://172.16.30.151:44122" rel="noreferrer"
target="_blank" moz-do-not-send="true">http://172.16.30.151:44122</a>><br>
> > <<a href="http://172.16.30.151:44122"
rel="noreferrer" target="_blank" moz-do-not-send="true">http://172.16.30.151:44122</a>>*<br>
> > *Jan 21 19:37:58 test kamailio: Content-Type:
application/json*<br>
> > *Jan 21 19:37:58 test kamailio: Server:
kamailio (5.2.1<br>
> (x86_64/linux))*<br>
> > *Jan 21 19:37:58 test kamailio: Content-Length:
108*<br>
> > *Jan 21 19:37:58 test kamailio: {*<br>
> > *Jan 21 19:37:58 test kamailio:
"jsonrpc":#011"2.0",*<br>
> > *Jan 21 19:37:58 test kamailio: "error":#011{*<br>
> > *Jan 21 19:37:58 test kamailio:
"code":#011500,*<br>
> > *Jan 21 19:37:58 test kamailio:
"message":#011"Internal error:<br>
> failed to<br>
> > create context"*<br>
> > *Jan 21 19:37:58 test kamailio: }*<br>
> > *Jan 21 19:37:58 test kamailio: }*<br>
> ><br>
> > Thanks!<br>
> ><br>
> > пн, 17 вер. 2018 о 09:18 Juha Heinanen <<a
href="mailto:jh@tutpro.com" target="_blank"
moz-do-not-send="true">jh@tutpro.com</a><br>
> <mailto:<a href="mailto:jh@tutpro.com"
target="_blank" moz-do-not-send="true">jh@tutpro.com</a>>>
пише:<br>
> > > willy writes:<br>
> > > > Have anyone tried to use pua.publish
to send MWI<br>
> notification? Can it<br>
> > > > work at all?<br>
> > > ><br>
> > > > I'm sending request through jsonrpc
server, but it is not<br>
> dispatched by<br>
> > > > handle_publish.<br>
> > ><br>
> > > It works fine here. Last week I noticed
an issue with<br>
> pua.publish over<br>
> > > jsonrpc and it was fixed. Even before the
fix, pua.publish<br>
> worked, but<br>
> > > an error message was issued.<br>
> <br>
> <br>
> <br>
> <br>
> _______________________________________________<br>
> Kamailio (SER) - Users Mailing List<br>
> <a href="mailto:sr-users@lists.kamailio.org"
target="_blank" moz-do-not-send="true">sr-users@lists.kamailio.org</a><br>
> <a
href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
> <br>
<br>
-- <br>
Serge S. Yuriev<br>
Senior VoIP engineer<br>
<br>
<br>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank"
moz-do-not-send="true">sr-users@lists.kamailio.org</a><br>
<a
href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<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 World Conference - May 6-8, 2019 -- <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a>
Kamailio Advanced Training - Mar 4-6, 2019 in Berlin; Mar 25-27, 2019, in Washington, DC, USA -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a></pre>
</body>
</html>