[Sofaswitch-svn] [commit] r416 - in sofaswitch/trunk: . voip
Author: derek Date: Mon May 26 23:02:56 2008 New Revision: 416 Modified: sofaswitch/trunk/Makefile sofaswitch/trunk/voip/jocall.cxx sofaswitch/trunk/voip/udpconnection.cxx sofaswitch/trunk/voip/udpconnection.h Log: Changes resulting from upgrades to the ptlib/opal library. Modified: sofaswitch/trunk/Makefile ============================================================================== --- sofaswitch/trunk/Makefile (original) +++ sofaswitch/trunk/Makefile Mon May 26 23:02:56 2008 @@ -26,7 +26,7 @@ # $Date: 2008-03-14 16:19:22 +1300 (Fri, 14 Mar 2008) $ # -export SOFADIR=/users/derek/sofa/sofaswitch +export SOFADIR=/home/derek/sofa/sofaswitch INSTALL=/usr/bin/install -c OS_NAME=$(shell uname -s) Modified: sofaswitch/trunk/voip/jocall.cxx ============================================================================== --- sofaswitch/trunk/voip/jocall.cxx (original) +++ sofaswitch/trunk/voip/jocall.cxx Mon May 26 23:02:56 2008 @@ -97,8 +97,6 @@ PTRACE(3, "failed to lock the read write"); return false; } - - partyA = connection.GetRemotePartyName(); PTRACE(3, "ConnectionsActive has a size of " << connectionsActive.GetSize()); Modified: sofaswitch/trunk/voip/udpconnection.cxx ============================================================================== --- sofaswitch/trunk/voip/udpconnection.cxx (original) +++ sofaswitch/trunk/voip/udpconnection.cxx Mon May 26 23:02:56 2008 @@ -74,11 +74,13 @@ : OpalConnection(call, ep, newToken, options, _stringOptions), endpoint(ep) { - IncOpalUdpSsConnection(); - - silenceDetector = new OpalPCM16SilenceDetector; - - PTRACE(3, "UdpSs\tCreated UDP sound system OpalUdpSsConnection" << GetToken()); + IncOpalUdpSsConnection(); + + silenceDetector = + new OpalPCM16SilenceDetector(ep.GetManager().GetSilenceDetectParams()); + + PTRACE(3, "UdpSs\tCreated UDP sound system OpalUdpSsConnection" + << GetToken()); } @@ -93,21 +95,21 @@ { // Check if we are A-Party in thsi call, so need to do things differently if (ownerCall.GetConnection(0) == this) { - phase = SetUpPhase; - if (!OnIncomingConnection(0, NULL)) { - Release(EndedByCallerAbort); - return false; - } - - PTRACE(3, "PCSS\tOutgoing call routed to " << ownerCall.GetPartyB() << " for " << *this); - if (!ownerCall.OnSetUp(*this)) { - Release(EndedByNoAccept); - return false; - } - - return true; + SetPhase(SetUpPhase); + if (!OnIncomingConnection(0, NULL)) { + Release(EndedByCallerAbort); + return false; + } + + PTRACE(3, "PCSS\tOutgoing call routed to " << ownerCall.GetPartyB() << " for " << *this); + if (!ownerCall.OnSetUp(*this)) { + Release(EndedByNoAccept); + return false; + } + + return true; } - + { PSafePtr<OpalConnection> otherConn = ownerCall.GetOtherPartyConnection(*this); if (otherConn == NULL) @@ -119,7 +121,7 @@ } PTRACE(3, "PCSS\tSetUpConnection(" << remotePartyName << ')'); - phase = AlertingPhase; + SetPhase(AlertingPhase); OnAlerting(); return endpoint.OnShowIncoming(*this); @@ -129,7 +131,7 @@ bool OpalUdpSsConnection::SetAlerting(const PString & calleeName, bool) { PTRACE(3, "UdpSs\tSetAlerting(" << calleeName << ')'); - phase = AlertingPhase; + SetPhase(AlertingPhase); remotePartyName = calleeName; return endpoint.OnShowOutgoing(*this); } @@ -137,17 +139,17 @@ bool OpalUdpSsConnection::SetConnected() { - PTRACE(3, "UdpSs\tSetConnected()"); - - if (mediaStreams.IsEmpty()) - phase = ConnectedPhase; - else { - PTRACE(5, "UdpSs\t there are " << mediaStreams.GetSize() << " current media stream "); - phase = EstablishedPhase; - OnEstablished(); - } - - return true; + PTRACE(3, "UdpSs\tSetConnected()"); + + if (mediaStreams.IsEmpty()) + SetPhase(ConnectedPhase); + else { + PTRACE(5, "UdpSs\t there are " << mediaStreams.GetSize() << " current media stream "); + SetPhase(EstablishedPhase); + OnEstablished(); + } + + return true; } void OpalUdpSsConnection::OnEstablished() @@ -280,13 +282,13 @@ if (!LockReadOnly()) return; - if (phase != AlertingPhase) { + if (GetPhase() != AlertingPhase) { UnlockReadOnly(); return; } LockReadWrite(); - phase = ConnectedPhase; + SetPhase(ConnectedPhase); UnlockReadWrite(); UnlockReadOnly(); @@ -301,7 +303,7 @@ } LockReadWrite(); - phase = EstablishedPhase; + SetPhase(EstablishedPhase); UnlockReadWrite(); UnlockReadOnly(); Modified: sofaswitch/trunk/voip/udpconnection.h ============================================================================== --- sofaswitch/trunk/voip/udpconnection.h (original) +++ sofaswitch/trunk/voip/udpconnection.h Mon May 26 23:02:56 2008 @@ -71,6 +71,16 @@ /**@name Overrides from OpalConnection */ //@{ + /**Get indication of connection being to a "network". + This indicates the if the connection may be regarded as a "network" + connection. The distinction is about if there is a concept of a "remote" + party being connected to and is best described by example: sip, h323, + iax and pstn are all "network" connections as they connect to something + "remote". While pc, pots and ivr are not as the entity being connected + to is intrinsically local. + */ + virtual bool IsNetworkConnection() const { return false; } + /**Start an outgoing connection. This function will initiate the connection to the remote entity, for example in H.323 it sends a SETUP, in SIP it sends an INVITE etc.
participants (1)
-
SofaSWITCH SVN