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

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

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

revision 2813 by derek, Sat May 29 03:10:25 2004 UTC revision 2817 by derek, Sat May 29 03:24:24 2004 UTC
# Line 544  Line 544 
544  void  void
545  Dialog::makeRequest(SipMessage& request, MethodTypes method)  Dialog::makeRequest(SipMessage& request, MethodTypes method)
546  {  {
    SipMessage* request = new SipMessage;  
547     RequestLine rLine(method);     RequestLine rLine(method);
548    
549     rLine.uri() = mRemoteTarget;     rLine.uri() = mRemoteTarget.uri();
550        
551     request.header(h_RequestLine) = rLine;     request.header(h_RequestLine) = rLine;
552     request.header(h_To) = mRemoteUri;     request.header(h_To) = mRemoteTarget;
553     request.header(h_To).param(p_tag) = mRemoteTag;     request.header(h_To).param(p_tag) = mRemoteTag;
554     request.header(h_From) = mLocalContact;     request.header(h_From) = mLocalContact;
555     request.header(h_From).param(p_tag) = mLocalTag;     request.header(h_From).param(p_tag) = mLocalTag;
# Line 583  Line 582 
582        assert (request.header(h_Contacts).size() == 1);        assert (request.header(h_Contacts).size() == 1);
583        response.header(h_To).param(p_tag) = mLocalTag;        response.header(h_To).param(p_tag) = mLocalTag;
584    
585        Helper::makeResponse(proto, request, code);        Helper::makeResponse(response, request, code);
586    
587        if (!request.exists(h_Contacts) && request.header(h_Contacts).size() != 1)        if (!request.exists(h_Contacts) && request.header(h_Contacts).size() != 1)
588        {        {
# Line 592  Line 591 
591           throw Exception("Invalid or missing contact header in request", __FILE__,__LINE__);           throw Exception("Invalid or missing contact header in request", __FILE__,__LINE__);
592        }        }
593    
594        assert (response->header(h_To).exists(p_tag));        assert (response.header(h_To).exists(p_tag));
595     }     }
596     else     else
597     {     {
598        Helper::makeResponse(proto, request, code, mContact);        Helper::makeResponse(response, request, code, mLocalContact);
599     }     }
600  }  }
601    
   
 void  
 Dialog::makeMethod(SipMessage& proto, MethodTypes method)  
 {  
    RequestLine rLine(method);  
 /*  
    rLine.uri().scheme() = target.uri().scheme();  
    rLine.uri().host() = target.uri().host();  
    rLine.uri().port() = target.uri().port();  
    mLastRequest.header(h_RequestLine) = rLine;  
   
    mLastRequest.header(h_To) = target;  
    mLastRequest.header(h_MaxForwards).value() = 70;  
    mLastRequest.header(h_CSeq).method() = method;  
    mLastRequest.header(h_CSeq).sequence() = 1;  
    mLastRequest.header(h_From) = mDum.getProfile()->getDefaultAor();  
    mLastRequest.header(h_From).param(p_tag) = Helper::computeTag(Helper::tagSize);  
    mLastRequest.header(h_CallId).value() = Helper::computeCallId();  
   
    NameAddr contact; // if no GRUU, let the stack fill in the contact  
    if (mDum.getProfile()->hasGruu(target.uri().getAor()))  
    {  
       contact = mDum.getProfile()->getGruu(target.uri().getAor());  
    }  
    mLastRequest.header(h_Contacts).push_front(contact);  
     
    Via via;  
    mLastRequest.header(h_Vias).push_front(via);  
   
    mLastRequest.header(h_Supporteds) = mDum.getProfile()->getSupportedOptionTags();  
 */  
   
 }  
   
   
   
602  Dialog::Exception::Exception(const Data& msg, const Data& file, int line)  Dialog::Exception::Exception(const Data& msg, const Data& file, int line)
603     : BaseException(msg, file, line)     : BaseException(msg, file, line)
604  {}  {}

Legend:
Removed from v.2813  
changed lines
  Added in v.2817

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27