|
reSIProcate
SIP stack, Dialog Usage Manager and related libraries
|
This class is one of two main classes of concern to an application using the UserAgent library. More...
#include <SipXMediaStackAdapter.hxx>
Public Types | |
| enum | MediaInterfaceMode { sipXGlobalMediaInterfaceMode , sipXConversationMediaInterfaceMode } |
| Note: sipXtapi Media Interfaces have a finite number of supported endpoints that are allowed in each bridge mixer - by default this value is 10 (1 used for local mic / speaker, 1 for a WAV Player/Recorder and 1 for a Tone Player, leaving 7 remaining for RemoteParticipants - 8 if local audio is disabled). More... | |
Static Public Attributes | |
| static constexpr char | DEFAULT_FROM_FILE_2_RESOURCE_NAME [] = "FromFile2" |
| static constexpr char | DEFAULT_FROM_FILE_3_RESOURCE_NAME [] = "FromFile3" |
| static constexpr char | DEFAULT_RECORDER_2_RESOURCE_NAME [] = "Recorder2" |
Protected Member Functions | |
| virtual void | setUserAgent (UserAgent *userAgent) override |
Protected Member Functions inherited from recon::MediaStackAdapter | |
| virtual UserAgent * | getUserAgent () |
| ConversationManager & | getConversationManager () |
| std::shared_ptr< BridgeMixer > & | getBridgeMixer () |
| bool | isShuttingDown () |
| ConversationHandle | getNewConversationHandle () |
| void | post (resip::Message *message) |
| Conversation * | getConversation (ConversationHandle convHandle) |
| std::shared_ptr< resip::ConfigParse > | getConfig () |
This class is one of two main classes of concern to an application using the UserAgent library.
This class should be subclassed by the application and the ConversationManager handlers should be implemented by it.
This class is responsible for handling tasks that are directly related to managing Conversations. All non-conversation handling is done via the UserAgent class.
This class handles tasks such as: -Creation and destruction of Conversations -Participant management and creation -Placing and receiving calls -Playing audio and/or tones into a conversation -Managing local audio properties
Author: Scott Godin (sgodin AT SipSpectrum DOT com)
Definition at line 64 of file SipXMediaStackAdapter.hxx.
Note: sipXtapi Media Interfaces have a finite number of supported endpoints that are allowed in each bridge mixer - by default this value is 10 (1 used for local mic / speaker, 1 for a WAV Player/Recorder and 1 for a Tone Player, leaving 7 remaining for RemoteParticipants - 8 if local audio
is disabled).
Also, if enableExtraPlayAndRecordResources is passed in as true then 2 extra slots are taken for additional players and a recorder.
The limit of 10 is controlled by the preprocessor define DEFAULT_BRIDGE_MAX_IN_OUTPUTS (see http://www.resiprocate.org/Limitations_with_sipXtapi_media_Integration for more details.
sipXGlobalMediaInterfaceMode - uses 1 global sipXtapi media interface and allows for participants to exist in multiple conversations at the same time and have the bridge mixer properly control their mixing. In this mode, there can only be a single MediaParticipant at a time performing each operation (ie. 1 playing a WAV, 1 recording and one playing a tone is allowed, but only 1 of each type) for all conversations. If enableExtraPlayAndRecordResources is enabled then you are allowed to have 3 players and 2 recorders. This architecture/mode is appropriate for single user agent devices (ie. sip phones).
sipXConversationMediaInterfaceMode - by default uses 1 sipXtapi media interface per conversation. If you use createSharedMediaInterfaceConversation instead of createConversation then you can specify that 2 (multiple) conversations can share the same media interface. This allows participants to be moved between any conversations that share the same media interface. Using this mode, participants can only exist in multiple conversations at the same time if those conversations share the same media interface. This means the limit of remote participants is no longer global, it now applies to each media interface. The limit on media participants is per media interface. This architecture/mode is appropriate for server applications, such as multi-party conference servers (up to 8 participants per conference), music on hold servers and call park servers. API restrictions in this mode: -joinConversation -restricted to functioning only if both source and destination conversations share the same media inteface -addParticipant -can only add a participant to multiple conversations if the conversations share the same media interface -moveParticipant -can only move a participant to another conversation if both source and destination conversations share the same media inteface -alertParticipant -if you are using the EarlyFlag then the RemoteParticipant must be added to a conversation before calling this -answerParticipant -RemoteParticipant must be added to a conversation before calling this Note: Only LocalParticipants can only exist outside of a conversation. If they exist in multiple conversations then those conversations must have the same media interface.
| Enumerator | |
|---|---|
| sipXGlobalMediaInterfaceMode | |
| sipXConversationMediaInterfaceMode | |
Definition at line 124 of file SipXMediaStackAdapter.hxx.
| SipXMediaStackAdapter::SipXMediaStackAdapter | ( | ConversationManager & | conversationManager, |
| bool | localAudioEnabled = true, |
||
| MediaInterfaceMode | mediaInterfaceMode = sipXGlobalMediaInterfaceMode, |
||
| bool | enableExtraPlayAndRecordResources = false |
||
| ) |
Definition at line 71 of file SipXMediaStackAdapter.cxx.
| SipXMediaStackAdapter::SipXMediaStackAdapter | ( | ConversationManager & | conversationManager, |
| bool | localAudioEnabled, | ||
| MediaInterfaceMode | mediaInterfaceMode, | ||
| int | defaultSampleRate, | ||
| int | maxSampleRate, | ||
| bool | enableExtraPlayAndRecordResources | ||
| ) |
Definition at line 82 of file SipXMediaStackAdapter.cxx.
|
virtual |
Definition at line 201 of file SipXMediaStackAdapter.cxx.
|
overridevirtual |
Builds a session capabilties SDPContents based on the passed in ipaddress and codec ordering.
Note: Codec ordering is an array of sipX internal codecId's. Id's for codecs not loaded are ignored.
Implements recon::MediaStackAdapter.
Definition at line 358 of file SipXMediaStackAdapter.cxx.
|
overridevirtual |
Implements recon::MediaStackAdapter.
Definition at line 532 of file SipXMediaStackAdapter.cxx.
|
overridevirtual |
Implements recon::MediaStackAdapter.
Definition at line 185 of file SipXMediaStackAdapter.cxx.
|
overridevirtual |
Implements recon::MediaStackAdapter.
Definition at line 542 of file SipXMediaStackAdapter.cxx.
|
overridevirtual |
Implements recon::MediaStackAdapter.
Definition at line 551 of file SipXMediaStackAdapter.cxx.
|
overridevirtual |
Implements recon::MediaStackAdapter.
Definition at line 557 of file SipXMediaStackAdapter.cxx.
|
overridevirtual |
Implements recon::MediaStackAdapter.
Definition at line 575 of file SipXMediaStackAdapter.cxx.
|
overridevirtual |
Implements recon::MediaStackAdapter.
Definition at line 569 of file SipXMediaStackAdapter.cxx.
|
overridevirtual |
Implements recon::MediaStackAdapter.
Definition at line 563 of file SipXMediaStackAdapter.cxx.
|
virtual |
Only applicable if sipXConversationMediaInterfaceMode is used.
Create a new empty Conversation to which participants can be added. This new conversation will share the media interface from the passed in conversation handle. This allows participants to be moved between these two conversations, or any conversations that share the same media interface. This method will fail (return 0) if this ConversationManager is in sipXGlobalMediaInterfaceMode.
| autoHoldMode | - enum specifying one of the following: AutoHoldDisabled - Never auto hold, only hold if holdParticipant API is used AutoHoldEnabled - Default. Automatically put a RemoteParticipant on-hold if there are no other participants in the conversation with them. AutoHoldBroadcastOnly - Use this if you are broadcasting media to all participants and don't need to receive any inbound media. All participants in the conversation will be SIP held and will receive media from an added MediaParticipant. Remote offers with inactive will be responded with sendonly as well. This option is useful for implementing music on hold servers. |
Definition at line 229 of file SipXMediaStackAdapter.cxx.
Definition at line 328 of file SipXMediaStackAdapter.cxx.
Definition at line 313 of file SipXMediaStackAdapter.cxx.
Definition at line 343 of file SipXMediaStackAdapter.cxx.
Definition at line 214 of file SipXMediaStackAdapter.hxx.
|
inline |
Definition at line 209 of file SipXMediaStackAdapter.hxx.
|
inlinevirtual |
Definition at line 195 of file SipXMediaStackAdapter.hxx.
Definition at line 303 of file SipXMediaStackAdapter.cxx.
Definition at line 293 of file SipXMediaStackAdapter.cxx.
Definition at line 194 of file SipXMediaStackAdapter.hxx.
Definition at line 283 of file SipXMediaStackAdapter.cxx.
Implements recon::MediaStackAdapter.
Definition at line 209 of file SipXMediaStackAdapter.cxx.
|
overridevirtual |
Implements recon::MediaStackAdapter.
Definition at line 196 of file SipXMediaStackAdapter.cxx.
Implements recon::MediaStackAdapter.
Definition at line 213 of file SipXMediaStackAdapter.hxx.
|
overridevirtual |
Implements recon::MediaStackAdapter.
Definition at line 526 of file SipXMediaStackAdapter.cxx.
|
friend |
Definition at line 267 of file SipXMediaStackAdapter.hxx.
|
friend |
Definition at line 271 of file SipXMediaStackAdapter.hxx.
|
friend |
Definition at line 272 of file SipXMediaStackAdapter.hxx.
|
friend |
Definition at line 247 of file SipXMediaStackAdapter.hxx.
|
friend |
Definition at line 229 of file SipXMediaStackAdapter.hxx.
|
friend |
Definition at line 260 of file SipXMediaStackAdapter.hxx.
|
friend |
Definition at line 265 of file SipXMediaStackAdapter.hxx.
Definition at line 264 of file SipXMediaStackAdapter.hxx.
Definition at line 263 of file SipXMediaStackAdapter.hxx.
|
friend |
Definition at line 222 of file SipXMediaStackAdapter.hxx.
|
friend |
Definition at line 261 of file SipXMediaStackAdapter.hxx.
|
friend |
Definition at line 266 of file SipXMediaStackAdapter.hxx.
Definition at line 240 of file SipXMediaStackAdapter.hxx.
|
friend |
Definition at line 276 of file SipXMediaStackAdapter.hxx.
|
friend |
Definition at line 262 of file SipXMediaStackAdapter.hxx.
|
friend |
Definition at line 246 of file SipXMediaStackAdapter.hxx.
|
friend |
Definition at line 241 of file SipXMediaStackAdapter.hxx.
|
friend |
Definition at line 245 of file SipXMediaStackAdapter.hxx.
Definition at line 259 of file SipXMediaStackAdapter.hxx.
Definition at line 270 of file SipXMediaStackAdapter.hxx.
|
friend |
Definition at line 269 of file SipXMediaStackAdapter.hxx.
|
friend |
Definition at line 231 of file SipXMediaStackAdapter.hxx.
|
friend |
Definition at line 233 of file SipXMediaStackAdapter.hxx.
|
friend |
Definition at line 274 of file SipXMediaStackAdapter.hxx.
|
friend |
Definition at line 275 of file SipXMediaStackAdapter.hxx.
|
friend |
Definition at line 273 of file SipXMediaStackAdapter.hxx.
|
friend |
Definition at line 236 of file SipXMediaStackAdapter.hxx.
Definition at line 243 of file SipXMediaStackAdapter.hxx.
|
friend |
Definition at line 268 of file SipXMediaStackAdapter.hxx.
|
friend |
Definition at line 230 of file SipXMediaStackAdapter.hxx.
|
friend |
Definition at line 248 of file SipXMediaStackAdapter.hxx.
|
friend |
Definition at line 234 of file SipXMediaStackAdapter.hxx.
|
friend |
Definition at line 237 of file SipXMediaStackAdapter.hxx.
Definition at line 244 of file SipXMediaStackAdapter.hxx.
Definition at line 223 of file SipXMediaStackAdapter.hxx.
Definition at line 238 of file SipXMediaStackAdapter.hxx.
|
friend |
Definition at line 225 of file SipXMediaStackAdapter.hxx.
|
staticconstexpr |
Definition at line 68 of file SipXMediaStackAdapter.hxx.
|
staticconstexpr |
Definition at line 69 of file SipXMediaStackAdapter.hxx.
|
staticconstexpr |
Definition at line 70 of file SipXMediaStackAdapter.hxx.