[asterisk-scf-commits] asterisk-scf/integration/sip.git branch "directmedia" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Fri Sep 23 11:30:10 CDT 2011


branch "directmedia" has been updated
       via  c6f4aa3569581f096081103f2b5c2fa1003bcfb0 (commit)
       via  122752c281c469c6f3cd0d3cfa30b142dda398f3 (commit)
       via  74e4baab02b8b76883efc9f1d8bbb31fe3c1fc1b (commit)
       via  0fd640440dbeb15959e14f45f09382be7b984e43 (commit)
       via  aab5c74c90c25ca9f0b9f43a2fbe071a55a9b002 (commit)
       via  e0ef5e5f9e41545b42a006820fb233338c69e828 (commit)
       via  407eceb8bbca9ad4b09fbf14165f1a8a656fbe5c (commit)
       via  6635bf7183e7868f54c35dbcf1bf5f2d05777b84 (commit)
       via  fdf2ec9681b3ac0b879dd445bba76cb9baa22745 (commit)
       via  9d646ac41b175c67edb7759a2ec0bc2c1d99b1a1 (commit)
       via  50a077ec425116275dfcc9bc5032fecd1fb62bdb (commit)
       via  5fe54b87788a322dd00bddc396b24500b8d13bdc (commit)
       via  ccec5ae8cb8bc658387d41ed309c134b35f2038e (commit)
       via  12f7bb81986f9c7d63a975447fdb7baa6f15e9d3 (commit)
       via  5e6d4e5f80325395220a91d5647bf3c795cfa8fd (commit)
       via  b40da7f6b1d4a5dd3b7375b6c04ec3280ff83e92 (commit)
       via  8067347207ab8b70244c586ffc07ab0559122399 (commit)
       via  766aabb6ca4f52ba1d964930b1380e89577655d5 (commit)
      from  83655076d1e60f7442ee0d86c281759419ca6cd4 (commit)

Summary of changes:
 config/SipConfigurator.py                          |    3 +-
 config/test_sip.conf                               |    6 +-
 .../SipSessionManager/SipConfigurationIf.ice       |   11 -
 .../SipSessionManager/SipStateReplicationIf.ice    |   53 ++-
 .../SipSessionManager/SipSessionCookiesIf.ice      |   50 ++
 src/AuthManager.cpp                                |   32 +-
 src/AuthManager.h                                  |    4 +
 src/CMakeLists.txt                                 |   14 +-
 src/Component.cpp                                  |  631 +++++++++++++++++++
 src/PJSipManager.cpp                               |   11 +-
 src/PJSipManager.h                                 |    9 +-
 src/PJSipModule.cpp                                |   15 +-
 src/PJSipRegistrarModule.cpp                       |   37 +-
 src/PJSipRegistrarModule.h                         |    6 +-
 src/PJSipRegistrarModuleConstruction.cpp           |    4 +-
 src/PJSipSessionModule.cpp                         |  361 ++----------
 src/PJSipSessionModule.h                           |   12 +-
 src/PJSipSessionModuleConstruction.cpp             |   18 +-
 src/SipEndpoint.cpp                                |  234 +++++++-
 src/SipEndpoint.h                                  |   31 +-
 src/SipEndpointFactory.cpp                         |    4 +-
 src/SipEndpointFactory.h                           |    7 +-
 src/SipReplicationContext.h                        |   83 +++
 src/SipSession.cpp                                 |  334 +++++++----
 src/SipSession.h                                   |   57 ++-
 src/SipSessionManagerApp.cpp                       |    4 +-
 src/SipStateReplicator.h                           |    8 +-
 src/SipStateReplicatorApp.cpp                      |   67 +--
 src/SipStateReplicatorListener.cpp                 |  150 +++++-
 src/SipTransfer.cpp                                |  632 ++++++++++++++++++++
 src/SipTransfer.h                                  |  365 +++++++++++
 31 files changed, 2613 insertions(+), 640 deletions(-)
 create mode 100644 slice/AsteriskSCF/SessionCookies/SipSessionManager/SipSessionCookiesIf.ice
 create mode 100644 src/Component.cpp
 create mode 100644 src/SipReplicationContext.h
 create mode 100644 src/SipTransfer.cpp
 create mode 100644 src/SipTransfer.h


