[asterisk-dev] REGISTER uses 401 not 407?

Ed Greenberg edg at greenberg.org
Tue Oct 3 16:55:28 MST 2006


I discovered this trying to register an Audiocodes gateway onto Asterisk 
1.2.12.1.

According to the Audiocodes engineer:

> Unfortunately we're receiving back a 401 UNAUTHORIZED ... which is a
> final response (4xx) - the GW should not be bombarding a registrar with
> REGISTER requests when it receives a definitive response of
> UNAUTHORIZED.

So we send 401, and they do not respond, and the gateway never registers.

I'm still investigating why some of my GWs authenticate and others don't. 
If I get any packet traces that make sense, I'll feed back further.

</edg>


--On Tuesday, October 03, 2006 8:40 AM +0200 Olle E Johansson 
<oej at edvina.net> wrote:

>
> 3 okt 2006 kl. 05.18 skrev Ed Greenberg:
>
>> In chan-sip.c (from 1.2.12.1) it is written:
>>
>> 06223       /* On a REGISTER, we have to use 401 and its family of
>> headers instead of 407 and its family
>> 06224          of headers -- GO SIP!  Whoo hoo!  Two things that do
>> the same thing but are used in
>> 06225          different circumstances! What a surprise. */
>>
>> Why is this so?
>>
>
> This comment in the source is totally wrong. I've been trying to  change
> this logic a few times, but Mark has been
> worried we might break things by fixing it.
>
> The truth is that by issuing a proxy auth request, we break things  even
> more... Asterisk is always an
> endpoint and never a proxy and should never, ever, issue a proxy
> authorization request.
>
> It is easy to change source code, but it takes time to change  attitude
> and educate people :-)
>
> Hopefully, I can soon start with the new SIP channel since we've  created
> a new trunk where we
> have more freedom. That SIP channel won't worry as much with  backwards
> compatibility
> but focus more on RFC compliance. The current code is way too much
> spagetti with fixes
> on top of fixes and needs to be cleaned out before christmas :-)
>
> If everything works out for the best, I can start that project during
> this month.
>
> /O
>
>
> ---
> * Olle E. Johansson - oej at edvina.net
> * Asterisk Training http://edvina.net/training/
> * Next class: The Asterisk Masterclass (formerly "bootcamp"),  Stockholm,
> Sweden Nov 2006
>
>
>
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev






More information about the asterisk-dev mailing list