reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
ConversationProfile.hxx
Go to the documentation of this file.
1#if !defined(ConversationProfile_hxx)
2#define ConversationProfile_hxx
3
4#ifdef HAVE_CONFIG_H
5#include "config.h"
6#endif
7
10
11namespace recon
12{
13
14typedef unsigned int ConversationProfileHandle;
15
24{
25public:
26
28
34
43
45 {
46 NoSecureMedia, // Will accept secure media offers, but will not offer secure media in calls placed
47 Srtp, // SRTP with keying outside of media stream - ie. SDES key negotiation via SDP
49 SrtpDtls, // SRTP with DTLS key negotiation
51 };
52
58
66 ConversationProfile(std::shared_ptr<resip::Profile> baseProfile);
67
75
86 virtual const resip::SdpContents sessionCaps() const;
87
94 virtual bool& allowAutoAnswer() { return mAllowAutoAnswer; }
95 virtual const bool allowAutoAnswer() const { return mAllowAutoAnswer; }
96
106 virtual bool& allowPriorityAutoAnswer() { return mAllowPriorityAutoAnswer; }
107 virtual const bool allowPriorityAutoAnswer() const { return mAllowPriorityAutoAnswer; }
108
116 virtual bool shouldAutoAnswer(const resip::SipMessage& inviteRequest, bool *required = 0);
117
127 virtual bool& challengeAutoAnswerRequests() { return mChallengeAutoAnswerRequests; }
128 virtual const bool challengeAutoAnswerRequests() const { return mChallengeAutoAnswerRequests; }
129
139 virtual bool& challengeOODReferRequests() { return mChallengeOODReferRequests; }
140 virtual const bool challengeOODReferRequests() const { return mChallengeOODReferRequests; }
141
148 virtual bool& delayedMediaOutboundMode() { return mDelayedMediaOutboundMode; }
149 virtual const bool delayedMediaOutboundMode() const { return mDelayedMediaOutboundMode; }
150
156 virtual MediaEndpointMode& mediaEndpointMode() { return mMediaEndpointMode; }
157 virtual const MediaEndpointMode mediaEndpointMode() const { return mMediaEndpointMode; }
158
171 virtual SecureMediaMode& secureMediaMode() { return mSecureMediaMode; }
172 virtual const SecureMediaMode secureMediaMode() const { return mSecureMediaMode; }
173
182 virtual bool& secureMediaRequired() { return mSecureMediaRequired; }
183 virtual const bool secureMediaRequired() const { return mSecureMediaRequired; }
184
185
196 virtual SecureMediaCryptoSuite& secureMediaDefaultCryptoSuite() { return mDefaultSecureMediaCryptoSuite; }
197 virtual const SecureMediaCryptoSuite secureMediaDefaultCryptoSuite() const { return mDefaultSecureMediaCryptoSuite; }
198
217 virtual NatTraversalMode& natTraversalMode() { return mNatTraversalMode; }
218 virtual const NatTraversalMode natTraversalMode() const { return mNatTraversalMode; }
219
220 virtual bool& forceCOMedia() { return mForceCOMedia; }
221 virtual const bool forceCOMedia() const { return mForceCOMedia; }
222
230 virtual resip::Data& natTraversalServerHostname() { return mNatTraversalServerHostname; }
231 virtual const resip::Data natTraversalServerHostname() const { return mNatTraversalServerHostname; }
232
239 virtual unsigned short& natTraversalServerPort() { return mNatTraversalServerPort; }
240 virtual const unsigned short natTraversalServerPort() const { return mNatTraversalServerPort; }
241
249 virtual resip::Data& stunUsername() { return mStunUsername; }
250 virtual const resip::Data stunUsername() const { return mStunUsername; }
251
259 virtual resip::Data& stunPassword() { return mStunPassword; }
260 virtual const resip::Data stunPassword() const { return mStunPassword; }
261
267 virtual unsigned int& maximumVideoBandwidth() { return mMaximumVideoBandwidth; }
268 virtual const unsigned int maximumVideoBandwidth() const { return mMaximumVideoBandwidth; }
269
270private:
271 friend class UserAgent;
272 void setHandle(ConversationProfileHandle handle);
273
275 resip::SdpContents mSessionCaps;
276 bool mAllowAutoAnswer;
277 bool mAllowPriorityAutoAnswer;
278 bool mChallengeAutoAnswerRequests;
279 bool mChallengeOODReferRequests;
280 bool mDelayedMediaOutboundMode;
281 MediaEndpointMode mMediaEndpointMode;
282 SecureMediaMode mSecureMediaMode;
283 bool mSecureMediaRequired;
284 SecureMediaCryptoSuite mDefaultSecureMediaCryptoSuite;
285 NatTraversalMode mNatTraversalMode;
286 bool mForceCOMedia;
287 resip::Data mNatTraversalServerHostname;
288 unsigned short mNatTraversalServerPort;
289 resip::Data mStunUsername;
290 resip::Data mStunPassword;
291 unsigned int mMaximumVideoBandwidth;
292};
293
294}
295
296#endif
297
298
299/* ====================================================================
300
301 Copyright (c) 2021, Daniel Pocock https://danielpocock.com
302 Copyright (c) 2007-2008, Plantronics, Inc.
303 All rights reserved.
304
305 Redistribution and use in source and binary forms, with or without
306 modification, are permitted provided that the following conditions are
307 met:
308
309 1. Redistributions of source code must retain the above copyright
310 notice, this list of conditions and the following disclaimer.
311
312 2. Redistributions in binary form must reproduce the above copyright
313 notice, this list of conditions and the following disclaimer in the
314 documentation and/or other materials provided with the distribution.
315
316 3. Neither the name of Plantronics nor the names of its contributors
317 may be used to endorse or promote products derived from this
318 software without specific prior written permission.
319
320 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
321 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
322 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
323 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
324 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
325 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
326 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
327 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
328 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
329 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
330 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
331
332 ==================================================================== */
This class extends the resip UserProfile to include Conversation Manager specific settings.
virtual const unsigned short natTraversalServerPort() const
virtual MediaEndpointMode & mediaEndpointMode()
Get/Set the type of Media endpoint.
virtual bool & secureMediaRequired()
Get/Set the wether Secure Media is required (default is false).
virtual resip::Data & natTraversalServerHostname()
Get/Set the NAT traversal server hostname that will be used for if natTranversalMode is anything othe...
virtual bool & challengeAutoAnswerRequests()
Get/Set wether auto answer requests should be digest challenged or not.
virtual const bool secureMediaRequired() const
virtual resip::Data & stunPassword()
Get/Set the STUN password that will be used for if natTranversalMode is anything other than NoNatTrav...
virtual const NatTraversalMode natTraversalMode() const
virtual const resip::Data stunPassword() const
virtual const MediaEndpointMode mediaEndpointMode() const
virtual bool shouldAutoAnswer(const resip::SipMessage &inviteRequest, bool *required=0)
Checks an Invite message for auto-answer headers against the current allow settings.
virtual const bool forceCOMedia() const
virtual const bool challengeAutoAnswerRequests() const
virtual const SecureMediaCryptoSuite secureMediaDefaultCryptoSuite() const
virtual const resip::Data natTraversalServerHostname() const
virtual unsigned int & maximumVideoBandwidth()
Get/Set the maximum video bandwidth to be indicated in SDP.
virtual const bool delayedMediaOutboundMode() const
virtual const unsigned int maximumVideoBandwidth() const
virtual const resip::Data stunUsername() const
virtual const bool allowAutoAnswer() const
virtual NatTraversalMode & natTraversalMode()
Get/Set the NAT traversal mode that will be used for sending/receiving media packets.
virtual resip::SdpContents & sessionCaps()
Get/Set the session capabilities.
virtual SecureMediaCryptoSuite & secureMediaDefaultCryptoSuite()
Get/Set the secure media default crypto suite.
virtual unsigned short & natTraversalServerPort()
Get/Set the NAT traversal server port that will be used for if natTranversalMode is anything other th...
virtual bool & allowAutoAnswer()
Get/Set wether auto answers are allowed, if an autoanswer indication is found in a new inbound call r...
virtual bool & delayedMediaOutboundMode()
Get/set whether to use delayed media mode (INVITE without SDP offer) when making an outgoing call.
virtual const bool allowPriorityAutoAnswer() const
virtual const SecureMediaMode secureMediaMode() const
virtual resip::Data & stunUsername()
Get/Set the STUN username that will be used for if natTranversalMode is anything other than NoNatTrav...
virtual bool & allowPriorityAutoAnswer()
Get/Set wether priority auto answers are allowed, if a priority autoanswer indication is found in a n...
virtual SecureMediaMode & secureMediaMode()
Get/Set the secure media mode that will be used for sending/receiving media packets.
virtual bool & challengeOODReferRequests()
Get/Set wether out of dialog REFER requests should be digest challenged or not.
virtual ConversationProfileHandle getHandle()
Get the conversation profile handle.
virtual const bool challengeOODReferRequests() const
This class is one of two main classes of concern to an application using the UserAgent library.
Definition UserAgent.hxx:56
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
Definition Data.hxx:90
Provides an interface to process and generate SDP bodies (MIME content-type application/sdp).
Represents a SIP message.
unsigned int ConversationProfileHandle
void list()
Definition userAdmin.cxx:66