This file is indexed.

/usr/include/recon/ConversationProfile.hxx is in librecon-1.11-dev 1:1.11.0~beta5-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
#if !defined(ConversationProfile_hxx)
#define ConversationProfile_hxx

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include <resip/dum/UserProfile.hxx>
#include <resip/stack/SdpContents.hxx>

namespace recon
{

typedef unsigned int ConversationProfileHandle;

/**
  This class extends the resip UserProfile to include Conversation 
  Manager specific settings.

  Author: Scott Godin (sgodin AT SipSpectrum DOT com)
*/

class ConversationProfile : public resip::UserProfile
{
public:  

   ConversationProfile(); 

   enum NatTraversalMode
   {
      NoNatTraversal,
      StunBindDiscovery,
      TurnUdpAllocation,
      TurnTcpAllocation,
      TurnTlsAllocation
   };

   enum SecureMediaMode
   {
      NoSecureMedia, // Will accept secure media offers, but will not offer secure media in calls placed
      Srtp,       // SRTP with keying outside of media stream - ie. SDES key negotiation via SDP
      SrtpDtls    // SRTP with DTLS key negotiation
   };

   enum SecureMediaCryptoSuite
   {
      SRTP_AES_CM_128_HMAC_SHA1_32,
      SRTP_AES_CM_128_HMAC_SHA1_80
   };

   /**
     Constructor

     @param baseProfile if any UserProfile settings are not set on this
                        class, then the setting will "fall through" to 
                        the base profile
   */  
   ConversationProfile(resip::SharedPtr<resip::Profile> baseProfile);  

   /**
     Get the conversation profile handle.  Returns 0 if called before adding
     the profile to the ConversationManager.

     @return ConversationProfileHandle
   */  
   virtual ConversationProfileHandle getHandle();

   /**
     Get/Set the session capabilities.  Session capabilites are expressed
     as a SessionDesriptionProtocol body.  Typically this is populated as you
     would expect an SDP offer to look like that is generated by this application.

     This is used to generate SDP offers and form valid SDP answers.

     @return SdpContents representing the session capabilities
   */  
   virtual resip::SdpContents& sessionCaps();
   virtual const resip::SdpContents sessionCaps() const; 

   /**
     Get/Set wether auto answers are allowed, if an autoanswer indication
     is found in a new inbound call request.

     @return bool True if auto answer is enabled
   */  
   virtual bool& allowAutoAnswer() { return mAllowAutoAnswer; }
   virtual const bool allowAutoAnswer() const { return mAllowAutoAnswer; }

   /**
     Get/Set wether priority auto answers are allowed, if a priority 
     autoanswer indication is found in a new inbound call request.

     @note Priority Auto Answers are indicated using the PrivAnswerMode
           SIP header

     @return bool True if priority auto answer is enabled
   */  
   virtual bool& allowPriorityAutoAnswer() { return mAllowPriorityAutoAnswer; }
   virtual const bool allowPriorityAutoAnswer() const { return mAllowPriorityAutoAnswer; }

   /** 
     Checks an Invite message for auto-answer headers against the current allow 
     settings.  
     
     @param inviteRequest SIP Invite message to check
     @param required Will return true if the auto-answer is "required"
   */
   virtual bool shouldAutoAnswer(const resip::SipMessage& inviteRequest, bool *required = 0);

   /** 
     Get/Set wether auto answer requests should be digest challenged
     or not.

     @note Requests will be challenged using the digest credentials
           set on this profile
     
     @return bool True if auto answer requests should be challenged
   */
   virtual bool& challengeAutoAnswerRequests() { return mChallengeAutoAnswerRequests; }
   virtual const bool challengeAutoAnswerRequests() const { return mChallengeAutoAnswerRequests; }

   /** 
     Get/Set wether out of dialog REFER requests should be digest 
     challenged or not.

     @note Requests will be challenged using the digest credentials
           set on this profile
     
     @return bool True if OOD REFER requests should be challenged
   */
   virtual bool& challengeOODReferRequests() { return mChallengeOODReferRequests; }
   virtual const bool challengeOODReferRequests() const { return mChallengeOODReferRequests; }

   /** 
     Get/Set the secure media mode that will be used for sending/receiving media packets.
     NoSecureMedia - don't use any secure media strategies - RTP packets are sent 
                     unencrypted via the specified transport.
     Srtp          - use SRTP with keying outside of media stream - ie. SDES key negotiation via SDP (default)
     SrtpDtls      - use SRTP with DTLS key negotiation

     @note If TurnTlsAllocation NatTraversalMode is used, then media will be secured from 
           this UA to the TURN the turn server, even if NoSecureMedia is used.

     @return SecureMediaMode
   */
   virtual SecureMediaMode& secureMediaMode() { return mSecureMediaMode; }
   virtual const SecureMediaMode secureMediaMode() const { return mSecureMediaMode; }

   /** 
     Get/Set the wether Secure Media is required (default is false).
     - if required then SAVP transport protocol is signalled in SDP offers
     - if not required then AVP transport portocol is signalled in SDP offers 
       and encryption=optional attribute is added

     @return true if secure media is required
   */
   virtual bool& secureMediaRequired() { return mSecureMediaRequired; }
   virtual const bool secureMediaRequired() const { return mSecureMediaRequired; }


