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

[reSIProcate-users] How to work on forwarding request and forking?


Hi all,

I am new to here. I am now reading the document and code.
I am going to have a new project which involves forking an incoming request.
It is not supposed to be a B2BUA. The incoming and outgoing invite should have the same To/From/Call-Id. 

I tried to read the ichat-gw included in the source code. However, it is actually a B2BUA case and I cannot find any example doing proxy by using dum layer api or forking incoming invite.

My question, for such case, I should have 3 Session object per call?
I am not sure if I am correct or not. I just put my understanding based on the ichat-gw I read and I think I should do the following modification in order to made it work for my case.

When I receive the first invite, I should receive onNewSession and then onOffer in the B2BSession. 
Then I should now create two peer by creating two more B2BSession(createNewPeer in ichat-gw) and run mDum.makeInviteSession with the use of the incoming message with the use of another overloaded version 

      SharedPtr<SipMessage> makeInviteSession(const NameAddr& target, InviteSessionHandle sessionToReplace, const SharedPtr<UserProfile>& userProfile, const Contents* initialOffer, AppDialogSet* ads = 0);

I should change the RURI/Route header/.... accordingly in the two different makeInviteSession

Am I correct? 


Best Regards,
Terry