/usr/include/recon/UserAgentMasterProfile.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 | #if !defined(UserAgentMasterProfile_hxx)
#define UserAgentMasterProfile_hxx
#include <rutil/SharedPtr.hxx>
#include <rutil/TransportType.hxx>
#include <rutil/dns/DnsStub.hxx>
#include <resip/stack/SecurityTypes.hxx>
#include <resip/stack/Transport.hxx>
#include <resip/dum/MasterProfile.hxx>
#include <reflow/RTCPEventLoggingHandler.hxx>
#include <vector>
namespace recon
{
/**
This class extends the resip MasterProfile to include UserAgent
specific settings.
Author: Scott Godin (sgodin AT SipSpectrum DOT com)
*/
class UserAgentMasterProfile : public resip::MasterProfile
{
public:
UserAgentMasterProfile();
class TransportInfo
{
public:
resip::TransportType mProtocol;
int mPort;
resip::IpVersion mIPVersion;
resip::StunSetting mStunEnabled;
resip::Data mIPInterface;
resip::Data mSipDomainname;
resip::Data mTlsPrivateKeyPassPhrase;
resip::SecurityTypes::SSLType mSslType;
unsigned mTransportFlags;
resip::Data mTlsCertificate;
resip::Data mTlsPrivateKey;
resip::SecurityTypes::TlsClientVerificationMode mCvm;
bool mUseEmailAsSIP;
unsigned int mRcvBufLen;
};
void setTransportSipMessageLoggingHandler(resip::SharedPtr<resip::Transport::SipMessageLoggingHandler> handler);
const resip::SharedPtr<resip::Transport::SipMessageLoggingHandler> getTransportSipMessageLoggingHandler() const;
void setRTCPEventLoggingHandler(resip::SharedPtr<flowmanager::RTCPEventLoggingHandler> handler);
const resip::SharedPtr<flowmanager::RTCPEventLoggingHandler> getRTCPEventLoggingHandler() const;
/**
Adds a network transport to use for send/receiving SIP messages.
@note This MUST be called before the UserAgent is created
@param protocol Transport type: UDP,TCP or TLS
@param port UDP or TCP port to listen on
@param version IP Version: V4 or V6
@param ipInterface IP Interface to bind to - empty string
binds to all interfaces
@param sipDomainname TLS Domain name - only used if protocol
is TLS
@param sslType SSLv23 vs TLSv1 - only use if protocol is TLS
*/
void addTransport( resip::TransportType protocol,
int port,
resip::IpVersion version=resip::V4,
resip::StunSetting stun=resip::StunDisabled,
const resip::Data& ipInterface = resip::Data::Empty,
const resip::Data& sipDomainname = resip::Data::Empty, // TLS only
const resip::Data& privateKeyPassPhrase = resip::Data::Empty,
resip::SecurityTypes::SSLType sslType = resip::SecurityTypes::SSLv23,
unsigned transportFlags = 0,
const resip::Data& certificateFilename = resip::Data::Empty,
const resip::Data& privateKeyFilename = resip::Data::Empty,
resip::SecurityTypes::TlsClientVerificationMode cvm = resip::SecurityTypes::None,
bool useEmailAsSIP = false,
unsigned int rcvBufLen = 0);
/**
Gets a vector of the transports previously added.
@return Reference to a vector of TransportInfo's
*/
const std::vector<TransportInfo>& getTransports() const;
/**
Adds a domain suffix used in ENUM DNS queries.
For example: e164.arpa
@note This MUST be called before the UserAgent is created
@param enumSuffix ENUM Domain suffix to add
*/
void addEnumSuffix(const resip::Data& enumSuffix);
/**
Gets a vector of the ENUM domain suffixes previously added.
@return Reference to a vector of ENUM domain suffixes
*/
const std::vector<resip::Data>& getEnumSuffixes() const;
/**
Adds an additional DNS server to ones that are attempted
to be discovered by the SIP stack.
@note This MUST be called before the UserAgent is created
@param dnsServerIPAddress IP Address of DNS server to add
*/
void addAdditionalDnsServer(const resip::Data& dnsServerIPAddress);
/**
Gets a vector of the DNS Servers previously added.
@note This does not include DNS servers detected by the stack
@return Reference to a vector of DNS server IP Addresses
*/
const resip::DnsStub::NameserverList& getAdditionalDnsServers() const;
/**
Get/Set the location where the SIP stack will look for X509
certificates
@note This MUST be called before the UserAgent is created
@return Data cert path location
*/
virtual resip::Data& certPath();
virtual const resip::Data certPath() const;
/**
Get/Set the locations where the SIP stack will look for X.509
trusted root certificates.
@note This MUST be called before the UserAgent is created
@return Data root cert directory location
*/
virtual std::vector<resip::Data>& rootCertDirectories();
virtual const std::vector<resip::Data>& rootCertDirectories() const;
/**
Get/Set the names of files containing bundles of X.509 trusted
root certificates
@note This MUST be called before the UserAgent is created
@return Data cert path location
*/
virtual std::vector<resip::Data>& rootCertBundles();
virtual const std::vector<resip::Data>& rootCertBundles() const;
/**
Get/Set wether SIP message statistics are send to logging subsystem
@return bool Set to true to enable statistics
*/
virtual bool& statisticsManagerEnabled();
virtual const bool statisticsManagerEnabled() const;
/**
Get/Set the starting port number in the range of valid port
numbers to be used for RTP traffic.
@note This MUST be called before the UserAgent is created
@return unsigned short range min
*/
virtual unsigned short& rtpPortRangeMin();
virtual const unsigned short rtpPortRangeMin() const;
/**
Get/Set the ending port number in the range of valid port
numbers to be used for RTP traffic.
@note This MUST be called before the UserAgent is created
@return unsigned short range max
*/
virtual unsigned short& rtpPortRangeMax();
virtual const unsigned short rtpPortRangeMax() const;
/**
Get/Set the interval at which subscriptions are retried if
they fail (if one is not suggested in the failure).
@note This MUST be called before the UserAgent is created
@return int subscription retry interval in seconds
*/
virtual int& subscriptionRetryInterval();
virtual const int subscriptionRetryInterval() const;
private:
resip::Data mCertPath;
std::vector<resip::Data> mRootCertDirectories;
std::vector<resip::Data> mRootCertBundles;
bool mStatisticsManagerEnabled;
resip::SharedPtr<resip::Transport::SipMessageLoggingHandler> mTransportSipMessageLoggingHandler;
resip::SharedPtr<flowmanager::RTCPEventLoggingHandler> mRTCPEventLoggingHandler;
std::vector<TransportInfo> mTransports;
std::vector<resip::Data> mEnumSuffixes;
resip::DnsStub::NameserverList mAdditionalDnsServers;
unsigned short mRTPPortRangeMin;
unsigned short mRTPPortRangeMax;
int mSubscriptionRetryInterval;
};
}
#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.
==================================================================== */
|