Hi Sebastian,
I have followed your configuration: event_route[xhttp:request] { *xlog("ALERT", "Logesh \n");* if ($hu =~ "^/jsonrpc") { xlog("L_NOTICE", "Got jsonrpc request, body '$rb'\n"); jsonrpc_dispatch(); } else { xhttp_reply("500", "Internal Server Error", "text/html", "<html><body>Unsupported URL $hu</body></html>"); } return; }
and I have added one more log to make sure the http hit is coming in .
I have used the http postman as you have suggested
http://$serverip:$server_port/jsonrpc
'{"id":260,"method":"lcr.reload","jsonrpc":"2.0","params":[]}' http://$kamailio_ip:$kamailio_port/jsonrpc
Eventhough The Http hit is not coming inside, I am not sure where I need to correct the mistake.
Please guide me.
Thanks & Kind Regards, Logeshwaran G
On Thu, Aug 17, 2017 at 1:26 PM, Logeshwaran G logeshwarangs@gmail.com wrote:
Thanks.
Yes I am having the route config as well:
# XMLRPC routing #!ifdef WITH_XMLRPC route[XMLRPC] { # allow XMLRPC from localhost if ((method=="POST" || method=="GET") && (src_ip==127.0.0.1)) { # close connection only for xmlrpclib user agents (there is a bug in # xmlrpclib: it waits for EOF before interpreting the response). if ($hdr(User-Agent) =~ "xmlrpclib") set_reply_close(); set_reply_no_connect(); dispatch_rpc(); exit; } send_reply("403", "Forbidden"); exit; } #!endif
But I am not sure , where I have missed in the config.
Thanks & Kind Regards, Logeshwaran G
On Thu, Aug 17, 2017 at 1:05 PM, Sebastian Damm damm@sipgate.de wrote:
On Thu, Aug 17, 2017 at 9:13 AM, Logeshwaran G logeshwarangs@gmail.com wrote:
Also If I commented the dispatch_rpc(); Kamailio is running but it dosent accepting the http request. Please Guide me.
Actually, it is all documented in the xmlrpc module. My example was for using jsonrpc, xmlrpc works a bit different.
http://www.kamailio.net/docs/modules/5.0.x/modules/xmlrpc.html
The xmlrpc module doesn't depend on the xhttp module, it works standalone. You need to specify the route name where xmlrpc requests will end up. In this route you call dispatch_rpc(), just as example 1.8 shows you: http://www.kamailio.net/docs/m odules/5.0.x/modules/xmlrpc.html#idp29963340
BR Sebastian
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users