<p dir="ltr">Great, thanks Alex. I will give that a shot and see how it goes.</p>
<div class="gmail_extra"><br><div class="gmail_quote">On Aug 26, 2016 5:42 PM, "Alex Balashov" <<a href="mailto:abalashov@evaristesys.com">abalashov@evaristesys.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello Chad,<br>
<br>
My suggestion would be to use the 'jsonrpc-s' module:<br>
<br>
<a href="http://kamailio.org/docs/modules/4.4.x/modules/jsonrpc-s.html" rel="noreferrer" target="_blank">http://kamailio.org/docs/modul<wbr>es/4.4.x/modules/jsonrpc-s.<wbr>html</a><br>
<br>
This runs over the 'xhttp' module, and requires enabling the TCP transport. However, the end result is that with very little config script, it will allow you to run next-generation RPC commands, including the equivalent of 'ds_reload', 'dispatcher.reload':<br>
<br>
<a href="http://kamailio.org/docs/modules/4.4.x/modules/dispatcher.html#dispatcher.f.reload" rel="noreferrer" target="_blank">http://kamailio.org/docs/modul<wbr>es/4.4.x/modules/dispatcher.<wbr>html#dispatcher.f.reload</a><br>
<br>
You would run it using something like this:<br>
<br>
$ curl -v -H 'Content-Type: application/json' \<br>
-H 'Call-ID: abc12' \<br>
-d '{"jsonrpc": "2.0", "method": "dispatcher.reload", "id": "0deadb33f"}' \<br>
<a href="http://your.kamailio.server:5060/rpc_path/" rel="noreferrer" target="_blank">http://your.kamailio.server:50<wbr>60/rpc_path/</a><br>
<br>
The basic boilerplate is as simple as:<br>
<br>
----<br>
<br>
listen=tcp:<a href="http://0.0.0.0:5060" rel="noreferrer" target="_blank">0.0.0.0:5060</a><br>
<br>
loadmodule "xhttp"<br>
loadmodule "jsonrpc-s"<br>
<br>
modparam("xhttp", "url_match", "^/rpc_path/")<br>
modparam("jsonrpc-s", "pretty_format", 1)<br>
<br>
event_route[xhttp:request] {<br>
   if($hu =~ "^/rpc_path")<br>
      jsonrpc_dispatch();<br>
   else<br>
      xhttp_reply("404", "Not Found", "text/html", "");<br>
}<br>
<br>
----<br>
<br>
Of course, in the real world, you'll want to consider authentication, IP ACLs, and other things that go into some sort of security thought process. But that's the basic idea.<br>
<br>
-- Alex<br>
<br>
-- <br>
Alex Balashov | Principal | Evariste Systems LLC<br>
<br>
Tel: +1-706-510-6800 (direct) / +1-800-250-5920 (toll-free)<br>
Web: <a href="http://www.evaristesys.com/" rel="noreferrer" target="_blank">http://www.evaristesys.com/</a>, <a href="http://www.csrpswitch.com/" rel="noreferrer" target="_blank">http://www.csrpswitch.com/</a><br>
<br>
______________________________<wbr>_________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">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/cg<wbr>i-bin/mailman/listinfo/sr-user<wbr>s</a><br>
</blockquote></div></div>