[Freeswitch-users] Problem with digest authentication

Gunnlaugur Máni Hrólfsson mani at tungli.net
Thu Nov 8 02:44:03 MSK 2012


Hello all,

I'm having a problem with a particular device, that I'm hoping some one on
this list can help me with. The device is a Telsey IAD.

At first the device registers just fine. But when the registration expires
and the device re-registers, freeswitch responds with a 403 Forbidden.

I realized that this must be because either the device og Freeswitch wasn't
calculating the digest response correctly. So I tried to calculate it
myself. This is a sample sent from the device, that Freeswitch responded
with a 403 to:

REGISTER sip:test.sip.is SIP/2.0
Call-ID: 5f880-1485c-aab33cd at 10.171.32.9
From: <sip:4151664 at test.sip.is;user=phone>;tag=2f5c0-1485c
To: <sip:4151664 at test.sip.is;user=phone>
CSeq: 104 REGISTER
Via: SIP/2.0/UDP 10.171.32.9;branch=z9hG4bK-2f5c0-101315
Contact: <sip:4151664 at 10.171.32.9;user=phone>
Max-Forwards: 70
User-Agent: Telsey ver4_49_25
Expires: 30
Supported: timer
Authorization: Digest username="4151664",realm="test.sip.is",uri="sip:
test.sip.is
",response="c3b5cd8147fb883fbbe9acb183838717",algorithm=MD5,nonce="9202dbb4-292d-11e2-bac2-399d85a4015c",qop=auth,cnonce="0002f818",nc=00000001
Content-Length: 0

Assuming a password of "1234", the digest response should
be 041323244fc4bdac8d49872bf29d9a3a. But the device seems to increment the
nc value to 00000002 and calculates the response
as c3b5cd8147fb883fbbe9acb183838717.

The problem is that the device sends nc=00000001 so freeswitch uses that
value to calculate the digest, while the device uses 00000002.

I think it is obviously the device that's broken but not Freeswitch. But,
in this case I need to get this device to work as is. Is there any way I
can have freeswitch authenticate the device without using digest method
that requires a nonce count, like rfc2069?

Best regards,
Mani Hrolfsson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20121107/e6ac6068/attachment.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list