rpms/opal/F-7 ekiga-429076-42.patch, NONE, 1.1 ekiga-429076-50.patch, NONE, 1.1 opal.spec, 1.19, 1.20 rfc2833_duration.patch, 1.1, NONE

Daniel Veillard (veillard) fedora-extras-commits at redhat.com
Wed Aug 22 10:26:52 UTC 2007


Author: veillard

Update of /cvs/pkgs/rpms/opal/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16234

Modified Files:
	opal.spec 
Added Files:
	ekiga-429076-42.patch ekiga-429076-50.patch 
Removed Files:
	rfc2833_duration.patch 
Log Message:
Preparing update with CISCO support, removing old patch, Daniel


ekiga-429076-42.patch:

--- NEW FILE ekiga-429076-42.patch ---
diff -uNr opal-2.2.8/src/opal/transcoders.cxx opal-cvs/src/opal/transcoders.cxx
--- opal-2.2.8/src/opal/transcoders.cxx	2006-12-31 18:00:48.000000000 +0100
+++ opal-cvs/src/opal/transcoders.cxx	2007-04-15 11:55:35.000000000 +0200
@@ -24,6 +24,9 @@
  * Contributor(s): ______________________________________.
  *
  * $Log: transcoders.cxx,v $
+ * Revision 2.17.2.4  2007/04/15 09:55:35  dsandras
+ * Do not try converting input frames with a payload size of 0.
+ *
  * Revision 2.17.2.3  2006/12/31 17:00:48  dsandras
  * Do not try transcoding RTP frames if they do not correspond to the formats
  * for which the transcoder was created.
@@ -188,6 +191,9 @@
 {
   RTP_DataFrame::PayloadTypes pt;
 
+  if (input.GetPayloadSize()==0)
+    return TRUE;
+
   if (output.IsEmpty())
     output.Append(new RTP_DataFrame);
   else {
diff -uNr opal-2.2.8/src/sip/sipcon.cxx opal-cvs/src/sip/sipcon.cxx
--- opal-2.2.8/src/sip/sipcon.cxx	2007-03-15 22:19:48.000000000 +0100
+++ opal-cvs/src/sip/sipcon.cxx	2007-04-15 11:54:46.000000000 +0200
@@ -24,6 +24,14 @@
  * Contributor(s): ______________________________________.
  *
  * $Log: sipcon.cxx,v $
+ * Revision 2.120.2.27  2007/04/15 09:54:46  dsandras
+ * Some systems like CISCO Call Manager do like having a Contact field in INVITE
+ * PDUs which is different to the one being used in the original REGISTER request.
+ * Added code to use the same Contact field in both cases if we can determine that
+ * we are registered to that specific account and if there is a transport running.
+ * Fixed problem where the SIP connection was not released with a BYE PDU when
+ * the ACK is received while we are already in EstablishedPhase.
+ *
  * Revision 2.120.2.26  2007/03/15 21:19:48  dsandras
  * Make sure lastTransportAddress is correctly initialized even when
  * uncompliant SIP PDUs are received.
@@ -931,8 +939,8 @@
   }
 
   // send the 200 OK response
-  PString userName = endpoint.GetRegisteredPartyName(SIPURL(remotePartyAddress).GetHostName()).GetUserName();
-  SIPURL contact = endpoint.GetLocalURL(*transport, userName);
+  PString userName = endpoint.GetRegisteredPartyName(SIPURL(localPartyAddress).GetHostName()).GetUserName();
+  SIPURL contact = endpoint.GetContactURL(*transport, userName, SIPURL(localPartyAddress).GetHostName());
   SIP_PDU response(*originalInvite, SIP_PDU::Successful_OK, (const char *) contact.AsQuotedString());
   response.SetSDP(sdpOut);
   SendPDU(response, originalInvite->GetViaAddress(endpoint)); 
@@ -1818,8 +1826,8 @@
 
   
     // send the 200 OK response
-    PString userName = endpoint.GetRegisteredPartyName(SIPURL(remotePartyAddress).GetHostName()).GetUserName();
-    SIPURL contact = endpoint.GetLocalURL(*transport, userName);
+    PString userName = endpoint.GetRegisteredPartyName(SIPURL(localPartyAddress).GetHostName()).GetUserName();
+    SIPURL contact = endpoint.GetContactURL(*transport, userName, SIPURL(localPartyAddress).GetHostName());
     SIP_PDU response(*originalInvite, SIP_PDU::Successful_OK, (const char *) contact.AsQuotedString ());
     response.SetSDP(sdpOut);
     SendPDU(response, originalInvite->GetViaAddress(endpoint));
@@ -1909,17 +1917,17 @@
     StartMediaStreams();
   }
   
