Skip to content
Permalink
Browse files

-added new DialogUsageManager::makeInviteSession API that allows spec…

…ification of the DialogSetId,

 this allows a user to specify a call Id and From tag of their choosing, as opposed to DUM
 framework generating one for them
  • Loading branch information...
sgodin committed May 24, 2019
1 parent 3a3ef70 commit 69e4525eb26a3090327819fcea3bb0ed0995340c
Showing with 20 additions and 1 deletion.
  1. +19 −1 resip/dum/DialogUsageManager.cxx
  2. +1 −0 resip/dum/DialogUsageManager.hxx
@@ -592,6 +592,24 @@ DialogUsageManager::makeInviteSession(const NameAddr& target,
return makeInviteSession(target, getMasterUserProfile(), initialOffer, level, alternative, appDs);
}

SharedPtr<SipMessage>
DialogUsageManager::makeInviteSession(const NameAddr& target,
const DialogSetId& dialogSetId,
const SharedPtr<UserProfile>& userProfile,
const Contents* initialOffer,
EncryptionLevel level,
const Contents* alternative,
AppDialogSet* appDs)
{
assert(mDialogSetMap.find(dialogSetId) == mDialogSetMap.end());
BaseCreator* baseCreator(new InviteSessionCreator(*this, target, userProfile, initialOffer, level, alternative));
baseCreator->getLastRequest()->header(h_CallID).value() = dialogSetId.getCallId();
baseCreator->getLastRequest()->header(h_From).param(p_tag) = dialogSetId.getLocalTag();
SharedPtr<SipMessage> inv = makeNewSession(baseCreator, appDs);
DumHelper::setOutgoingEncryptionLevel(*inv, level);
return inv;
}

SharedPtr<SipMessage>
DialogUsageManager::makeInviteSession(const NameAddr& target,
InviteSessionHandle sessionToReplace,
@@ -2157,7 +2175,7 @@ DialogUsageManager::processResponse(const SipMessage& response)
DebugLog ( << "DialogUsageManager::processResponse: " << std::endl << std::endl << response.brief());
ds->dispatch(response);
}
else
else
{
InfoLog (<< "Throwing away stray response: " << std::endl << std::endl << response.brief());
}
@@ -201,6 +201,7 @@ class DialogUsageManager : public HandleManager, public TransactionUser
SharedPtr<SipMessage> makeInviteSession(const NameAddr& target, const Contents* initialOffer, AppDialogSet* ads = 0);
SharedPtr<SipMessage> makeInviteSession(const NameAddr& target, const SharedPtr<UserProfile>& userProfile, const Contents* initialOffer, EncryptionLevel level, const Contents* alternative = 0, AppDialogSet* ads = 0);
SharedPtr<SipMessage> makeInviteSession(const NameAddr& target, const Contents* initialOffer, EncryptionLevel level, const Contents* alternative = 0, AppDialogSet* ads = 0);
SharedPtr<SipMessage> makeInviteSession(const NameAddr& target, const DialogSetId& dialogSetId, const SharedPtr<UserProfile>& userProfile, const Contents* initialOffer, EncryptionLevel level, const Contents* alternative = 0, AppDialogSet* ads = 0);
// Versions that add a replaces header
SharedPtr<SipMessage> makeInviteSession(const NameAddr& target, InviteSessionHandle sessionToReplace, const SharedPtr<UserProfile>& userProfile, const Contents* initialOffer, AppDialogSet* ads = 0);
SharedPtr<SipMessage> makeInviteSession(const NameAddr& target, InviteSessionHandle sessionToReplace, const SharedPtr<UserProfile>& userProfile, const Contents* initialOffer, EncryptionLevel level = None, const Contents* alternative = 0, AppDialogSet* ads = 0);

0 comments on commit 69e4525

Please sign in to comment.
You can’t perform that action at this time.