/[resiprocate]/main/resip/dum/InviteSessionHandler.cxx
ViewVC logotype

Contents of /main/resip/dum/InviteSessionHandler.cxx

Parent Directory Parent Directory | Revision Log Revision Log


Revision 10695 - (show annotations) (download)
Fri Nov 22 23:12:34 2013 UTC (5 years, 11 months ago) by sgodin
File MIME type: text/plain
File size: 5489 byte(s)
-Merged from b-uasprack-20130904
  -added UAS Prack support to DUM!  Original implementation taken from b-uasprack-20091103
  -many changes, fixes and enhancements from original branch
  -MasterProfile setting setUasReliableProvisionalMode is used to enable
  -added mode called SupportedEssential where we will send reliable provisionals only if they
   are a provisional that is carrying an offer or answer  - required for 3GPP IMS flows 
  -added resubmit timer for reliable responses to ensure we send a reliable provisional at least 
   every 2.5 minutes  -new profile setting: set1xxRelResubmitTime to support this
  -updated state diagrams and added new PRACK flow diagrams to dum/doc directory (removed old diagrams)
  -fixed update glare handling for UAC prack 
  -added in support for UAC Prack to be able to send an offer in the first PRACK response 
  (must call provideOffer from onAnswer callback)
  -made a helper method on DialogUsageManager to set advertised capabilities 
  -fixed missing break in ClientInviteSession::dispatchReceivedUpdateEarly 
  

  
  
1 #include "resip/dum/AppDialogSet.hxx"
2 #include "resip/dum/InviteSessionHandler.hxx"
3 #include "resip/dum/ClientInviteSession.hxx"
4 #include "resip/stack/SdpContents.hxx"
5 #include "rutil/Logger.hxx"
6
7 #define RESIPROCATE_SUBSYSTEM Subsystem::DUM
8
9 using namespace resip;
10
11 void
12 InviteSessionHandler::onEarlyMedia(ClientInviteSessionHandle h, const SipMessage& msg, const Contents& body)
13 {
14 if(!mGenericOfferAnswer)
15 {
16 const SdpContents* sdp = dynamic_cast<const SdpContents*>(&body);
17 assert(sdp);
18 onEarlyMedia(h, msg, *sdp);
19 }
20 }
21
22 void
23 InviteSessionHandler::onStaleCallTimeout(ClientInviteSessionHandle handle)
24 {
25 InfoLog(<< "InviteSessionHandler::onStaleCallTimeout");
26 }
27
28 void
29 InviteSessionHandler::terminate(ClientInviteSessionHandle h)
30 {
31 h->getAppDialogSet()->end();
32 }
33
34 void
35 InviteSessionHandler::onAckReceived(InviteSessionHandle, const SipMessage& msg)
36 {
37 }
38
39 void
40 InviteSessionHandler::onAckNotReceived(InviteSessionHandle handle)
41 {
42 InfoLog(<< "InviteSessionHandler::onAckNotReceived");
43 handle->end(InviteSession::AckNotReceived);
44 }
45
46 void
47 InviteSessionHandler::onStaleReInviteTimeout(InviteSessionHandle handle)
48 {
49 InfoLog(<< "InviteSessionHandler::onStaleReInviteTimeout");
50 handle->end(InviteSession::StaleReInvite);
51 }
52
53 void
54 InviteSessionHandler::onIllegalNegotiation(InviteSessionHandle handle, const SipMessage& msg)
55 {
56 InfoLog(<< "InviteSessionHandler::onIllegalNegotiation");
57 }
58
59 void
60 InviteSessionHandler::onSessionExpired(InviteSessionHandle handle)
61 {
62 InfoLog(<< "InviteSessionHandler::onSessionExpired");
63 handle->end(InviteSession::SessionExpired);
64 }
65
66 void
67 InviteSessionHandler::onAnswer(InviteSessionHandle h, const SipMessage& msg, const Contents& body)
68 {
69 if(!mGenericOfferAnswer)
70 {
71 const SdpContents* sdp = dynamic_cast<const SdpContents*>(&body);
72 assert(sdp);
73 onAnswer(h, msg, *sdp);
74 }
75 }
76
77 void
78 InviteSessionHandler::onOffer(InviteSessionHandle h, const SipMessage& msg, const Contents& body)
79 {
80 if(!mGenericOfferAnswer)
81 {
82 const SdpContents* sdp = dynamic_cast<const SdpContents*>(&body);
83 assert(sdp);
84 onOffer(h, msg, *sdp);
85 }
86 }
87
88 void
89 InviteSessionHandler::onRemoteSdpChanged(InviteSessionHandle, const SipMessage& msg, const SdpContents&)
90 {
91 }
92
93 void
94 InviteSessionHandler::onRemoteAnswerChanged(InviteSessionHandle h, const SipMessage& msg, const Contents& body)
95 {
96 if(!mGenericOfferAnswer)
97 {
98 const SdpContents* sdp = dynamic_cast<const SdpContents*>(&body);
99 assert(sdp);
100 onRemoteSdpChanged(h, msg, *sdp);
101 }
102 }
103
104 void
105 InviteSessionHandler::onReadyToSend(InviteSessionHandle, SipMessage& msg)
106 {
107 // default is to do nothing. this is for adornment
108 }
109
110 void
111 InviteSessionHandler::onOfferRequestRejected(InviteSessionHandle, const SipMessage& msg)
112 {
113 }
114
115 void
116 InviteSessionHandler::onConnectedConfirmed(InviteSessionHandle handle, const SipMessage& msg)
117 {
118 }
119
120 void
121 InviteSessionHandler::onPrack(ServerInviteSessionHandle, const SipMessage &msg)
122 {
123 }
124
125 void
126 InviteSessionHandler::onFlowTerminated(InviteSessionHandle)
127 {
128 InfoLog(<< "InviteSessionHandler::onFlowTerminated");
129 }
130
131
132 /* ====================================================================
133 * The Vovida Software License, Version 1.0
134 *
135 * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
136 *
137 * Redistribution and use in source and binary forms, with or without
138 * modification, are permitted provided that the following conditions
139 * are met:
140 *
141 * 1. Redistributions of source code must retain the above copyright
142 * notice, this list of conditions and the following disclaimer.
143 *
144 * 2. Redistributions in binary form must reproduce the above copyright
145 * notice, this list of conditions and the following disclaimer in
146 * the documentation and/or other materials provided with the
147 * distribution.
148 *
149 * 3. The names "VOCAL", "Vovida Open Communication Application Library",
150 * and "Vovida Open Communication Application Library (VOCAL)" must
151 * not be used to endorse or promote products derived from this
152 * software without prior written permission. For written
153 * permission, please contact vocal@vovida.org.
154 *
155 * 4. Products derived from this software may not be called "VOCAL", nor
156 * may "VOCAL" appear in their name, without prior written
157 * permission of Vovida Networks, Inc.
158 *
159 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
160 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
161 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
162 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
163 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
164 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
165 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
166 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
167 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
168 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
169 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
170 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
171 * DAMAGE.
172 *
173 * ====================================================================
174 *
175 * This software consists of voluntary contributions made by Vovida
176 * Networks, Inc. and many individuals on behalf of Vovida Networks,
177 * Inc. For more information on Vovida Networks, Inc., please see
178 * <http://www.vovida.org/>.
179 *
180 */

Properties

Name Value
svn:eol-style native
svn:mime-type text/plain

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27