< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index Next in Thread >

RE: [reSIProcate] registration on sipphone.com


You don't actually need to do all of this manual work.  DUM handles
digest challenges for you.  You only need to define your username,
password, realm, etc.  in the User/MasterProfile and assign and
setClientAuthManager on DUM.  See dum/test/BasicRegister.cxx for an
example.

Scott
-----Original Message-----
From: resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx
[mailto:resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of
Dmytro Bogovych
Sent: Monday, August 29, 2005 9:16 AM
To: resiprocate-devel@xxxxxxxxxxxxxxxxxxx
Subject: [reSIProcate] registration on sipphone.com

Greetings.

May anyone to help me implement registration on proxy01.sipphone.com?

Looks like this registrar using WWW-Authenticate authorization scheme.
I tried to implement this as

void MyUserAgent::onFailure(ClientRegistrationHandle h, const
SipMessage&  
response)
{
   int responseCode = response.header(h_StatusLine).statusCode();
   if ( responseCode == 401 || responseCode == 407 )
   {
     if (response.exists(h_WWWAuthenticates))
     {
       const ParserContainer<Auth>& wwwAuth =  
response.header(h_WWWAuthenticates);
       Data nonceData = wwwAuth.front().param(p_nonce);
       //Data nonceData = wwwAuth.find(p);
       Helper::addAuthorization(this->mRegMessageStored, response,  
mRegistrarUri.user(), mRegistrarUri.password(), nonceData,  
this->mNonceCount);

       mRegMessageStored.header(h_CSeq).sequence()++;
       mRegMessageStored.header(h_Vias).front().remove(p_branch);
       mRegMessageStored.header(h_Vias).front().param(p_branch);
       mDum.send(mRegMessageStored);
       return;
     }
   }
}

But server doesn't respond to my second packet :(
May anyone to help me?


-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
_______________________________________________
resiprocate-devel mailing list
resiprocate-devel@xxxxxxxxxxxxxxxxxxx
https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel