Kamran Ahmad
2004-Dec-28 00:12 UTC
[Asterisk-Users] Re: Help on Register message with Authentication
it is sometime generating wrong response can any one help me in this #include <stdio.h> #include "digcalc.h" void main(int argc, char ** argv) { char * pszNonce "dcd98b7102dd2f0e8b11d0f600bfb0c093"; char * pszCNonce = ""; char * pszUser = "6000"; char * pszRealm = "asterisk"; char * pszPass = "kamran"; char * pszAlg = "md5"; char szNonceCount[9] = ""; char * pszMethod = "REGISTER"; char * pszQop = ""; char * pszURI = "sip:192.168.0.11"; HASHHEX HA1; HASHHEX HA2 = ""; HASHHEX Response; digcalc dig; dig.DigestCalcHA1(pszAlg, pszUser, pszRealm, pszPass, pszNonce, pszCNonce, HA1); dig.DigestCalcResponse(HA1, pszNonce, szNonceCount, pszCNonce, pszQop, pszMethod, pszURI, HA2, Response); printf("Response = %s\n", Response); }; __________________________________ Do you Yahoo!? Send a seasonal email greeting and help others. Do good. http://celebrity.mail.yahoo.com