[reSIProcate] exception when receiving 200 from re-invite request with modified to: tag
Justin Matthews
jmatthewsr at gmail.com
Sat Dec 9 16:26:38 CST 2006
Exception occurs during following scenario:
DUM receives a call and establishes a session as the UAS.
DUM sends re-INVITE request
DUM receives 200 ok response with a different to: tag then the established
session.
The dialogset is found, but dialogset.cxx tries to create a new dialog from
this 200 and calls the following code:
Dialog.cxx, in Dialog constructor:
mLocalContact = creator->getLastRequest()->header(h_Contacts).front();
I believe that getLastRequest does not contain a contact because this call
was established from an inbound session.
For now I just patched it this way, is there a better way? If not I will
commit this.
-------------------
BaseCreator* creator = mDialogSet.getCreator();
//assert(creator);// !jf! throw or something here
//assert(creator->getLastRequest()->exists(h_Contacts));
//assert(!creator->getLastRequest()->header(h_Contacts).empty());
if( NULL == creator )
{
ErrLog(<< "BaseCreator is null for DialogSet");
ErrLog(<< response);
throw Exception("BaseCreator is null for DialogSet", __FILE__,
__LINE__);
}
SharedPtr<SipMessage> lastRequest(creator->getLastRequest());
if( NULL == lastRequest ||
!lastRequest->exists(h_Contacts) ||
lastRequest->header(h_Contacts).empty())
{
ErrLog(<< "No contact available for dialogset's last request");
ErrLog(<< response);
throw Exception("No contact available for dialogset's last request",
__FILE__, __LINE__);
}
mLocalContact = creator->getLastRequest()->header(h_Contacts).front();
mRemoteTarget = contact;
----------------------
Thanks,
-justin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20061209/7a2479c1/attachment.htm>
More information about the resiprocate-devel
mailing list