Lee Essen wrote:
> I'm not sure my original message ever made it to the list (can't see
> it in the archives), but now I have confirmed the bug exists and have
> proposed a very simple fix.
>
> Basically if a SUBSCRIBE with not authentication information is
> received, then callweaver properly sends a "401 Unauthorized" reponse,
> however because of the bug in chan_sip.c if then immediately sends a
> "403 Forbidden" which then completely confuses the follow-on
> transaction.
>
> in the check_auth() function, after sending the "401" the return code
> isn't correctly set, and defaults to AUTH_FAILED, which subsequently
> causes the forbidden response.
>
> This was taken from the 2008-06-21 snapshot. I will also raise this
> as a bug.
>
> Regards,
>
> Lee.
>
> --
>
> diff -ua chan_sip.c chan_sip.c.fixed
> --- chan_sip.c 2008-06-20 22:40:01.000000000 +0100
> +++ chan_sip.c.fixed 2008-06-26 11:34:08.000000000 +0100
> @@ -8458,6 +8458,7 @@
> transmit_response_with_auth(p, response, req, randdata,
> reliable,
> respheader, 0);
> /* Schedule auto destroy in 15 seconds */
> sip_scheddestroy(p, 15000);
> + res = AUTH_CHALLENGE_SENT;
> }
> else
> {
>
>
> On 25 Jun 2008, at 08:35, [EMAIL PROTECTED] wrote:
>
>> Hi,
>>
>> I'm working on porting CallWeaver over to the IP-04 and, so far, it's
>> looking pretty good. I've just been looking at MWI and subscriptions
>> and
>> I'm seeing strange behavior, I doubt this is an IP-04 specific thing
>> so I
>> though I should describe it here and see if anyone else is seeing
>> it...
>>
>> I have a Siemens S685IP SIP phone and it's registering against
>> callweaver
>> and then subscribing to the message-summary so it can handle MWI. I
>> know
>> this used to work properly a while ago (albeit on a different phone
>> and
>> different version of CallWeaver!)
>>
>> Now I'm seeing the register, the auth-required, then the register with
>> auth information and the OK response, so all ok so far.
>>
>> Then comes the SUBSCRIBE, we send a "401 Unauthorized" as expected. At
>> this point something seems to go wrong, we also now send a "403
>> Forbidden"
>> (reliably) so this repeats quite a few times.
>>
>> In the meantime the phone re-sends the SUBSCRIBE with the correct
>> authentication, we find the peer and respond with a "200 OK",
>> however we
>> are still reliably transmitting the "403 Forbidden" on the same
>> callid,
>> and I think it's this that messes up the whole interaction.
>>
>> Looking at the chan_sip.c code it seems that if we sent an
>> auth_challenge
>> then we shouldn't send the "Forbidden" (line 13875), however this
>> doesn't
>> seem to be working properly?
>>
>> I will build callweaver on a x86 system and try to reproduce the
>> problem,
>> but just wanted to flag the issue.
>>
>> Some SIP debug below (sorry, cut from a serial session so missing
>> some end
>> of lines)...
>>
>> Regards,
>>
>> Lee.
>>
>>
thx. but pls use svn diff command to create patches and dont top-quote on
maillists.
y
tom
_______________________________________________
Callweaver-dev mailing list
[email protected]
http://lists.callweaver.org/mailman/listinfo/callweaver-dev