reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
SipXMediaInterface.cxx
Go to the documentation of this file.
3#include "ReconSubsystem.hxx"
4#include "DtmfEvent.hxx"
6
7#include <CpTopologyGraphInterface.h>
8#include <mp/MpResourceTopology.h>
9#include <mi/MiNotification.h>
10#include <mi/MiDtmfNotf.h>
11#include <mi/MiRtpStreamActivityNotf.h>
12#include <mi/MiIntNotf.h>
13
14#include <rutil/Lock.hxx>
15#include <rutil/Logger.hxx>
16
17using namespace recon;
18using namespace resip;
19
20#define RESIPROCATE_SUBSYSTEM ReconSubsystem::RECON
21
22SipXMediaInterface::SipXMediaInterface(ConversationManager& conversationManager, CpTopologyGraphInterface* mediaInterface) :
23 mConversationManager(conversationManager),
24 mMediaInterface(mediaInterface),
25 mAllowLoggingDTMFDigits(true)
26{
27 InfoLog(<< "SipXMediaInterface: CpTopologyGraphInterface created: 0x" << std::hex << mMediaInterface);
28
29 // Add the available sipX resources. Note: This list must match what is provided by the sipX CpTopologyGraphImpl
30 // default initial resources, plus any customizations done in SipXMediaStackAdapter::addExtraPlayAndRecordResourcesToTopology
31 mMediaResourceAllocations[MediaResourceParticipant::Tone].push_back(MediaResourceAllocationInfo(DEFAULT_TONE_GEN_RESOURCE_NAME));
32 mMediaResourceAllocations[MediaResourceParticipant::File].push_back(MediaResourceAllocationInfo(DEFAULT_FROM_FILE_RESOURCE_NAME)); // Note: File resource also tracks Cache and Buffer types
33 mMediaResourceAllocations[MediaResourceParticipant::RecordMultiChannel].push_back(MediaResourceAllocationInfo(DEFAULT_RECORDER_RESOURCE_NAME));
34 SipXMediaStackAdapter& mediaStackAdapter = static_cast<SipXMediaStackAdapter&>(conversationManager.getMediaStackAdapter());
35 if (mediaStackAdapter.extraPlayAndRecordResourcesEnabled())
36 {
40 }
41}
42
44{
45 InfoLog(<< "~SipXMediaInterface: releasing CpTopologyGraphInterface: 0x" << std::hex << mMediaInterface);
46 mMediaInterface->release();
47}
48
49OsStatus
50SipXMediaInterface::createConnection(int& connectionId, ParticipantHandle partHandle, FlowManagerSipXSocket* rtpSocket, FlowManagerSipXSocket* rtcpSocket, bool isMulticast)
51{
52 resip_assert(mMediaInterface);
53 OsStatus ret = mMediaInterface->createConnection(connectionId, rtpSocket, rtcpSocket, isMulticast);
54 updateConnectionIdToPartipantHandleMapping(connectionId, partHandle);
55 return ret;
56}
57
58OsStatus
59SipXMediaInterface::createConnection(int& connectionId, ParticipantHandle partHandle, const char* localAddress, int localPort)
60{
61 resip_assert(mMediaInterface);
62 OsStatus ret = mMediaInterface->createConnection(connectionId, localAddress, localPort);
63 updateConnectionIdToPartipantHandleMapping(connectionId, partHandle);
64 return ret;
65}
66
67void
69{
70 resip::Lock lock(mConnectionIdToParticipantHandleMapMutex);
71 mConnectionIdToPartipantHandleMap[connectionId] = partHandle;
72}
73
74OsStatus
76{
77 resip_assert(mMediaInterface);
78 OsStatus ret = mMediaInterface->deleteConnection(connectionId);
79 {
80 resip::Lock lock(mConnectionIdToParticipantHandleMapMutex);
81 mConnectionIdToPartipantHandleMap.erase(connectionId);
82 }
83 return ret;
84}
85
87SipXMediaInterface::getParticipantHandleForConnectionId(int connectionId)
88{
89 ParticipantHandle partHandle = 0;
90 resip::Lock lock(mConnectionIdToParticipantHandleMapMutex);
91 auto it = mConnectionIdToPartipantHandleMap.find(connectionId);
92 if (it != mConnectionIdToPartipantHandleMap.end())
93 {
94 partHandle = it->second;
95 }
96 return partHandle;
97}
98
100SipXMediaInterface::getParticipantHandleForMediaResource(MediaResourceParticipant::ResourceType resourceType, const resip::Data& sipXResourceName)
101{
102 ParticipantHandle partHandle = 0;
103 resip::Lock lock(mMediaResourceAllocationsMutex);
104 std::list<MediaResourceAllocationInfo>& resourceInfos = getAllocationResourceInfos(resourceType);
105 // Walk the list and find the resource name
106 for (auto it = resourceInfos.begin(); it != resourceInfos.end(); it++)
107 {
108 if (it->mSipXResourceName == sipXResourceName)
109 {
110 resip_assert(it->mAllocatedParticipantHandle != 0);
111 partHandle = it->mAllocatedParticipantHandle;
112 break;
113 }
114 }
115 return partHandle;
116}
117
118// ensure mutex is grabbed before calling
119std::list<SipXMediaInterface::MediaResourceAllocationInfo>& SipXMediaInterface::getAllocationResourceInfos(MediaResourceParticipant::ResourceType resourceType)
120{
121 if (resourceType == MediaResourceParticipant::Cache ||
122 resourceType == MediaResourceParticipant::Buffer)
123 {
124 // Cache, Buffer and File resources are the same sipX resource, track both under the File type
125 resourceType = MediaResourceParticipant::File;
126 }
127 resip_assert(mMediaResourceAllocations.find(resourceType) != mMediaResourceAllocations.end());
128 return mMediaResourceAllocations[resourceType];
129}
130
131bool
133{
134 resip::Lock lock(mMediaResourceAllocationsMutex);
135 std::list<MediaResourceAllocationInfo>& resourceInfos = getAllocationResourceInfos(resourceType);
136 // Walk the list and find an unallocated resource
137 for (auto it = resourceInfos.begin(); it != resourceInfos.end(); it++)
138 {
139 if (it->mAllocatedParticipantHandle == 0)
140 {
141 allocatedResourceName = it->mSipXResourceName;
142 it->mAllocatedParticipantHandle = partHandle;
143 return true;
144 }
145 }
146 return false;
147}
148
149void
151{
152 resip::Lock lock(mMediaResourceAllocationsMutex);
153 std::list<MediaResourceAllocationInfo>& resourceInfos = getAllocationResourceInfos(resourceType);
154 // Walk the list and find the allocated resource, then disassociate the participant handle to signify it is unallocated
155 for (auto it = resourceInfos.begin(); it != resourceInfos.end(); it++)
156 {
157 if (it->mAllocatedParticipantHandle == partHandle)
158 {
159 it->mAllocatedParticipantHandle = 0;
160 break;
161 }
162 }
163}
164
165OsStatus
166SipXMediaInterface::post(const OsMsg& msg)
167{
168 if((OsMsg::MsgTypes)msg.getMsgType() == OsMsg::MI_NOTF_MSG)
169 {
170 MiNotification* pNotfMsg = (MiNotification*)&msg;
171 switch((MiNotification::NotfType)pNotfMsg->getType())
172 {
173 case MiNotification::MI_NOTF_PLAY_STARTED:
174 InfoLog( << "SipXMediaInterface: received MI_NOTF_PLAY_STARTED, sourceId=" << pNotfMsg->getSourceId().data() << ", connectionId=" << pNotfMsg->getConnectionId());
175 break;
176 case MiNotification::MI_NOTF_PLAY_PAUSED:
177 InfoLog( << "SipXMediaInterface: received MI_NOTF_PLAY_PAUSED, sourceId=" << pNotfMsg->getSourceId().data() << ", connectionId=" << pNotfMsg->getConnectionId());
178 break;
179 case MiNotification::MI_NOTF_PLAY_RESUMED:
180 InfoLog( << "SipXMediaInterface: received MI_NOTF_PLAY_RESUMED, sourceId=" << pNotfMsg->getSourceId().data() << ", connectionId=" << pNotfMsg->getConnectionId());
181 break;
182 case MiNotification::MI_NOTF_PLAY_STOPPED:
183 InfoLog( << "SipXMediaInterface: received MI_NOTF_PLAY_STOPPED, sourceId=" << pNotfMsg->getSourceId().data() << ", connectionId=" << pNotfMsg->getConnectionId());
184 break;
185 case MiNotification::MI_NOTF_PLAY_FINISHED:
186 {
187 // Queue event to conversation manager thread
188 ParticipantHandle partHandle = getParticipantHandleForMediaResource(MediaResourceParticipant::File, pNotfMsg->getSourceId().data());
189 MediaEvent* mevent = new MediaEvent(mConversationManager, partHandle, MediaEvent::RESOURCE_DONE, MediaEvent::DIRECTION_OUT);
190 mConversationManager.post(mevent);
191 InfoLog(<< "SipXMediaInterface: received MI_NOTF_PLAY_FINISHED, sourceId=" << pNotfMsg->getSourceId().data() <<
192 ", connectionId=" << pNotfMsg->getConnectionId() << ", participantHandle=" << partHandle);
193 }
194 break;
195 case MiNotification::MI_NOTF_PLAY_ERROR:
196 {
197 // Queue event to conversation manager thread
198 ParticipantHandle partHandle = getParticipantHandleForMediaResource(MediaResourceParticipant::File, pNotfMsg->getSourceId().data());
199 MediaEvent* mevent = new MediaEvent(mConversationManager, partHandle, MediaEvent::RESOURCE_FAILED, MediaEvent::DIRECTION_OUT);
200 mConversationManager.post(mevent);
201 InfoLog(<< "SipXMediaInterface: received MI_NOTF_PLAY_ERROR, sourceId=" << pNotfMsg->getSourceId().data() <<
202 ", connectionId=" << pNotfMsg->getConnectionId() << ", participantHandle=" << partHandle);
203 }
204 break;
205 case MiNotification::MI_NOTF_PROGRESS:
206 InfoLog( << "SipXMediaInterface: received MI_NOTF_PROGRESS, sourceId=" << pNotfMsg->getSourceId().data() << ", connectionId=" << pNotfMsg->getConnectionId());
207 break;
208 case MiNotification::MI_NOTF_RECORD_STARTED:
209 InfoLog( << "SipXMediaInterface: received MI_NOTF_RECORD_STARTED, sourceId=" << pNotfMsg->getSourceId().data() << ", connectionId=" << pNotfMsg->getConnectionId());
210 break;
211#ifndef SIPX_NO_RECORD
212 case MiNotification::MI_NOTF_RECORD_PAUSED:
213 InfoLog(<< "SipXMediaInterface: received MI_NOTF_RECORD_PAUSED, sourceId=" << pNotfMsg->getSourceId().data() << ", connectionId=" << pNotfMsg->getConnectionId());
214 break;
215 case MiNotification::MI_NOTF_RECORD_RESUMED:
216 InfoLog(<< "SipXMediaInterface: received MI_NOTF_RECORD_RESUMED, sourceId=" << pNotfMsg->getSourceId().data() << ", connectionId=" << pNotfMsg->getConnectionId());
217 break;
218#endif
219 case MiNotification::MI_NOTF_RECORD_STOPPED:
220 InfoLog( << "SipXMediaInterface: received MI_NOTF_RECORD_STOPPED, sourceId=" << pNotfMsg->getSourceId().data() << ", connectionId=" << pNotfMsg->getConnectionId());
221 break;
222 case MiNotification::MI_NOTF_RECORD_FINISHED:
223 {
224 // Queue event to conversation manager thread
225 ParticipantHandle partHandle = getParticipantHandleForMediaResource(MediaResourceParticipant::Record, pNotfMsg->getSourceId().data());
226 MediaEvent* mevent = new MediaEvent(mConversationManager, partHandle, MediaEvent::RESOURCE_DONE, MediaEvent::DIRECTION_IN);
227 mConversationManager.post(mevent);
228 InfoLog(<< "SipXMediaInterface: received MI_NOTF_RECORD_FINISHED, sourceId=" << pNotfMsg->getSourceId().data() <<
229 ", connectionId=" << pNotfMsg->getConnectionId() << ", participantHandle=" << partHandle);
230 }
231 break;
232 case MiNotification::MI_NOTF_RECORD_ERROR:
233 {
234 // Queue event to conversation manager thread
235 ParticipantHandle partHandle = getParticipantHandleForMediaResource(MediaResourceParticipant::Record, pNotfMsg->getSourceId().data());
236 MediaEvent* mevent = new MediaEvent(mConversationManager, partHandle, MediaEvent::RESOURCE_FAILED, MediaEvent::DIRECTION_IN);
237 mConversationManager.post(mevent);
238 InfoLog(<< "SipXMediaInterface: received MI_NOTF_RECORD_ERROR, sourceId=" << pNotfMsg->getSourceId().data() <<
239 ", connectionId=" << pNotfMsg->getConnectionId() << ", participantHandle=" << partHandle);
240 }
241 break;
242 case MiNotification::MI_NOTF_DTMF_RECEIVED:
243 {
244 MiDtmfNotf* pDtmfNotfMsg = (MiDtmfNotf*)&msg;
245
246 int duration = pDtmfNotfMsg->getDuration(); // in RTP timestamp units
247 int durationMS = duration;
248 if(duration >= 0) // negative durations indicate start of tone in sipXtapi
249 {
250 int rtpClockRate = 8000; // FIXME - should use actual RTP clock rate of the flow graph?
251 durationMS = (duration * 1000) / rtpClockRate; // convert from RTP timestamp units to milliseconds
252 StackLog(<< "RTP clock rate = " << rtpClockRate << "Hz, duration (timestamp units) = " << duration << " = " << durationMS << "ms");
253 }
254
255 ParticipantHandle partHandle = getParticipantHandleForConnectionId(pNotfMsg->getConnectionId());
256
257 if (mAllowLoggingDTMFDigits)
258 {
259 InfoLog(<< "SipXMediaInterface: received MI_NOTF_DTMF_RECEIVED, sourceId=" << pNotfMsg->getSourceId().data() <<
260 ", connectionId=" << pNotfMsg->getConnectionId() <<
261 ", participantHandle=" << partHandle <<
262 ", keyCode=" << pDtmfNotfMsg->getKeyCode() <<
263 ", state=" << pDtmfNotfMsg->getKeyPressState() <<
264 ", duration=" << pDtmfNotfMsg->getDuration());
265 }
266 else
267 {
268 InfoLog(<< "SipXMediaInterface: received MI_NOTF_DTMF_RECEIVED, sourceId=" << pNotfMsg->getSourceId().data() <<
269 ", connectionId=" << pNotfMsg->getConnectionId() <<
270 ", participantHandle=" << partHandle <<
271 ", keyCode=<HIDDEN>" <<
272 ", state=" << pDtmfNotfMsg->getKeyPressState() <<
273 ", duration=" << pDtmfNotfMsg->getDuration());
274 }
275
276 // Get event into dum queue, so that callback is on dum thread
277 DtmfEvent* devent = new DtmfEvent(mConversationManager, partHandle, pDtmfNotfMsg->getKeyCode(), durationMS, pDtmfNotfMsg->getKeyPressState()==MiDtmfNotf::KEY_UP);
278 mConversationManager.post(devent);
279 }
280 break;
281 case MiNotification::MI_NOTF_DELAY_SPEECH_STARTED:
282 InfoLog( << "SipXMediaInterface: received MI_NOTF_DELAY_SPEECH_STARTED, sourceId=" << pNotfMsg->getSourceId().data() << ", connectionId=" << pNotfMsg->getConnectionId());
283 break;
284 case MiNotification::MI_NOTF_DELAY_NO_DELAY:
285 InfoLog( << "SipXMediaInterface: received MI_NOTF_DELAY_NO_DELAY, sourceId=" << pNotfMsg->getSourceId().data() << ", connectionId=" << pNotfMsg->getConnectionId());
286 break;
287 case MiNotification::MI_NOTF_DELAY_QUIESCENCE:
288 InfoLog( << "SipXMediaInterface: received MI_NOTF_DELAY_QUIESCENCE, sourceId=" << pNotfMsg->getSourceId().data() << ", connectionId=" << pNotfMsg->getConnectionId());
289 break;
290 case MiNotification::MI_NOTF_RX_STREAM_ACTIVITY:
291 {
292 MiRtpStreamActivityNotf* pRtpStreamActivityNotfMsg = (MiRtpStreamActivityNotf*)&msg;
293
294 DebugLog( << "SipXMediaInterface: received MI_NOTF_RX_STREAM_ACTIVITY, sourceId=" << pNotfMsg->getSourceId().data() <<
295 ", connectionId=" << pNotfMsg->getConnectionId() <<
296 ", state=" << (pRtpStreamActivityNotfMsg->getState() == MiRtpStreamActivityNotf::STREAM_START ? "STREAM_START" :
297 pRtpStreamActivityNotfMsg->getState() == MiRtpStreamActivityNotf::STREAM_STOP ? "STREAM_STOP" :
298 pRtpStreamActivityNotfMsg->getState() == MiRtpStreamActivityNotf::STREAM_CHANGE ? "STREAM_CHANGE" :
299 Data(pRtpStreamActivityNotfMsg->getState()).c_str()) <<
300 ", ssrc=" << pRtpStreamActivityNotfMsg->getSsrc() <<
301 ", address=" << pRtpStreamActivityNotfMsg->getAddress() <<
302 ", port=" << pRtpStreamActivityNotfMsg->getPort());
303 }
304 break;
305 case MiNotification::MI_NOTF_ENERGY_LEVEL:
306 //{
307 // MiIntNotf* pIntNotfMsg = (MiIntNotf*)&msg;
308 // DebugLog( << "MediaInterface: received MI_NOTF_ENERGY_LEVEL, sourceId=" << pNotfMsg->getSourceId().data() <<
309 // ", connectionId=" << pNotfMsg->getConnectionId() <<
310 // ", value=" << pIntNotfMsg->getValue());
311 //}
312 break;
313 case MiNotification::MI_NOTF_VOICE_STARTED:
314 {
315#ifndef SIPX_NO_RECORD
316 MediaEvent::MediaDirection direction = (pNotfMsg->getSourceId().contains(DIRECTION_IN_SUFFIX) || pNotfMsg->getSourceId().contains(MIC_NAME_SUFFIX)) ? MediaEvent::DIRECTION_IN : MediaEvent::DIRECTION_OUT;
317 DebugLog(<< "MediaInterface: received MI_NOTF_VOICE_STARTED, sourceId=" << pNotfMsg->getSourceId().data() << ", connectionId=" << pNotfMsg->getConnectionId() << ", direction=" << (direction == MediaEvent::DIRECTION_IN ? "IN" : "OUT"));
318 ParticipantHandle partHandle = getParticipantHandleForConnectionId(pNotfMsg->getConnectionId());
319
320 // Get event into dum queue, so that callback is on dum thread
321 MediaEvent* mevent = new MediaEvent(mConversationManager, partHandle, MediaEvent::VOICE_STARTED, direction);
322 mConversationManager.post(mevent);
323#endif
324 }
325 break;
326 case MiNotification::MI_NOTF_VOICE_STOPPED:
327 {
328#ifndef SIPX_NO_RECORD
329 MediaEvent::MediaDirection direction = (pNotfMsg->getSourceId().contains(DIRECTION_IN_SUFFIX) || pNotfMsg->getSourceId().contains(MIC_NAME_SUFFIX)) ? MediaEvent::DIRECTION_IN : MediaEvent::DIRECTION_OUT;
330 DebugLog(<< "MediaInterface: received MI_NOTF_VOICE_STOPPED, sourceId=" << pNotfMsg->getSourceId().data() << ", connectionId=" << pNotfMsg->getConnectionId() << ", direction=" << (direction == MediaEvent::DIRECTION_IN ? "IN" : "OUT"));
331 ParticipantHandle partHandle = getParticipantHandleForConnectionId(pNotfMsg->getConnectionId());
332
333 // Get event into dum queue, so that callback is on dum thread
334 MediaEvent* mevent = new MediaEvent(mConversationManager, partHandle, MediaEvent::VOICE_STOPPED, direction);
335 mConversationManager.post(mevent);
336#endif
337 }
338 break;
339#ifndef SIPX_NO_RECORD
340 case MiNotification::MI_NOTF_TONE_DETECT_ON:
341 InfoLog(<< "MediaInterface: received MI_NOTF_TONE_DETECT_ON, sourceId=" << pNotfMsg->getSourceId().data() << ", connectionId=" << pNotfMsg->getConnectionId());
342 break;
343#endif
344 case MiNotification::MI_NOTF_H264_SPS:
345 InfoLog(<< "MediaInterface: received MI_NOTF_H264_SPS, sourceId=" << pNotfMsg->getSourceId().data() << ", connectionId=" << pNotfMsg->getConnectionId());
346 break;
347 case MiNotification::MI_NOTF_H264_PPS:
348 InfoLog( << "MediaInterface: received MI_NOTF_H264_PPS, sourceId=" << pNotfMsg->getSourceId().data() << ", connectionId=" << pNotfMsg->getConnectionId());
349 break;
350#ifndef SIPX_NO_RECORD
351 case MiNotification::MI_NOTF_TONE_DETECT_OFF:
352 InfoLog( << "MediaInterface: received MI_NOTF_TONE_DETECT_OFF, sourceId=" << pNotfMsg->getSourceId().data() << ", connectionId=" << pNotfMsg->getConnectionId());
353 break;
354 case MiNotification::MI_NOTF_RECORDER_CIRCULARBUFFER_WATERMARK_REACHED:
355 WarningLog(<< "MediaInterface: received MI_NOTF_RECORDER_CIRCULARBUFFER_WATERMARK_REACHED, sourceId=" << pNotfMsg->getSourceId().data() << ", connectionId=" << pNotfMsg->getConnectionId());
356 break;
357 case MiNotification::MI_NOTF_INPUT_DEVICE_NOT_PRESENT:
358 InfoLog(<< "MediaInterface: received MI_NOTF_INPUT_DEVICE_NOT_PRESENT, sourceId=" << pNotfMsg->getSourceId().data() << ", connectionId=" << pNotfMsg->getConnectionId());
359 break;
360 case MiNotification::MI_NOTF_OUTPUT_DEVICE_NOT_PRESENT:
361 InfoLog(<< "MediaInterface: received MI_NOTF_OUTPUT_DEVICE_NOT_PRESENT, sourceId=" << pNotfMsg->getSourceId().data() << ", connectionId=" << pNotfMsg->getConnectionId());
362 break;
363#endif
364
365 default:
366 InfoLog(<< "SipXMediaInterface: unrecognized MiNotification type = " << pNotfMsg->getType());
367 }
368 }
369 else
370 {
371 InfoLog(<< "SipXMediaInterface: unrecognized message type = " << msg.getMsgType());
372 }
373 return OS_SUCCESS;
374}
375
376
377/* ====================================================================
378
379 Copyright (c) 2010-2023, SIP Spectrum, Inc. http://www.sipspectrum.com
380 Copyright (c) 2021, Daniel Pocock https://danielpocock.com
381 All rights reserved.
382
383 Redistribution and use in source and binary forms, with or without
384 modification, are permitted provided that the following conditions are
385 met:
386
387 1. Redistributions of source code must retain the above copyright
388 notice, this list of conditions and the following disclaimer.
389
390 2. Redistributions in binary form must reproduce the above copyright
391 notice, this list of conditions and the following disclaimer in the
392 documentation and/or other materials provided with the distribution.
393
394 3. Neither the name of SIP Spectrum nor the names of its contributors
395 may be used to endorse or promote products derived from this
396 software without specific prior written permission.
397
398 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
399 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
400 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
401 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
402 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
403 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
404 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
405 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
406 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
407 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
408 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
409
410 ==================================================================== */
#define DebugLog(args_)
Definition Logger.hxx:128
#define StackLog(args_)
Definition Logger.hxx:125
#define InfoLog(args_)
Definition Logger.hxx:131
#define WarningLog(args_)
Definition Logger.hxx:134
#define resip_assert(x)
This file needs to work for both C and C++ code.
This class is one of two main classes of concern to an application using the UserAgent library.
void post(resip::Message *message)
MediaStackAdapter & getMediaStackAdapter()
This class represents the data passed in a DTMF event.
Definition DtmfEvent.hxx:18
This class represents an event that happens to a media participant.
SipXMediaInterface(ConversationManager &conversationManager, CpTopologyGraphInterface *mediaInterface)
OsStatus createConnection(int &connectionId, ParticipantHandle partHandle, FlowManagerSipXSocket *rtpSocket, FlowManagerSipXSocket *rtcpSocket, bool isMulticast=false)
OsStatus deleteConnection(int connectionId)
void updateConnectionIdToPartipantHandleMapping(int connectionId, ParticipantHandle partHandle)
void unallocateResourceForMediaOperation(MediaResourceParticipant::ResourceType resourceType, ParticipantHandle partHandle)
bool allocateAvailableResourceForMediaOperation(MediaResourceParticipant::ResourceType resourceType, ParticipantHandle partHandle, resip::Data &allocatedResourceName)
This class is one of two main classes of concern to an application using the UserAgent library.
static constexpr char DEFAULT_FROM_FILE_2_RESOURCE_NAME[]
static constexpr char DEFAULT_RECORDER_2_RESOURCE_NAME[]
static constexpr char DEFAULT_FROM_FILE_3_RESOURCE_NAME[]
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
Definition Data.hxx:90
unsigned int ParticipantHandle
dcm! – add UnusedChecking(_enum) below;
std::unique_lock< Mutex > Lock
A convenience class to lock a Lockable (such as a Mutex) on object creation, and unlock on destructio...
Definition Lock.hxx:28