- Log -----------------------------------------------------------------
commit c6f4aa3569581f096081103f2b5c2fa1003bcfb0
Author: Joshua Colp <jcolp at digium.com>
Date:   Fri Sep 23 13:33:59 2011 -0300

    Use network helper code to determine if addresses are compatible.

diff --git a/src/SipSession.cpp b/src/SipSession.cpp
index 6556ee5..7b460c9 100755
--- a/src/SipSession.cpp
+++ b/src/SipSession.cpp
@@ -28,6 +28,8 @@
 #include <boost/thread/shared_mutex.hpp>
 #include <boost/lexical_cast.hpp>
 
+#include <AsteriskSCF/Helpers/Network.h>
+
 #include <AsteriskSCF/System/WorkQueue/WorkQueueIf.h>
 #include <AsteriskSCF/logger.h>
 #include <AsteriskSCF/System/NAT/NATTraversalIf.h>
@@ -45,6 +47,7 @@ using namespace AsteriskSCF::Media::RTP::V1;
 using namespace AsteriskSCF::Media::V1;
 using namespace AsteriskSCF::Media;
 using namespace AsteriskSCF::Media::SDP::V1;
+using namespace AsteriskSCF::Helpers;
 using namespace std;
 
 namespace
@@ -3065,14 +3068,13 @@ Ice::StringSeq SipSession::checkDirectConnections(const AsteriskSCF::Media::V1::
             continue;
         }
 
-        std::string theirAddress = sink->getRemoteAddress();
+        AddressPtr theirAddress(new Address(sink->getRemoteAddress(), 0));
 
         StreamSourceRTPPrx source = StreamSourceRTPPrx::uncheckedCast(stream->second->sources.front());
-        std::string ourAddress = source->getLocalAddress();
+        AddressPtr ourAddress(new Address(source->getLocalAddress(), 0));
 
-        // Is the address compatible with the address family on it?
-        if ((ourAddress.find(":") == std::string::npos && theirAddress.find(":") != std::string::npos) ||
-            (ourAddress.find(":") != std::string::npos && theirAddress.find(":") == std::string::npos))
+        // Ensure both are IPv4 or IPv6
+        if (theirAddress->isIPV6() != ourAddress->isIPV6())
         {
             continue;
         }

commit 122752c281c469c6f3cd0d3cfa30b142dda398f3
Author: Joshua Colp <jcolp at digium.com>
Date:   Fri Sep 23 12:44:44 2011 -0300

    Don't pass in a pointer to SipSessionPriv.

