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

Re: [reSIProcate] The "role" of the resip objects... and myunderstanding of them


Matthias Moetje wrote:

John,

I can understand your feelings. I had the same problems and you are absolutely correct
that this stuff is really badly documented
and you really need to dig into the stack and its classes to find out how things are
supposed to be used. Also the terms of client
and server are used differently as in the actual SIP RFC, so don't get confused by this.

Here are some of my findings/suggestions:

The main application class should contain:

- one stack object
- one dum object
- one dum thread object
- one stack thread object
I've done that...  but we also have AppDialogSets....  and this is most
confusing to me....

It should inherit from:

- ClientInviteSessionHandler
 (receive callbacks from outgoing calls

- ServerInviteSessionHandler
 (receive callbacks from incoming calls)
So - would I use "ServerInviteSessionHandler" even though I'm implementing
a SIP Phone?   Which is client only?   And I presume I would implement only
a few of these methods relating to standing by for incoming calls?

- ClientRegistrationHandler
 (for handling registrations)
Right - I actually got this working now.


You should also have a call object. An AppDialogSet
is equivalent to a call (a call can have several
AppDialogs = request/response). The call object
could probably inherit from AppDialogSet.
What exactly is a "Call object"?  Is this an object relating to
handling of a single call?    So this subclass of a AppDialogSet
only has the lifetime or duration of a single call?    What about
a conference call?   Would I have one for each participant in
my conference call?

Usually in Windows types of Applications, like the Mac,  Windows
and others,  there is a main "application" object.  It usually lives
for the duration of the program...  IE:  when program is launched,
an Application is instantiated.  On the Mac,  it's an NSApplication.
What is the relationship of a AppDialogSet and an Application?

Though, I decided to create a class like TestAppDialogSet
in the BasicCall example which has a pointer to
my class object.
That is the most confusing to me.  The example in BasicCall
does NOT address the issue of how long I'm to keep the
TestAppDialog set around...   What is it's lifetime...  in MY
case,  I'm not running all of my code in a single "main()" like
BasicCall does...  So I really have NO CLUE how long I'm
to keep my TestAppDialogSet around....   For instance,
do I create it and keep it around for the lifetime of the
Application,  or do I create it for every "call" I make and
ditch it when the call is taken down.  If DO have to ditch
it,   how do I tell the DUM I'm done with it?

I also create an AppDialogSet factory
which is reponsible for creating a TestAppDialogSet
object for incoming calls (for outgoing calls you create the object yourself).
Boy - now this is getting even MORE confusing...   Is there
anyway we can meet and "chat" about this?  I keep European
times,  but I cannot afford to talk on the phone unless you
can give me a land line phone I can call you on...  I prefer
Skype if you can meet me there....  it's free....  but I can
also meet you on AIM....  I find a short "interactive" conversation
Ideal for this....  Mornings are best for me,  or mid evening
European time.

In the main app class where you receive callbacks
you can cast the handles (like InvitSessionHandle)
to your TestAppDialogSet object from which you can get a pointer to your call object.
What do you mean by "main app class" when used in the context
above,  are you referring to my InviteSessionHandler subclass,
or do you mean my TestAppDialogSet subclass,  or do you mean
I force cast my "main app class" to BE an 'InviteSessionHandler'?
Is that what you mean?

I think once you have understood these procedures,
the rest is easy to find out.
I Still haven't figured it out yet,  but I find a direct Intaractive
chat is best for me. I need interaction to
clarify textual context of information as it comes in.

My next private Email I send you will have my Skype and AIM
contact information,  including my PSTN phone number,  should
you care to take a few minutes of your busy time to talk to me.

John

John