-  // start all of the media threads for the connection
+  releaseMethod = ReleaseWithBYE;
   if (phase != ConnectedPhase)  
     return;
   
-  releaseMethod = ReleaseWithBYE;
   SetPhase(EstablishedPhase);
   OnEstablished();
 
   // HACK HACK HACK: this is a work-around for a deadlock that can occur
   // during incoming calls. What is needed is a proper resequencing that
   // avoids this problem
+  // start all of the media threads for the connection
   StartMediaStreams();
 }
 
diff -uNr opal-2.2.8/src/sip/sipep.cxx opal-cvs/src/sip/sipep.cxx
--- opal-2.2.8/src/sip/sipep.cxx	2007-03-27 23:52:45.000000000 +0200
+++ opal-cvs/src/sip/sipep.cxx	2007-04-17 23:50:19.000000000 +0200
@@ -24,6 +24,19 @@
  * Contributor(s): ______________________________________.
  *
  * $Log: sipep.cxx,v $
+ * Revision 2.97.2.38  2007/04/17 21:50:19  dsandras
+ * Fixed Via field in previous commit.
+ * Make sure the correct port is being used.
+ * Improved FindSIPInfoByDomain.
+ *
+ * Revision 2.97.2.37  2007/04/15 09:54:46  dsandras
+ * Some systems like CISCO Call Manager do like having a Contact field in INVITE
+ * PDUs which is different to the one being used in the original REGISTER request.
+ * Added code to use the same Contact field in both cases if we can determine that
+ * we are registered to that specific account and if there is a transport running.
+ * Fixed problem where the SIP connection was not released with a BYE PDU when
+ * the ACK is received while we are already in EstablishedPhase.
+ *
  * Revision 2.97.2.36  2007/03/27 21:52:45  dsandras
  * Added more PTRACE statements
  *
@@ -669,7 +682,7 @@
 			  registrationAddress, 
 			  registrationID, 
 			  unregister ? 0 : expire,
-        retryTimeoutMin, retryTimeoutMax);
+                          retryTimeoutMin, retryTimeoutMax);
 }
 
 void SIPRegisterInfo::OnSuccess ()
@@ -2023,6 +2036,17 @@
 }
 
 
+SIPURL SIPEndPoint::GetContactURL(const OpalTransport &transport, const PString & userName, const PString & host)
+{
+  PSafePtr<SIPInfo> info = activeSIPInfo.FindSIPInfoByDomain(host, SIP_PDU::Method_REGISTER, PSafeReadOnly);
+  
+  if (info == NULL || info->GetTransport() == NULL) 
+    return GetLocalURL(transport, userName);
+  else
+    return GetLocalURL(*info->GetTransport(), userName);
+}
+
+
 SIPURL SIPEndPoint::GetLocalURL(const OpalTransport &transport, const PString & userName)
 {
   PIPSocket::Address ip(PIPSocket::GetDefaultIpAny());
@@ -2040,10 +2064,7 @@
     PIPSocket::Address remoteIP;
     if (transport.GetRemoteAddress().GetIpAddress(remoteIP)) {
       GetManager().TranslateIPAddress(localIP, remoteIP); 	 
-      PIPSocket::Address _localIP(localIP);
-      PSTUNClient * stun = manager.GetSTUN(remoteIP);
-      if (stun != NULL || localIP != _localIP)
-	contactPort = localPort;
+      contactPort = localPort;
       contactAddress = OpalTransportAddress(localIP, contactPort, "udp");
     }
   }
diff -uNr opal-2.2.8/src/sip/sippdu.cxx opal-cvs/src/sip/sippdu.cxx
--- opal-2.2.8/src/sip/sippdu.cxx	2007-03-27 22:18:13.000000000 +0200
+++ opal-cvs/src/sip/sippdu.cxx	2007-04-17 23:50:19.000000000 +0200
@@ -24,6 +24,19 @@
  * Contributor(s): ______________________________________.
  *
  * $Log: sippdu.cxx,v $