diff --git a/src/SipSession.cpp b/src/SipSession.cpp
index ca7a48a..6556ee5 100755
--- a/src/SipSession.cpp
+++ b/src/SipSession.cpp
@@ -609,79 +609,14 @@ public:
     CheckDirectConnectionsOperation(
         const AsteriskSCF::Media::V1::AMD_DirectMediaConnection_checkDirectConnectionsPtr& cb,
         const AsteriskSCF::Media::V1::DirectMediaConnectionDict& connections,
-        const boost::shared_ptr<SipSessionPriv>& sessionPriv)
-        : mCb(cb), mConnections(connections), mImplPriv(sessionPriv) { }
+        const SipSessionPtr& session)
+        : mCb(cb), mConnections(connections), mSession(session) { }
 
     SuspendableWorkResult execute(const SuspendableWorkListenerPtr&)
     {
-        SipEndpointConfig &config = mImplPriv->mEndpoint->getConfig();
-
-        // If direct media connections are disabled or if NAT is enabled don't even bother checking
-        if (config.sessionConfig.directMedia == false || config.transportConfig.enableNAT == true)
-        {
-            mCb->ice_response(Ice::StringSeq());
-            return Complete;
-        }
-
-        Ice::StringSeq allowedStreams;
-
         lg(Debug) << "Executing a checkDirectConnections Operation";
 
-        // Iterate through each requested connection checking if it is possible
-        for (AsteriskSCF::Media::V1::DirectMediaConnectionDict::const_iterator connection = mConnections.begin();
-             connection != mConnections.end();
-             ++connection)
-        {
-            // Do we have a local stream that matches this?
-            StreamInformationDict::const_iterator stream = mImplPriv->mStreams.find(connection->first);
-
-            // Uh, if they passed in a stream that we know nothing about skip it...
-            if (stream == mImplPriv->mStreams.end())
-            {
-                continue;
-            }
-
-            RTPMediaSessionDict::const_iterator session = mImplPriv->mRTPSessions.find(connection->first);
-
-            // We only support connecting streams directly that use RTP
-            if (session == mImplPriv->mRTPSessions.end())
-            {
-                continue;
-            }
-
-            // If the session is using SRTP we can not directly connect
-            SRTPSessionPrx srtp = SRTPSessionPrx::checkedCast(session->second);
-
-            if (srtp)
-            {
-                continue;
-            }
-
-            StreamSinkRTPPrx sink = StreamSinkRTPPrx::checkedCast(connection->second);
-
-            // If the provided sink is not an RTP one this connection is not possible
-            if (!sink)
-            {
-                continue;
-            }
-
-            std::string theirAddress = sink->getRemoteAddress();
-
-            StreamSourceRTPPrx source = StreamSourceRTPPrx::uncheckedCast(stream->second->sources.front());
-            std::string ourAddress = source->getLocalAddress();
-
-            // Is the address compatible with the address family on it?
-            if ((ourAddress.find(":") == std::string::npos && theirAddress.find(":") != std::string::npos) ||
-                (ourAddress.find(":") != std::string::npos && theirAddress.find(":") == std::string::npos))
-            {
-                continue;
-            }
-
-            // It passed! We can establish a direct external media connection
-            allowedStreams.push_back(connection->first);
-        }
-
-        mCb->ice_response(allowedStreams);
+        mCb->ice_response(mSession->checkDirectConnections(mConnections));
 
         return Complete;
     }
@@ -689,7 +624,7 @@ public:
 private:
     AsteriskSCF::Media::V1::AMD_DirectMediaConnection_checkDirectConnectionsPtr mCb;
     AsteriskSCF::Media::V1::DirectMediaConnectionDict mConnections;
-    boost::shared_ptr<SipSessionPriv> mImplPriv;
+    SipSessionPtr mSession;
 };
 
 class ConnectStreamsOperation : public SuspendableWork
