[Asterisk-Dev] Don't kick my ass, please help...
Jan Hulala
hulala at xodatel.com
Sun Sep 26 23:18:40 MST 2004
Please help mi with my MD5-ing... :(((
What wrong is in my response calculation (see below)...?
Thanks,
Jan
--------------------------------------------------------------------------------
SIP message from server:
SIP/2.0 407 Proxy Authentication Required
.
.
.
Proxy-Authenticate: Digest realm="asterisk", nonce="3594843a"
Content-Length: 0
Perl script for calculation REGISTER reponse:
$md5 = Digest::MD5->new;
$md5->add($username, ':', $realm, ':', $password);
$HXA = $md5->hexdigest;
$md5 = Digest::MD5->new;
$md5->add('md5', ':');
$HXB = $md5->hexdigest;
$md5 = Digest::MD5->new;
$md5->add($HXA, ':', $nonce, ':', $HXB);
$response = $md5->hexdigest;
---> Proxy-Authorization: Digest realm="asterisk", nonce="3594843a",
username="XXXXXXXXX", algorithm="md5", response="cd8b4824f70bfdd6b686f9abd851cf3b"
SIP response message:
SIP/2.0 401 Unauthorized
.
.
.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Content-Length: 0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20040927/617ac7a1/attachment.htm
More information about the asterisk-dev
mailing list