<div dir="ltr">Hey Alex, this worked well for me. <div><br></div><div>As far as the security portion goes, I just exposed the tcp on a separate port that is only accessible to linked containers. I feel like that should be sufficient.</div><div><br></div><div>Thank you for the direction!</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div>--</div><div>Chad McElligott<br></div><div><div><span style="font-size:12.8px">Digium, Inc. | Senior Software Developer</span><br></div><div>445 Jan Davis Drive NW - Huntsville, AL 35806 - US</div><div>direct: +1-256-434-5151 / <a href="mailto:cmcelligott@digium.com" target="_blank">cmcelligott@digium.com</a></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Fri, Aug 26, 2016 at 6:05 PM, Chad McElligott <span dir="ltr"><<a href="mailto:cmcelligott@digium.com" target="_blank">cmcelligott@digium.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Great, thanks Alex. I will give that a shot and see how it goes.</p><div class="HOEnZb"><div class="h5">
<div class="gmail_extra"><br><div class="gmail_quote">On Aug 26, 2016 5:42 PM, "Alex Balashov" <<a href="mailto:abalashov@evaristesys.com" target="_blank">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.htm<wbr>l</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.ht<wbr>ml#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>
</div></div></blockquote></div><br></div>