reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
ParkManager.hxx
Go to the documentation of this file.
1#if !defined(ParkManager_hxx)
2#define ParkManager_hxx
3
4#include <map>
5#include <deque>
6#include "ActiveCallInfo.hxx"
7#include "../UserAgent.hxx"
8#include "../HandleTypes.hxx"
9#include "ConfigParser.hxx"
10
11namespace resip
12{
13class SipMessage;
14}
15
16namespace mohparkserver
17{
18class Server;
19class ParkOrbit;
20
22{
23public:
24 ParkManager(Server& server);
25 virtual ~ParkManager();
26
28 void initializeConversationProfile(const resip::NameAddr& uri, const resip::Data& password, unsigned long registrationTime, const resip::NameAddr& outboundProxy);
29 void initializeOrbitConversationProfiles(unsigned long orbitStart, unsigned long numOrbits, const resip::NameAddr& uri, const resip::Data& password, unsigned long registrationTime, const resip::NameAddr& outboundProxy);
32
38
40
41private:
42 resip::Mutex mMutex;
43 Server& mServer;
44 volatile recon::ConversationProfileHandle mConversationProfileHandle;
45 resip::NameAddr mParkUri;
46 unsigned long mOrbitRangeStart;
47 unsigned long mNumOrbits;
48 unsigned long mMaxParkTime;
49 resip::Uri mMusicFilename;
50 std::deque<unsigned long> mFreeOrbitList;
51
52 // Orbit by orbit number
53 ParkOrbit* getOrbit(unsigned long orbit);
54 typedef std::map<unsigned long, ParkOrbit*> OrbitMap;
55 OrbitMap mOrbits;
56
57 // index on orbits for fast access
59 typedef std::map<recon::ParticipantHandle, ParkOrbit*> OrbitsByParticipantMap;
60 OrbitsByParticipantMap mOrbitsByParticipant;
61
63
64 typedef std::map<unsigned long, recon::ConversationProfileHandle> OrbitProfileMap;
65 OrbitProfileMap mOrbitProfiles;
66};
67
68}
69
70#endif
71
72/* ====================================================================
73
74 Copyright (c) 2011-2016, SIP Spectrum, Inc.
75 All rights reserved.
76
77 Redistribution and use in source and binary forms, with or without
78 modification, are permitted provided that the following conditions are
79 met:
80
81 1. Redistributions of source code must retain the above copyright
82 notice, this list of conditions and the following disclaimer.
83
84 2. Redistributions in binary form must reproduce the above copyright
85 notice, this list of conditions and the following disclaimer in the
86 documentation and/or other materials provided with the distribution.
87
88 3. Neither the name of SIP Spectrum nor the names of its contributors
89 may be used to endorse or promote products derived from this
90 software without specific prior written permission.
91
92 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
93 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
94 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
95 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
96 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
97 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
98 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
99 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
100 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
101 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
102 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
103
104 ==================================================================== */
105
bool onMaxParkTimeout(recon::ParticipantHandle participantHandle)
void parkParticipant(recon::ParticipantHandle participantHandle, const resip::SipMessage &msg)
void shutdown(bool shuttingDownServer)
void getActiveCallsInfo(CallInfoList &callInfos)
void initializeParkSettings(unsigned long maxParkTime, const resip::Uri &musicFilename)
void incomingParticipant(recon::ParticipantHandle participantHandle, const resip::SipMessage &msg)
bool removeParticipant(recon::ParticipantHandle participantHandle)
void startup(ConfigParser::ParkSettings &settings)
void initializeOrbitConversationProfiles(unsigned long orbitStart, unsigned long numOrbits, const resip::NameAddr &uri, const resip::Data &password, unsigned long registrationTime, const resip::NameAddr &outboundProxy)
bool isMyProfile(recon::ConversationProfile &profile)
void initializeConversationProfile(const resip::NameAddr &uri, const resip::Data &password, unsigned long registrationTime, const resip::NameAddr &outboundProxy)
This class extends the resip UserProfile to include Conversation Manager specific settings.
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
Definition Data.hxx:90
Represents the "name-addr" and the "addr-spec" elements in the RFC 3261 grammar.
Definition NameAddr.hxx:19
Represents a SIP message.
Represents the "SIP-URI" and "SIPS-URI" elements in the RFC 3261 grammar.
Definition Uri.hxx:22
std::list< ActiveCallInfo > CallInfoList
unsigned int ConversationProfileHandle
unsigned int ParticipantHandle
dcm! – add UnusedChecking(_enum) below;
std::mutex Mutex
A semaphore that can be locked by only one thread at a time.
Definition Mutex.hxx:37
void list()
Definition userAdmin.cxx:66