<p>I don't think it worth adding C code for external SQL query needs. IIRC, during early SER times there was a command to execute any sql query via mi/fifo, but wasn't feasible and easy to maintain, therefore removed.</p>

<p>I kamctl can be added using db cli application (e.g., mysql) with a bit of grep/sed/awk will print only the value.</p>

<p>Fetching the value via xmlrpc should be possible via a bit of config scripting, inside route[XMLRPC] intercept the command before dispatch_rpc() (search over the body or using xmlops), do appropriate sql_query(...) via sqlops and push back a reply with a body in xmlrpc format.</p>

<p>I would propose to close this item here.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/kamailio/kamailio/issues/113#issuecomment-88467639">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZXzSWz1u7hwNDqsX4m_TADPTIhe8ks5n6-F8gaJpZM4Dxach.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
  <div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
    <link itemprop="url" href="https://github.com/kamailio/kamailio/issues/113#issuecomment-88467639"></link>
    <meta itemprop="name" content="View Issue"></meta>
  </div>
  <meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>