Author: derek Date: Thu Aug 2 21:24:33 2007 New Revision: 387 Modified: sofaswitch/trunk/voip/jocall.cxx sofaswitch/trunk/voip/mymanager.cxx sofaswitch/trunk/voip/mymanager.h Log: Work on getting the alerting right. Modified: sofaswitch/trunk/voip/jocall.cxx ============================================================================== --- sofaswitch/trunk/voip/jocall.cxx (original) +++ sofaswitch/trunk/voip/jocall.cxx Thu Aug 2 21:24:33 2007 @@ -181,8 +181,7 @@ void MyOpalCall::IncomingCall(const PString &remoteNode) { PTRACE(3, "Jocal - incoming call to query the remote controller on "); - comms.SendThisMessageTo(PString("QueryAcceptIncoming ") + remoteNode, - manager.GetControllerId()); + } void MyOpalCall::AcceptThisCall(BOOL doAccept) Modified: sofaswitch/trunk/voip/mymanager.cxx ============================================================================== --- sofaswitch/trunk/voip/mymanager.cxx (original) +++ sofaswitch/trunk/voip/mymanager.cxx Thu Aug 2 21:24:33 2007 @@ -437,6 +437,17 @@ } +BOOL MyManager::OnIncomingConnection( + OpalConnection & connection, ///< Connection that is calling + unsigned options, ///< options for new connection + OpalConnection::StringOptions * stringOptions + ) +{ + PString message = PString("QueryAcceptIncoming ") + connection.GetRemotePartyName(); + supervisor.SendThisMessageTo(message, GetControllerId()); + return TRUE; +} + void MyManager::AcceptThisCall(const PString & uniqueCallId, BOOL doAccept) { PTRACE(3, "Accept this call if we can find it " << uniqueCallId); Modified: sofaswitch/trunk/voip/mymanager.h ============================================================================== --- sofaswitch/trunk/voip/mymanager.h (original) +++ sofaswitch/trunk/voip/mymanager.h Thu Aug 2 21:24:33 2007 @@ -80,6 +80,20 @@ /**Where we sit, while waiting for commands & events */ void Main(PArgList & args); + /**Call back for answering an incoming call. + This function is used for an application to control the answering of + incoming calls. + + If TRUE is returned then the connection continues. If FALSE then the + connection is aborted. + + Note this function should not block for any length of time. + */ + virtual BOOL OnIncomingConnection( + OpalConnection & connection, ///< Connection that is calling + unsigned options, ///< options for new connection + OpalConnection::StringOptions * stringOptions + ); /**A call has been established, and now is running with media in both directions */ virtual void OnEstablishedCall(
participants (1)
-
SofaSWITCH SVN