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

[reSIProcate-users] Issues with makeInviteSessionFromRefer


Hello,

 

We are having an issue with RemoteParticipant::OnRefer in recon.

 

When we transfer one call to another (from other sip client), this event is raised, however the “Invite” is not sent to the remote participant unless we put the sleep after makeInviteSessionFromRefer function.

When the sleep is not present, the last message that is sent is NOTIFY (100 trying…) and the refer process is not completed successfully.

Can you advise on how to fix this issue without calling the “sleep” between makeInviteSessionFromRefer and sendInvite.

Here is the code of RemoteParticipant::OnRefer:

 

ss->send(ss->accept(202 /* Refer Accepted */));

 

// Figure out hold SDP before removing ourselves from the conversation

bool holdSdp = mLocalHold; 

 

// Create new Participant - but use same participant handle

RemoteParticipantDialogSet* participantDialogSet = new RemoteParticipantDialogSet(mConversationManager, mDialogSet.getForkSelectMode(), mMediaAddress, mMediaPort);

RemoteParticipant *participant = participantDialogSet->createUACOriginalRemoteParticipant(mHandle); // This will replace old participant in ConversationManager map

participant->mReferringAppDialog = getHandle();

 

replaceWithParticipant(participant);      // adjust conversation mappings

 

// Create offer

SdpContents offer;

participant->buildSdpOffer(holdSdp, offer);

 

// Build the Invite

SharedPtr<SipMessage> NewInviteMsg = mDum.makeInviteSessionFromRefer(msg, ss->getHandle(), &offer, participantDialogSet);

 

/*******Sleep********/

Sleep(500);

 

participantDialogSet->sendInvite(NewInviteMsg);

 

 

 

Thank you in advance.