Hi Anton,

On 06.10.10 09:44, Антон Загорский wrote:
-----Original Message-----
From: Raphael Coeffic [mailto:[email protected]]
Sent: Wednesday, October 06, 2010 12:56 AM
To: Антон Загорский
Cc: 'sems mailing list'
Subject: Re: [Sems] Transferring a session

But in my opinion, the second option would be better suited for your
scenario, and would allow for merging calls as well, as described in
earlier emails.
Raphael, what do you think about adding explicit constructor 
AmSession::AmSession(const AmSession*) ?
Or explicit constructor AmB2ABCallerSession::AmB2ABCallerSession(const 
AmSession*) ?


Accessing a session pointer from another session's process() method requires to lock the session-container, so that the session does not get destroyed in between, or maybe some other more complex mechanism. However, SEMS is built in such a way that sessions do not lock each other, but send events to each other, in a way to avoid dead locks and memory access related issues.

For your scenario, the following steps should be enough:

- create/start as many AmB2[A]BCalleeSession instances as destinations, save the callee session id list in the caller session. - when a positive final callee reply is received in the caller session, set other_id to that callee session id, and send B2BTerminateLeg events to the other sessions (just like terminateOtherLeg() does, but for more than one session). - when a negative final callee reply is received, just remove that callee session id from your list on the caller side.


Cheers
Raphael.
_______________________________________________
Sems mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/sems

Reply via email to