<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    You can always replace the real IP (and usernames/phone numbers)
    with something else using a text editor, before posting to the
    mailing list. If no details are given, it is hard to help.<br>
    <br>
    Anyhow, in this case you provided some leads, respectively that you
    get 401 response. That could be because the password was wrong. You
    can run kamailio with debug=3 and see what is printed when the phone
    fails to register or use xlog() to print $rc after auth_check()..<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <div class="moz-cite-prefix">On 05/02/16 12:27, Gholamreza Sabery
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAJx6kgUdNkMAunezdJ+yKrJr0otXzZ9dtdQMaZDsjKn2vNm=GQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>All of my clients are behind NAT! Unfortunately I can
              not put my captures here. The strange thing here for me is
              that:<br>
            </div>
            1- Desktop can always REGISTER with all of my usernames.<br>
          </div>
          2- My android phones can REGISTER with some usernames! For
          example if I have a 12 and a 17 username Android Linphone can
          REGISTER with 12 but not with 17. Kamailio will always return
          a 401 error. This thing only happens on Android Linphone.<br>
        </div>
        <div><br>
          I captured packets for both scenarios but nothing is strange
          about packets! How is this even possible?!!<br>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Fri, Feb 5, 2016 at 1:25 PM,
          Daniel-Constantin Mierla <span dir="ltr"><<a
              moz-do-not-send="true" href="mailto:miconda@gmail.com"
              target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:miconda@gmail.com">miconda@gmail.com</a></a>></span> wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000"> Hello,<br>
              <br>
              received and rport are added when the client is behind
              NAT. Can you paste here the capture for the case that
              doesn't work? It will help us to see what is wrong there,
              and if not, could be that the mobile operator does some
              SIP ALG which breaks/blocks the sip, in this case you have
              to switch to tls.<br>
              <br>
              Cheers,<br>
              Daniel <br>
              <span class=""> <br>
                <div>On 05/02/16 07:35, Gholamreza Sabery wrote:<br>
                </div>
              </span>
              <blockquote type="cite"><span class="">
                  <div dir="ltr">I am using Kamailio 4.1.x with NAT
                    enabled. When I want to REGISTER using my desktop
                    client which is Linphone everything is find with any
                    username. But on Android some users can REGISTER and
                    someusers can not. I captured SIP packets and the
                    only difference between packets on Android devices
                    and packets on Desktop client is that on my desktop
                    "received" and "rport" are not added by Kamailio in
                    response messages. Any idea on what is happening
                    here?<br>
                  </div>
                  <br>
                  <fieldset></fieldset>
                  <br>
                </span>
                <pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><span class="HOEnZb"><font color="#888888">
</font></span></pre>
                <span class="HOEnZb"><font color="#888888"> </font></span></blockquote>
              <span class="HOEnZb"><font color="#888888"> <br>
                  <pre cols="72">-- 
Daniel-Constantin Mierla
<a moz-do-not-send="true" href="http://twitter.com/#%21/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a moz-do-not-send="true" href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a>
Book: SIP Routing With Kamailio - <a moz-do-not-send="true" href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
<a moz-do-not-send="true" href="http://miconda.eu" target="_blank">http://miconda.eu</a></pre>
                </font></span></div>
            <br>
            _______________________________________________<br>
            SIP Express Router (SER) and Kamailio (OpenSER) - sr-users
            mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
            <a moz-do-not-send="true"
              href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users"
              rel="noreferrer" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
            <br>
          </blockquote>
        </div>
        <br>
      </div>
    </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>
Book: SIP Routing With Kamailio - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://miconda.eu">http://miconda.eu</a></pre>
  </body>
</html>