/[resiprocate]/main/resip/dum/InviteSession.cxx
ViewVC logotype

Diff of /main/resip/dum/InviteSession.cxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3607 by sgodin, Tue Nov 23 21:17:30 2004 UTC revision 3613 by jason, Wed Nov 24 01:03:05 2004 UTC
# Line 7  Line 7 
7  #include "resiprocate/dum/ClientInviteSession.hxx"  #include "resiprocate/dum/ClientInviteSession.hxx"
8  #include "resiprocate/dum/ServerInviteSession.hxx"  #include "resiprocate/dum/ServerInviteSession.hxx"
9  #include "resiprocate/dum/InviteSessionHandler.hxx"  #include "resiprocate/dum/InviteSessionHandler.hxx"
10  #include "resiprocate/dum/MasterProfile.hxx"  #include "resiprocate/dum/Profile.hxx"
11  #include "resiprocate/dum/UsageUseException.hxx"  #include "resiprocate/dum/UsageUseException.hxx"
12  #include "resiprocate/os/Logger.hxx"  #include "resiprocate/os/Logger.hxx"
13  #include "resiprocate/os/Timer.hxx"  #include "resiprocate/os/Timer.hxx"
# Line 89  Line 89 
89     handleSessionTimerRequest(mLastIncomingRequest, finalResponse);     handleSessionTimerRequest(mLastIncomingRequest, finalResponse);
90    
91     // Check if we should add our capabilites to the invite success response     // Check if we should add our capabilites to the invite success response
92     if(mDialog.mDialogSet.getIdentity()->isAdvertisedCapability(Headers::Allow)) finalResponse.header(h_Allows) = mDum.getMasterProfile()->getAllowedMethods();     if(mDum.getProfile()->isAdvertisedCapability(Headers::Allow)) finalResponse.header(h_Allows) = mDum.getProfile()->getAllowedMethods();
93     if(mDialog.mDialogSet.getIdentity()->isAdvertisedCapability(Headers::AcceptEncoding)) finalResponse.header(h_AcceptEncodings) = mDum.getMasterProfile()->getSupportedEncodings();     if(mDum.getProfile()->isAdvertisedCapability(Headers::AcceptEncoding)) finalResponse.header(h_AcceptEncodings) = mDum.getProfile()->getSupportedEncodings();
94     if(mDialog.mDialogSet.getIdentity()->isAdvertisedCapability(Headers::AcceptLanguage)) finalResponse.header(h_AcceptLanguages) = mDum.getMasterProfile()->getSupportedLanguages();     if(mDum.getProfile()->isAdvertisedCapability(Headers::AcceptLanguage)) finalResponse.header(h_AcceptLanguages) = mDum.getProfile()->getSupportedLanguages();
95     if(mDialog.mDialogSet.getIdentity()->isAdvertisedCapability(Headers::Supported)) finalResponse.header(h_Supporteds) = mDum.getMasterProfile()->getSupportedOptionTags();     if(mDum.getProfile()->isAdvertisedCapability(Headers::Supported)) finalResponse.header(h_Supporteds) = mDum.getProfile()->getSupportedOptionTags();
96    
97     return finalResponse;     return finalResponse;
98  }  }
# Line 228  Line 228 
228  InviteSession::handleSessionTimerResponse(const SipMessage& msg)  InviteSession::handleSessionTimerResponse(const SipMessage& msg)
229  {  {
230     // If session timers are locally supported then handle response     // If session timers are locally supported then handle response
231     if(mDum.getMasterProfile()->getSupportedOptionTags().find(Token(Symbols::Timer)))     if(mDum.getProfile()->getSupportedOptionTags().find(Token(Symbols::Timer)))
232     {     {
233        bool fUAS = dynamic_cast<ServerInviteSession*>(this) != NULL;        bool fUAS = dynamic_cast<ServerInviteSession*>(this) != NULL;
234    
# Line 282  Line 282 
282  InviteSession::handleSessionTimerRequest(const SipMessage& request, SipMessage &response)  InviteSession::handleSessionTimerRequest(const SipMessage& request, SipMessage &response)
283  {  {
284     // If session timers are locally supported then add necessary headers to response     // If session timers are locally supported then add necessary headers to response
285     if(mDum.getMasterProfile()->getSupportedOptionTags().find(Token(Symbols::Timer)))     if(mDum.getProfile()->getSupportedOptionTags().find(Token(Symbols::Timer)))
286     {     {
287        bool fUAS = dynamic_cast<ServerInviteSession*>(this) != NULL;        bool fUAS = dynamic_cast<ServerInviteSession*>(this) != NULL;
288    
# Line 293  Line 293 
293           return;           return;
294        }        }
295    
296        mSessionInterval = mDialog.mDialogSet.getIdentity()->getDefaultSessionTime();  // Used only if UAC doesn't request a time        mSessionInterval = mDum.getProfile()->getDefaultSessionTime();  // Used only if UAC doesn't request a time
297        mSessionRefresherUAS = true;  // Used only if UAC doesn't request a time        mSessionRefresherUAS = true;  // Used only if UAC doesn't request a time
298    
299        // Check if far-end supports        // Check if far-end supports
# Line 448  Line 448 
448              //make a function to do this & the occurences of this in DialogUsageManager              //make a function to do this & the occurences of this in DialogUsageManager
449              SipMessage failure;              SipMessage failure;
450              mDum.makeResponse(failure, msg, 481);              mDum.makeResponse(failure, msg, 481);
451              failure.header(h_AcceptLanguages) = mDum.getMasterProfile()->getSupportedLanguages();              failure.header(h_AcceptLanguages) = mDum.mProfile->getSupportedLanguages();
452              mDum.sendResponse(failure);              mDum.sendResponse(failure);
453           }           }
454           break;           break;

Legend:
Removed from v.3607  
changed lines
  Added in v.3613

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27