@@ -764,14 +699,14 @@ private:
 class SipDirectMediaConnection : public AsteriskSCF::Media::V1::DirectMediaConnection
 {
 public:
-    SipDirectMediaConnection(boost::shared_ptr<SipSessionPriv> implPriv, const SipSessionPtr& session) :
-        mImplPriv(implPriv), mSession(session) { }
+    SipDirectMediaConnection(const SipSessionPtr& session) :
+        mSession(session) { }
 
     void checkDirectConnections_async(const AsteriskSCF::Media::V1::AMD_DirectMediaConnection_checkDirectConnectionsPtr& cb,
                                       const AsteriskSCF::Media::V1::DirectMediaConnectionDict& connections, const Ice::Current&)
     {
         lg(Debug) << "Queueing checkDirectConnections operation";
-        mSession->enqueueSessionWork(new CheckDirectConnectionsOperation(cb, connections, mImplPriv));
+        mSession->enqueueSessionWork(new CheckDirectConnectionsOperation(cb, connections, mSession));
     }
 
     void connectStreams_async(const AsteriskSCF::Media::V1::AMD_DirectMediaConnection_connectStreamsPtr& cb,
@@ -790,11 +725,6 @@ public:
 
 private:
     /**
-     * Private implementation details for SipSession.
-     */
-    boost::shared_ptr<SipSessionPriv> mImplPriv;
-
-    /**
      * A pointer to the communications session that created us.
      */
     SipSessionPtr mSession;
@@ -1013,7 +943,7 @@ SipSession::SipSession(const Ice::ObjectAdapterPtr& adapter,
     mImplPriv->mOurSessionControllerProxy =
         AsteriskSCF::SessionCommunications::V1::SessionControllerPrx::uncheckedCast(adapter->addWithUUID(mImplPriv->mOurSessionController));
 
-    DirectMediaConnectionPtr directMedia = new SipDirectMediaConnection(mImplPriv, this);
+    DirectMediaConnectionPtr directMedia = new SipDirectMediaConnection(this);
     adapter->addFacet(directMedia, mImplPriv->mSessionProxy->ice_getIdentity(), directMediaConnectionFacet);
 
     if (isUAC)
@@ -1064,7 +994,7 @@ SipSession::SipSession(const Ice::ObjectAdapterPtr& adapter,
     mImplPriv->mOurSessionControllerProxy =
         AsteriskSCF::SessionCommunications::V1::SessionControllerPrx::uncheckedCast(adapter->add(mImplPriv->mOurSessionController, controllerid));
 
-    DirectMediaConnectionPtr directMedia = new SipDirectMediaConnection(mImplPriv, this);
+    DirectMediaConnectionPtr directMedia = new SipDirectMediaConnection(this);
     adapter->addFacet(directMedia, sessionid, directMediaConnectionFacet);
 
     mImplPriv->mRTPSessions = mediasessions;
@@ -3082,6 +3012,78 @@ void SipSession::setStreams(const AsteriskSCF::Media::V1::StreamInformationDict&
     mImplPriv->mStreams = streams;
 }
 
+/**
+ * Internal function which retrieves possible direct connections.
+ */
+Ice::StringSeq SipSession::checkDirectConnections(const AsteriskSCF::Media::V1::DirectMediaConnectionDict& connections)
+{
+    SipEndpointConfig &config = mImplPriv->mEndpoint->getConfig();
+
+    // If direct media connections are disabled or if NAT is enabled don't even bother checking
+    if (config.sessionConfig.directMedia == false || config.transportConfig.enableNAT == true)
+    {
+        return Ice::StringSeq();
+    }
+
+    Ice::StringSeq allowedStreams;
+
+    // Iterate through each requested connection checking if it is possible
+    for (AsteriskSCF::Media::V1::DirectMediaConnectionDict::const_iterator connection = connections.begin();
+         connection != connections.end();
+         ++connection)
+    {
+        // Do we have a local stream that matches this?
+        StreamInformationDict::const_iterator stream = mImplPriv->mStreams.find(connection->first);
+
+        // Uh, if they passed in a stream that we know nothing about skip it...
+        if (stream == mImplPriv->mStreams.end())
+        {
+            continue;
+        }
+
+        RTPMediaSessionDict::const_iterator session = mImplPriv->mRTPSessions.find(connection->first);
+
+        // We only support connecting streams directly that use RTP
+        if (session == mImplPriv->mRTPSessions.end())
+        {
+            continue;
+        }
+
+        // If the session is using SRTP we can not directly connect
+        SRTPSessionPrx srtp = SRTPSessionPrx::checkedCast(session->second);
+
+        if (srtp)
+        {
+            continue;
+        }
+
+        StreamSinkRTPPrx sink = StreamSinkRTPPrx::checkedCast(connection->second);
+
+        // If the provided sink is not an RTP one this connection is not possible
+        if (!sink)
+        {
+            continue;
+        }
+
+        std::string theirAddress = sink->getRemoteAddress();
+
+        StreamSourceRTPPrx source = StreamSourceRTPPrx::uncheckedCast(stream->second->sources.front());
+        std::string ourAddress = source->getLocalAddress();
+
+        // Is the address compatible with the address family on it?
+        if ((ourAddress.find(":") == std::string::npos && theirAddress.find(":") != std::string::npos) ||
+            (ourAddress.find(":") != std::string::npos && theirAddress.find(":") == std::string::npos))
+        {
+            continue;
+        }
+
+        // It passed! We can establish a direct external media connection
+        allowedStreams.push_back(connection->first);
+    }
+
+    return allowedStreams;
+}
+
 bool SipSession::operator==(const SipSession &other) const {
     return (this->mImplPriv->mInviteSession == other.mImplPriv->mInviteSession);
 }
diff --git a/src/SipSession.h b/src/SipSession.h
index 730606a..251c628 100644
--- a/src/SipSession.h
+++ b/src/SipSession.h
@@ -282,6 +282,8 @@ public:
 
     pjsip_inv_session *getInviteSession();
 
+    Ice::StringSeq checkDirectConnections(const AsteriskSCF::Media::V1::DirectMediaConnectionDict&);
+
     //
     // TODO: Are these thread safe?
     //

commit 74e4baab02b8b76883efc9f1d8bbb31fe3c1fc1b
Author: Joshua Colp <jcolp at digium.com>
Date:   Fri Sep 23 12:28:01 2011 -0300

    Function renaming.

diff --git a/src/SipSession.cpp b/src/SipSession.cpp
index 68c48c0..ca7a48a 100755
--- a/src/SipSession.cpp
+++ b/src/SipSession.cpp
@@ -709,7 +709,7 @@ public:
             return Complete;
         }
 
-        pjmedia_sdp_session *sdp = mSession->modifySDP(mConnections);
+        pjmedia_sdp_session *sdp = mSession->modifySDPforDirectConnections(mConnections);
         pjsip_tx_data *packet = NULL;
 
         if ((pjsip_inv_reinvite(mSession->getInviteSession(), NULL, sdp, &packet)) == PJ_SUCCESS)
@@ -2773,7 +2773,7 @@ pjmedia_sdp_session *SipSession::modifySDP(const AsteriskSCF::Media::V1::StreamI
 /**
  * Internal function which modifies our SDP to contain remote destination and format details.
  */
-pjmedia_sdp_session *SipSession::modifySDP(const AsteriskSCF::Media::V1::DirectMediaConnectionDict& connections)
+pjmedia_sdp_session *SipSession::modifySDPforDirectConnections(const AsteriskSCF::Media::V1::DirectMediaConnectionDict& connections)
 {
     // In order to modify SDP you have to have SDP
     if (!mImplPriv->mSDP)
diff --git a/src/SipSession.h b/src/SipSession.h
index e8c8844..730606a 100644
--- a/src/SipSession.h
+++ b/src/SipSession.h
@@ -270,7 +270,7 @@ public:
 
     pjmedia_sdp_session *modifySDP(const AsteriskSCF::Media::V1::StreamInformationDict&);
 
-    pjmedia_sdp_session *modifySDP(const AsteriskSCF::Media::V1::DirectMediaConnectionDict&);
+    pjmedia_sdp_session *modifySDPforDirectConnections(const AsteriskSCF::Media::V1::DirectMediaConnectionDict&);
 
     pjmedia_sdp_session *modifySDP(const Ice::StringSeq&);
 

commit 0fd640440dbeb15959e14f45f09382be7b984e43
Author: Joshua Colp <jcolp at digium.com>
Date:   Fri Sep 23 12:17:04 2011 -0300

    Add some bounds checking.

diff --git a/src/SipSession.cpp b/src/SipSession.cpp
index ff1d275..68c48c0 100755
--- a/src/SipSession.cpp
+++ b/src/SipSession.cpp
@@ -2786,7 +2786,14 @@ pjmedia_sdp_session *SipSession::modifySDP(const AsteriskSCF::Media::V1::DirectM
          connection != connections.end();
          ++connection)
     {
-        pjmedia_sdp_media *media = mImplPriv->mSDP->media[boost::lexical_cast<int>(connection->first)];
+        unsigned int streamNum = boost::lexical_cast<unsigned int>(connection->first);
+
+        if (streamNum >= mImplPriv->mSDP->media_count)
+        {
+            continue;
+        }
+
+        pjmedia_sdp_media *media = mImplPriv->mSDP->media[streamNum];
 
         // Skip unknown streams
         if (!media)

commit aab5c74c90c25ca9f0b9f43a2fbe071a55a9b002
Author: Joshua Colp <jcolp at digium.com>
Date:   Fri Sep 23 12:05:19 2011 -0300

    Some variable renaming.

diff --git a/src/SipSession.cpp b/src/SipSession.cpp
index e70e11b..ff1d275 100755
--- a/src/SipSession.cpp
+++ b/src/SipSession.cpp
@@ -665,14 +665,14 @@ public:
                 continue;
             }
 
-            std::string their_address = sink->getRemoteAddress();
+            std::string theirAddress = sink->getRemoteAddress();
 
             StreamSourceRTPPrx source = StreamSourceRTPPrx::uncheckedCast(stream->second->sources.front());
-            std::string our_address = source->getLocalAddress();
+            std::string ourAddress = source->getLocalAddress();
 
             // Is the address compatible with the address family on it?
-            if ((our_address.find(":") == std::string::npos && their_address.find(":") != std::string::npos) ||
-                (our_address.find(":") != std::string::npos && their_address.find(":") == std::string::npos))
+            if ((ourAddress.find(":") == std::string::npos && theirAddress.find(":") != std::string::npos) ||
+                (ourAddress.find(":") != std::string::npos && theirAddress.find(":") == std::string::npos))
             {
                 continue;
             }

commit e0ef5e5f9e41545b42a006820fb233338c69e828
Author: Joshua Colp <jcolp at digium.com>
Date:   Fri Sep 23 12:04:42 2011 -0300

    Take into account SRTP and NAT when determining if a direct media connection is possible.

diff --git a/src/SipSession.cpp b/src/SipSession.cpp
index 7edfaec..e70e11b 100755
--- a/src/SipSession.cpp
+++ b/src/SipSession.cpp
@@ -616,7 +616,8 @@ public:
     {
         SipEndpointConfig &config = mImplPriv->mEndpoint->getConfig();
 
-        if (config.sessionConfig.directMedia == false)
+        // If direct media connections are disabled or if NAT is enabled don't even bother checking
+        if (config.sessionConfig.directMedia == false || config.transportConfig.enableNAT == true)
         {
             mCb->ice_response(Ice::StringSeq());
             return Complete;
@@ -640,6 +641,22 @@ public:
                 continue;
             }
 
+            RTPMediaSessionDict::const_iterator session = mImplPriv->mRTPSessions.find(connection->first);
+
+            // We only support connecting streams directly that use RTP
+            if (session == mImplPriv->mRTPSessions.end())
+            {
+                continue;
+            }
+
+            // If the session is using SRTP we can not directly connect
+            SRTPSessionPrx srtp = SRTPSessionPrx::checkedCast(session->second);
+
+            if (srtp)
+            {
+                continue;
+            }
+
             StreamSinkRTPPrx sink = StreamSinkRTPPrx::checkedCast(connection->second);
 
             // If the provided sink is not an RTP one this connection is not possible

commit 407eceb8bbca9ad4b09fbf14165f1a8a656fbe5c
Merge: 8365507 6635bf7
Author: Joshua Colp <jcolp at digium.com>
Date:   Fri Sep 23 11:58:44 2011 -0300

    Merge branch 'master' into directmedia
    
    Conflicts:
    	slice/AsteriskSCF/Replication/SipSessionManager/SipStateReplicationIf.ice
    	src/SipSession.cpp
    	src/SipSession.h

diff --cc slice/AsteriskSCF/Replication/SipSessionManager/SipStateReplicationIf.ice
index abf7951,09e4af4..f982668
--- a/slice/AsteriskSCF/Replication/SipSessionManager/SipStateReplicationIf.ice
+++ b/slice/AsteriskSCF/Replication/SipSessionManager/SipStateReplicationIf.ice
@@@ -144,9 -139,7 +139,7 @@@ module V
  	  bool isClient;
     };
  
-    sequence<AsteriskSCF::SessionCommunications::V1::SessionListener*> SessionListenerSeq;
- 
 -   sequence<AsteriskSCF::Media::RTP::V1::RTPSession*> RTPMediaSessionSeq;
 +   dictionary<string, AsteriskSCF::Media::RTP::V1::RTPSession*> RTPMediaSessionDict;
  
     class SipSessionStateItem extends SipStateItem
     {
@@@ -159,8 -152,8 +152,8 @@@
        AsteriskSCF::Media::V1::StreamSourceSeq sources;
        AsteriskSCF::Media::V1::StreamSinkSeq sinks;
        AsteriskSCF::Media::V1::StreamInformationDict streams;
 -      RTPMediaSessionSeq rtpMediaSessions;
 +      RTPMediaSessionDict rtpMediaSessions;
-       SessionListenerSeq listeners;
+       AsteriskSCF::SessionCommunications::V1::SessionListenerSeq listeners;
        AsteriskSCF::SessionCommunications::V1::Bridge *bridge;
        AsteriskSCF::SessionCommunications::V1::SessionCookieDict cookies;
     };
diff --cc src/SipSession.cpp
index 29926fc,f550ce9..7edfaec
--- a/src/SipSession.cpp
+++ b/src/SipSession.cpp
@@@ -993,17 -835,26 +1018,26 @@@ SipSession::SipSession(const Ice::Objec
  /**
   * Replica constructor.
   */
- SipSession::SipSession(const Ice::ObjectAdapterPtr& adapter, const SipEndpointPtr& endpoint,
-                        const std::string& destination, const Ice::Identity& sessionid,
+ SipSession::SipSession(const Ice::ObjectAdapterPtr& adapter,
+                        const SipEndpointPtr& endpoint,
+                        const std::string& destination, 
 -                       const Ice::Identity& /* sessionid */,
++                       const Ice::Identity& sessionid,
                         const Ice::Identity& controllerid,
-                        const Ice::Identity& mediaid, const AsteriskSCF::Replication::SipSessionManager::V1::RTPMediaSessionDict& mediasessions,
-                        const AsteriskSCF::Media::V1::StreamSourceSeq& sources, const AsteriskSCF::Media::V1::StreamSinkSeq& sinks,
-                        const PJSipManagerPtr& manager, const AsteriskSCF::Core::Discovery::V1::ServiceLocatorPrx& serviceLocator,
-                        const AsteriskSCF::System::Component::V1::ReplicaPtr& replica, bool isUAC, const SipEndpointConfig &config,
+                        const Ice::Identity& mediaid,
 -                       const AsteriskSCF::Replication::SipSessionManager::V1::RTPMediaSessionSeq& mediasessions,
++                       const AsteriskSCF::Replication::SipSessionManager::V1::RTPMediaSessionDict& mediasessions,
+                        const AsteriskSCF::Media::V1::StreamSourceSeq& sources,
+                        const AsteriskSCF::Media::V1::StreamSinkSeq& sinks,
+                        const PJSipManagerPtr& manager,
+                        const AsteriskSCF::Core::Discovery::V1::ServiceLocatorPrx& serviceLocator,
+                        const SipReplicationContextPtr& replicationContext,
+                        const AsteriskSCF::SessionCommunications::ExtensionPoints::V1::SessionCreationHookPrx& oneShotHook,
+                        bool isUAC,
+                        const SipEndpointConfig &config,
                         const NATEndpointOptions& natOptions)
-     : mImplPriv(new SipSessionPriv(adapter, endpoint, destination, manager, serviceLocator, replica, natOptions))
+     : mImplPriv(new SipSessionPriv(adapter, endpoint, destination, manager, serviceLocator, replicationContext, natOptions))
  {
-     activateIceObjects(mImplPriv->mManager->getSessionModule()->getSessionCreationHooks());
+     mImplPriv->mSessionProxy = 
+         AsteriskSCF::SessionCommunications::V1::SessionPrx::uncheckedCast(mImplPriv->mAdapter->addWithUUID(this));
  
      mImplPriv->mMediaSession = new SipMediaSession(this);
      mImplPriv->mMediaSessionProxy =
diff --cc src/SipSession.h
index 09f1bc3,8da0248..e8c8844
--- a/src/SipSession.h
+++ b/src/SipSession.h
@@@ -110,18 -110,36 +110,36 @@@ class SipEndpointConfig
  class SipSession : public AsteriskSCF::SessionCommunications::V1::TelephonySession
  {
  public:
-     SipSession(const Ice::ObjectAdapterPtr&, const SipEndpointPtr&, const std::string&,
-         const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx&, const PJSipManagerPtr& manager,
+     SipSession(const Ice::ObjectAdapterPtr&,
+         const SipEndpointPtr&,
+         const std::string&,
+         const std::vector<AsteriskSCF::SessionCommunications::V1::SessionListenerPrx>&,         
+         const AsteriskSCF::SessionCommunications::V1::SessionCookies&, 
+         const PJSipManagerPtr& manager,
          const AsteriskSCF::Core::Discovery::V1::ServiceLocatorPrx& serviceLocator,
-         const AsteriskSCF::System::Component::V1::ReplicaPtr& replica,
-         bool ipv6, bool isUAC, const SipEndpointConfig& config, const NATEndpointOptions& natOptions);
- 
-     SipSession(const Ice::ObjectAdapterPtr&, const SipEndpointPtr&, const std::string&, const Ice::Identity&, const Ice::Identity&,
-         const Ice::Identity&, const AsteriskSCF::Replication::SipSessionManager::V1::RTPMediaSessionDict&,
-         const AsteriskSCF::Media::V1::StreamSourceSeq&, const AsteriskSCF::Media::V1::StreamSinkSeq&,
-         const PJSipManagerPtr& manager, const AsteriskSCF::Core::Discovery::V1::ServiceLocatorPrx& serviceLocator,
-         const AsteriskSCF::System::Component::V1::ReplicaPtr& replica,
-         bool isUAC, const SipEndpointConfig& config, const NATEndpointOptions& natOptions);
+         const SipReplicationContextPtr& replicationContext,
+         const AsteriskSCF::SessionCommunications::ExtensionPoints::V1::SessionCreationHookPrx&,
+         bool ipv6,
+         bool isUAC,
+         const SipEndpointConfig& config,
+         const NATEndpointOptions& natOptions);
+ 
+     SipSession(const Ice::ObjectAdapterPtr&,
+         const SipEndpointPtr&,
+         const std::string&,
+         const Ice::Identity&,
+         const Ice::Identity&,
+         const Ice::Identity&,
 -        const AsteriskSCF::Replication::SipSessionManager::V1::RTPMediaSessionSeq&,
++        const AsteriskSCF::Replication::SipSessionManager::V1::RTPMediaSessionDict&,
+         const AsteriskSCF::Media::V1::StreamSourceSeq&,
+         const AsteriskSCF::Media::V1::StreamSinkSeq&,
+         const PJSipManagerPtr& manager,
+         const AsteriskSCF::Core::Discovery::V1::ServiceLocatorPrx& serviceLocator,
+         const SipReplicationContextPtr& replicationContext,
+         const AsteriskSCF::SessionCommunications::ExtensionPoints::V1::SessionCreationHookPrx&,
+         bool isUAC,
+         const SipEndpointConfig& config,
+         const NATEndpointOptions& natOptions);
  
      bool operator==(const SipSession &other) const;
  

-----------------------------------------------------------------------


-- 
asterisk-scf/integration/sip.git



More information about the asterisk-scf-commits mailing list