+ * Revision 2.83.2.15  2007/04/17 21:50:19  dsandras
+ * Fixed Via field in previous commit.
+ * Make sure the correct port is being used.
+ * Improved FindSIPInfoByDomain.
+ *
+ * Revision 2.83.2.14  2007/04/15 09:54:47  dsandras
+ * Some systems like CISCO Call Manager do like having a Contact field in INVITE
+ * PDUs which is different to the one being used in the original REGISTER request.
+ * Added code to use the same Contact field in both cases if we can determine that
+ * we are registered to that specific account and if there is a transport running.
+ * Fixed problem where the SIP connection was not released with a BYE PDU when
+ * the ACK is received while we are already in EstablishedPhase.
+ *
  * Revision 2.83.2.13  2007/03/27 20:18:13  dsandras
  * Added missing mutex.
  *
@@ -1637,7 +1650,8 @@
 {
   SIPEndPoint & endpoint = connection.GetEndPoint();
   PString localPartyName = connection.GetLocalPartyName();
-  SIPURL contact = endpoint.GetLocalURL(transport, localPartyName);
+  SIPURL contact = endpoint.GetContactURL(transport, localPartyName, SIPURL(connection.GetRemotePartyAddress()).GetHostName());
+  SIPURL via = endpoint.GetLocalURL(transport, localPartyName);
   mime.SetContact(contact);
 
   SIPURL targetAddress = connection.GetTargetAddress();
@@ -1649,7 +1663,7 @@
             connection.GetLocalPartyAddress(),
             connection.GetToken(),
             connection.GetNextCSeq(),
-            contact.GetHostAddress());
+            via.GetHostAddress());
 
   SetRoute(connection); // Possibly adjust the URI and the route
 }
diff -uNr opal-2.2.8/include/sip/sipep.h opal-cvs/include/sip/sipep.h
--- opal-2.2.8/include/sip/sipep.h	2007-03-27 22:23:22.000000000 +0200
+++ opal-cvs/include/sip/sipep.h	2007-04-17 23:50:19.000000000 +0200
@@ -25,6 +25,19 @@
  * Contributor(s): ______________________________________.
  *
  * $Log: sipep.h,v $
+ * Revision 2.46.2.17  2007/04/17 21:50:19  dsandras
+ * Fixed Via field in previous commit.
+ * Make sure the correct port is being used.
+ * Improved FindSIPInfoByDomain.
+ *
+ * Revision 2.46.2.16  2007/04/15 09:54:47  dsandras
+ * Some systems like CISCO Call Manager do like having a Contact field in INVITE
+ * PDUs which is different to the one being used in the original REGISTER request.
+ * Added code to use the same Contact field in both cases if we can determine that
+ * we are registered to that specific account and if there is a transport running.
+ * Fixed problem where the SIP connection was not released with a BYE PDU when
+ * the ACK is received while we are already in EstablishedPhase.
+ *
  * Revision 2.46.2.15  2007/03/27 20:23:22  dsandras
  * Added Garbage collector. Make sure the transport is closed before
  * deleting it. Better handling of SIPInfo objects.
@@ -872,6 +885,20 @@
     virtual SIPURL GetDefaultRegisteredPartyName();
     
 
