reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
InviteSessionHandler.hxx
Go to the documentation of this file.
1#if !defined(RESIP_INVITESESSIONHANDLER_HXX)
2#define RESIP_INVITESESSIONHANDLER_HXX
3
6
7namespace resip
8{
9
10class SipMessage;
11class SdpContents;
12class Contents;
13
41{
42 public:
43 InviteSessionHandler(bool genericOfferAnswer=false) : mGenericOfferAnswer(genericOfferAnswer) {}
45 virtual bool isGenericOfferAnswer() { return mGenericOfferAnswer; }
46
50
52 virtual void onFailure(ClientInviteSessionHandle, const SipMessage& msg)=0;
53
56 virtual void onEarlyMedia(ClientInviteSessionHandle, const SipMessage&, const Contents&);
57
60
63
65 virtual void onConnected(InviteSessionHandle, const SipMessage& msg)=0;
66
68 virtual void onConnectedConfirmed(InviteSessionHandle, const SipMessage &msg);
69
71 virtual void onPrack(ServerInviteSessionHandle, const SipMessage &msg);
72
78
83
88 {
96 Rejected, //Only as UAS, UAC has distinct onFailure callback
98 };
99
101
105
113
115 virtual void onReadyToSend(InviteSessionHandle, SipMessage& msg);
116
119 virtual void onAnswer(InviteSessionHandle, const SipMessage& msg, const SdpContents&)=0;
120 // You should only override the following method if genericOfferAnswer is true
121 virtual void onAnswer(InviteSessionHandle, const SipMessage& msg, const Contents&);
122
124 virtual void onOffer(InviteSessionHandle, const SipMessage& msg, const SdpContents&)=0;
125 // You should only override the following method if genericOfferAnswer is true
126 virtual void onOffer(InviteSessionHandle, const SipMessage& msg, const Contents&);
127
131 virtual void onRemoteSdpChanged(InviteSessionHandle, const SipMessage& msg, const SdpContents&);
132 // You should only override the following method if genericOfferAnswer is true
133 virtual void onRemoteAnswerChanged(InviteSessionHandle, const SipMessage& msg, const Contents&);
134
136 virtual void onOfferRequestRejected(InviteSessionHandle, const SipMessage& msg);
137
140 virtual void onOfferRequired(InviteSessionHandle, const SipMessage& msg)=0;
141
144 virtual void onOfferRejected(InviteSessionHandle, const SipMessage* msg)=0;
145
149 virtual void onInfo(InviteSessionHandle, const SipMessage& msg)=0;
150
152 virtual void onInfoSuccess(InviteSessionHandle, const SipMessage& msg)=0;
153 virtual void onInfoFailure(InviteSessionHandle, const SipMessage& msg)=0;
154
156 virtual void onMessage(InviteSessionHandle, const SipMessage& msg)=0;
157
161
167
168 virtual void onReferNoSub(InviteSessionHandle, const SipMessage& msg)=0;
169
171 virtual void onReferRejected(InviteSessionHandle, const SipMessage& msg)=0;
172
175
177 virtual void onAckReceived(InviteSessionHandle, const SipMessage& msg);
178
181
185
187 virtual void onIllegalNegotiation(InviteSessionHandle, const SipMessage& msg);
188
192
195 // Called only if clientOutbound is enabled on the UserProfile and the first hop server
199
200 private:
201 bool mGenericOfferAnswer;
202};
203
204}
205
206#endif
207
208/* ====================================================================
209 * The Vovida Software License, Version 1.0
210 *
211 * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
212 *
213 * Redistribution and use in source and binary forms, with or without
214 * modification, are permitted provided that the following conditions
215 * are met:
216 *
217 * 1. Redistributions of source code must retain the above copyright
218 * notice, this list of conditions and the following disclaimer.
219 *
220 * 2. Redistributions in binary form must reproduce the above copyright
221 * notice, this list of conditions and the following disclaimer in
222 * the documentation and/or other materials provided with the
223 * distribution.
224 *
225 * 3. The names "VOCAL", "Vovida Open Communication Application Library",
226 * and "Vovida Open Communication Application Library (VOCAL)" must
227 * not be used to endorse or promote products derived from this
228 * software without prior written permission. For written
229 * permission, please contact vocal@vovida.org.
230 *
231 * 4. Products derived from this software may not be called "VOCAL", nor
232 * may "VOCAL" appear in their name, without prior written
233 * permission of Vovida Networks, Inc.
234 *
235 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
236 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
237 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
238 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
239 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
240 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
241 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
242 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
243 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
244 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
245 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
246 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
247 * DAMAGE.
248 *
249 * ====================================================================
250 *
251 * This software consists of voluntary contributions made by Vovida
252 * Networks, Inc. and many individuals on behalf of Vovida Networks,
253 * Inc. For more information on Vovida Networks, Inc., please see
254 * <http://www.vovida.org/>.
255 *
256 */
Base class for all SIP body types.
Definition Contents.hxx:51
virtual void onStaleReInviteTimeout(InviteSessionHandle h)
UAC gets no final response within the stale re-invite timeout (default is 40 seconds).
virtual void onInfo(InviteSessionHandle, const SipMessage &msg)=0
called when INFO message is received the application must call acceptNIT() or rejectNIT() once it is ...
virtual void onOfferRejected(InviteSessionHandle, const SipMessage *msg)=0
called if an offer in a UPDATE or re-INVITE was rejected - not real useful.
virtual void onReferRejected(InviteSessionHandle, const SipMessage &msg)=0
called when an REFER message receives a failure response
InviteSessionHandler(bool genericOfferAnswer=false)
virtual void terminate(ClientInviteSessionHandle h)
called when an early dialog decides it wants to terminate the dialog.
virtual void onIllegalNegotiation(InviteSessionHandle, const SipMessage &msg)
will be called if reINVITE or UPDATE in dialog fails
virtual void onAckNotReceived(InviteSessionHandle)
default behaviour is to send a BYE to end the dialog
virtual void onForkDestroyed(ClientInviteSessionHandle)=0
called when a fork that was created through a 1xx never receives a 2xx because another fork answered ...
virtual void onAckReceived(InviteSessionHandle, const SipMessage &msg)
called when ACK is received
virtual void onRefer(InviteSessionHandle, ServerSubscriptionHandle, const SipMessage &msg)=0
called when an REFER message is received.
virtual void onAnswer(InviteSessionHandle, const SipMessage &msg, const SdpContents &)=0
called when an answer is received - has nothing to do with user answering the call
virtual void onEarlyMedia(ClientInviteSessionHandle, const SipMessage &, const SdpContents &)=0
called when an in-dialog provisional response is received that contains a body
virtual void onSessionExpired(InviteSessionHandle)
will be called if Session-Timers are used and Session Timer expires default behaviour is to send a BY...
virtual void onReferNoSub(InviteSessionHandle, const SipMessage &msg)=0
virtual void onProvisional(ClientInviteSessionHandle, const SipMessage &)=0
called when dialog enters the Early state - typically after getting 18x
virtual void onOfferRequired(InviteSessionHandle, const SipMessage &msg)=0
called when an Invite w/out offer is sent, or any other context which requires an offer from the user
virtual void onRedirected(ClientInviteSessionHandle, const SipMessage &msg)=0
called when a 3xx with valid targets is encountered in an early dialog This is different then getti...
virtual void onMessage(InviteSessionHandle, const SipMessage &msg)=0
called when MESSAGE message is received
virtual void onConnectedConfirmed(InviteSessionHandle, const SipMessage &msg)
called when ACK (with out an answer) is received for initial invite (UAS)
virtual void onStaleCallTimeout(ClientInviteSessionHandle h)
UAC gets no final response within the stale call timeout (default is 3 minutes).
virtual void onPrack(ServerInviteSessionHandle, const SipMessage &msg)
called when PRACK is received for a reliable provisional answer (UAS)
virtual void onInfoFailure(InviteSessionHandle, const SipMessage &msg)=0
virtual void onNewSession(ServerInviteSessionHandle, InviteSession::OfferAnswerType oat, const SipMessage &msg)=0
virtual void onInfoSuccess(InviteSessionHandle, const SipMessage &msg)=0
called when response to INFO message is received
virtual void onTerminated(InviteSessionHandle, InviteSessionHandler::TerminatedReason reason, const SipMessage *related=0)=0
virtual void onOffer(InviteSessionHandle, const SipMessage &msg, const SdpContents &)=0
called when an offer is received - must send an answer soon after this
virtual void onNewSession(ClientInviteSessionHandle, InviteSession::OfferAnswerType oat, const SipMessage &msg)=0
called when an initial INVITE or the intial response to an outoing invite
virtual void onReadyToSend(InviteSessionHandle, SipMessage &msg)
called to allow app to adorn a message. default is to send immediately
TerminatedReason
called when an dialog enters the terminated state - this can happen after getting a BYE,...
@ Referred
slg! - This is really Redirected - not sure why it is called Referred. Only gets used when we send a ...
virtual void onMessageFailure(InviteSessionHandle, const SipMessage &msg)=0
virtual void onMessageSuccess(InviteSessionHandle, const SipMessage &msg)=0
called when response to MESSAGE message is received
virtual void onRemoteAnswerChanged(InviteSessionHandle, const SipMessage &msg, const Contents &)
virtual void onConnected(InviteSessionHandle, const SipMessage &msg)=0
called when a dialog initiated as a UAS enters the connected state
virtual void onFlowTerminated(InviteSessionHandle)
Called when a TCP or TLS flow to the server has terminated.
virtual void onOfferRequestRejected(InviteSessionHandle, const SipMessage &msg)
Called when an error response is received for a reinvite-nobody request (via requestOffer)
virtual void onRemoteSdpChanged(InviteSessionHandle, const SipMessage &msg, const SdpContents &)
called when a modified body is received in a 2xx response to a session-timer reINVITE.
virtual void onFailure(ClientInviteSessionHandle, const SipMessage &msg)=0
Received a failure response from UAS.
virtual void onReferAccepted(InviteSessionHandle, ClientSubscriptionHandle, const SipMessage &msg)=0
called when an REFER message receives an accepted response
virtual void onConnected(ClientInviteSessionHandle, const SipMessage &msg)=0
called when a dialog initiated as a UAC enters the connected state
Provides an interface to process and generate SDP bodies (MIME content-type application/sdp).
Represents a SIP message.
dcm! – add UnusedChecking(_enum) below;