"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/h323.cxx" between
h323plus-1_27_0.tar.gz and h323plus-1_27_1.tar.gz

About: H.323 Plus offers libraries for voice (VoIP) and videoconferencing using H.323.

h323.cxx  (h323plus-1_27_0):h323.cxx  (h323plus-1_27_1)
skipping to change at line 413 skipping to change at line 413
localCapabilities(ep.GetCapabilities()), localCapabilities(ep.GetCapabilities()),
gkAccessTokenOID(ep.GetGkAccessTokenOID()), gkAccessTokenOID(ep.GetGkAccessTokenOID()),
alertingTime(0), alertingTime(0),
connectedTime(0), connectedTime(0),
callEndTime(0), callEndTime(0),
reverseMediaOpenTime(0), reverseMediaOpenTime(0),
noMediaTimeOut(ep.GetNoMediaTimeout().GetMilliSeconds()), noMediaTimeOut(ep.GetNoMediaTimeout().GetMilliSeconds()),
roundTripDelayRate(ep.GetRoundTripDelayRate().GetMilliSeconds()), roundTripDelayRate(ep.GetRoundTripDelayRate().GetMilliSeconds()),
releaseSequence(ReleaseSequenceUnknown) releaseSequence(ReleaseSequenceUnknown)
,EPAuthenticators(ep.CreateEPAuthenticators()) ,EPAuthenticators(ep.CreateEPAuthenticators())
#ifdef H323_H239
,h239SessionID(0)
#endif
#ifdef H323_H460 #ifdef H323_H460
,features(ep.GetFeatureSet()) ,features(ep.GetFeatureSet())
#endif #endif
{ {
localAliasNames.MakeUnique(); localAliasNames.MakeUnique();
callAnswered = FALSE; callAnswered = FALSE;
gatekeeperRouted = FALSE; gatekeeperRouted = FALSE;
distinctiveRing = 0; distinctiveRing = 0;
callReference = ref; callReference = ref;
skipping to change at line 1090 skipping to change at line 1093
PTRACE(3, "H225\tFast Start DISABLED!"); PTRACE(3, "H225\tFast Start DISABLED!");
h245Tunneling = FALSE; h245Tunneling = FALSE;
} }
} }
h245TunnelRxPDU = &pdu; h245TunnelRxPDU = &pdu;
#ifdef H323_H450 #ifdef H323_H450
// Check for presence of supplementary services // Check for presence of supplementary services
if (pdu.m_h323_uu_pdu.HasOptionalField(H225_H323_UU_PDU::e_h4501SupplementaryS ervice)) { if (pdu.m_h323_uu_pdu.HasOptionalField(H225_H323_UU_PDU::e_h4501SupplementaryS ervice)) {
if (!h450dispatcher->HandlePDU(pdu)) // Process H4501SupplementaryService AP if (!h450dispatcher->HandlePDU(pdu)) { // Process H4501SupplementaryService
DU APDU
Unlock();
return FALSE; return FALSE;
}
} }
#endif #endif
#ifdef H323_H460 #ifdef H323_H460
if (pdu.m_h323_uu_pdu.HasOptionalField(H225_H323_UU_PDU::e_genericData)) { if (pdu.m_h323_uu_pdu.HasOptionalField(H225_H323_UU_PDU::e_genericData)) {
if (q931.GetMessageType() == Q931::SetupMsg) { if (q931.GetMessageType() == Q931::SetupMsg) {
remotePartyName = pdu.GetQ931().GetDisplayName(); remotePartyName = pdu.GetQ931().GetDisplayName();
remoteAliasNames = pdu.GetSourceAliasNames(); remoteAliasNames = pdu.GetSourceAliasNames();
} }
ReceiveFeatureData<H323SignalPDU>(this,q931.GetMessageType(),pdu); ReceiveFeatureData<H323SignalPDU>(this,q931.GetMessageType(),pdu);
skipping to change at line 4615 skipping to change at line 4620
// Now close the conflicting channel // Now close the conflicting channel
CloseLogicalChannelNumber(number); CloseLogicalChannelNumber(number);
return TRUE; return TRUE;
} }
H323Channel * H323Connection::CreateLogicalChannel(const H245_OpenLogicalChannel & open, H323Channel * H323Connection::CreateLogicalChannel(const H245_OpenLogicalChannel & open,
PBoolean startingFast, PBoolean startingFast,
unsigned & errorCode) unsigned & errorCode)
{ {
const H245_H2250LogicalChannelParameters * param; const H245_H2250LogicalChannelParameters * param = NULL;
const H245_DataType * dataType; const H245_DataType * dataType = NULL;
H323Channel::Directions direction; H323Channel::Directions direction;
if (startingFast && open.HasOptionalField(H245_OpenLogicalChannel::e_reverseLo gicalChannelParameters)) { if (startingFast && open.HasOptionalField(H245_OpenLogicalChannel::e_reverseLo gicalChannelParameters)) {
if (open.m_reverseLogicalChannelParameters.m_multiplexParameters.GetTag() != if (open.m_reverseLogicalChannelParameters.m_multiplexParameters.GetTag() !=
H245_OpenLogicalChannel_reverseLogicalChannelParameters_multiplexP arameters H245_OpenLogicalChannel_reverseLogicalChannelParameters_multiplexP arameters
::e_h2250LogicalChannelPar ameters) { ::e_h2250LogicalChannelPar ameters) {
errorCode = H245_OpenLogicalChannelReject_cause::e_unsuitableReverseParame ters; errorCode = H245_OpenLogicalChannelReject_cause::e_unsuitableReverseParame ters;
PTRACE(2, "H323\tCreateLogicalChannel - reverse channel, H225.0 only suppo rted"); PTRACE(2, "H323\tCreateLogicalChannel - reverse channel, H225.0 only suppo rted");
return NULL; return NULL;
} }
skipping to change at line 4654 skipping to change at line 4659
dataType = &open.m_forwardLogicalChannelParameters.m_dataType; dataType = &open.m_forwardLogicalChannelParameters.m_dataType;
param = &(const H245_H2250LogicalChannelParameters &) param = &(const H245_H2250LogicalChannelParameters &)
open.m_forwardLogicalChannelParameters.m_multiplexParamete rs; open.m_forwardLogicalChannelParameters.m_multiplexParamete rs;
direction = H323Channel::IsReceiver; direction = H323Channel::IsReceiver;
} }
unsigned sessionID = param->m_sessionID; unsigned sessionID = param->m_sessionID;
#ifdef H323_VIDEO #ifdef H323_VIDEO
#ifdef H323_H239 #ifdef H323_H239
if (sessionID == 0) {
if (IsH245Master()) {
// as master we assign the session ID
sessionID = GetExtVideoRTPSessionID();
const_cast<H245_H2250LogicalChannelParameters *>(param)->m_sessionID = ses
sionID; // TODO: make PDU (open) non-const all the way ?
PTRACE(2, "H323\tAssigned RTP session ID " << sessionID);
} else {
PTRACE(2, "H323\tCreateLogicalChannel - received RTP session ID 0 as slave
");
return NULL;
}
}
if (!startingFast && if (!startingFast &&
open.HasOptionalField(H245_OpenLogicalChannel::e_genericInformation)) { / / check for extended Video OLC open.HasOptionalField(H245_OpenLogicalChannel::e_genericInformation)) { / / check for extended Video OLC
unsigned roleLabel = 0; unsigned roleLabel = 0;
H323ChannelNumber channelnum = H323ChannelNumber(open.m_forwardLogicalChanne lNumber, TRUE); H323ChannelNumber channelnum = H323ChannelNumber(open.m_forwardLogicalChanne lNumber, TRUE);
const H245_ArrayOf_GenericInformation & cape = open.m_genericInformation; const H245_ArrayOf_GenericInformation & cape = open.m_genericInformation;
for (PINDEX i=0; i<cape.GetSize(); i++) { for (PINDEX i = 0; i < cape.GetSize(); i++) {
const H245_GenericMessage & gcap = cape[i]; const H245_GenericMessage & gcap = cape[i];
const PASN_ObjectId & object_id = gcap.m_messageIdentifier; const PASN_ObjectId & object_id = gcap.m_messageIdentifier;
if (object_id.AsString() == OpalPluginCodec_Identifer_H239_Video) { if (object_id.AsString() == OpalPluginCodec_Identifer_H239_Video) {
if (gcap.HasOptionalField(H245_GenericMessage::e_messageContent)) { if (gcap.HasOptionalField(H245_GenericMessage::e_messageContent)) {
const H245_ArrayOf_GenericParameter & params = gcap.m_messageCont ent; const H245_ArrayOf_GenericParameter & params = gcap.m_messageCont ent;
for (PINDEX j=0; j<params.GetSize(); j++) { for (PINDEX j = 0; j < params.GetSize(); j++) {
const H245_GenericParameter & content = params[j]; const H245_GenericParameter & content = params[j];
const H245_ParameterValue & paramval = content.m_parameterVal ue; const H245_ParameterValue & paramval = content.m_parameterVal ue;
if (paramval.GetTag() == H245_ParameterValue::e_booleanArray) { if (paramval.GetTag() == H245_ParameterValue::e_booleanArray) {
const PASN_Integer & val = paramval; const PASN_Integer & val = paramval;
roleLabel = val; roleLabel = val;
} }
} }
} }
OnReceivedExtendedVideoSession(roleLabel,channelnum); OnReceivedExtendedVideoSession(roleLabel, channelnum);
} }
} }
} }
#endif #endif
#endif // H323_VIDEO #endif // H323_VIDEO
// See if datatype is supported // See if datatype is supported
H323Capability * capability = localCapabilities.FindCapability(*dataType); H323Capability * capability = localCapabilities.FindCapability(*dataType);
if (capability == NULL) { if (capability == NULL) {
errorCode = H245_OpenLogicalChannelReject_cause::e_unknownDataType; errorCode = H245_OpenLogicalChannelReject_cause::e_unknownDataType;
skipping to change at line 4717 skipping to change at line 4734
if (!OnCreateLogicalChannel(*capability, direction, errorCode)) if (!OnCreateLogicalChannel(*capability, direction, errorCode))
return NULL; // If codec combination not supported, return error return NULL; // If codec combination not supported, return error
H323Channel * channel = capability->CreateChannel(*this, direction, sessionID, param); H323Channel * channel = capability->CreateChannel(*this, direction, sessionID, param);
if (channel == NULL) { if (channel == NULL) {
errorCode = H245_OpenLogicalChannelReject_cause::e_dataTypeNotAvailable; errorCode = H245_OpenLogicalChannelReject_cause::e_dataTypeNotAvailable;
PTRACE(2, "H323\tCreateLogicalChannel - data type not available"); PTRACE(2, "H323\tCreateLogicalChannel - data type not available");
return NULL; return NULL;
} }
#ifdef H323_H239
if ((channel->GetCapability().GetMainType() == H323Capability::e_Video)
&& (channel->GetCapability().GetSubType() == H245_VideoCapability::e_exten
dedVideoCapability)
&& !IsH245Master()) {
// as slave remember the session ID for H.239 that the master has used
SetExtVideoRTPSessionID(sessionID);
}
#endif // H323_H239
if (startingFast && if (startingFast &&
open.HasOptionalField(H245_OpenLogicalChannel::e_genericInformation)) open.HasOptionalField(H245_OpenLogicalChannel::e_genericInformation))
OnReceiveOLCGenericInformation(sessionID,open.m_genericInformation, fa lse); OnReceiveOLCGenericInformation(sessionID, open.m_genericInformation, f alse);
if (!channel->SetInitialBandwidth()) if (!channel->SetInitialBandwidth())
errorCode = H245_OpenLogicalChannelReject_cause::e_insufficientBandwidth; errorCode = H245_OpenLogicalChannelReject_cause::e_insufficientBandwidth;
else if (channel->OnReceivedPDU(open, errorCode)) else if (channel->OnReceivedPDU(open, errorCode))
return channel; return channel;
PTRACE(2, "H323\tOnReceivedPDU gave error " << errorCode); PTRACE(2, "H323\tOnReceivedPDU gave error " << errorCode);
delete channel; delete channel;
return NULL; return NULL;
} }
H323Channel * H323Connection::CreateRealTimeLogicalChannel(const H323Capability & capability, H323Channel * H323Connection::CreateRealTimeLogicalChannel(const H323Capability & capability,
H323Channel::Directio ns dir, H323Channel::Directio ns dir,
unsigned sessionID, unsigned sessionID,
const H245_H2250LogicalChannelParameters * param, const H245_H2250LogicalChannelParameters * param,
RTP_QOS * rtpqos) RTP_QOS * rtpqos)
{ {
#ifdef H323_H235 #ifdef H323_H235
if (PIsDescendant(&capability,H323SecureCapability)) { if (PIsDescendant(&capability, H323SecureCapability) || PIsDescendant(&capabil ity, H323SecureExtendedCapability)) {
// Override this function to add Secure ExternalRTPChannel Support // Override this function to add Secure ExternalRTPChannel Support
// H323Channel * extChannel = new H323_ExternalRTPChannel(*this, capabil ity, dir, sessionID, externalIpAddress, externalPort); // H323Channel * extChannel = new H323_ExternalRTPChannel(*this, capabil ity, dir, sessionID, externalIpAddress, externalPort);
// return new H323SecureChannel(this, capability, extChannel); // return new H323SecureChannel(this, capability, extChannel);
// call H323_ExternalRTPChannel::OnReadFrame(RTP_DataFrame & frame) and H323_ExternalRTPChannel::OnWriteFrame(RTP_DataFrame & frame) // call H323_ExternalRTPChannel::OnReadFrame(RTP_DataFrame & frame) and H323_ExternalRTPChannel::OnWriteFrame(RTP_DataFrame & frame)
// to encrypt and decrypt media // to encrypt and decrypt media
return NULL; return NULL;
} }
#endif #endif
skipping to change at line 4762 skipping to change at line 4788
#ifdef H323_H46026 #ifdef H323_H46026
H46026IsMediaTunneled() || H46026IsMediaTunneled() ||
#endif #endif
!param || !param->HasOptionalField(H245_H2250LogicalChannelParameters::e_me diaControlChannel)) { !param || !param->HasOptionalField(H245_H2250LogicalChannelParameters::e_me diaControlChannel)) {
// Make a fake transmprt address from the connection so gets initialised with // Make a fake transmprt address from the connection so gets initialised with
// the transport type (IP, IPX, multicast etc). // the transport type (IP, IPX, multicast etc).
H245_TransportAddress addr; H245_TransportAddress addr;
GetControlChannel().SetUpTransportPDU(addr, H323Transport::UseLocalTSAP) ; GetControlChannel().SetUpTransportPDU(addr, H323Transport::UseLocalTSAP) ;
session = UseSession(sessionID, addr, dir, rtpqos); session = UseSession(sessionID, addr, dir, rtpqos);
} else { } else {
session = UseSession(param->m_sessionID, param->m_mediaControlChannel, dir, rtpqos); session = UseSession(sessionID, param->m_mediaControlChannel, dir, rtpqos);
} }
if (session == NULL) if (session == NULL)
return NULL; return NULL;
return new H323_RTPChannel(*this, capability, dir, *session); return new H323_RTPChannel(*this, capability, dir, *session);
} }
PBoolean H323Connection::OnCreateLogicalChannel(const H323Capability & capabilit y, PBoolean H323Connection::OnCreateLogicalChannel(const H323Capability & capabilit y,
H323Channel::Directions dir, H323Channel::Directions dir,
skipping to change at line 4972 skipping to change at line 4998
void H323Connection::OnLogicalChannelJitter(H323Channel * channel, void H323Connection::OnLogicalChannelJitter(H323Channel * channel,
DWORD jitter, DWORD jitter,
int skippedFrameCount, int skippedFrameCount,
int additionalBuffer) int additionalBuffer)
{ {
if (channel != NULL) if (channel != NULL)
channel->OnJitterIndication(jitter, skippedFrameCount, additionalBuffer); channel->OnJitterIndication(jitter, skippedFrameCount, additionalBuffer);
} }
// TODO: the bandwidth value returned here is wrong, usually, 1280
unsigned H323Connection::GetBandwidthUsed() const unsigned H323Connection::GetBandwidthUsed() const
{ {
unsigned used = 0; unsigned used = 0;
for (PINDEX i = 0; i < logicalChannels->GetSize(); i++) { for (PINDEX i = 0; i < logicalChannels->GetSize(); i++) {
H323Channel * channel = logicalChannels->GetChannelAt(i); H323Channel * channel = logicalChannels->GetChannelAt(i);
if (channel != NULL) if (channel != NULL)
used += channel->GetBandwidthUsed(); used += channel->GetBandwidthUsed();
} }
skipping to change at line 5607 skipping to change at line 5634
} }
} }
} }
} }
PTRACE(4,"H46024A\tError finding Transport parameter " << id); PTRACE(4,"H46024A\tError finding Transport parameter " << id);
return false; return false;
} }
bool GetStringGenericOctetString(unsigned id, const H245_ArrayOf_GenericParamete r & params, PString & str) bool GetStringGenericOctetString(unsigned id, const H245_ArrayOf_GenericParamete r & params, PString & str)
{ {
for (PINDEX i=0; i < params.GetSize(); i++) for (PINDEX i = 0; i < params.GetSize(); i++) {
{ const H245_GenericParameter & param = params[i];
const H245_GenericParameter & param = params[i]; const H245_ParameterIdentifier & idm = param.m_parameterIdentifier;
const H245_ParameterIdentifier & idm = param.m_parameterIdentifier; if (idm.GetTag() == H245_ParameterIdentifier::e_standard) {
if (idm.GetTag() == H245_ParameterIdentifier::e_standard) { const PASN_Integer & idx = idm;
const PASN_Integer & idx = idm; if (idx == id) {
if (idx == id) { const H245_ParameterValue & genvalue = params[i].m_parameterValu
const H245_ParameterValue & genvalue = params[i].m_parameterValue; e;
if (genvalue.GetTag() == H245_ParameterValue::e_octetString) { if (genvalue.GetTag() == H245_ParameterValue::e_octetString) {
const PASN_OctetString & valg = genvalue; const PASN_OctetString & valg = genvalue;
PASN_IA5String data; PASN_IA5String data;
valg.DecodeSubType(data); if (valg.DecodeSubType(data)) {
str = data; str = data;
return true; return true;
} }
} }
} }
} }
}
PTRACE(4,"H46024A\tError finding String parameter " << id); PTRACE(4,"H46024A\tError finding String parameter " << id);
return false; return false;
} }
bool GetUnsignedGeneric(unsigned id, const H245_ArrayOf_GenericParameter & param s, unsigned & num) bool GetUnsignedGeneric(unsigned id, const H245_ArrayOf_GenericParameter & param s, unsigned & num)
{ {
for (PINDEX i=0; i < params.GetSize(); i++) for (PINDEX i=0; i < params.GetSize(); i++)
{ {
const H245_GenericParameter & param = params[i]; const H245_GenericParameter & param = params[i];
const H245_ParameterIdentifier & idm = param.m_parameterIdentifier; const H245_ParameterIdentifier & idm = param.m_parameterIdentifier;
skipping to change at line 5653 skipping to change at line 5680
} }
} }
} }
} }
PTRACE(4,"H46024A\tError finding unsigned parameter " << id); PTRACE(4,"H46024A\tError finding unsigned parameter " << id);
return false; return false;
} }
bool GetTransportGenericOctetString(unsigned id, const H245_ArrayOf_GenericParam eter & params, H323TransportAddress & str) bool GetTransportGenericOctetString(unsigned id, const H245_ArrayOf_GenericParam eter & params, H323TransportAddress & str)
{ {
for (PINDEX i=0; i < params.GetSize(); i++) for (PINDEX i = 0; i < params.GetSize(); i++) {
{ const H245_GenericParameter & param = params[i];
const H245_GenericParameter & param = params[i]; const H245_ParameterIdentifier & idm = param.m_parameterIdentifier;
const H245_ParameterIdentifier & idm = param.m_parameterIdentifier; if (idm.GetTag() == H245_ParameterIdentifier::e_standard) {
if (idm.GetTag() == H245_ParameterIdentifier::e_standard) { const PASN_Integer & idx = idm;
const PASN_Integer & idx = idm; if (idx == id) {
if (idx == id) { const H245_ParameterValue & genvalue = params[i].m_parameterValu
const H245_ParameterValue & genvalue = params[i].m_parameterValue; e;
if (genvalue.GetTag() == H245_ParameterValue::e_octetString) { if (genvalue.GetTag() == H245_ParameterValue::e_octetString) {
const PASN_OctetString & valg = genvalue; const PASN_OctetString & valg = genvalue;
H245_TransportAddress addr; H245_TransportAddress addr;
valg.DecodeSubType(addr); if (valg.DecodeSubType(addr)) {
str = H323TransportAddress(addr); str = H323TransportAddress(addr);
return true; return true;
} }
} }
} }
} }
return false; }
return false;
} }
H245_GenericParameter & BuildGenericOctetString(H245_GenericParameter & param, u nsigned id, const PASN_Object & data) H245_GenericParameter & BuildGenericOctetString(H245_GenericParameter & param, u nsigned id, const PASN_Object & data)
{ {
H245_ParameterIdentifier & idm = param.m_parameterIdentifier; H245_ParameterIdentifier & idm = param.m_parameterIdentifier;
idm.SetTag(H245_ParameterIdentifier::e_standard); idm.SetTag(H245_ParameterIdentifier::e_standard);
PASN_Integer & idx = idm; PASN_Integer & idx = idm;
idx = id; idx = id;
H245_ParameterValue & genvalue = param.m_parameterValue; H245_ParameterValue & genvalue = param.m_parameterValue;
genvalue.SetTag(H245_ParameterValue::e_octetString); genvalue.SetTag(H245_ParameterValue::e_octetString);
skipping to change at line 5749 skipping to change at line 5776
for (PINDEX i=0; i < params.GetSize(); i++) for (PINDEX i=0; i < params.GetSize(); i++)
{ {
const H245_GenericParameter & param = params[i]; const H245_GenericParameter & param = params[i];
const H245_ParameterIdentifier & idm = param.m_parameterIdentifier; const H245_ParameterIdentifier & idm = param.m_parameterIdentifier;
if (idm.GetTag() == H245_ParameterIdentifier::e_standard) { if (idm.GetTag() == H245_ParameterIdentifier::e_standard) {
const PASN_Integer & idx = idm; const PASN_Integer & idx = idm;
if (idx == id) { if (idx == id) {
const H245_ParameterValue & genvalue = params[i].m_parameterValue; const H245_ParameterValue & genvalue = params[i].m_parameterValue;
if (genvalue.GetTag() == H245_ParameterValue::e_octetString) { if (genvalue.GetTag() == H245_ParameterValue::e_octetString) {
const PASN_OctetString & xval = genvalue; const PASN_OctetString & xval = genvalue;
xval.DecodeSubType(val); if (xval.DecodeSubType(val))
return true; return true;
} }
} }
} }
} }
PTRACE(4,"H46024B\tError finding H46024BRequest " << id); PTRACE(4,"H46024B\tError finding H46024BRequest " << id);
return false; return false;
} }
void BuildH46024BResponse(H323ControlPDU & pdu) void BuildH46024BResponse(H323ControlPDU & pdu)
{ {
H245_GenericMessage & cap = pdu.Build(H245_ResponseMessage::e_genericRespons e); H245_GenericMessage & cap = pdu.Build(H245_ResponseMessage::e_genericRespons e);
H245_CapabilityIdentifier & id = cap.m_messageIdentifier; H245_CapabilityIdentifier & id = cap.m_messageIdentifier;
id.SetTag(H245_CapabilityIdentifier::e_standard); id.SetTag(H245_CapabilityIdentifier::e_standard);
PASN_ObjectId & gid = id; PASN_ObjectId & gid = id;
gid.SetValue(H46024BOID); gid.SetValue(H46024BOID);
skipping to change at line 6940 skipping to change at line 6967
m_H46026enabled = true; m_H46026enabled = true;
#ifdef H323_H46018 #ifdef H323_H46018
if (features->HasFeature(19)) { if (features->HasFeature(19)) {
H460_Feature * feat = features->GetFeature(19); H460_Feature * feat = features->GetFeature(19);
if (feat) { if (feat) {
PTRACE(4,"H46026\tDisabling H.460.19 support for call"); PTRACE(4,"H46026\tDisabling H.460.19 support for call");
((H460_FeatureStd19 *)feat)->SetAvailable(false); ((H460_FeatureStd19 *)feat)->SetAvailable(false);
} }
} }
m_H46019enabled = false; m_H46019enabled = false;
#endif #endif // H323_H46018
} }
PBoolean H323Connection::H46026IsMediaTunneled() PBoolean H323Connection::H46026IsMediaTunneled()
{ {
return m_H46026enabled; return m_H46026enabled;
} }
#endif // H323_H46026 #endif // H323_H46026
#ifdef H323_H460COM #ifdef H323_H460COM
void H323Connection::OnRemoteVendorInformation(const PString & product, const PS tring & version) void H323Connection::OnRemoteVendorInformation(const PString & product, const PS tring & version)
{ {
} }
#endif #endif // H323_H460COM
#ifdef H323_H461 #ifdef H323_H461
// Normally first message will be a listRequest. ie (4) // Normally first message will be a listRequest. ie (4)
H323Connection::H461MessageInfo::H461MessageInfo() H323Connection::H461MessageInfo::H461MessageInfo()
: m_message(4), m_assocToken(PString()), m_callToken(PString()), : m_message(4), m_assocToken(PString()), m_callToken(PString()),
m_applicationID(-1), m_invokeToken(PString()), m_aliasAddress(PString()), m_ap proved(false) m_applicationID(-1), m_invokeToken(PString()), m_aliasAddress(PString()), m_ap proved(false)
{ {
} }
skipping to change at line 6991 skipping to change at line 7018
m_H461Info.m_applicationID = applicationID; m_H461Info.m_applicationID = applicationID;
m_H461Info.m_invokeToken = invokeToken; m_H461Info.m_invokeToken = invokeToken;
m_H461Info.m_aliasAddress = aliasAddress; m_H461Info.m_aliasAddress = aliasAddress;
m_H461Info.m_approved = approved; m_H461Info.m_approved = approved;
} }
H323Connection::H461MessageInfo & H323Connection::GetH461MessageInfo() H323Connection::H461MessageInfo & H323Connection::GetH461MessageInfo()
{ {
return m_H461Info; return m_H461Info;
} }
#endif #endif // H323_H461
#endif // H323_H461 #endif // H323_H461
PBoolean H323Connection::OnH245AddressConflict() PBoolean H323Connection::OnH245AddressConflict()
{ {
#ifdef H323_H46018 // if the other side requests us to start a H.245 channel, we always do that
return m_H46019enabled; instead of insisting that we already opened a listener
#else return true;
return false;
#endif
} }
PBoolean H323Connection::OnSendFeatureSet(unsigned code, H225_FeatureSet & feats , PBoolean advertise) const PBoolean H323Connection::OnSendFeatureSet(unsigned code, H225_FeatureSet & feats , PBoolean advertise) const
{ {
#ifdef H323_H460 #ifdef H323_H460
if (disableH460) if (disableH460)
return FALSE; return FALSE;
return features->SendFeature(code, feats, advertise); return features->SendFeature(code, feats, advertise);
#else #else
skipping to change at line 7464 skipping to change at line 7488
} }
void H323Connection::OpenExtendedVideoSessionDenied() void H323Connection::OpenExtendedVideoSessionDenied()
{ {
PTRACE(2,"H239\tOpen Request denied from remote"); PTRACE(2,"H239\tOpen Request denied from remote");
} }
PBoolean H323Connection::OpenExtendedVideoSession(H323ChannelNumber & num, int d efaultSession) PBoolean H323Connection::OpenExtendedVideoSession(H323ChannelNumber & num, int d efaultSession)
{ {
PBoolean applicationOpen = false; PBoolean applicationOpen = false;
// First need to check if extended video channel is opened
if (logicalChannels->FindChannelBySession(OpalMediaFormat::DefaultExtVideoSess
ionID, false) ||
logicalChannels->FindChannelBySession(defaultSession, false)) {// is opene
d
PTRACE(3, "Extended video channel is opened, no need open it");
return true;
}
// extended video channel is not opened, try to open it
for (PINDEX i = 0; i < localCapabilities.GetSize(); i++) { for (PINDEX i = 0; i < localCapabilities.GetSize(); i++) {
H323Capability & localCapability = localCapabilities[i]; H323Capability & localCapability = localCapabilities[i];
if ((localCapability.GetMainType() == H323Capability::e_Video) && if ((localCapability.GetMainType() == H323Capability::e_Video) &&
(localCapability.GetSubType() == H245_VideoCapability::e_extendedVideoCa pability)) { (localCapability.GetSubType() == H245_VideoCapability::e_extendedVideoCa pability)) {
H323ExtendedVideoCapability * remoteCapability = (H323ExtendedVideoCapabil ity *)remoteCapabilities.FindCapability(localCapability); H323ExtendedVideoCapability * remoteCapability = (H323ExtendedVideoCapabil ity *)remoteCapabilities.FindCapability(localCapability);
if (remoteCapability != NULL) { if (remoteCapability != NULL) {
PTRACE(3, "H323\tApplication Available " << *remoteCapability); PTRACE(3, "H323\tApplication Available " << *remoteCapability);
for (PINDEX j = 0; j < remoteCapability->GetSize(); j++) { #ifdef H323_H235
// SessionID must be 0 becouse otherwise Tandberg will reject the OLC. H323SecureExtendedCapability* secureCap = dynamic_cast<H323SecureExtende
if (logicalChannels->Open(remoteCapability[j], defaultSession ,num)) { dCapability*>(remoteCapability);
if (secureCap) { // this is case of H.235
if (logicalChannels->Open(*secureCap, defaultSession, num)) {
applicationOpen = TRUE; applicationOpen = TRUE;
break; break;
} else { } else {
PTRACE(2, "H323\tApplication OpenLogicalChannel failed: " << *remot PTRACE(2, "H323\tApplication OpenLogicalChannel failed: " << *secur
eCapability); eCap);
}
} else
#endif
{ // this is case of normal
for (PINDEX j = 0; j < remoteCapability->GetSize(); j++) {
if (logicalChannels->Open(remoteCapability[j], defaultSession, num))
{
applicationOpen = TRUE;
break;
} else {
PTRACE(2, "H323\tApplication OpenLogicalChannel failed: " << *rem
oteCapability);
}
} }
} }
if (applicationOpen) if (applicationOpen)
break; break;
} }
} }
} }
return applicationOpen; return applicationOpen;
} }
PBoolean H323Connection::CloseExtendedVideoSession(const H323ChannelNumber & num ) PBoolean H323Connection::CloseExtendedVideoSession(const H323ChannelNumber & num )
{ {
CloseLogicalChannel(num,num.IsFromRemote()); CloseLogicalChannel(num, num.IsFromRemote());
return TRUE; return TRUE;
} }
PBoolean H323Connection::OpenExtendedVideoChannel(PBoolean isEncoding,H323VideoC odec & codec) PBoolean H323Connection::OpenExtendedVideoChannel(PBoolean isEncoding,H323VideoC odec & codec)
{ {
return endpoint.OpenExtendedVideoChannel(*this, isEncoding, codec); return endpoint.OpenExtendedVideoChannel(*this, isEncoding, codec);
} }
unsigned H323Connection::GetExtVideoRTPSessionID() const
{
if (IsH245Master()) {
return 32; // TODO: make a constant ?
} else {
return h239SessionID;
}
}
#endif // H323_H239 #endif // H323_H239
#endif // NO_H323_VIDEO #endif // NO_H323_VIDEO
#ifdef H323_H230 #ifdef H323_H230
PBoolean H323Connection::OpenConferenceControlSession(PBoolean & chairControl, P Boolean & extControls) PBoolean H323Connection::OpenConferenceControlSession(PBoolean & chairControl, P Boolean & extControls)
{ {
chairControl = FALSE; chairControl = FALSE;
extControls = FALSE; extControls = FALSE;
for (PINDEX i = 0; i < localCapabilities.GetSize(); i++) { for (PINDEX i = 0; i < localCapabilities.GetSize(); i++) {
H323Capability & localCapability = localCapabilities[i]; H323Capability & localCapability = localCapabilities[i];
 End of changes. 26 change blocks. 
65 lines changed or deleted 130 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)