Index: chan_sip.c =================================================================== RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v retrieving revision 1.335 diff -u -r1.335 chan_sip.c --- chan_sip.c 15 Apr 2004 00:02:07 -0000 1.335 +++ chan_sip.c 17 Apr 2004 07:58:23 -0000 @@ -4835,7 +4835,7 @@ snprintf(cnonce, sizeof(cnonce), "%08x", rand()); - snprintf(a1,sizeof(a1),"%s:%s:%s",p->peername,p->realm,p->peersecret); + snprintf(a1,sizeof(a1),"%s:%s:%s",p->username,p->realm,p->peersecret); snprintf(a2,sizeof(a2),"%s:%s",orig_header,uri); if (strlen(p->peermd5secret)) strncpy(a1_hash, p->peermd5secret, sizeof(a1_hash) - 1); @@ -4851,9 +4851,9 @@ md5_hash(resp_hash,resp); /* XXX We hard code our qop to "auth" for now. XXX */ if (strlen(p->qop)) - snprintf(digest,digest_len,"Digest username=\"%s\", realm=\"%s\", algorithm=\"MD5\", uri=\"%s\", nonce=\"%s\", response=\"%s\", opaque=\"%s\", qop=\"%s\", cnonce=\"%s\", nc=%s",p->peername,p->realm,uri,p->nonce,resp_hash, p->opaque, "auth", cnonce, "00000001"); + snprintf(digest,digest_len,"Digest username=\"%s\", realm=\"%s\", algorithm=\"MD5\", uri=\"%s\", nonce=\"%s\", response=\"%s\", opaque=\"%s\", qop=\"%s\", cnonce=\"%s\", nc=%s",p->username,p->realm,uri,p->nonce,resp_hash, p->opaque, "auth", cnonce, "00000001"); else - snprintf(digest,digest_len,"Digest username=\"%s\", realm=\"%s\", algorithm=\"MD5\", uri=\"%s\", nonce=\"%s\", response=\"%s\", opaque=\"%s\"",p->peername,p->realm,uri,p->nonce,resp_hash, p->opaque); + snprintf(digest,digest_len,"Digest username=\"%s\", realm=\"%s\", algorithm=\"MD5\", uri=\"%s\", nonce=\"%s\", response=\"%s\", opaque=\"%s\"",p->username,p->realm,uri,p->nonce,resp_hash, p->opaque); return 0; }