[Sofaswitch-svn] [commit] r389 - sofaswitch/trunk/voip
Author: derek Date: Fri Aug 3 00:41:32 2007 New Revision: 389 Modified: sofaswitch/trunk/voip/jocall.cxx sofaswitch/trunk/voip/mymanager.cxx sofaswitch/trunk/voip/udpconnection.cxx sofaswitch/trunk/voip/udpep.cxx Log: Fiddles - try to bring into line with Opal Requirements. Modified: sofaswitch/trunk/voip/jocall.cxx ============================================================================== --- sofaswitch/trunk/voip/jocall.cxx (original) +++ sofaswitch/trunk/voip/jocall.cxx Fri Aug 3 00:41:32 2007 @@ -118,13 +118,8 @@ } } } - PTRACE(3, "Final value of Call::OnSetUp is " << ok); - return ok; - - PTRACE(2, "OnSetup of connection. " << connection.GetToken()); - BOOL res = OpalCall::OnSetUp(connection); - PTRACE(2, "finished onsetup of connection/call and it gave " << res); - return res; + PTRACE(2, "finished onsetup of connection/call and it gave " << 1); + return TRUE; } BOOL MyOpalCall::OnAlerting(OpalConnection & connection) Modified: sofaswitch/trunk/voip/mymanager.cxx ============================================================================== --- sofaswitch/trunk/voip/mymanager.cxx (original) +++ sofaswitch/trunk/voip/mymanager.cxx Fri Aug 3 00:41:32 2007 @@ -832,10 +832,32 @@ } call->SetPartyB(partyB); + unsigned int options = 0; + int userData ; + OpalConnection::StringOptions stringOptions; + + OpalConnection *c1; + if (!MakeConnection(*call, partyA, &userData, options, &stringOptions)) { + PTRACE(3, "Manager\tFailed to make connection to " << partyA); + goto CallSetupFailed; + } + + c1 = call->GetConnection(0); + if (c1 == NULL) { + PTRACE(3, "SofaMan\t c1 is NULLLLLLL"); + goto CallSetupFailed; + } + + if (!c1->SetUpConnection()) { + PTRACE(3, "Manager\tFailed to setup connetion"); + goto CallSetupFailed; + } + + PTRACE(3, "SofaMan\tSetUpCall succeeded, call=" << *call); + return TRUE; + - if (MakeConnection(*call, partyA, NULL)) - return TRUE; - + CallSetupFailed: call->Clear(); PStringStream msg; msg << "FAILED to make a connection to connect " << partyA << " and " << partyB; Modified: sofaswitch/trunk/voip/udpconnection.cxx ============================================================================== --- sofaswitch/trunk/voip/udpconnection.cxx (original) +++ sofaswitch/trunk/voip/udpconnection.cxx Fri Aug 3 00:41:32 2007 @@ -98,47 +98,42 @@ BOOL OpalUdpSsConnection::SetUpConnection() { - remotePartyName = ownerCall.GetOtherPartyConnection(*this)->GetRemotePartyName(); - remotePartyAddress = ownerCall.GetOtherPartyConnection(*this)->GetRemotePartyAddress(); - PString remoteApplication = ownerCall.GetOtherPartyConnection(*this)->GetRemoteApplication(); + PSafePtr<OpalConnection> otherConn = ownerCall.GetOtherPartyConnection(*this); + + if (otherConn == NULL) { + PTRACE(3, "UdpSsConenction\t error - other party is NULL"); + PAssertAlways("Other Connection is NULL"); + } + + remotePartyName = otherConn->GetRemotePartyName(); + remotePartyAddress = otherConn->GetRemotePartyAddress(); + PString remoteApplication = otherConn->GetRemoteApplication(); PTRACE(3, "UdpSs\tSetUpConnection, Remote party name " << remotePartyName << ')'); PTRACE(3, "UdpSs\tSetUpConnection, Remote party address" << remotePartyAddress << ')'); PTRACE(3, "UdpSs\tSetUpConnection, Remote application " << remoteApplication << ')'); - - // 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(2, "PCSS\tOutgoing call routed to " << ownerCall.GetPartyB() << " for " << *this); - if (!ownerCall.OnSetUp(*this)) { - Release(EndedByNoAccept); - return FALSE; + + // 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(2, "PCSS\tOutgoing call routed to " << ownerCall.GetPartyB() << " for " << *this); + if (!ownerCall.OnSetUp(*this)) { + Release(EndedByNoAccept); + return FALSE; + } + + PTRACE(3, "PCSS\tSetUpConnection(" << remotePartyName << ')'); + phase = AlertingPhase; + endpoint.OnShowIncoming(*this); + OnAlerting(); } return TRUE; - } - - { - PSafePtr<OpalConnection> otherConn = ownerCall.GetOtherPartyConnection(*this); - if (otherConn == NULL) - return FALSE; - - remotePartyName = otherConn->GetRemotePartyName(); - remotePartyAddress = otherConn->GetRemotePartyAddress(); - remoteApplication = otherConn->GetRemoteApplication(); - } - - PTRACE(3, "PCSS\tSetUpConnection(" << remotePartyName << ')'); - phase = AlertingPhase; - endpoint.OnShowIncoming(*this); - OnAlerting(); - - return TRUE; } Modified: sofaswitch/trunk/voip/udpep.cxx ============================================================================== --- sofaswitch/trunk/voip/udpep.cxx (original) +++ sofaswitch/trunk/voip/udpep.cxx Fri Aug 3 00:41:32 2007 @@ -202,7 +202,7 @@ unsigned int options, OpalConnection::StringOptions *stringOptions) { - return manager.OnIncomingConnection(conn, options, stringOptions); + return TRUE; }
participants (1)
-
SofaSWITCH SVN