reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
LibWebRTCRemoteParticipantDialogSet.hxx
Go to the documentation of this file.
1#if !defined(LibWebRTCRemoteParticipantDialogSet_hxx)
2#define LibWebRTCRemoteParticipantDialogSet_hxx
3
4#include <map>
5#include <list>
11
12// FlowManager Includes
14#include "reTurn/StunTuple.hxx"
15
18#include "Participant.hxx"
20
21namespace resip
22{
23class DialogUsageManager;
24class SipMessage;
25}
26
27namespace recon
28{
29class ConversationManager;
30class RemoteParticipant;
31class LibWebRTCRemoteParticipant;
32
40{
41public:
45 std::shared_ptr<ConversationProfile> conversationProfile = nullptr);
46
48
50
52
53 virtual void setPeerExpectsSAVPF(bool value) { mPeerExpectsSAVPF = value; }
54 virtual bool peerExpectsSAVPF() { return mPeerExpectsSAVPF; }
55
56 // Media stack stuff
57 virtual int getMediaConnectionId() { return mMediaConnectionId; }
58 virtual int getConnectionPortOnBridge();
59 virtual void freeMediaResources();
60
61 void setActiveDestination(const char* address, unsigned short rtpPort, unsigned short rtcpPort);
62 void startDtlsClient(const char* address, unsigned short rtpPort, unsigned short rtcpPort);
63 void setRemoteSDPFingerprint(const resip::Data& hashFunction, const resip::Data& fingerprint);
65
66 // Media Stream Processing
67 virtual void processMediaStreamReadyEvent(std::shared_ptr<MediaStreamReadyEvent::StreamParams> streamParams);
68
70
71 const resip::Data& getLocalSrtpSessionKey() { return mLocalSrtpSessionKey; }
72
73 void onLibWebRTCEvent(const std::string& event_name, const json::Object& message);
74
75protected:
76 virtual bool isAsyncMediaSetup();
77
78 virtual void fixUpSdp(resip::SdpContents* sdp);
79
80private:
81 LibWebRTCMediaStackAdapter& mLibWebRTCMediaStackAdapter;
82 unsigned int mLocalRTPPort;
83 bool mAllocateLocalRTPPortFailed;
84 bool mPeerExpectsSAVPF;
85
86 // Media Stream stuff
87 reTurn::StunTuple mRtpTuple;
88 reTurn::StunTuple mRtcpTuple;
89
90 // Secure Media
91 resip::Data mLocalSrtpSessionKey;
93
94 // sipX media stuff
95 int mMediaConnectionId;
96 int mConnectionPortOnBridge;
97
98 virtual void onMediaStreamReady(const reTurn::StunTuple& remoteRtpTuple, const reTurn::StunTuple& remoteRtcpTuple);
99 virtual void onMediaStreamError(unsigned int errorCode);
100};
101
102}
103
104#endif
105
106
107/* ====================================================================
108
109 Copyright (c) 2022, Software Freedom Institute https://softwarefreedom.institute
110 Copyright (c) 2022, Daniel Pocock https://danielpocock.com
111 Copyright (c) 2021-2026, SIP Spectrum, Inc.
112 Copyright (c) 2007-2008, Plantronics, Inc.
113 All rights reserved.
114
115 Redistribution and use in source and binary forms, with or without
116 modification, are permitted provided that the following conditions are
117 met:
118
119 1. Redistributions of source code must retain the above copyright
120 notice, this list of conditions and the following disclaimer.
121
122 2. Redistributions in binary form must reproduce the above copyright
123 notice, this list of conditions and the following disclaimer in the
124 documentation and/or other materials provided with the distribution.
125
126 3. Neither the name of Plantronics nor the names of its contributors
127 may be used to endorse or promote products derived from this
128 software without specific prior written permission.
129
130 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
131 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
132 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
133 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
134 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
135 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
136 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
137 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
138 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
139 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
140 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
141
142 ==================================================================== */
This class is one of two main classes of concern to an application using the UserAgent library.
This class is one of two main classes of concern to an application using the UserAgent library.
void setRemoteSDPFingerprint(const resip::Data &hashFunction, const resip::Data &fingerprint)
void startDtlsClient(const char *address, unsigned short rtpPort, unsigned short rtcpPort)
resip::MediaConstants::SrtpCryptoSuite getSrtpCryptoSuite()
virtual void processMediaStreamReadyEvent(std::shared_ptr< MediaStreamReadyEvent::StreamParams > streamParams)
void setActiveDestination(const char *address, unsigned short rtpPort, unsigned short rtcpPort)
virtual resip::AppDialog * createAppDialog(const resip::SipMessage &msg)
void onLibWebRTCEvent(const std::string &event_name, const json::Object &message)
bool createSRTPSession(resip::MediaConstants::SrtpCryptoSuite cryptoSuite, const char *remoteKey, size_t remoteKeyLen)
virtual void setActiveRemoteParticipantHandle(ParticipantHandle handle)
This class is used by Invite DialogSets.
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 ParticipantHandle
dcm! – add UnusedChecking(_enum) below;
void list()
Definition userAdmin.cxx:66