<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#ffffff">
    On 11/22/2011 04:37 PM, Bruce Ferrell wrote:
    <blockquote cite="mid:4ECBC1CC.2090301@baywinds.org" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      <br>
      <br>
      On 11/22/2011 07:29 AM, Jonas Kellens wrote:
      <blockquote cite="mid:4ECBBFCF.2020204@telenet.be" type="cite">
        <meta content="text/html; charset=ISO-8859-1"
          http-equiv="Content-Type">
        On 11/22/2011 04:25 PM, Bruce Ferrell wrote:
        <blockquote cite="mid:4ECBBEE1.3020008@baywinds.org" type="cite">
          <meta content="text/html; charset=ISO-8859-1"
            http-equiv="Content-Type">
          <br>
          Jonas,<br>
          <br>
          May I suggest that you present us your sip.conf entry for this
          peer, properly redacted, of course.&nbsp; That might help more.&nbsp;
          What I do for "gateways" at known addresses is to put an entry
          like this into the sip.conf entry:<br>
          <br>
          <br>
          [peer]<br>
          type=peer<br>
          defaultip=192.168.40.123<br>
          insecure=invite,port<br>
          context=some_context<br>
          <br>
        </blockquote>
        <font face="Helvetica, Arial, sans-serif"><br>
        </font><font face="Helvetica, Arial, sans-serif"><br>
          This is the peer definition in sip.conf :<br>
          <br>
          [</font><font face="Helvetica, Arial, sans-serif">SIPPEERusername]<br>
          type=friend<br>
          host=dynamic<br>
          defaultuser=</font><font face="Helvetica, Arial, sans-serif">SIPPEERusername<br>
          secret=guessthis<br>
          context=from-PEERTRUNK<br>
          nat=yes<br>
          dtmfmode=rfc2833<br>
          canreinvite=no<br>
          disallow=all<br>
          allow=alaw<br>
          allow=gsm<br>
          <br>
          <br>
          Hope you can help me out with this extra information.<br>
          <br>
        </font><br>
        Kind regards,<br>
        <br>
        Jonas.<br>
      </blockquote>
      From what I see in your entry, you are requiring registration from
      the peer.&nbsp; The next thing i would check is to see if the
      registration has succeeded.&nbsp; If it doesn't succeed, you will see
      the results you presented.&nbsp; I see you have the peer set as a
      dynamic host, and if the IP address of the device does in fact
      change then registration is appropriate.<br>
    </blockquote>
    <br>
    Registration of the SIP PEER is no problem. The PEER registers with
    a correct REGISTER statement and Asterisk sends a 200 OK.<br>
    <br>
    So the PEER is registered and then wants to make a call (INVITE) but
    for some reason this INVITE is being refused with 401-Unauthorized.<br>
    <br>
    The first 401-Unauthorized is normal, because the SIP PEER needs to
    send a second INVITE with a challenge (nonce). But after this INVITE
    with challenge, Asterisk still sends a 401 and that's strange !!<br>
    <br>
    Jonas.<br>
    <br>
    <br>
  </body>
</html>