<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hello,</p>
    <p>check the config file and be sure you do not have the event route
      block between some #!IFDEF ... #!ENDIF that is not enabled.</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <div class="moz-cite-prefix">On 13.06.19 13:40, Dhruva TS wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAEny=-=pKY=mgi_9KGSmVvfWj6z-42CPOgJLewkviSRK-MyrUg@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div dir="ltr">
          <div dir="ltr">
            <div>Hello,</div>
            <div><br>
            </div>
            <div>I am new to Kamailio and I am using Kamailio 5.2. When
              trying to the load the XHTTP module, event route not found
              error is thrown and XHTTP is module is not getting loaded.
              I am trying to use JSONRPC module through HTTP transport
              for RPC calls.  Using XMLRPC, things work fine.</div>
            <div><br>
            </div>
            <div> DEBUG: <core> [core/sr_module.c:896]:
              init_mod(): xhttp<br>
              ERROR: xhttp [xhttp_mod.c:136]: mod_init(): failed to find
              event_route[xhttp:request]<br>
              ERROR: <core> [core/sr_module.c:898]: init_mod():
              Error while initializing module xhttp
              (/usr/lib/kamailio/modules/xhttp.so)<br>
              ERROR: error while initializing modules</div>
            <div><br>
            </div>
            <div><br>
            </div>
            <div>I have added below to Kamailio.cfg file:</div>
            <span><span></span></span></div>
          <div><span><span>loadmodule "xhttp.so"</span></span></div>
          <div><span><span><br>
              </span></span></div>
          <div><span><span>
                <pre class="gmail-programlisting">event_route[xhttp:request] {
    if(src_ip!=127.0.0.1) {
        xhttp_reply("403", "Forbidden", "text/html",
            "<html><body>Not allowed from $si</body></html>");
        exit;
        }
        if ($hu =~ "^/RPC") {
                jsonrpc_dispatch();
        } else {
        xhttp_reply("200", "OK", "text/html",
            "<html><body>Wrong URL $hu</body></html>");
    }
    return;
}</pre>
              </span></span></div>
          <span><span>
              <div><span><span>Any help in this regard.</span></span></div>
              <div><span><span></span></span><br>
              </div>
              <div><span><span>Thanks,</span></span></div>
              <div><span><span>Dhruva<br>
                  </span></span></div>
            </span></span></div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a></pre>
  </body>
</html>