+    /**Return the contact URL for the given host and user name
+     * based on the listening port of the registration to that host.
+     * 
+     * That URL can be used as as contact field in outgoing
+     * requests.
+     *
+     * The URL is translated if required.
+     *
+     * If no active registration is used, return the result of GetLocalURL
+     * on the given transport.
+     */
+    SIPURL GetContactURL(const OpalTransport &transport, const PString & userName, const PString & host);
+
+
     /**Return the local URL for the given transport and user name.
      * That URL can be used as via address, and as contact field in outgoing
      * requests.
@@ -1008,10 +1035,25 @@
 	     */
 	    PSafePtr <SIPInfo> FindSIPInfoByDomain (const PString & name, SIP_PDU::Methods meth, PSafetyMode m)
 	    {
-	      OpalTransportAddress addr = name;
 	      for (PSafePtr<SIPInfo> info(*this, m); info != NULL; ++info) {
-                if (info->IsRegistered() && (name == info->GetRegistrationAddress().GetHostName() || (info->GetTransport() && addr.GetHostName() == info->GetTransport()->GetRemoteAddress().GetHostName())) && meth == info->GetMethod())
+
+                if (name == info->GetRegistrationAddress().GetHostName())
                   return info;
+
+                OpalTransportAddress addr;
+                PIPSocket::Address infoIP;
+                PIPSocket::Address nameIP;
+                WORD port = 5060;
+                addr = name;
+
+                if (addr.GetIpAndPort (nameIP, port)) {
+                  addr = info->GetRegistrationAddress().GetHostName();
+                  if (addr.GetIpAndPort (infoIP, port)) {
+                    if (infoIP == nameIP) {
+                      return info;
+                    }
+                  }
+                }
 	      }
 	      return NULL;
 	    }

ekiga-429076-50.patch:

--- NEW FILE ekiga-429076-50.patch ---
Index: src/sip/sipcon.cxx
===================================================================
RCS file: /cvsroot/openh323/opal/src/sip/sipcon.cxx,v
retrieving revision 2.120.2.27
diff -u -r2.120.2.27 sipcon.cxx
--- src/sip/sipcon.cxx	15 Apr 2007 09:54:46 -0000	2.120.2.27
+++ src/sip/sipcon.cxx	18 Apr 2007 22:26:23 -0000
@@ -1015,6 +1015,11 @@
     PTRACE(2, "SIP\tCould not find matching media type for session " << rtpSessionId);
     return FALSE;
   }
+
+  if (incomingMedia->GetMediaFormats(rtpSessionId).GetSize() == 0) {
+    PTRACE(1, "SIP\tCould not find media formats in SDP media description for session " << rtpSessionId);
+    return FALSE;
+  }
   
   // Create the list of Opal format names for the remote end.
   // We will answer with the media format that will be opened.
@@ -1043,7 +1048,18 @@
   OpalTransportAddress mediaAddress = incomingMedia->GetTransportAddress();
   rtpSession = OnUseRTPSession(rtpSessionId, mediaAddress, localAddress);
   if (rtpSession == NULL && !ownerCall.IsMediaBypassPossible(*this, rtpSessionId)) {
-    Release(EndedByTransportFail);
+    if (rtpSessionId == OpalMediaFormat::DefaultAudioSessionID) 
+      Release(EndedByTransportFail);
+    return FALSE;
+  }
+  
+  // set the remote address
+  PIPSocket::Address ip;
+  WORD port;
+  if (!mediaAddress.GetIpAndPort(ip, port) || (rtpSession && !rtpSession->SetRemoteSocketInfo(ip, port, TRUE))) {
+    PTRACE(1, "SIP\tCannot set remote ports on RTP session");
+    if (rtpSessionId == OpalMediaFormat::DefaultAudioSessionID) 
+      Release(EndedByTransportFail);
     return FALSE;
   }
 
@@ -1062,17 +1078,6 @@
     localMedia->AddSDPMediaFormat(new SDPMediaFormat("0-15", rfc2833Handler->GetPayloadType()));
   }
   
-  // set the remote address after the stream is opened
-  PIPSocket::Address ip;
-  WORD port;
-  mediaAddress.GetIpAndPort(ip, port);
-  if (rtpSession && !rtpSession->SetRemoteSocketInfo(ip, port, TRUE)) {
-    PTRACE(1, "SIP\tCannot set remote ports on RTP session");
-    Release(EndedByTransportFail);
-    delete localMedia;
-    return FALSE;
-  }
-  
   // No stream opened for this session, use the default SDP
   if (reverseStreamsFailed) {
     SDPSessionDescription *sdp = (SDPSessionDescription *) &sdpOut;
@@ -2261,12 +2266,28 @@
     return FALSE;
   }
 
