diff -rup opal-3.6.6.orig/src/rtp/rtp.cxx opal-3.6.6/src/rtp/rtp.cxx
--- opal-3.6.6.orig/src/rtp/rtp.cxx	2009-09-22 04:58:36.000000000 +0400
+++ opal-3.6.6/src/rtp/rtp.cxx	2010-03-03 23:20:39.000000000 +0300
@@ -1647,8 +1647,8 @@ PBoolean RTP_UDP::Open(PIPSocket::Addres
     }
 
     if (dataSocket == NULL || controlSocket == NULL) {
-      dataSocket = new PUDPSocket(dataQos);
-      controlSocket = new PUDPSocket(ctrlQos);
+      dataSocket = new PUDPSocket(dataQos, 0, bindingAddress.GetVersion() == 6 ? AF_INET6 : AF_INET);
+      controlSocket = new PUDPSocket(ctrlQos, 0, bindingAddress.GetVersion() == 6 ? AF_INET6 : AF_INET);    
       while (!   dataSocket->Listen(bindingAddress, 1, localDataPort) ||
              !controlSocket->Listen(bindingAddress, 1, localControlPort)) {
         dataSocket->Close();
diff -rup opal-3.6.6-orig/src/sip/sippdu.cxx opal-3.6.6/src/sip/sippdu.cxx
--- opal-3.6.6-orig/src/sip/sippdu.cxx	2009-09-22 04:58:06.000000000 +0400
+++ opal-3.6.6/src/sip/sippdu.cxx	2010-03-05 00:38:49.000000000 +0300
@@ -2025,7 +2025,13 @@ bool SIP_PDU::SendResponse(OpalTransport
       viaAddress = viaAddress.Mid(j+1);
     if ((j = viaAddress.Find (';')) != P_MAX_INDEX)
       viaAddress = viaAddress.Left(j);
-    if ((j = viaAddress.Find (':')) != P_MAX_INDEX) {
+
+    PINDEX bracket = viaAddress.FindLast(']');
+    if (bracket == P_MAX_INDEX)
+      bracket = 0;
+
+    j = viaAddress.FindLast (':');
+    if ((j != P_MAX_INDEX) && (j > bracket)) {
       viaPort = viaAddress.Mid(j+1);
       viaAddress = viaAddress.Left(j);
     }
