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

RE: [reSIProcate] Finding the correct DialogID to get the InviteSession


Jason,

Just getting back to making this code work and I've found a problem with
the aforementioned strategy...

If my map looks like this: 
std::map<unsigned long refid, ServerInviteSessionHandle> the_map;

And in UA::onNewSession(ServerInviteSessionHandle h, ...)
the_map[refid] = h;

Then later when I try to find the sish with:
ServerInviteSessionHandle sish = the_map[evRefId];
sish.isValid() returns false!!

What am I missing??

Bill Kovar
ECAD R&D - IC Advocate and Workflow
Avaya Inc.
(732) 852-2609
bkovar@xxxxxxxxx

-----Original Message-----
From: jason.fischl@xxxxxxxxx [mailto:jason.fischl@xxxxxxxxx] On Behalf
Of Jason Fischl
Sent: Wednesday, May 10, 2006 3:06 PM
To: Kovar, William (Bill)
Subject: Re: [reSIProcate] Finding the correct DialogID to get the
InviteSession

There is an isValid method on any handle. Also, there is an onTerminated
callback on the InviteSessionHandler.

On 5/10/06, Kovar, William (Bill) <bkovar@xxxxxxxxx> wrote:
>
>
> Jason,
>
> Excellent solution!! Thanks!!
>
> What's the best way to know when I should remove the entry from the
map i.e.
> which callback is fired when the session is, or is about to be, 
> deleted, or conversely, know that the InviteSessionHandle is no longer

> valid. There is no ish->isValid() method.
>
> Any suggestions?
>
> Bill Kovar
>
>  ________________________________
>
> From: jason.fischl@xxxxxxxxx [mailto:jason.fischl@xxxxxxxxx] On Behalf

> Of Jason Fischl
> Sent: Wednesday, May 10, 2006 2:00 PM
> To: Kovar, William (Bill)
>
> Subject: Re: [reSIProcate] Finding the correct DialogID to get the 
> InviteSession
>
>
> You can just call sish->getSessionHandle() which will return the 
> associated InviteSessionHandle.
>
>
> On 5/10/06, Kovar, William (Bill) < bkovar@xxxxxxxxx> wrote:
> >
> >
> >
> > Jason,
> >
> > Thanks for the info... If the onNewSession() contains a
> ServerInviteSessionHandle (because I just received a call that a 3rd 
> party has to decide where to deliver it to) can I just cast it to an 
> InviteSessionHandle before stuffing it into the map?? The every time I

> use it, I will only want the InviteSessionHandle from that point on.
> >
> >
> > Is this the right way to do it??
> >
> > std::map<unsigned long refid, InviteSessionHandle> the_map;
> >
> > and then add to the map
> >
> > void Class::onNewSession(ServerInviteSessionHandle sish,
> ....)
> > {
> > the_map[refid] = (dynamic_cast<InviteSessionHandle>)sish;
> >
> > }
> >
> >
> > Bill Kovar
> > ECAD R&D - IC Advocate and Workflow
> > Avaya Inc.
> > (732) 852-2609
> > bkovar@xxxxxxxxx
> >
> >
> >
> > ________________________________
>
> > From: jason.fischl@xxxxxxxxx [mailto:jason.fischl@xxxxxxxxx] On 
> > Behalf Of
> Jason Fischl
> >
> > Sent: Wednesday, May 10, 2006 11:13 AM
> >
> > To: Kovar, William (Bill)
> > Cc: resiprocate-devel
> > Subject: Re: [reSIProcate] Finding the correct DialogID to get the
> InviteSession
> >
> >
> >
> >
> > Yes. There is one InviteSession per Dialog. The DialodId really 
> > isn't
> needed at all for your application. It is mainly an internal
construct.
> >
> >
> > On 5/10/06, Kovar, William (Bill) <bkovar@xxxxxxxxx> wrote:
> > >
> > >
> > >
> > > Jason,
> > >
> > > I thought about persisting the InviteSessionHandle but I wasn't 
> > > sure it
> pointed to only ONE dialogId.
> > > Is there a 1:1 relationship between InviteSessionHandle ->
DialogId?
> > >
> > > I need to find the right call in the UA and the right end of the 
> > > call to
> move it correctly.
> > >
> > > Bill Kovar
> > >
> > >
> > > ________________________________
>  From: jason.fischl@xxxxxxxxx [mailto:jason.fischl@xxxxxxxxx] On 
> Behalf Of Jason Fischl
> > > Sent: Wednesday, May 10, 2006 10:52 AM
> > > To: Kovar, William (Bill)
> > > Cc: resiprocate-devel
> > > Subject: Re: [reSIProcate] Finding the correct DialogID to get the
> InviteSession
> > >
> > >
> > >
> > > Can you not store the InviteSessionHandle instead? That way you 
> > > won't
> need to call findInviteSession at all. You can just store a map from 
> refid
> -> InviteSessionHandle.
> > >
> > >
> > > On 5/9/06, Kovar, William (Bill) <bkovar@xxxxxxxxx> wrote:
> > > >
> > > >
> > > >
> > > > I'm building a multiple UA server that receives 3rd party 
> > > > commands
> that contain a Uri and refid.
> > > >
> > > > A top layer maps Uri->UA to find the UA. But I can't seem to 
> > > > figure
> out what to persist in my UA to find the correct dialog to act on. My 
> UA may have multiple active sessions.
> > > >
> > > > If I map inside the UA as such:
> > > > std::map<unsigned long refid, DialogId> the_map; and then add to

> > > > the map the_map[refid] = ish->getAppDialog()->getDialogID();
> > > > and then do:
> > > > mdum->findInviteSession(DialogId);
> > > >
> > > > Compiler complains about no appropriate copy constructor on
> resip::DialogId.
> > > >
> > > > Should I modify class DialogId to have a copy constructor or is 
> > > > there
> another way around this? Or does the DialogUsageManager have some 
> goodies for me to use to find the correct session inside one UA.
> > > >
> > > > Any alternatives to findInviteSession() ??
> > > >
> > > > Any suggestions??
> > > >
> > > > Bill Kovar
> > > > bkovar@xxxxxxxxx
> > > >
> > > > _______________________________________________
> > > > resiprocate-devel mailing list
> > > > resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> > > >
> https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel
> > > >
> > > >
> > >
> > >
> > >
> >
> >
>
>