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

Re: [reSIProcate] Need help with Handles


The solution Scott suggested (in the earlier post) was good but there is
an easier way. When the session is created (constructor), use the
AppDialog to always tag the session as a UAC when calling
makeInviteSession(). Then, when a ServerSession is created, tag it as
UAS in the onNewSession(sish...).

Always store handles as InviteSessionHandle (in the map) and if the
handle is valid, you can reach into the AppDialog and get the handle
type. At this point you know if it's client of server handle and can
cast accordingly.

What I was more interested is getting straightened out was which of the
InviteSession.isConnected()...IsEarly()...IsAccepted() state calls
identify when ONLY the InviteSessionHandle is valid. Obviously
isConnected() tells me to only use the InviteSessionHandle, but I'm not
totally clear on IsEarly() and isAccepted().

Any insight??


Bill Kovar
Avaya Inc.
(732) 852-2609
bkovar@xxxxxxxxx

-----Original Message-----
From: resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx
[mailto:resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of
Scott Godin
Sent: Friday, September 08, 2006 9:41 AM
To: Benjamin Jacob; resiprocate-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [reSIProcate] Need help with Handles

One advantage of storing InviteSessionHandle's is that using them is
more efficient than calling findInviteSession, since a map lookup is not
needed.
 
> -----Original Message-----
> From: resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx
> [mailto:resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Benjamin Jacob
> Sent: Friday, September 08, 2006 1:27 AM
> To: resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> Subject: Re: [reSIProcate] Need help with Handles
> 
> Wudn't it rather be better to store DialogIds? actualy, i shud
rephrase
> that question, which approach is better, storing DialogIds or 
> sessionHandles??
> 
> You are anyway passed InviteHandles in the callbacks. Also, if needed 
> you can procure the handles using dum->findInviteSession(DialogId).
> 
> Ben.
> 
> 
> Kovar, William (Bill) wrote:
> 
> > All,
> >
> > In building a B2B with DUM, which manages MANY calls,  I maintain a 
> > separate list of ServerInviteSessionHandle and 
> > ClientInviteSessionHandle. I'm trying to merge these 2 lists into a 
> > single master list of Handles. I know I can maintain the list as:
> >
> > map<key, InviteSessionHandle> TheList
> >
> > When I go to fetch a handle I don't know whether that handle should
> be
> > cast to ServerInviteSessionHandle, ClientInviteSessionHandle of 
> > InviteSessionHandle because I can't figure out which type it
> currently is.
> >
> > Is there way to know which type of handle is currently active??
> >
> > Bill Kovar
> > Avaya Inc.
> > (732) 852-2609
> > bkovar@xxxxxxxxx <mailto:bkovar@xxxxxxxxx>
> >
> >
>
>----------------------------------------------------------------------
> -
> >-
> >
> >_______________________________________________
> >resiprocate-devel mailing list
> >resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> >https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel
> >
> _______________________________________________
> resiprocate-devel mailing list
> resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel

_______________________________________________
resiprocate-devel mailing list
resiprocate-devel@xxxxxxxxxxxxxxxxxxx
https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel