<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Your registration should have also have the flow<div><br></div><div>PEER ASTERISK</div><div>REGISTER-------></div><div><----------------------401</div><div>REGISTER(nonce) -></div><div><------------------------200OK</div><div><br></div><div>Then the server controls the life of the registration and 200 Expires Header gives you this timeout. If the invite is sent within that window, then Asterisk should not challenge anymore. If Invite is challenged and the peer responds with the correctly calculated NONCE, domain and other Auth params, then something is wrong with your Authentication. I suggest trapping the traffic with Ethereal or any other packet capture programs and examining that carefully from the start of the session (i.e. register) to the invite. I would also check where the 401 is coming from (i.e. IP address).</div><div><br></div><div>Hope that helps</div><div><br></div><div>Alex </div><div><div><div>On Nov 22, 2011, at 11:23 AM, Jonas Kellens wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
<div 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. That might help more.
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. The next thing i would check is to see if the
registration has succeeded. If it doesn't succeed, you will see
the results you presented. 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>
</div>
--<br>_____________________________________________________________________<br>-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com">http://www.api-digital.com</a> --<br>New to Asterisk? Join us for a live introductory webinar every Thurs:<br> <a href="http://www.asterisk.org/hello">http://www.asterisk.org/hello</a><br><br>asterisk-users mailing list<br>To UNSUBSCRIBE or update options visit:<br> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a></blockquote></div><br></div></body></html>