reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
ConversationManager.hxx
Go to the documentation of this file.
1#if !defined(ConversationManager_hxx)
2#define ConversationManager_hxx
3
4#include "BridgeMixer.hxx"
5
7#include <resip/stack/Uri.hxx>
15
17#include "MediaEvent.hxx"
18#include "HandleTypes.hxx"
19
20#include <atomic>
21#include <memory>
22#include <mutex>
23
24namespace resip
25{
26class DialogUsageManager;
27}
28
29namespace recon
30{
31class Conversation;
32class RelatedConversationSet;
33class Participant;
34class UserAgent;
35class ConversationProfile;
36class LocalParticipant;
37class MediaResourceParticipant;
38class MediaStackAdapter;
39class RemoteParticipant;
40class RemoteParticipantDialogSet;
41
42
71{
72public:
73
74 ConversationManager(std::shared_ptr<MediaStackAdapter> mediaStackAdapter,
75 std::shared_ptr<resip::ConfigParse> configParse = std::shared_ptr<resip::ConfigParse>());
76 virtual ~ConversationManager();
77
87
88 typedef enum
89 {
90 // Create a conversation for each early fork. Accept the first fork
91 // from which a 200 is received. Automatically kill other forks on
92 // answer only. In this mode, applications wishing to end a call
93 // before answer must destory each related participant/conversation
94 // seperately, causing a BYE to be sent to each leg that has
95 // established an early dialog, followed by a CANCEL after all
96 // related legs are destroyed
98 // Create a conversation for each early fork. Let the application
99 // dispose of extra forks. ex: app may form conference.
101 // Create a conversation for each early fork. Accept the first fork
102 // from which a 200 is received. Automatically kill other forks on
103 // answer or if the original participant is destroyed. Also issues
104 // a single CANCEL request if original participant is destroyed before
105 // answer.
108
109 typedef enum
110 {
111 // Never auto hold, only hold if holdParticipant API is used
113 // Default. Automatically put a RemoteParticipant on-hold if there
114 // are no other participants in the conversation with them.
116 // Use this if you are broadcasting media to all participants and
117 // don't need to receive any inbound media. All participants in
118 // the conversation will be SIP held and will receive media from
119 // an added MediaParticipant. Remote offers with inactive will be
120 // responded with sendonly as well. This option is useful for
121 // implementing music on hold servers.
124
125 typedef enum
126 {
127 RedirectSuccessOnTrying, // Consider redirect to be successful on Notify SipFrag 100
128 RedirectSuccessOnRinging, // Consider redirect to be successful on Notify SipFrag 18x
129 RedirectSuccessOnConnected // Consider redirect to be successful on Notify SipFrag 2xx
131
133 // Conversation methods //////////////////////////////////////////////
135
158
166
175
177 // Participant methods ///////////////////////////////////////////////
179
200 const resip::NameAddr& destination,
202 const std::shared_ptr<ConversationProfile>& conversationProfile = nullptr,
203 const std::multimap<resip::Data, resip::Data>& extraHeaders = std::multimap<resip::Data, resip::Data>());
204
218 const std::shared_ptr<ConversationProfile>& conversationProfile = nullptr);
219
239 const std::shared_ptr<ConversationProfile>& callerProfile = nullptr,
240 const std::multimap<resip::Data, resip::Data>& extraHeaders = std::multimap<resip::Data, resip::Data>());
241
310 virtual ParticipantHandle createMediaResourceParticipant(ConversationHandle convHandle, const resip::Uri& mediaUrl, const std::shared_ptr<resip::Data>& playAudioBuffer = std::shared_ptr<resip::Data>(), void* recordingCircularBuffer = 0);
311
322
330
342
353
369
378
389
399
409 virtual void alertParticipant(ParticipantHandle partHandle, bool earlyFlag = true);
410
418
426 virtual void rejectParticipant(ParticipantHandle partHandle, unsigned int rejectCode);
427
440
452
460 virtual void holdParticipant(ParticipantHandle partHandle, bool hold);
461
469 virtual void sendIMToParticipant(ParticipantHandle partHandle, std::unique_ptr<resip::Contents> contents);
470
482 virtual void addBufferToMediaResourceCache(const resip::Data& name, const resip::Data& buffer, int type);
483
494 virtual bool getBufferFromMediaResourceCache(const resip::Data& name, resip::Data** buffer, int* type);
495
496 virtual void requestKeyframe(ParticipantHandle partHandle, std::chrono::duration<double> durationMs);
497 virtual void requestKeyframeFromPeer(ParticipantHandle partHandle, std::chrono::duration<double> durationMs);
498 virtual void requestKeyframeFromPeerRecurring(ParticipantHandle partHandle, std::chrono::duration<double> interval);
510 virtual void startApplicationTimer(unsigned int timerId, unsigned int timerData1, unsigned int timerData2, unsigned int durationMs);
511
523 virtual void startApplicationTimer(unsigned int timerId, unsigned int timerData1, unsigned int timerData2, std::chrono::duration<double> duration);
524
525 // Override this to handle the callback
526 virtual void onApplicationTimer(unsigned int timerId, unsigned int timerData1, unsigned int timerData2) { }
527
528
530 // Conversation Manager Handlers //////////////////////////////////////
532
533 // !slg! Note: We should eventually be passing back a generic ParticipantInfo object
534 // and not the entire SipMessage for these callbacks
535
545
556
565
576
586 virtual void onParticipantSendIMFailure(ParticipantHandle partHandle, const resip::SipMessage& status, std::unique_ptr<resip::Contents> contents) {}
587
599
607 virtual void onParticipantTerminated(ParticipantHandle partHandle, unsigned int statusCode) = 0;
608
622 virtual void onParticipantTerminated(ParticipantHandle partHandle, unsigned int statusCode, const resip::Data& reason) { onParticipantTerminated(partHandle, statusCode); }
623
632
641
655
670
671
680
689
698
707
715
722 virtual void onParticipantRedirectFailure(ParticipantHandle partHandle, unsigned int statusCode) = 0;
723
733 virtual void onDtmfEvent(ParticipantHandle partHandle, int dtmf, int duration, bool up) = 0;
734
736
745
753
758 std::shared_ptr<ConversationProfile> conversationProfile = nullptr);
759
760 virtual void setMediaStackAdapter(std::shared_ptr<MediaStackAdapter> mediaStackAdapter);
761 MediaStackAdapter& getMediaStackAdapter() { return *mMediaStackAdapter; };
762
763 std::shared_ptr<resip::ConfigParse> getConfig() { return mConfigParse; };
764
765 bool sendKeyframesAtStart() const { return !mKeyframeIntervals.empty(); };
766
767protected:
768
769 // Invite Session Handler /////////////////////////////////////////////////////
770 using InviteSessionHandler::onReadyToSend;
783 virtual void onOffer(resip::InviteSessionHandle handle, const resip::SipMessage& msg, const resip::SdpContents& offer);
788 virtual void onInfo(resip::InviteSessionHandle, const resip::SipMessage& msg);
799
800 // DialogSetHandler //////////////////////////////////////////////
801 virtual void onTrying(resip::AppDialogSetHandle, const resip::SipMessage& msg);
803
804 // ClientSubscriptionHandler ///////////////////////////////////////////////////
805 using ClientSubscriptionHandler::onReadyToSend;
806 virtual void onUpdatePending(resip::ClientSubscriptionHandle h, const resip::SipMessage& notify, bool outOfOrder);
807 virtual void onUpdateActive(resip::ClientSubscriptionHandle h, const resip::SipMessage& notify, bool outOfOrder);
808 virtual void onUpdateExtension(resip::ClientSubscriptionHandle, const resip::SipMessage& notify, bool outOfOrder);
812
813 // ServerSubscriptionHandler ///////////////////////////////////////////////////
823 virtual bool hasDefaultExpires() const;
824 virtual uint32_t getDefaultExpires() const;
825
826 // OutOfDialogHandler //////////////////////////////////////////////////////////
830
831 // RedirectHandler /////////////////////////////////////////////////////////////
834
835 // ClientPagerMessageHandler ///////////////////////////////////////////////////
837 virtual void onFailure(resip::ClientPagerMessageHandle, const resip::SipMessage& status, std::unique_ptr<resip::Contents> contents);
838
839 // ServerPagerMessageHandler ///////////////////////////////////////////////////
841
842
843 UserAgent* getUserAgent() { return mUserAgent; }
844
846
847 void post(resip::Message *message);
848 void post(resip::ApplicationMessage& message, std::chrono::duration<double> duration=std::chrono::milliseconds::zero());
849
850 virtual void setUserAgent(UserAgent *userAgent);
851
852 friend class MediaStackAdapter;
853 std::shared_ptr<BridgeMixer>& getBridgeMixer() { return mBridgeMixer; }
854
857
858 std::set<ConversationHandle> getConversationHandles() const; // thread safe
859 std::set<ParticipantHandle> getParticipantHandlesByType(ParticipantType participantType) const; // thread safe
860
861 bool isShuttingDown() { return mShuttingDown; }
862
863 bool remoteParticipantInitialHold() { return mConfigParse ? mConfigParse->getConfigBool("RemoteParticipantInitialHold", true) : true; }
864 const std::vector<int>& keyframeIntervals() const { return mKeyframeIntervals; }
865
866private:
867 friend class DefaultDialogSet;
868 friend class Subscription;
869
871 void shutdown(void);
872
873 // Note: In general the following fns are not thread safe and must be called from dum process
874 // loop only
875 friend class Conversation;
876 friend class SipXConversation;
878 void registerConversation(Conversation *);
879 void unregisterConversation(Conversation *);
880
881 friend class Participant;
882 void registerParticipant(Participant *);
883 void unregisterParticipant(Participant *);
884
885 friend class RemoteParticipant;
889 friend class UserAgent;
890
891 /* Called periodically in the event loop to give the ConversationManager
892 the opportunity to do any pending work */
893 virtual void process();
894
895 friend class DtmfEvent;
896 friend class MediaEvent;
898
908 void notifyDtmfEvent(ParticipantHandle partHandle, int dtmf, int duration, bool up);
909
914 friend class LocalParticipant;
915 friend class BridgeMixer;
916 friend class SipXMediaInterface;
917
918 // exists here (as opposed to RemoteParticipant) - since it is required for OPTIONS responses
919 virtual void buildSdpOffer(ConversationProfile* profile, resip::SdpContents& offer);
920
921 friend class OutputBridgeMixWeightsCmd;
922
931 friend class AddParticipantCmd;
933 friend class MoveParticipantCmd;
941 friend class HoldParticipantCmd;
944 friend class RequestKeyframeCmd;
947
950
951 UserAgent* mUserAgent;
952 std::shared_ptr<MediaStackAdapter> mMediaStackAdapter;
953 std::shared_ptr<resip::ConfigParse> mConfigParse;
954 bool mShuttingDown;
955
956 typedef std::map<ConversationHandle, Conversation *> ConversationMap;
957 ConversationMap mConversations;
958 mutable std::mutex mConversationHandlesMutex;
959 std::atomic<ConversationHandle> mCurrentConversationHandle;
960 std::set<ConversationHandle> mConversationHandles;
961
962 typedef std::map<ParticipantHandle, Participant *> ParticipantMap;
963 ParticipantMap mParticipants;
964 mutable std::mutex mParticipantHandlesMutex;
965 std::atomic<ParticipantHandle> mCurrentParticipantHandle;
967 std::map<ParticipantType, std::set<ParticipantHandle>> mParticipantHandlesByType;
968
969 MediaResourceCache mMediaResourceCache;
970
971 std::shared_ptr<BridgeMixer> mBridgeMixer;
972
973 std::vector<int> mKeyframeIntervals = { 2, 2, 5, 5, 7, 10, 20, 30 };
974};
975
976}
977
978#endif
979
980
981/* ====================================================================
982
983 Copyright (c) 2021-2026, SIP Spectrum, Inc. http://www.sipspectrum.com
984 Copyright (c) 2021, Daniel Pocock https://danielpocock.com
985 Copyright (c) 2007-2008, Plantronics, Inc.
986 All rights reserved.
987
988 Redistribution and use in source and binary forms, with or without
989 modification, are permitted provided that the following conditions are
990 met:
991
992 1. Redistributions of source code must retain the above copyright
993 notice, this list of conditions and the following disclaimer.
994
995 2. Redistributions in binary form must reproduce the above copyright
996 notice, this list of conditions and the following disclaimer in the
997 documentation and/or other materials provided with the distribution.
998
999 3. Neither the name of Plantronics nor the names of its contributors
1000 may be used to endorse or promote products derived from this
1001 software without specific prior written permission.
1002
1003 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1004 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1005 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1006 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1007 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1008 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1009 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1010 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1011 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1012 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1013 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1014
1015 ==================================================================== */
This class is used to control the sipX Bridge Mixer mix matrix.
This class is one of two main classes of concern to an application using the UserAgent library.
virtual void onConnectedConfirmed(resip::InviteSessionHandle, const resip::SipMessage &msg)
called when ACK (with out an answer) is received for initial invite (UAS)
virtual void onReferNoSub(resip::InviteSessionHandle, const resip::SipMessage &msg)
virtual void onMediaResourceParticipantFailed(ParticipantHandle partHandle)
Notifies an application about a failure in a media resource participant.
const std::vector< int > & keyframeIntervals() const
virtual bool getBufferFromMediaResourceCache(const resip::Data &name, resip::Data **buffer, int *type)
This function is used to retrieve a chunk of memory from the media/prompt cache.
virtual void onParticipantDestroyed(ParticipantHandle partHandle, ParticipantType partType)
Notifies an application when a Participant has been destroyed.
virtual void onMessage(resip::InviteSessionHandle, const resip::SipMessage &msg)
called when MESSAGE message is received
virtual void onMessageFailure(resip::InviteSessionHandle, const resip::SipMessage &msg)
virtual void joinConversation(ConversationHandle sourceConvHandle, ConversationHandle destConvHandle)
Joins all participants from source conversation into destination conversation and destroys source con...
virtual void onRelatedConversation(ConversationHandle relatedConvHandle, ParticipantHandle relatedPartHandle, ConversationHandle origConvHandle, ParticipantHandle origPartHandle)=0
Notifies an applications that a outbound remote participant request has forked.
virtual void onError(resip::ServerSubscriptionHandle, const resip::SipMessage &msg)
virtual ParticipantHandle createRemoteIMSessionParticipant(const resip::NameAddr &destination, ParticipantForkSelectMode forkSelectMode=ForkSelectAutomatic, const std::shared_ptr< ConversationProfile > &callerProfile=nullptr, const std::multimap< resip::Data, resip::Data > &extraHeaders=std::multimap< resip::Data, resip::Data >())
Creates a new remote IM participant that will attempted to be reached immediately at the specified ad...
virtual void onApplicationTimer(unsigned int timerId, unsigned int timerData1, unsigned int timerData2)
virtual void redirectParticipant(ParticipantHandle partHandle, const resip::NameAddr &destination, unsigned int redirectCode=302, RedirectSuccessCondition successCondition=RedirectSuccessOnConnected)
Redirects the participant to another endpoint.
virtual void startApplicationTimer(unsigned int timerId, unsigned int timerData1, unsigned int timerData2, unsigned int durationMs)
This function is used to start a timer on behalf of recon based application.
virtual ParticipantHandle createMediaResourceParticipant(ConversationHandle convHandle, const resip::Uri &mediaUrl, const std::shared_ptr< resip::Data > &playAudioBuffer=std::shared_ptr< resip::Data >(), void *recordingCircularBuffer=0)
Creates a new media resource participant in the specified conversation.
virtual void onParticipantSendIMFailure(ParticipantHandle partHandle, const resip::SipMessage &status, std::unique_ptr< resip::Contents > contents)
Notifies an application that a send IM call has failed.
virtual void onReferAccepted(resip::InviteSessionHandle, resip::ClientSubscriptionHandle, const resip::SipMessage &msg)
called when an REFER message receives an accepted response
std::set< ParticipantHandle > getParticipantHandlesByType(ParticipantType participantType) const
virtual bool onTryingNextTarget(resip::AppDialogSetHandle, const resip::SipMessage &request)
virtual void onParticipantConnectedConfirmed(ParticipantHandle partHandle, const resip::SipMessage &msg)
Notifies an application that an inbound remote participant call now fully connected after answering (...
virtual void requestKeyframeFromPeer(ParticipantHandle partHandle, std::chrono::duration< double > durationMs)
virtual void onFailure(resip::ClientInviteSessionHandle h, const resip::SipMessage &msg)
Received a failure response from UAS.
virtual void onNonDialogCreatingProvisional(resip::AppDialogSetHandle, const resip::SipMessage &msg)
virtual void moveParticipant(ParticipantHandle partHandle, ConversationHandle sourceConvHandle, ConversationHandle destConvHandle)
Removed the specified participant from the specified conversation.
virtual void onConnected(resip::ClientInviteSessionHandle h, const resip::SipMessage &msg)
called when a dialog initiated as a UAC enters the connected state
virtual void onExpiredByClient(resip::ServerSubscriptionHandle, const resip::SipMessage &sub, resip::SipMessage &notify)
virtual bool hasDefaultExpires() const
dcm! – a bit clunky, but really want these objects to not have state
virtual void onConversationDestroyed(ConversationHandle convHandle)=0
Notifies an application when a conversation has been destroyed.
virtual void setMediaStackAdapter(std::shared_ptr< MediaStackAdapter > mediaStackAdapter)
virtual void onIncomingIMPagerParticipant(ParticipantHandle partHandle, const resip::SipMessage &msg, ConversationProfile &conversationProfile)
Notifies an application about a new remote IM pager mode participant that has sent a message.
virtual void onOfferRequired(resip::InviteSessionHandle, const resip::SipMessage &msg)
called when an Invite w/out offer is sent, or any other context which requires an offer from the user
virtual void answerParticipant(ParticipantHandle partHandle)
Signal to the participant that the call is answered.
virtual void setUserAgent(UserAgent *userAgent)
virtual void onInfoSuccess(resip::InviteSessionHandle, const resip::SipMessage &msg)
called when response to INFO message is received
virtual void onUpdateExtension(resip::ClientSubscriptionHandle, const resip::SipMessage &notify, bool outOfOrder)
virtual void onParticipantTerminated(ParticipantHandle partHandle, unsigned int statusCode, const resip::Data &reason)
Notifies an application about a disconnect by a remote participant.
void post(resip::Message *message)
virtual void onRedirected(resip::ClientInviteSessionHandle, const resip::SipMessage &msg)
called when a 3xx with valid targets is encountered in an early dialog This is different then getti...
virtual void modifyParticipantRecordChannel(ParticipantHandle partHandle, unsigned int channelNum)
If the participant is mixed to a multi-channel recording resource, then this controls if a participan...
ParticipantHandle getNewParticipantHandle()
virtual void onRefer(resip::InviteSessionHandle, resip::ServerSubscriptionHandle, const resip::SipMessage &msg)
called when an REFER message is received.
virtual void onParticipantConnected(ParticipantHandle partHandle, const resip::SipMessage &msg)=0
Notifies an application that a remote participant call attempt is now connected.
virtual void onIncomingIMSessionParticipant(ParticipantHandle partHandle, const resip::SipMessage &msg, bool autoAnswer, ConversationProfile &conversationProfile)
Notifies an application about a new remote IM session mode participant that has sent an INVITE.
virtual void rejectParticipant(ParticipantHandle partHandle, unsigned int rejectCode)
Rejects an incoming remote participant with the specified code.
virtual void onMessageSuccess(resip::InviteSessionHandle, const resip::SipMessage &msg)
called when response to MESSAGE message is received
virtual void onAnswer(resip::InviteSessionHandle, const resip::SipMessage &msg, const resip::SdpContents &)
called when an answer is received - has nothing to do with user answering the call
virtual void onProvisional(resip::ClientInviteSessionHandle, const resip::SipMessage &msg)
called when dialog enters the Early state - typically after getting 18x
MediaStackAdapter & getMediaStackAdapter()
virtual void sendIMToParticipant(ParticipantHandle partHandle, std::unique_ptr< resip::Contents > contents)
Sends a MESSAGE with specified Contents to RemoteParticipant, RemoteIMPagerParticipant,...
virtual void onParticipantAlerting(ParticipantHandle partHandle, const resip::SipMessage &msg)=0
Notifies an application that a remote participant call attempt is alerting the remote party.
virtual void onUpdatePending(resip::ClientSubscriptionHandle h, const resip::SipMessage &notify, bool outOfOrder)
virtual void onSuccess(resip::ClientOutOfDialogReqHandle, const resip::SipMessage &response)
virtual ParticipantHandle createRemoteParticipant(ConversationHandle convHandle, const resip::NameAddr &destination, ParticipantForkSelectMode forkSelectMode=ForkSelectAutomatic, const std::shared_ptr< ConversationProfile > &conversationProfile=nullptr, const std::multimap< resip::Data, resip::Data > &extraHeaders=std::multimap< resip::Data, resip::Data >())
Creates a new remote participant in the specified conversation that is attempted to be reached at the...
virtual void onUpdateActive(resip::ClientSubscriptionHandle h, const resip::SipMessage &notify, bool outOfOrder)
virtual void requestKeyframe(ParticipantHandle partHandle, std::chrono::duration< double > durationMs)
virtual void onTrying(resip::AppDialogSetHandle, const resip::SipMessage &msg)
static const char * participantTypeToString(ParticipantType partType)
virtual void onExpired(resip::ServerSubscriptionHandle, resip::SipMessage &notify)
virtual void onParticipantRequestedHold(ParticipantHandle partHandle, bool held)=0
virtual void destroyParticipant(ParticipantHandle partHandle)
Ends connections to the participant and removes it from all active conversations.
virtual void onForkDestroyed(resip::ClientInviteSessionHandle)
called when a fork that was created through a 1xx never receives a 2xx because another fork answered ...
virtual void onInfo(resip::InviteSessionHandle, const resip::SipMessage &msg)
called when INFO message is received the application must call acceptNIT() or rejectNIT() once it is ...
virtual void redirectToParticipant(ParticipantHandle partHandle, ParticipantHandle destPartHandle, RedirectSuccessCondition successCondition=RedirectSuccessOnConnected)
This is used for attended transfer scenarios where both participants are no longer managed by the con...
virtual void onOffer(resip::InviteSessionHandle handle, const resip::SipMessage &msg, const resip::SdpContents &offer)
called when an offer is received - must send an answer soon after this
virtual void onNotifyRejected(resip::ServerSubscriptionHandle, const resip::SipMessage &msg)
virtual void addBufferToMediaResourceCache(const resip::Data &name, const resip::Data &buffer, int type)
This function is used to add a chunk of memory to a media/prompt cache.
virtual void onDtmfEvent(ParticipantHandle partHandle, int dtmf, int duration, bool up)=0
Notifies an application when an RFC2833 DTMF event is received from a particular remote participant.
Conversation * getConversation(ConversationHandle convHandle)
virtual void removeParticipant(ConversationHandle convHandle, ParticipantHandle partHandle)
Removed the specified participant from the specified conversation.
virtual void alertParticipant(ParticipantHandle partHandle, bool earlyFlag=true)
Signal to the participant that it should provide ringback.
virtual void requestKeyframeFromPeerRecurring(ParticipantHandle partHandle, std::chrono::duration< double > interval)
virtual void addParticipant(ConversationHandle convHandle, ParticipantHandle partHandle)
Adds the specified participant to the specified conversation.
virtual void onRequestOutgoingParticipant(ParticipantHandle partHandle, const resip::SipMessage &msg, ConversationProfile &conversationProfile)=0
Notifies an application about a new remote participant that is trying to be contacted.
virtual void onOfferRequestRejected(resip::InviteSessionHandle, const resip::SipMessage &msg)
Called when an error response is received for a reinvite-nobody request (via requestOffer)
virtual void onParticipantRedirectFailure(ParticipantHandle partHandle, unsigned int statusCode)=0
Notifies an application that a redirect request has failed.
virtual void onReadyToSend(resip::ServerSubscriptionHandle, resip::SipMessage &)
virtual void onReferRejected(resip::InviteSessionHandle, const resip::SipMessage &msg)
called when an REFER message receives a failure response
virtual void destroyConversation(ConversationHandle convHandle)
Destroys an existing Conversation, and ends all participants that solely belong to this conversation.
ConversationHandle getNewConversationHandle()
virtual RemoteParticipant * createAppropriateRemoteParticipantInstance(resip::DialogUsageManager &dum, RemoteParticipantDialogSet &rpds)
std::shared_ptr< resip::ConfigParse > getConfig()
virtual void onRemoteSdpChanged(resip::InviteSessionHandle, const resip::SipMessage &msg, const resip::SdpContents &sdp)
called when a modified body is received in a 2xx response to a session-timer reINVITE.
virtual void onRefresh(resip::ServerSubscriptionHandle, const resip::SipMessage &sub)
std::shared_ptr< BridgeMixer > & getBridgeMixer()
virtual void holdParticipant(ParticipantHandle partHandle, bool hold)
Manually puts a paricipant on hold, or takes off hold without needing to move it in and out of any co...
virtual void onIncomingParticipant(ParticipantHandle partHandle, const resip::SipMessage &msg, bool autoAnswer, ConversationProfile &conversationProfile)=0
Notifies an application about a new remote participant that is attempting to contact it.
virtual void onOfferRejected(resip::InviteSessionHandle, const resip::SipMessage *msg)
called if an offer in a UPDATE or re-INVITE was rejected - not real useful.
virtual ParticipantHandle createRemoteIMPagerParticipant(const resip::NameAddr &destination, const std::shared_ptr< ConversationProfile > &conversationProfile=nullptr)
Creates a new remote IM participant that will be attempted to be reached when sendIMToParticipant is ...
virtual bool onReceiveIMFromParticipant(ParticipantHandle partHandle, const resip::SipMessage &msg)
Notifies an application about a subsequent message from remote and existing IM participant.
virtual void onNewSession(resip::ClientInviteSessionHandle h, resip::InviteSession::OfferAnswerType oat, const resip::SipMessage &msg)
called when an initial INVITE or the intial response to an outoing invite
virtual void onMessageArrived(resip::ServerPagerMessageHandle, const resip::SipMessage &message)
virtual void onTerminated(resip::InviteSessionHandle h, resip::InviteSessionHandler::TerminatedReason reason, const resip::SipMessage *msg)
virtual void onParticipantProceeding(ParticipantHandle partHandle, const resip::SipMessage &msg)
Notifies an application that a remote participant call attempt is proceeding at the first hop.
virtual void onReceivedRequest(resip::ServerOutOfDialogReqHandle, const resip::SipMessage &request)
virtual void onParticipantTerminated(ParticipantHandle partHandle, unsigned int statusCode)=0
Notifies an application about a disconnect by a remote participant.
virtual void onNewSubscription(resip::ClientSubscriptionHandle h, const resip::SipMessage &notify)
virtual void onParticipantRedirectSuccess(ParticipantHandle partHandle)=0
Notifies an application that a redirect request has succeeded.
virtual uint32_t getDefaultExpires() const
virtual ConversationHandle createConversation(AutoHoldMode autoHoldMode=AutoHoldEnabled)
Create a new empty Conversation to which participants can be added.
virtual void modifyParticipantContribution(ConversationHandle convHandle, ParticipantHandle partHandle, unsigned int inputGain, unsigned int outputGain)
Modifies how the participant contributes to the particular conversation.
virtual void onParticipantDestroyed(ParticipantHandle partHandle)=0
Notifies an application when a Participant has been destroyed.
std::set< ConversationHandle > getConversationHandles() const
virtual ParticipantHandle createLocalParticipant()
Creates a new local participant in the specified conversation (if supported).
virtual void onParticipantVoiceActivity(recon::ParticipantHandle partHandle, bool on, bool inbound)
Notifies an application when voice activity is detected to on or off from a remote participant.
virtual void onInfoFailure(resip::InviteSessionHandle, const resip::SipMessage &msg)
virtual void onStaleCallTimeout(resip::ClientInviteSessionHandle)
UAC gets no final response within the stale call timeout (default is 3 minutes).
virtual void onEarlyMedia(resip::ClientInviteSessionHandle, const resip::SipMessage &, const resip::SdpContents &)
called when an in-dialog provisional response is received that contains a body
virtual void onRedirectReceived(resip::AppDialogSetHandle, const resip::SipMessage &response)
virtual int onRequestRetry(resip::ClientSubscriptionHandle h, int retryMinimum, const resip::SipMessage &notify)
virtual void outputBridgeMatrix(ConversationHandle convHandle=0)
Logs a multiline representation of the current state of the mixing matrix.
virtual void onNewSubscriptionFromRefer(resip::ServerSubscriptionHandle, const resip::SipMessage &sub)
virtual RemoteParticipantDialogSet * createRemoteIMSessionParticipantDialogSetInstance(ConversationManager::ParticipantForkSelectMode forkSelectMode=ConversationManager::ForkSelectAutomatic, std::shared_ptr< ConversationProfile > conversationProfile=nullptr)
This class extends the resip UserProfile to include Conversation Manager specific settings.
This class is used to manage membership of participants.
The classes defined here are used to pass commands from the application thread to the UserAgent threa...
This class is used by non-Invite DialogSets.
This class represents the data passed in a DTMF event.
Definition DtmfEvent.hxx:18
This class represents a local participant.
This class represents an event that happens to a media participant.
This class is responsible for caching media resource buffers.
This class represents a media resource participant.
This class is one of two main classes of concern to an application.
This class represents events from the Media stream.
This is the base class for a RemoteParticipant, LocalParticipant and a MediaResourceParticipant.
This class represent an Instant Message remote participant.
This class represents an IM Session remote participant.
This class is used by Invite DialogSets.
This class represent a remote participant.
This class is used to manage membership of participants.
This class represents a media resource participant.
This class is used by Invite DialogSets.
This class represent a remote participant.
The classes defined here are used to pass commands from the application thread to the UserAgent threa...
This class is one of two main classes of concern to an application using the UserAgent library.
Definition UserAgent.hxx:56
A base-class for messages used by applications.
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
Definition Data.hxx:90
TerminatedReason
called when an dialog enters the terminated state - this can happen after getting a BYE,...
The base-class used for message-passing.
Definition Message.hxx:21
Represents the "name-addr" and the "addr-spec" elements in the RFC 3261 grammar.
Definition NameAddr.hxx:19
Provides an interface to process and generate SDP bodies (MIME content-type application/sdp).
Represents a SIP message.
Represents the "SIP-URI" and "SIPS-URI" elements in the RFC 3261 grammar.
Definition Uri.hxx:22
unsigned int ConversationHandle
unsigned int ParticipantHandle
dcm! – add UnusedChecking(_enum) below;
unsigned int uint32_t
Definition stdint.h:85
void list()
Definition userAdmin.cxx:66