[reSIProcate] Could use some more advice on how to use resip Stack....
Hi,
In my InviteSessionHandler, which I have defined as such.... I mark
specific
areas of interest with: <----
class InviteClient : public InviteSessionHandler, public OutOfDialogHandler
{
public:
bool connected; <---- State flag to indicate I'm connected.
Should it really go in my
AppDialogSet class?
ClientRegistrationHandle registerHandle;
// More instance variables
bool done;
SdpContents* sdp; <---- I want to be able to get at
this. Do I
put it here? or
does it go in AppDialogSet?
HeaderFieldValue* hfv;
Data* txt; <---- This is my "sdp" as a Data
type.
time_t* pHangupAt; <---- Not sure what this is, but
it was
in the test
code. What's this for?
const SipMessage& reqresponse;
// remote IP and Port of client when Invite was sucessful
// is set in "onConnected".
u_int16_t port; <---- I need this after i connect, do I
store it here?
char *ip; <---- same here...
InviteClient(); // removes const Data& n
virtual ~InviteClient(); // Don't need the Virtual part
// My own methods
virtual void SetStartTime(time_t* pH); <---- I call this to
time stamp when
I create the Handler.
virtual void SetDelegate(SipBridge *theBridge); <---- handler
needs to know my Bridge code
// <---- Which one of these following callbacks get called when a
sucessful callback?
// Only interested in the Client methods.
virtual void onNewSession(ClientInviteSessionHandle,
InviteSession::OfferAnswerType oat, const SipMessage& msg);
virtual void onProvisional(ClientInviteSessionHandle, const
SipMessage& msg);
virtual void onConnected(ClientInviteSessionHandle, const
SipMessage& msg);
virtual void onOfferRejected(InviteSessionHandle, const
SipMessage& msg);
virtual void onStaleCallTimeout(ClientInviteSessionHandle);
virtual void onRedirected(ClientInviteSessionHandle, const
SipMessage& msg);
virtual void onEarlyMedia(ClientInviteSessionHandle, const
SipMessage& msg, const SdpContents& sdp);
virtual void onForkDestroyed(ClientInviteSessionHandle);
virtual void onTerminated(InviteSessionHandle,
InviteSessionHandler::TerminatedReason reason, const SipMessage* msg);
virtual void onAnswer(InviteSessionHandle, const SipMessage& msg,
const SdpContents& sdp);
virtual void onOffer(InviteSessionHandle is, const SipMessage&
msg, const SdpContents& sdp);
virtual void onOfferRequired(InviteSessionHandle, const
SipMessage& msg);
virtual void onInfo(InviteSessionHandle, const SipMessage& msg);
virtual void onInfoSuccess(InviteSessionHandle, const SipMessage&
msg);
virtual void onInfoFailure(InviteSessionHandle, const SipMessage&
msg);
virtual void onRefer(InviteSessionHandle,
ServerSubscriptionHandle, const SipMessage& msg);
virtual void onReferRejected(InviteSessionHandle, const
SipMessage& msg);
virtual void onReferAccepted(InviteSessionHandle,
ClientSubscriptionHandle, const SipMessage& msg);
// Server - we don't use this
virtual void onNewSession(ServerInviteSessionHandle,
InviteSession::OfferAnswerType oat, const SipMessage& msg);
virtual void onFailure(ClientInviteSessionHandle, const
SipMessage& msg);
virtual void onConnected(InviteSessionHandle, const SipMessage& msg);
// Out-of-Dialog Callbacks
virtual void onSuccess(ClientOutOfDialogReqHandle, const
SipMessage& successResponse);
virtual void onFailure(ClientOutOfDialogReqHandle, const
SipMessage& errorResponse);
virtual void onReceivedRequest(ServerOutOfDialogReqHandle ood,
const SipMessage& request);
private:
// this is our link back to the SipBridge code
SipBridge *mBridge; // reference to SipBridge
// this is related to RTP stuff.
int mSession_number; // RTP Session number - used my JRTPLIB.
// I think we need the server stuff also.
ServerInviteSessionHandle mSis; <---- I think this might be
needed for
incoming calls.
// We add this when we do the RTP part.
// RTPBridge *mRTPBridge; // Reference to the RTP Bridge object.
};
Anyway - these are my "burning questions" of the week. FYI, I've been
asking
questions of this form for at least 3 weeks, how come nobody has bothered
to step forward to answer them? I know a lot of you on this list can
answer them.
I'm sure there are zillions of ways one can do this, but all I'm asking
for is
just ONE way - a way in which I can use to write a simple SIP phone.
John