handle_request: Registration from sip failed

I’ve tried several sip-phones, and no one manages to register.

I can use the phone if I skip the authentication parameters in sip.conf,
only setting type, host and context.
But it fails when I add secret.

Can anyone explain how I calculate the md5 checksum manually to find out
if the problem is in the phone or in Asterisk?

(I’ve tried with a Budgetone 100, version and a Cisco 7940, same problem)

I’m using Asterisk 1.0.9 in Debian sid.