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

[reSIProcate] rejecting an info when in connected, which InviteSession to use?


Hello,

If I have a session connected, either UAS (ServerInviteSession) or UAC
(ClientInviteSession) and I receive an INFO request and want to reject it,
it looks like I should be using the InviteSession type when calling
reject().  The problem I have is that I want to select (cast from
DialogUsageManager::getHandled()) either a ServerInviteSession or
ClientInviteSession and always use those derived classes.  This is because I
exit from my InviteSessionHandler and pass the event to another subsystem.
When that subsystem processes the event (example: it wants to reject an INFO
request) I don't want to have to figure out if I need to cast to
InviteSession for a particular request (if the original onNewSession() was a
ClientInviteSession, then I want to store that and use it for all future
processing).  How are other people handling this if they pass the logic of
handling events in their InviteSessionHandler to another subsystem and
return later to execute the appropriate command (accept(), reject(),
provideOffer...)?  I could pass a token to the my subsystem that identifies
the event, so that when the subsystem returns with a response I could cast
to the appropriate InviteSession.  Is there a better way?

Thanks,

-Justin