<p>It seems mi_xmlrpc_ng &amp; mi_json can not build the XMLRPC or JSON answer when the modules are used together with pua_publish.</p>

<p>Jun 11 15:55:45 golgoth05 opensips[31577]: DBG:mi_json:mi_json_answer_to_connection: got an async reply<br><br>
Jun 11 15:55:45 golgoth05 opensips[31577]: DBG:httpd:answer_to_connection: MHD_create_response_from_callback<br>
Jun 11 15:55:45 golgoth05 opensips[31577]: ERROR:mi_json:mi_json_flush_data: Unexpected NULL mi handler!</p>

<p>This "Unexpected NULL mi handler" when building the module response to the query happens with both modules.</p>

<p>Attached is a script that reproduces the error. The system should probably return a 500 Internal Server error. Please note that when I submit a wrong XML document using mi_json through a command-line telnet, it seems to work. But both XMLRPC and mi_json trigger the bug when being invoked from a PHP script. Perhaps there is a timing issue or something similar.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/OpenSIPS/opensips/issues/552">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AFOciSBrOcV8HDBMHL3lVTljsqAWBOzIks5oSZZJgaJpZM4E_y9-.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/OpenSIPS/opensips/issues/552"></link>
    <meta itemprop="name" content="View Issue"></meta>
  </div>
  <meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>