   /** 
     Get/Set the secure media default crypto suite.  The default crypto suite is used when
     forming SDP offers (SDES only - does not apply to DTLS-SRTP).
     SRTP_AES_CM_128_HMAC_SHA1_32 - Counter Mode AES 128 bit encryption with 
                                    32bit authenication code 
     SRTP_AES_CM_128_HMAC_SHA1_80 - Counter Mode AES 128 bit encryption with 
                                    80bit authenication code (default)

     @return SecureMediaMode
   */
   virtual SecureMediaCryptoSuite& secureMediaDefaultCryptoSuite() { return mDefaultSecureMediaCryptoSuite; }
   virtual const SecureMediaCryptoSuite secureMediaDefaultCryptoSuite() const { return mDefaultSecureMediaCryptoSuite; }

   /** 
     Get/Set the NAT traversal mode that will be used for sending/receiving media packets.
     NoNatTraversal - don't use any NAT traversal strategies - local address and port
                      are used in SDP negotiations
     StunBindDiscovery - use Binding discovery on a STUN server, to discover and use
                         "public" address and port in SDP negotiations
     TurnUdpAllocation - Use a TURN server as a media relay.  Communicate to the TURN
                         server over UDP and Allocate a UDP relay address and port to 
                         use in SDP negotiations
     TurnTcpAllocation - Use a TURN server as a media relay.  Communicate to the TURN
                         server over TCP and Allocate a UDP relay address and port to 
                         use in SDP negotiations
     TurnTlsAllocation - Use a TURN server as a media relay.  Communicate to the TURN
                         server over TLS and Allocate a UDP relay address and port to 
                         use in SDP negotiations
     
     @return NatTraversalMode
   */
   virtual NatTraversalMode& natTraversalMode() { return mNatTraversalMode; }
   virtual const NatTraversalMode natTraversalMode() const { return mNatTraversalMode; }

   virtual bool& forceCOMedia() { return mForceCOMedia; }
   virtual const bool forceCOMedia() const { return mForceCOMedia; }

   /** 
     Get/Set the NAT traversal server hostname that will be used for if natTranversalMode
     is anything other than NoNatTraversal.  The server can be specified as an IP address
     or a A-Records DNS resolvable hostname.  SRV resolution is not yet supported.
     
     @return The server to use for NAT traversal
   */
   virtual resip::Data& natTraversalServerHostname() { return mNatTraversalServerHostname; }
   virtual const resip::Data natTraversalServerHostname() const { return mNatTraversalServerHostname; }

   /** 
     Get/Set the NAT traversal server port that will be used for if natTranversalMode
     is anything other than NoNatTraversal.  
     
     @return The server port to use for NAT traversal
   */
   virtual unsigned short& natTraversalServerPort() { return mNatTraversalServerPort; }
   virtual const unsigned short natTraversalServerPort() const { return mNatTraversalServerPort; }

   /** 
     Get/Set the STUN username that will be used for if natTranversalMode
     is anything other than NoNatTraversal.  The stun username/password is used for 
     both STUN and TURN server authentication.
     
     @return The STUN username
   */
   virtual resip::Data& stunUsername() { return mStunUsername; }
   virtual const resip::Data stunUsername() const { return mStunUsername; }

   /** 
     Get/Set the STUN password that will be used for if natTranversalMode
     is anything other than NoNatTraversal.  The stun username/password is used for 
     both STUN and TURN server authentication.
     
     @return The STUN password
   */
   virtual resip::Data& stunPassword() { return mStunPassword; }
   virtual const resip::Data stunPassword() const { return mStunPassword; }

private:            
   friend class UserAgent;
   void setHandle(ConversationProfileHandle handle);

   ConversationProfileHandle mHandle;
   resip::SdpContents mSessionCaps;    
   bool mAllowAutoAnswer;
   bool mAllowPriorityAutoAnswer;
   bool mChallengeAutoAnswerRequests;
   bool mChallengeOODReferRequests;
   SecureMediaMode mSecureMediaMode;
   bool mSecureMediaRequired;
   SecureMediaCryptoSuite mDefaultSecureMediaCryptoSuite;
   NatTraversalMode mNatTraversalMode;
   bool mForceCOMedia;
   resip::Data mNatTraversalServerHostname;
   unsigned short mNatTraversalServerPort;
   resip::Data mStunUsername;
   resip::Data mStunPassword;
};

}

#endif


/* ====================================================================

 Copyright (c) 2007-2008, Plantronics, Inc.
 All rights reserved.

 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are 
 met:

 1. Redistributions of source code must retain the above copyright 
    notice, this list of conditions and the following disclaimer. 

 2. Redistributions in binary form must reproduce the above copyright
    notice, this list of conditions and the following disclaimer in the
    documentation and/or other materials provided with the distribution. 

 3. Neither the name of Plantronics nor the names of its contributors 
    may be used to endorse or promote products derived from this 
    software without specific prior written permission. 

 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

 ==================================================================== */