+  if (mediaDescription->GetMediaFormats(rtpSessionId).GetSize() == 0) {
+    PTRACE(1, "SIP\tCould not find media formats in SDP media description for session " << rtpSessionId);
+    return FALSE;
+  }
+
   // Create the RTPSession
   OpalTransportAddress localAddress;
   OpalTransportAddress address = mediaDescription->GetTransportAddress();
   rtpSession = OnUseRTPSession(rtpSessionId, address, localAddress);
   if (rtpSession == NULL && !ownerCall.IsMediaBypassPossible(*this, rtpSessionId)) {
-    Release(EndedByTransportFail);
+    if (rtpSessionId == OpalMediaFormat::DefaultAudioSessionID) 
+      Release(EndedByTransportFail);
+    return FALSE;
+  }
+  
+  // set the remote address 
+  PIPSocket::Address ip;
+  WORD port;
+  if (!address.GetIpAndPort(ip, port) || (rtpSession && !rtpSession->SetRemoteSocketInfo(ip, port, TRUE))) {
+    PTRACE(1, "SIP\tCannot set remote ports on RTP session");
+    if (rtpSessionId == OpalMediaFormat::DefaultAudioSessionID) 
+      Release(EndedByTransportFail);
     return FALSE;
   }
 
@@ -2281,16 +2302,6 @@
   // Open the streams and the reverse streams
   OnOpenSourceMediaStreams(remoteFormatList, rtpSessionId, NULL);
 
-  // set the remote address after the stream is opened
-  PIPSocket::Address ip;
-  WORD port;
-  address.GetIpAndPort(ip, port);
-  if (rtpSession && !rtpSession->SetRemoteSocketInfo(ip, port, TRUE)) {
-    PTRACE(1, "SIP\tCannot set remote ports on RTP session");
-    Release(EndedByTransportFail);
-    return FALSE;
-  }
-
   return TRUE;
 }
 
Index: src/sip/sipep.cxx
===================================================================
RCS file: /cvsroot/openh323/opal/src/sip/sipep.cxx,v
retrieving revision 2.97.2.38
diff -u -r2.97.2.38 sipep.cxx
--- src/sip/sipep.cxx	17 Apr 2007 21:50:19 -0000	2.97.2.38
+++ src/sip/sipep.cxx	18 Apr 2007 22:26:24 -0000
@@ -619,14 +619,6 @@
 
   registrarAddress = transportAddress;
   
-  // Only delete if we are refreshing
-  if (registrarTransport != NULL && HasExpired()) {
-    PTRACE(4,"SIPInfo\tWill delete transport " << *registrarTransport << " (expired)");
-    registrarTransport->CloseWait ();
-    delete registrarTransport;
-    registrarTransport = NULL;
-  }
-
   if (registrarTransport == NULL) {
     registrarTransport = ep.CreateTransport(registrarAddress);
   }


Index: opal.spec
===================================================================
RCS file: /cvs/pkgs/rpms/opal/F-7/opal.spec,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- opal.spec	15 Apr 2007 20:41:57 -0000	1.19
+++ opal.spec	22 Aug 2007 10:26:19 -0000	1.20
@@ -1,7 +1,7 @@
 Summary: Open Phone Abstraction Library
 Name: opal
 Version: 2.2.8
-Release: 1%{?dist}
+Release: 5%{?dist}
 URL: http://www.openh323.org/
 Source0: http://www.ekiga.org/%{name}-%{version}.tar.gz
 License: MPL
@@ -13,6 +13,10 @@
 BuildRoot: %{_tmppath}/%{name}-root
 Obsoletes: openh323
 
+# workaround problems with CISCO server
+Patch0: ekiga-429076-42.patch
+Patch1: ekiga-429076-50.patch
+
 %description
 Open Phone Abstraction Library, implementation of the ITU H.323
 teleconferencing protocol, and successor of the openh323 library.
@@ -28,6 +32,8 @@
 
 %prep
 %setup -q 
+%patch0 -p1
+%patch1 -p0
 
 %build
 %configure --enable-localspeex
@@ -59,6 +65,9 @@
 %{_libdir}/*.so
 
 %changelog
+* Wed Aug 22 2007 Daniel Veillard <veillard at redhat.com> - 2.2.8-5.fc7
+- added 2 patches needed when using a CISCO server
+
 * Sun Apr 15 2007 Daniel Veillard <veillard at redhat.com> - 2.2.8-1
 - upstream release of 2.2.8
 


--- rfc2833_duration.patch DELETED ---




More information about the fedora-extras-commits mailing list