<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    so they can call without being asked for password? Are they valid
    users anyhow or unknown ones. Were you able to grab a sip trace for
    such calls? If yes, send it here.<br>
    <br>
    What I would recommend, is to enable cfgtrace from debugger module
    and see what actions are executed from configuration file.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <div class="moz-cite-prefix">On 22/09/14 15:28, Ashwin Jain wrote:<br>
    </div>
    <blockquote
cite="mid:CAM9SNVQCmpx=e3Ebnvxamovnx1VyvPsq916jbj1dAzymvECYHQ@mail.gmail.com"
      type="cite">
      <div dir="ltr"><span
          style="font-family:arial,sans-serif;font-size:13px">Hi all,</span>
        <div style="font-family:arial,sans-serif;font-size:13px"><br>
        </div>
        <div style="font-family:arial,sans-serif;font-size:13px">I am
          using Kamailio to front my freeswitch servers and it is
          working great. I am getting some problems with authentication,
          sometimes users which are not registered with kamailio are
          also able to make calls. I have a feeling that I am doing
          something really silly with kamailio routing. Following is the
          AUTH route that I am using, please let me know I am missing
          something very obvious.</div>
        <div style="font-family:arial,sans-serif;font-size:13px"><br>
        </div>
        <div style="font-family:arial,sans-serif;font-size:13px">
          <div>route[AUTH] {</div>
          <div>#!ifdef WITH_AUTH</div>
          <div><br>
          </div>
          <div>#!ifdef WITH_FREESWITCH</div>
          <div>    if(route(FSINBOUND))</div>
          <div>        return;</div>
          <div>#!endif</div>
          <div><br>
          </div>
          <div>#!ifdef WITH_IPAUTH</div>
          <div><span style="white-space:pre-wrap"> </span>if((!is_method("REGISTER"))
            && allow_source_address())</div>
          <div><span style="white-space:pre-wrap"> </span>{</div>
          <div><span style="white-space:pre-wrap"> </span># source IP
            allowed</div>
          <div><span style="white-space:pre-wrap"> </span>return;</div>
          <div><span style="white-space:pre-wrap"> </span>}</div>
          <div>#!endif</div>
          <div><br>
          </div>
          <div><span style="white-space:pre-wrap"> </span>if
            (is_method("REGISTER") || from_uri==myself)</div>
          <div><span style="white-space:pre-wrap"> </span>{</div>
          <div><span style="white-space:pre-wrap"> </span>#
            authenticate requests</div>
          <div><span style="white-space:pre-wrap"> </span>if
            (!auth_check("$fd", "subscriber", "1")) {</div>
          <div><span style="white-space:pre-wrap"> </span>auth_challenge("$fd",
            "0");</div>
          <div><span style="white-space:pre-wrap"> </span>exit;</div>
          <div><span style="white-space:pre-wrap"> </span>}</div>
          <div><span style="white-space:pre-wrap"> </span># user
            authenticated - remove auth header</div>
          <div><span style="white-space:pre-wrap"> </span>if(!is_method("REGISTER|PUBLISH"))</div>
          <div><span style="white-space:pre-wrap"> </span>consume_credentials();</div>
          <div><span style="white-space:pre-wrap"> </span>}</div>
          <div><span style="white-space:pre-wrap"> </span># if caller
            is not local subscriber, then check if it calls</div>
          <div><span style="white-space:pre-wrap"> </span># a local
            destination, otherwise deny, not an open relay here</div>
          <div><span style="white-space:pre-wrap"> </span>if
            (from_uri!=myself && uri!=myself)</div>
          <div><span style="white-space:pre-wrap"> </span>{</div>
          <div><span style="white-space:pre-wrap"> </span>sl_send_reply("403","Not
            relaying");</div>
          <div><span style="white-space:pre-wrap"> </span>exit;</div>
          <div><span style="white-space:pre-wrap"> </span>}</div>
          <div><br>
          </div>
          <div>#!endif</div>
          <div><span style="white-space:pre-wrap"> </span>return;</div>
          <div>}</div>
          <div><br>
          </div>
          <div>
            <div>route[FSINBOUND] {</div>
            <div>  if($si== $sel(cfg_get.freeswitch.bindip) &&
              $sp==$sel(cfg_get.freeswitch.bindport))</div>
            <div>     return 1;</div>
            <div>  return -1;</div>
            <div>}</div>
          </div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div>I have set "WITH_AUTH" and "WITH_FREESWITCH". Let me
            know, if any more details are required.</div>
          <div><br>
          </div>
          <div>System configuration:</div>
          <div>Ubuntu: 12.04 LTS</div>
          <div>Kamailio: 4.1.5 (x86_64/linux)</div>
          <div>Freeswitch: 1.4.7 stable release</div>
        </div>
        <div><br>
        </div>
        -- <br>
        <div dir="ltr">Thanks and Regards,<br>
          Ashwin Jain<br>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Next Kamailio Advanced Trainings 2014 - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
Sep 22-25, Berlin, Germany</pre>
  </body>
</html>