[Opalvoip-svn] SF.net SVN: opalvoip:[29611] opal/trunk
Brought to you by:
csoutheren,
rjongbloed
From: <rjo...@us...> - 2013-04-30 15:54:37
|
Revision: 29611 http://sourceforge.net/p/opalvoip/code/29611 Author: rjongbloed Date: 2013-04-30 15:54:32 +0000 (Tue, 30 Apr 2013) Log Message: ----------- Merged revision(s) 29608-29610 from opal/branches/v3_12: --------------------- r29610 Changed method of detecting secure signalling channel (TLS) when allowing SRTP in a SIP call. More tolerant in the face of others failures. --------------------- r29609 Be more forgiving of incorrect SAVP indication in SDP. If have "crypto" attribute, then must be SAVP even if it says AVP. Revision Links: -------------- http://sourceforge.net/p/opalvoip/code/29610 http://sourceforge.net/p/opalvoip/code/29609 Modified Paths: -------------- opal/trunk/include/sip/sipcon.h opal/trunk/src/sip/sdp.cxx Property Changed: ---------------- opal/trunk/ Index: opal/trunk =================================================================== --- opal/trunk 2013-04-30 15:29:50 UTC (rev 29610) +++ opal/trunk 2013-04-30 15:54:32 UTC (rev 29611) Property changes on: opal/trunk ___________________________________________________________________ Modified: svn:mergeinfo ## -6,7 +6,7 ## /opal/branches/csoutheren/LalandeBranch1:23412-23413,23415,23424,23510,23516,23553,23577,23607,23669,23724,23742-23744,23747-23748,23755,23758,23780,23788,23848,23850,23856 /opal/branches/rjongbloed/BarnardPlus:20584,20656,20749,20751,20756,20762,20786,20789,20814,20820,20829,20831,20841,20843,20923,20927,20938,22016-22017,22518,22582,22941 /opal/branches/v3_10:25182-29485 -/opal/branches/v3_12:28489-29607 +/opal/branches/v3_12:28489-29610 /opal/branches/v3_2:21143,21220,21227,21253,21455 /opal/branches/v3_4:21060,21062,21088,21092,21111,21113,21115,21119,21143,21148,21151-21152,21155,21158,21184,21188,21253,21265-21266,21283-21284,21298,21300,21303,21307,21309,21311,21327,21331,21333,21359,21367,21369,21488,21556,21564-21565,21568,21570,21620,21625,21631,21748,21751,21756,21759,21761,21767,21770,22246,23044,23140,23143,23286 /opal/branches/v3_6:22169,22178,22184,22186,22197,22204,22216,22251,22253,22255,22258,22260,22291,22296,22300,22306,22308,22313,22319,22336,22353,22358,22436,22447,22449,22497,22511,22517,22519-22521,22527,22536,22538,22589,22596,22599,22617,22620,22622,22630,22640,22655,22675,22682,22726-22728,22730,22733,22738,22745-22746,22800,22820-22821,22842,22844-22845,22851,22853,22889,22896,22902,22904,22906,22918,22924,22928,22946,22965,22967,22976,22978,22980,22982,22994,23028,23123,23125-23126,23128,23157,23165,23173,23175,23183,23294,23341,23465,23467,23474,23521,23829,24346,24809 \ No newline at end of property Modified: opal/trunk/include/sip/sipcon.h =================================================================== --- opal/trunk/include/sip/sipcon.h 2013-04-30 15:29:50 UTC (rev 29610) +++ opal/trunk/include/sip/sipcon.h 2013-04-30 15:54:32 UTC (rev 29611) @@ -738,7 +738,7 @@ void UpdateRemoteAddresses(); #if OPAL_SRTP - virtual bool CanDoSRTP() const { return m_dialog.GetRequestURI().GetTransportProto() == "tls"; } + virtual bool CanDoSRTP() const { return m_dialog.GetRemoteTransportAddress(m_dnsEntry).GetProtoPrefix() == OpalTransportAddress::TlsPrefix(); } #endif void NotifyDialogState( Modified: opal/trunk/src/sip/sdp.cxx =================================================================== --- opal/trunk/src/sip/sdp.cxx 2013-04-30 15:29:50 UTC (rev 29610) +++ opal/trunk/src/sip/sdp.cxx 2013-04-30 15:54:32 UTC (rev 29611) @@ -286,6 +286,12 @@ mediaFormat.SetPayloadType(m_payloadType); mediaFormat.SetOptionInteger(OpalAudioFormat::ChannelsOption(), m_parameters.IsEmpty() ? 1 : m_parameters.AsUnsigned()); +#if OPAL_VIDEO + // Save the RTCP feedback (RFC4585) capability. + if (m_rtcp_fb != OpalVideoFormat::e_NoRTCPFb && !m_parent.GetOptionStrings().GetBoolean(OPAL_OPT_FORCE_RTCP_FB)) + mediaFormat.SetOptionEnum(OpalVideoFormat::RTCPFeedbackOption(), m_rtcp_fb); +#endif + // Fill in the default values for (possibly) missing FMTP options for (PINDEX i = 0; i < mediaFormat.GetOptionCount(); i++) { OpalMediaOption & option = const_cast<OpalMediaOption &>(mediaFormat.GetOption(i)); @@ -298,6 +304,10 @@ if (mediaFormat.SetOptionString("FMTP", m_fmtp)) return; + // No FMTP to parse, may as well stop here + if (m_fmtp.IsEmpty()) + return; + // Look for a specific option with "FMTP" as it's name, it is the whole thing then for (PINDEX i = 0; i < mediaFormat.GetOptionCount(); i++) { const OpalMediaOption & option = mediaFormat.GetOption(i); @@ -307,10 +317,6 @@ } } - // No FMTP to parse, may as well stop here - if (m_fmtp.IsEmpty()) - return; - // Save the raw 'fmtp=' line so it is available for information purposes. mediaFormat.AddOption(new OpalMediaOptionString("RawFMTP", false, m_fmtp), true); @@ -1045,7 +1051,7 @@ bool SDPCryptoSuite::Decode(const PString & sdp) { - if (sdp.GetLength() < 7 || sdp[0] < '1' || sdp[0] > '2' || sdp[1] != ' ') + if (sdp.GetLength() < 7 || sdp[0] < '1' || sdp[0] > '9' || sdp[1] != ' ') return false; m_tag = sdp[0] - '0'; @@ -1302,8 +1308,11 @@ if (attr *= "crypto") { SDPCryptoSuite * cryptoSuite = new SDPCryptoSuite(0); - if (cryptoSuite->Decode(value)) + if (cryptoSuite->Decode(value)) { m_cryptoSuites.Append(cryptoSuite); + if (m_transportType == OpalRTPSession::RTP_AVP()) + m_transportType = OpalSRTPSession::RTP_SAVP(); + } else { delete cryptoSuite; PTRACE(2, "SDP\tCannot decode SDP crypto attribute: \"" << value << '"'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |