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

Re: [reSIProcate-users] The credential of refresh registration


I have tried modify the ClientAuthManager as below:

void
ClientAuthManager::addAuthentication(SipMessage& request)
{
   AttemptedAuthMap::iterator it = mAttemptedAuths.find(DialogSetId(request));
   if (it != mAttemptedAuths.end())
   {
       it->second.addAuthentication(request);
   }

   if (request.header(h_CSeq).method() == REGISTER && request.header(h_CSeq).sequence() > 2)
   {
       request.remove(h_ProxyAuthorizations);
       request.remove(h_Authorizations); 
   }
}

With VS2009 debug as step by step, the remove method was executed, but in wireshark the all refresh registration messages still have the "Authorization" header even if CSEQ sequence is 5, 6, 7....

My case is when use my phone register to Nortel server, the Nortel is stop respond refresh registration about 5 minutes later.
If use other softpone this issue is not appears, I have compared the SIP message, the only difference is other softphones haven't attached the credential in refresh registration message.

Thanks



On Fri, Jun 24, 2011 at 1:58 AM, Scott Godin <sgodin@xxxxxxxxxxxxxxx> wrote:
Ah yes - I moved the authentication header addition to an outbound decorator that will get run after all others.  Something else you could try is to put explicit code in the ClientAuthManager to not decorate registration refereshes for authentication.  It may be tricky to tell which messages are initial and which ones are refreshes though (you may be able to check the CSeq).  This change would require changing the DUM core, unless you can get this custom behavior into an overridden ClientAuthManager.

What is your use case for this?

Scott


On Thu, Jun 23, 2011 at 1:45 PM, Karlsson <boost.regex@xxxxxxxxx> wrote:
Thank you for your reply Scott, but I have tried MessageDecorator::decorateMessage() and DumFeature::process(), the SIP message  has no "Authorization" header, seems this header is not added into SIP message before called these two functions.

Any idea ?




On Thu, Mar 31, 2011 at 9:39 PM, Scott Godin <sgodin@xxxxxxxxxxxxxxx> wrote:
There is no built-in way to disable this behaviour.  If you want to remove the credentials without modifying resip code, then you could use an OutboundDecorator to remove the auth headers - you will need some logic to detect if a registration is a refresh or not.

Scott

On Wed, Mar 16, 2011 at 8:25 PM, Karlsson <boost.regex@xxxxxxxxx> wrote:
Hi, I see the reSIProcate always send the credential of REGISTER in the "refresh registration", how let it just send credential in the first REGISTER only?
Thanks


_______________________________________________
resiprocate-users mailing list
resiprocate-users@xxxxxxxxxxxxxxx
List Archive: http://list.resiprocate.org/archive/resiprocate-users/




--
havesoftware, Inc.


Jakson Kalsson









--
havesoftware, Inc.
http://www.havesoftware.com


Jakson Kalsson
Senior Programmer
jakkalsoon@xxxxxxxxxxxxxxxx