<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <tt>Hi,<br>
      <br>
      I performed the following:<br>
      <br>
      # kamcmd dbg.trace on</tt><br>
    <tt># curl --header 'Content-Type: application/json' \</tt><tt><br>
    </tt><tt>    </tt><tt>--data-binary '{\</tt><tt><br>
    </tt><tt>      </tt><tt>"jsonrpc": "2.0", \</tt><tt><br>
    </tt><tt>      </tt><tt>"method": "ul.lookup", \</tt><tt><br>
    </tt><tt>      </tt><tt>"params": [ "location",</tt><tt><a
        class="moz-txt-link-rfc2396E" href="mailto:user@example.com">"user@example.com"</a></tt><tt>
      ], \</tt><tt><br>
    </tt><tt>      </tt><tt>"id": 3 }' </tt><tt><a
        class="moz-txt-link-freetext"
        href="http://registrar.example.com/rpc">http://registrar.example.com/rpc</a></tt><tt><br>
      # kamcmd dbg.trace off<br>
      <br>
      And the following was presented in the log file<br>
      <br>
      [5843]: ERROR: *** cfgtrace:request_route=[xhttp:request]
      c=[/etc/kamailio/routing_logic.cfg] l=301 a=63 n=assign<br>
      [5843]: ERROR: *** cfgtrace:request_route=[xhttp:request]
      c=[/etc/kamailio/routing_logic.cfg] l=305 a=16 n=if<br>
      [5843]: ERROR: *** cfgtrace:request_route=[xhttp:request]
      c=[/etc/kamailio/routing_logic.cfg] l=303 a=24 n=jsonrpc_dispatch<br>
      [5843]: ERROR: *** cfgtrace:request_route=[xhttp:request]
      c=[/etc/kamailio/routing_logic.cfg] l=305 a=63 n=assign<br>
      [5843]: ERROR: *** cfgtrace:request_route=[xhttp:request]
      c=[/etc/kamailio/routing_logic.cfg] l=313 a=16 n=if<br>
      [5843]: ERROR: *** cfgtrace:request_route=[xhttp:request]
      c=[/etc/kamailio/routing_logic.cfg] l=314 a=28 n=xhttp_reply<br>
      [5843]: ERROR: <core> [core/data_lump_rpl.c:83]:
      add_lump_rpl2(): LUMP_RPL_BODY already added!<br>
      [5843]: ERROR: xhttp [xhttp_mod.c:410]: xhttp_send_reply(): Error
      while adding reply lump<br>
      <br>
      The relevent request route is as follows:<br>
      <br>
      # Handling HTTP events<br>
      event_route[xhttp:request] {<br>
              $var(xhttp_rpc_root) = $(hu{s.substr,0,4});<br>
              if ($var(xhttp_rpc_root) == "/rpc") {<br>
                      jsonrpc_dispatch();<br>
              }<br>
              $var(xhttp_rpc_root) = $(hu{s.substr,0,9});<br>
              if ($var(xhttp_rpc_root) == "/http_rpc") {<br>
                      dispatch_xhttp_rpc();<br>
              }<br>
              #$var(xhttp_rpc_root) = $(hu{s.substr,0,8});<br>
              #if ($var(xhttp_rpc_root) == "/http_pi") {<br>
              #        dispatch_xhttp_pi();<br>
              #}<br>
              xhttp_reply("200", "OK", "text/html",<br>
                      "<html><body>Wrong URL
      $hu</body></html>");<br>
      }<br>
      <br>
      Just looking at the above event route, do I need to "exit" the if
      statements above, would the last xhttp_reply be causing this
      error?<br>
      <br>
      Thanks<br>
      <br>
    </tt><br>
    <div class="moz-cite-prefix">On 18/05/18 13:52, Daniel-Constantin
      Mierla wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:ba37ebd9-12d4-044f-6441-6504d23a02cc@gmail.com">
      <pre wrap="">this sounds like the body for reply was already set. Can you enable
cfgtrace in debugger module and see what actions are executed in that
situation?</pre>
    </blockquote>
    <br>
  </body>
</html>