[asterisk-scf-commits] asterisk-scf/integration/routing.git branch "party-id" created.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Thu Oct 13 12:57:11 CDT 2011


branch "party-id" has been created
        at  0de4e641e2bd3fe51617a76db5c65c1708157ca6 (commit)

- Log -----------------------------------------------------------------
commit 0de4e641e2bd3fe51617a76db5c65c1708157ca6
Author: Mark Michelson <mmichelson at digium.com>
Date:   Thu Oct 13 11:47:07 2011 -0500

    Fix compiler errors.

diff --git a/src/RouteSessionOperation.cpp b/src/RouteSessionOperation.cpp
index dbace7c..42f2129 100644
--- a/src/RouteSessionOperation.cpp
+++ b/src/RouteSessionOperation.cpp
@@ -230,7 +230,7 @@ RouteSessionOperation::RouteSessionOperation(const AMD_SessionRouter_routeSessio
            mSource(source),
            mDestination(destination),
            mHook(oneShotHook),
-           mCallerID(callerID),
+           mCallerID(callerID)
 {
     initStateMachine();
 }
@@ -243,6 +243,7 @@ RouteSessionOperationPtr RouteSessionOperation::create(const AMD_SessionRouter_r
                               const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& source, 
                               const ::std::string& destination, 
                               const ::AsteriskSCF::SessionCommunications::ExtensionPoints::V1::SessionCreationHookPrx& oneShotHook,
+                              const ::AsteriskSCF::SessionCommunications::PartyIdentification::V1::CallerPtr& callerID,
                               const ::Ice::Current& current,
                               const SessionContextPtr& context,
                               OperationsManager* const listener) 
@@ -253,6 +254,7 @@ RouteSessionOperationPtr RouteSessionOperation::create(const AMD_SessionRouter_r
                                                             source,
                                                             destination,
                                                             oneShotHook,
+                                                            callerID,
                                                             current,
                                                             context,
                                                             listener));
@@ -499,7 +501,7 @@ void RouteSessionOperation::establishBridgeState()
         bridgedSessions.insert(bridgedSessions.end(), newSessions.begin(), newSessions.end());
 
         lg(Debug) <<  BOOST_CURRENT_FUNCTION << ": Creating bridge.";
-        bridge = mSessionContext->bridgeManager->createBridge(source, bridgedSessions, 0, mCallerID);
+        bridge = mSessionContext->bridgeManager->createBridge(mSource, bridgedSessions, 0, mCallerID);
     }
     catch (const Ice::Exception &e)
     {
diff --git a/src/RouteSessionOperation.h b/src/RouteSessionOperation.h
index aa568a8..882be57 100644
--- a/src/RouteSessionOperation.h
+++ b/src/RouteSessionOperation.h
@@ -70,6 +70,7 @@ public:
                                            const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& source, 
                                            const ::std::string& destination, 
                                            const ::AsteriskSCF::SessionCommunications::ExtensionPoints::V1::SessionCreationHookPrx& oneShotHook,
+                                           const ::AsteriskSCF::SessionCommunications::PartyIdentification::V1::CallerPtr& callerID,
                                            const ::Ice::Current& current,
                                            const SessionContextPtr& context,
                                            OperationsManager* const listener);
@@ -105,6 +106,7 @@ protected:
                           const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& source, 
                           const ::std::string& destination, 
                           const ::AsteriskSCF::SessionCommunications::ExtensionPoints::V1::SessionCreationHookPrx& oneShotHook,
+                          const ::AsteriskSCF::SessionCommunications::PartyIdentification::V1::CallerPtr& callerID,
                           const ::Ice::Current& current,
                           const SessionContextPtr& context,
                           OperationsManager* const listener);
diff --git a/test/MockBridgeManager.cpp b/test/MockBridgeManager.cpp
index 5b1d58d..1109599 100644
--- a/test/MockBridgeManager.cpp
+++ b/test/MockBridgeManager.cpp
@@ -20,6 +20,7 @@
 #include "SharedTestData.h"
 
 using namespace AsteriskSCF::SessionCommunications::V1;
+using namespace AsteriskSCF::SessionCommunications::PartyIdentification::V1;
 
 namespace AsteriskSCF
 {
@@ -31,7 +32,11 @@ void MockBridgeManager::addListener(const BridgeManagerListenerPrx&, const Ice::
 }
 
 void MockBridgeManager::createBridge_async(const AMD_BridgeManager_createBridgePtr& callback,
-        const SessionSeq& sessions, const BridgeListenerPrx& listener, const Ice::Current&)
+        const SessionPrx&,
+        const SessionSeq& sessions,
+        const BridgeListenerPrx& listener,
+        const CallerPtr&, 
+        const Ice::Current&)
 {
     try
     {
diff --git a/test/MockBridgeManager.h b/test/MockBridgeManager.h
index 1a25413..391fb2a 100644
--- a/test/MockBridgeManager.h
+++ b/test/MockBridgeManager.h
@@ -32,8 +32,10 @@ public:
 
     void addListener(const AsteriskSCF::SessionCommunications::V1::BridgeManagerListenerPrx&, const Ice::Current&);
     void createBridge_async(const AsteriskSCF::SessionCommunications::V1::AMD_BridgeManager_createBridgePtr&,
+            const AsteriskSCF::SessionCommunications::V1::SessionPrx& source,
             const AsteriskSCF::SessionCommunications::V1::SessionSeq& sessions,
-            const AsteriskSCF::SessionCommunications::V1::BridgeListenerPrx& listener, const Ice::Current&);
+            const AsteriskSCF::SessionCommunications::V1::BridgeListenerPrx& listener,
+            const AsteriskSCF::SessionCommunications::PartyIdentification::V1::CallerPtr& callerID, const Ice::Current&);
     void removeListener(const AsteriskSCF::SessionCommunications::V1::BridgeManagerListenerPrx&, const Ice::Current&);
     void addDefaultBridgeListener(const AsteriskSCF::SessionCommunications::V1::BridgeListenerPrx&, const Ice::Current&);
     void removeDefaultBridgeListener(const AsteriskSCF::SessionCommunications::V1::BridgeListenerPrx&, const Ice::Current&);
diff --git a/test/TestRouting.cpp b/test/TestRouting.cpp
index 2ce0d51..a662136 100644
--- a/test/TestRouting.cpp
+++ b/test/TestRouting.cpp
@@ -395,7 +395,7 @@ BOOST_FIXTURE_TEST_CASE(RouteSession, PerTestFixture)
         SharedTestData::instance.mBridgeConnected = false;
 
         BOOST_TEST_MESSAGE("Routing the session...");
-        SharedTestData::instance.sessionRouter->routeSession(IceUtil::generateUUID(), session, "102", 0);
+        SharedTestData::instance.sessionRouter->routeSession(IceUtil::generateUUID(), session, "102", 0, session->getCaller());
 
         BOOST_CHECK(SharedTestData::instance.mBridgeConnected);
 
@@ -450,7 +450,7 @@ BOOST_FIXTURE_TEST_CASE(BlindTransfer, PerTestFixture)
         SharedTestData::instance.mSessionReplaced = false;
 
         BOOST_TEST_MESSAGE("Routing the session...");
-        SharedTestData::instance.sessionRouter->routeSession(IceUtil::generateUUID(), session, "102", 0);
+        SharedTestData::instance.sessionRouter->routeSession(IceUtil::generateUUID(), session, "102", 0, session->getCaller());
 
         BridgePrx bridge = session->getBridge();
         BOOST_CHECK(bridge != 0);
@@ -507,7 +507,7 @@ BOOST_FIXTURE_TEST_CASE(AttendedTransfer, PerTestFixture)
         SharedTestData::instance.mBridgeConnected = false;
 
         BOOST_TEST_MESSAGE("Routing for the first pair...");
-        SharedTestData::instance.sessionRouter->routeSession("Test_AttendedTransfer_102_" + IceUtil::generateUUID(), session101, "102", 0);
+        SharedTestData::instance.sessionRouter->routeSession("Test_AttendedTransfer_102_" + IceUtil::generateUUID(), session101, "102", 0, session101->getCaller());
 
         BOOST_CHECK(SharedTestData::instance.mBridgeConnected);
 
@@ -523,7 +523,7 @@ BOOST_FIXTURE_TEST_CASE(AttendedTransfer, PerTestFixture)
 
         BOOST_TEST_MESSAGE("Routing the second pair...");
 
-        SharedTestData::instance.sessionRouter->routeSession("Test_AttendedTransfer_104_" + IceUtil::generateUUID(), session103, "104", 0);
+        SharedTestData::instance.sessionRouter->routeSession("Test_AttendedTransfer_104_" + IceUtil::generateUUID(), session103, "104", 0, session103->getCaller());
 
         BOOST_CHECK(SharedTestData::instance.mBridgeConnected);
 
@@ -715,7 +715,7 @@ BOOST_FIXTURE_TEST_CASE(FailoverRouteSession, PerTestFixture)
 
         // Note we're routing using AMI with no callback. The callback would never come due to the
         // way the test mode shuts down the operation. Simulates failure.
-        SharedTestData::instance.sessionRouter->begin_routeSession(operationId, session, "102", 0);
+        SharedTestData::instance.sessionRouter->begin_routeSession(operationId, session, "102", 0, session->getCaller());
 
         for (int counter=0; SharedTestData::instance.endpointLocator->mLookupCalled == false; counter++)
         {
@@ -744,7 +744,7 @@ BOOST_FIXTURE_TEST_CASE(FailoverRouteSession, PerTestFixture)
         BOOST_CHECK(SharedTestData::instance.serviceReplicaMgmt->isActive() == true);
 
         // Let the backup session router try to route using same operationId.
-        SharedTestData::instance.backupSessionRouter->routeSession(operationId, session, "102", 0);
+        SharedTestData::instance.backupSessionRouter->routeSession(operationId, session, "102", 0, session->getCaller());
 
         // The lookup should not be done again. 
         BOOST_CHECK(!SharedTestData::instance.endpointLocator->mLookupCalled);
@@ -800,7 +800,7 @@ BOOST_FIXTURE_TEST_CASE(FailoverConnectBridgedSessWithDest, PerTestFixture)
         SharedTestData::instance.mSessionReplaced = false;
 
         BOOST_TEST_MESSAGE("Routing the session...");
-        SharedTestData::instance.sessionRouter->routeSession(IceUtil::generateUUID(), session, "102", 0);
+        SharedTestData::instance.sessionRouter->routeSession(IceUtil::generateUUID(), session, "102", 0, session->getCaller());
 
         BridgePrx bridge = session->getBridge();
         BOOST_CHECK(bridge != 0);

commit 18eef1429f7f1d94be88a99d8a0d3c4873e8939a
Author: Mark Michelson <mmichelson at digium.com>
Date:   Wed Oct 12 15:22:35 2011 -0500

    Adjust for new slice definitions.

diff --git a/slice/AsteriskSCF/Replication/BasicRoutingService/BasicRoutingStateReplicationIf.ice b/slice/AsteriskSCF/Replication/BasicRoutingService/BasicRoutingStateReplicationIf.ice
index f83911b..6082325 100644
--- a/slice/AsteriskSCF/Replication/BasicRoutingService/BasicRoutingStateReplicationIf.ice
+++ b/slice/AsteriskSCF/Replication/BasicRoutingService/BasicRoutingStateReplicationIf.ice
@@ -102,6 +102,7 @@ module V1
         AsteriskSCF::SessionCommunications::V1::Session *source;
         string destination;
         AsteriskSCF::SessionCommunications::ExtensionPoints::V1::SessionCreationHook* hook;
+        AsteriskSCF::SessionCommunications::PartyIdentification::V1::Caller callerID;
     };
     const string RouteSessionOpStartKeyMod = ".START";
 
diff --git a/src/RouteSessionOperation.cpp b/src/RouteSessionOperation.cpp
index 63bd4d3..dbace7c 100644
--- a/src/RouteSessionOperation.cpp
+++ b/src/RouteSessionOperation.cpp
@@ -216,6 +216,7 @@ RouteSessionOperation::RouteSessionOperation(const AMD_SessionRouter_routeSessio
                                              const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& source, 
                                              const ::std::string& destination, 
                                              const ::AsteriskSCF::SessionCommunications::ExtensionPoints::V1::SessionCreationHookPrx& oneShotHook,
+                                             const ::AsteriskSCF::SessionCommunications::PartyIdentification::V1::CallerPtr& callerID,
                                              const ::Ice::Current& current,
                                              const SessionContextPtr& context,
                                              OperationsManager* const listener) 
@@ -228,7 +229,8 @@ RouteSessionOperation::RouteSessionOperation(const AMD_SessionRouter_routeSessio
                                                                  operationId),
            mSource(source),
            mDestination(destination),
-           mHook(oneShotHook)
+           mHook(oneShotHook),
+           mCallerID(callerID),
 {
     initStateMachine();
 }
@@ -308,6 +310,7 @@ void RouteSessionOperation::reflectUpdate(const AsteriskSCF::Replication::BasicR
     mSource = item->source;
     mDestination = item->destination;
     mHook = item->hook;
+    mCallerID = item->callerID;
     mOperationId = item->operationId;
 
     mReplicatedStates.push_back(RouteSessionOp::STATE_LOOKUP);
@@ -496,7 +499,7 @@ void RouteSessionOperation::establishBridgeState()
         bridgedSessions.insert(bridgedSessions.end(), newSessions.begin(), newSessions.end());
 
         lg(Debug) <<  BOOST_CURRENT_FUNCTION << ": Creating bridge.";
-        bridge = mSessionContext->bridgeManager->createBridge(bridgedSessions, 0);
+        bridge = mSessionContext->bridgeManager->createBridge(source, bridgedSessions, 0, mCallerID);
     }
     catch (const Ice::Exception &e)
     {
diff --git a/src/RouteSessionOperation.h b/src/RouteSessionOperation.h
index 8ab5f63..aa568a8 100644
--- a/src/RouteSessionOperation.h
+++ b/src/RouteSessionOperation.h
@@ -176,6 +176,7 @@ private:
     AsteriskSCF::SessionCommunications::V1::BridgePrx mBridge;
     std::string mDestination;
     AsteriskSCF::SessionCommunications::ExtensionPoints::V1::SessionCreationHookPrx mHook;
+    AsteriskSCF::SessionCommunications::PartyIdentification::V1::CallerPtr mCallerID;
     std::vector<RouteSessionOp::OperationState> mReplicatedStates;
 
 }; // class RouteSessionOperation
diff --git a/src/SessionRouter.cpp b/src/SessionRouter.cpp
index 9d9477a..a517b39 100644
--- a/src/SessionRouter.cpp
+++ b/src/SessionRouter.cpp
@@ -164,6 +164,7 @@ void SessionRouter::routeSession_async(const ::AsteriskSCF::SessionCommunication
                                        const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& source, 
                                        const ::std::string& destination, 
                                        const ::AsteriskSCF::SessionCommunications::ExtensionPoints::V1::SessionCreationHookPrx& oneShotHook,
+                                       const ::AsteriskSCF::SessionCommunications::PartyIdentification::V1::CallerPtr& callerID,
                                        const ::Ice::Current& current)
 {
     // Check the cache for a replica with this transaction Id.
@@ -182,6 +183,7 @@ void SessionRouter::routeSession_async(const ::AsteriskSCF::SessionCommunication
                                              source, 
                                              destination, 
                                              oneShotHook,
+                                             callerID,
                                              current, 
                                              mImpl->mSessionContext,
                                              mImpl.get()));
diff --git a/src/SessionRouter.h b/src/SessionRouter.h
index bc098d4..daba8bb 100644
--- a/src/SessionRouter.h
+++ b/src/SessionRouter.h
@@ -62,6 +62,7 @@ public:
                     const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& source, 
                     const ::std::string& destination, 
                     const ::AsteriskSCF::SessionCommunications::ExtensionPoints::V1::SessionCreationHookPrx& oneShotHook,
+                    const ::AsteriskSCF::SessionCommunications::PartyIdentification::V1::CallerPtr& callerID,
                     const ::Ice::Current&);
 
     /**

commit 472c492708d30b05c3949e3ffed14f9241b2456d
Author: Ken Hunt <ken.hunt at digium.com>
Date:   Fri Sep 30 17:38:48 2011 -0500

    Adapt to changes in Party Id records.

diff --git a/test/MockSession.cpp b/test/MockSession.cpp
index 38d3462..0a79a7c 100644
--- a/test/MockSession.cpp
+++ b/test/MockSession.cpp
@@ -88,7 +88,10 @@ MockSession::MockSession(const string& legId,
     idSeq2.push_back(connectedId);
     mConnectedLine = new ConnectedLine(idSeq2);
 
-        mRedirecting = new Redirecting(dialedId, connectedId, 1);
+    RedirectionSeq redirects;
+    RedirectionPtr redirect = new Redirection(dialedId, connectedId);
+    redirects.push_back(redirect);
+    mRedirections = new Redirections(redirects);
 }
 
 MockSession::~MockSession()
@@ -239,9 +242,9 @@ void MockSession::getConnectedLine_async(const AMD_Session_getConnectedLinePtr&
     cb->ice_response(mConnectedLine);
 }
 
-void MockSession::getRedirecting_async(const AMD_Session_getRedirectingPtr& cb, const Ice::Current& )
+void MockSession::getRedirections_async(const AMD_Session_getRedirectionsPtr& cb, const Ice::Current& )
 {
-    cb->ice_response(mRedirecting);
+    cb->ice_response(mRedirections);
 }
 
 /**
diff --git a/test/MockSession.h b/test/MockSession.h
index f60ae98..00026f5 100644
--- a/test/MockSession.h
+++ b/test/MockSession.h
@@ -100,7 +100,7 @@ public:
                             const ::Ice::Current&);
     void getConnectedLine_async(const AsteriskSCF::SessionCommunications::V1::AMD_Session_getConnectedLinePtr& cb,  
                                 const ::Ice::Current&);
-    void getRedirecting_async(const AsteriskSCF::SessionCommunications::V1::AMD_Session_getRedirectingPtr& cb, 
+    void getRedirections_async(const AsteriskSCF::SessionCommunications::V1::AMD_Session_getRedirectionsPtr& cb, 
                               const Ice::Current& );
 
 public:
@@ -128,7 +128,7 @@ private:
     AsteriskSCF::SessionCommunications::PartyIdentification::V1::CallerPtr mCaller;
     AsteriskSCF::SessionCommunications::PartyIdentification::V1::DialedPtr mDialed;
     AsteriskSCF::SessionCommunications::PartyIdentification::V1::ConnectedLinePtr mConnectedLine;
-    AsteriskSCF::SessionCommunications::PartyIdentification::V1::RedirectingPtr mRedirecting;
+    AsteriskSCF::SessionCommunications::PartyIdentification::V1::RedirectionsPtr mRedirections;
 };
 typedef IceUtil::Handle<MockSession> MockSessionPtr;
 

commit 5b3bdbd9ae828aecea006d5d604a86fa4afd133a
Author: Ken Hunt <ken.hunt at digium.com>
Date:   Tue Sep 20 13:42:53 2011 -0500

    Updated config file and removed extraneous file.

diff --git a/config/.routingtest.conf.swp b/config/.routingtest.conf.swp
deleted file mode 100644
index 2e63771..0000000
Binary files a/config/.routingtest.conf.swp and /dev/null differ
diff --git a/config/routing.conf b/config/routing.conf
index 31bfc03..7e471e6 100644
--- a/config/routing.conf
+++ b/config/routing.conf
@@ -23,5 +23,5 @@ LocatorServiceManagement.Proxy=LocatorServiceManagement:tcp -p 4412
 
 # this is used to connect to the IceStorm instance that lives in the same IceBox
 # container as the ServiceDiscovery service
-TopicManager.Proxy=ServiceDiscoveryIceStorm/TopicManager:tcp -p 4421
+TopicManager.Proxy=ServiceDiscovery/TopicManager:tcp -p 4421
 

commit 4992c9b1696c5a16f7c43e8b23fcb51f47097308
Author: Ken Hunt <ken.hunt at digium.com>
Date:   Mon Sep 19 18:10:46 2011 -0500

    Updates for changes to configuration properties for components.

diff --git a/config/.routingtest.conf.swp b/config/.routingtest.conf.swp
new file mode 100644
index 0000000..2e63771
Binary files /dev/null and b/config/.routingtest.conf.swp differ
diff --git a/config/routing-state-replicator.conf b/config/routing-state-replicator.conf
index c1c67ed..b943ef2 100644
--- a/config/routing-state-replicator.conf
+++ b/config/routing-state-replicator.conf
@@ -1,18 +1,17 @@
-# Adapter parameters for this component
-RoutingStateReplicator.Endpoints=default
-RoutingStateReplicator.ThreadPool.Size=4
+IceBox.InheritProperties = 1
+# this value was empirically determined... it may need to be different on different systems
+Ice.ThreadPool.Client.Size=10
 
-# A proxy to the IceStorm topic manager
-TopicManager.Proxy=AsteriskSCFIceStorm/TopicManager:default -p 10000
+IceBox.Service.RoutingStateReplicator=RoutingStateReplicator:create
 
-# A proxy to the service locator management service
-LocatorServiceManagement.Proxy=LocatorServiceManagement:tcp -p 4422
+RoutingStateReplicator.Adapter.ThreadPool.Size=4
+RoutingStateReplicator.Adapter.Endpoints=tcp -p 4492
 
-# A proxy to the service locator service
-LocatorService.Proxy=LocatorService:tcp -p 4411
+# this service name property is used when registering this component's 
+# services with the ServiceLocator. services are registered with
+# a Category, Service, and Instance.
+RoutingStateReplicator.ServiceName=default
 
-# The name of the state replicator
-RoutingStateReplicator.Name=default
+LocatorService.Proxy=LocatorService:tcp -p 4411
+LocatorServiceManagement.Proxy=LocatorServiceManagement:tcp -p 4412
 
-IceBox.InheritProperties = 1
-IceBox.Service.RoutingStateReplicator=RoutingStateReplicator:create
diff --git a/config/routing.conf b/config/routing.conf
index 21c2991..31bfc03 100644
--- a/config/routing.conf
+++ b/config/routing.conf
@@ -1,40 +1,27 @@
-# This is a configuration file for the Basic Routing Service
-
-Ice.Default.CollocationOptimized=0
-Ice.Warn.UnknownProperties=0
-Ice.ThreadPool.Client.Size=4
-
+IceBox.InheritProperties=1
+# this value was empirically determined... it may need to be different on different systems
+Ice.ThreadPool.Client.Size=10
 IceBox.Service.RoutingService=BasicRoutingService:create
 
-IceBox.InheritProperties=1 
-
-
-RoutingService.Endpoints=tcp -p 10050
-RoutingService.Backplane.Endpoints=tcp -p 10051
-RoutingService.ThreadPool.Size=4
-RoutingService.ThreadPool.SizeMax=10
-RoutingService.ThreadPool.SizeWarn=9
-
-RoutingService.Standby=no
-
+RoutingService.ServiceAdapter.Endpoints=tcp -p 4451
+RoutingService.BackplaneAdapter.Endpoints=tcp -p 4452
 RoutingService.Standalone=yes
+# this service name property is used when registering this component's 
+# services with the ServiceLocator. services are registered with
+# a Category, Service, and Instance.
+RoutingService.ServiceName=default
+# the RoutingService will use the ServiceLocator to locate the BridgeManager;
+# to do so it needs to specify the category (which is always “BridgeManager”, it is not
+# configurable), and the service name. the service name is configurable in the
+# configuration file of the BridgeManager itself, and in the example config it is set to
+# “default”, so the configuration item below tells the RoutingService to look up
+# (category: BridgeManager, service: default)
+RoutingService.BridgeServiceName=default
 
-#Replicator.InstanceName=Replicator
-#Replicator.Endpoints=default -p 10054
-#Replicator.ComponentService.Endpoints=default -p 10055
-#Replicator.ThreadPool.Size=4
-#Replicator.ThreadPool.SizeMax=10
-#Replicator.ThreadPool.SizeWarn=9
-
-# Where to find the Service Locator manager. We need the Service Locator in order to be able to plug in to the Asterisk SCF system Discovery mechanisms.
-LocatorServiceManagement.Proxy=LocatorServiceManagement:tcp -p 4422
-
-# Where to find the Service Locator.
 LocatorService.Proxy=LocatorService:tcp -p 4411
+LocatorServiceManagement.Proxy=LocatorServiceManagement:tcp -p 4412
 
-# Endpoints for Icestorm events
-TopicManager.Proxy=AsteriskSCFIceStorm/TopicManager:default -p 10000
-
-# Category for the bridge service
-BridgeManager.ServiceLocatorId=BridgeService
+# this is used to connect to the IceStorm instance that lives in the same IceBox
+# container as the ServiceDiscovery service
+TopicManager.Proxy=ServiceDiscoveryIceStorm/TopicManager:tcp -p 4421
 
diff --git a/config/routingtest.conf b/config/routingtest.conf
index e9a026c..0d8a5a3 100644
--- a/config/routingtest.conf
+++ b/config/routingtest.conf
@@ -3,68 +3,57 @@
 Ice.Default.CollocationOptimized=0
 
 Ice.Warn.UnknownProperties=0
-Ice.ThreadPool.Client.Size=6
 
-#Ice.Admin.Endpoints=tcp -p 10006
-#Ice.Admin.InstanceName=IceBox
+IceBox.InheritProperties=1
+Ice.ThreadPool.Client.Size=10
+
 IceBox.InstanceName=IceBox
 IceBox.ServiceManager.Endpoints=tcp -p 10007
 
-IceBox.InheritProperties=1
-
 IceBox.Service.ServiceDiscovery=service_locator:create
 IceBox.Service.RoutingService=BasicRoutingService:create
 IceBox.Service.RoutingService2=BasicRoutingService:create
+IceBox.Service.Replicator=BasicRoutingStateReplicator:create
 
-
-# Boost Test arguments can be passed here.
+# Boost Test arguments can be passed to RoutingTest:create
 IceBox.Service.RoutingTest = RoutingTest:create --log_level=all
-#IceBox.Service.RoutingTest = RoutingTest:create
-
-IceBox.Service.Replicator=BasicRoutingStateReplicator:create
 
 IceBox.LoadOrder=ServiceDiscovery,Replicator,RoutingService,RoutingService2,RoutingTest
 
-# Where to find the Service Locator manager. We need the Service Locator in order to be able to plug in to the Asterisk SCF system Discovery mechanisms.
-LocatorServiceManagement.Proxy=LocatorServiceManagement:tcp -p 4422
-
-# Where to find the Service Locator.
 LocatorService.Proxy=LocatorService:tcp -p 4411
+LocatorServiceManagement.Proxy=LocatorServiceManagement:tcp -p 4412
 
-# Test endpoints for IceStorm
-TopicManager.Proxy=AsteriskSCFIceStorm/TopicManager:default -p 10000
+# this is used to connect to the IceStorm instance that lives in the same IceBox
+# container as the ServiceDiscovery service
+TopicManager.Proxy=ServiceDiscovery/TopicManager:tcp -p 4421
 
-# Category for the bridge service
+# Category for the bridge service. This is used by the Routing test driver.
 BridgeManager.ServiceLocatorId=BridgeService
 
 ###########################################
 # Routing Service properties
 
-RoutingService.Endpoints=tcp -p 10050
-RoutingService.Backplane.Endpoints=tcp -p 10051
-RoutingService.ThreadPool.Size=8
-RoutingService.ThreadPool.SizeMax=14
-RoutingService.ThreadPool.SizeWarn=9
+RoutingService.ServiceAdapter.Endpoints=tcp -p 10050
+RoutingService.BackplaneAdapter.Endpoints=tcp -p 10051
+RoutingService.ServiceAdapter.ThreadPool.Size=8
+RoutingService.ServiceAdapter.ThreadPool.SizeMax=14
+RoutingService.ServiceAdapter.ThreadPool.SizeWarn=9
 RoutingService.Standby=no
 RoutingService.StateReplicatorId=Replicator
 RoutingService.ComponentTest=yes
 
-RoutingService2.Endpoints=tcp -p 10052
-RoutingService2.Backplane.Endpoints=tcp -p 10053
-RoutingService2.ThreadPool.Size=8
-RoutingService2.ThreadPool.SizeMax=14
-RoutingService2.ThreadPool.SizeWarn=9
+RoutingService2.ServiceAdapter.Endpoints=tcp -p 10052
+RoutingService2.BackplaneAdapter.Endpoints=tcp -p 10053
+RoutingService2.ServiceAdapter.ThreadPool.Size=8
+RoutingService2.ServiceAdapter.ThreadPool.SizeMax=14
+RoutingService2.ServiceAdapter.ThreadPool.SizeWarn=9
 RoutingService2.Standby=yes
 RoutingService2.StateReplicatorId=Replicator
 
-Replicator.InstanceName=Replicator
-Replicator.Endpoints=default -p 10054
-Replicator.Backplane.Endpoints=default -p 10055
-Replicator.ThreadPool.Size=8
-Replicator.ThreadPool.SizeMax=14
-Replicator.ThreadPool.SizeWarn=9
-
-# AsteriskSCF.RoutingService.logger=Debug
+Replicator.Adapter.Endpoints=default -p 10054
+Replicator.Adapter.ThreadPool.Size=8
+Replicator.Adapter.ThreadPool.SizeMax=14
+Replicator.Adapter.ThreadPool.SizeWarn=9
 
 ###########################################
 # Test properties
@@ -100,42 +89,17 @@ TestRoutingAdapterOut.ThreadPool.SizeWarn=9
 ##########################################
 # Service Locator properties
 
-AsteriskSCFIceStorm.InstanceName=AsteriskSCFIceStorm
-#
-# This property defines the endpoints on which the IceStorm
-# TopicManager listens.
-#
-AsteriskSCFIceStorm.TopicManager.Endpoints=default -p 10000
-
-#
-# This property defines the endpoints on which the topic
-# publisher objects listen. If you want to federate
-# IceStorm instances this must run on a fixed port (or use
-# IceGrid).
-#
-AsteriskSCFIceStorm.Publish.Endpoints=tcp -p 10001:udp -p 10001
-
-#
-# TopicManager Tracing
-#
-# 0 = no tracing
-# 1 = trace topic creation, subscription, unsubscription
-# 2 = like 1, but with more detailed subscription information
-#
-AsteriskSCFIceStorm.Trace.TopicManager=2
-AsteriskSCFIceStorm.Transient=1
+ServiceDiscovery.IceStorm.InstanceName=ServiceDiscovery
 
-#
-AsteriskSCFIceStorm.Flush.Timeout=2000
-# This is a configuration file used in conjunction with the service locator test driver
+ServiceDiscovery.IceStorm.TopicManager.Endpoints=default -p 4421
+ServiceDiscovery.IceStorm.Publish.Endpoints=tcp -p 4422:udp -p 4422
+ServiceDiscovery.IceStorm.Trace.TopicManager=2
+ServiceDiscovery.IceStorm.Transient=1
+ServiceDiscovery.IceStorm.Flush.Timeout=2000
 
 # Test endpoints for the service locator management adapter
-ServiceLocatorManagementAdapter.Endpoints=tcp -p 4422
-
-# Test endpoints for the service locator adapter
-ServiceLocatorAdapter.Endpoints=tcp -p 4411
-ServiceLocatorLocalAdapter.Endpoints=tcp -p 4412
+ServiceDiscovery.Management.ServiceAdapter.Endpoints=tcp -p 4412
+ServiceDiscovery.Locator.ServiceAdapter.Endpoints=tcp -p 4411
+ServiceDiscovery.BackplaneAdapter.Endpoints=tcp -p 4410
+ServiceDiscovery.Standalone=true
 
-# Logger configuration
-LoggerAdapter.Endpoints=default
-AsteriskSCF.Logging.logger.AsteriskSCF=Error
diff --git a/src/BasicRoutingStateReplicatorApp.cpp b/src/BasicRoutingStateReplicatorApp.cpp
index e07e2ec..9e6c29d 100644
--- a/src/BasicRoutingStateReplicatorApp.cpp
+++ b/src/BasicRoutingStateReplicatorApp.cpp
@@ -81,7 +81,6 @@ private:
     bool mRunning;
     bool mInitialized;
     ::Ice::ObjectAdapterPtr mServiceAdapter;
-    ::Ice::ObjectAdapterPtr mBackplaneAdapter;
     ::Ice::CommunicatorPtr mCommunicator;
     ServiceLocatorManagementPrx mServiceLocatorManagement;
     Discovery::V1::ServiceManagementPrx mComponentServiceManagement;
@@ -163,7 +162,7 @@ void BasicRoutingStateReplicatorService::registerWithServiceLocator()
         // Add our Replicator interface and add it to the Service Locator.
         mStateReplicationManagement = mServiceLocatorManagement->addService(mStateReplicatorPrx, StateReplicatorDiscoveryCategory);
 
-        string replicatorName = mCommunicator->getProperties()->getPropertyWithDefault(mAppName + ".InstanceName", "default");
+        string replicatorName = mAppName;
 	setCategory(mStateReplicationManagement, StateReplicatorDiscoveryCategory, serviceName, replicatorName);
     }
     catch(...)
@@ -204,20 +203,15 @@ void BasicRoutingStateReplicatorService::initialize(const std::string& appName)
     mAppName = appName;
 
     // This is the primary adapter for this component.
-    mServiceAdapter = mCommunicator->createObjectAdapter(mAppName);
-
-    // Create a separate adapter just for the component service. This is 
-    // to make it easy to deactivate all of our interfaces other than the
-    // component service to support suspend()/resume().
-    mBackplaneAdapter = mCommunicator->createObjectAdapter(mAppName + ".Backplane");
+    mServiceAdapter = mCommunicator->createObjectAdapter(mAppName + ".Adapter");
 
     // setup logging client
     mIceLogger = createIceLogger(mServiceAdapter);
     getLoggerFactory().setLogOutput(mIceLogger->getLogger());
 
-    // Create and publish our ComponentService interface support on its own adapter.
+    // Create and publish our ComponentService interface.
     mComponentServicePrx = ComponentServicePrx::uncheckedCast(
-        mBackplaneAdapter->add(new ComponentServiceImpl(this), mCommunicator->stringToIdentity(ComponentServiceId)));
+        mServiceAdapter->add(new ComponentServiceImpl(this), mCommunicator->stringToIdentity(ComponentServiceId)));
 
     // Create our instance of the StateReplicator template. 
     mStateReplicator = new RoutingStateReplicatorI();
@@ -226,7 +220,6 @@ void BasicRoutingStateReplicatorService::initialize(const std::string& appName)
 
     // Activate our adapters.
     mServiceAdapter->activate();
-    mBackplaneAdapter->activate();
 
     // Get a proxy to the management interface for the Service Locator, so we can add 
     // ourselves into the system discovery mechanisms.
@@ -251,7 +244,6 @@ void BasicRoutingStateReplicatorService::start(const string &name, const Ice::Co
     else
     {
         mServiceAdapter->activate();
-        mBackplaneAdapter->activate();
     }
 
     // Plug into the Asterisk SCF discovery system so that the interfaces we provide
@@ -320,9 +312,6 @@ void BasicRoutingStateReplicatorService::stop()
     // Just in case we were in suspend() mode when told to stop.
     mComponentServiceManagement->unregister();
 
-    // Turn off our ComponentService interface. 
-    // Only a start() directly from IceBox can restart us now. 
-    mBackplaneAdapter->deactivate();
 
     lg(Info) << "Stopped.";
 }

commit e4ab42275e41d785385bf31251d2c0e6a66e6006
Merge: 93333b0 dce3dee
Author: Mark Michelson <mmichelson at digium.com>
Date:   Tue Sep 13 11:49:08 2011 -0500

    Merge branch 'replacement'


commit dce3dee6eba6e654b26ba73838563bd2ffb1385f
Author: Mark Michelson <mmichelson at digium.com>
Date:   Tue Sep 13 11:30:55 2011 -0500

    Address Ken's feedback on CR-ASTSCF-155.
    
    Make sure to replicate the mReplaceSession boolean.

diff --git a/slice/AsteriskSCF/Replication/BasicRoutingService/BasicRoutingStateReplicationIf.ice b/slice/AsteriskSCF/Replication/BasicRoutingService/BasicRoutingStateReplicationIf.ice
index 939004c..f83911b 100644
--- a/slice/AsteriskSCF/Replication/BasicRoutingService/BasicRoutingStateReplicationIf.ice
+++ b/slice/AsteriskSCF/Replication/BasicRoutingService/BasicRoutingStateReplicationIf.ice
@@ -140,6 +140,7 @@ module V1
     {
         AsteriskSCF::SessionCommunications::V1::Session *sessionToReplace;
         string destination;
+        bool replaceSession;
     };
     const string ConnectBridgedSessionsWithDestStartKeyMod = ".START";
 
diff --git a/src/ConnectBridgedSessionsWithDestinationOperation.cpp b/src/ConnectBridgedSessionsWithDestinationOperation.cpp
index fea353f..a62b309 100644
--- a/src/ConnectBridgedSessionsWithDestinationOperation.cpp
+++ b/src/ConnectBridgedSessionsWithDestinationOperation.cpp
@@ -81,6 +81,7 @@ public:
                      ConnectBridgedSessionsWithDestStartKeyMod;
                 opStart->sessionToReplace = mOperation->getSessionToReplace();
                 opStart->destination = mOperation->getDestination();
+                opStart->replaceSession = mOperation->getReplaceSession();
 
                 pushState(opStart);
             }
@@ -319,6 +320,7 @@ void ConnectBridgedSessionsWithDestinationOperation::reflectUpdate(
     mSessionToReplace = item->sessionToReplace;
     mDestination = item->destination;
     mOperationId = item->operationId;
+    mReplaceSession = item->replaceSession;
 
     mReplicatedStates.push_back(ConnectBridgedSessionsWithDestinationOp::STATE_LOOKUP);
 }
diff --git a/src/ConnectBridgedSessionsWithDestinationOperation.h b/src/ConnectBridgedSessionsWithDestinationOperation.h
index c750c99..b9f2fb0 100644
--- a/src/ConnectBridgedSessionsWithDestinationOperation.h
+++ b/src/ConnectBridgedSessionsWithDestinationOperation.h
@@ -86,6 +86,8 @@ public:
 
     AsteriskSCF::SessionCommunications::V1::BridgePrx getBridge() {return mBridge;}
 
+    bool getReplaceSession() {return mReplaceSession;}
+
     /**
      * Factory method for replica objects. 
      */

commit 5ff9ea9fa9d25b1e5e73d64f7d95faac454a14f1
Author: Mark Michelson <mmichelson at digium.com>
Date:   Mon Aug 29 14:13:18 2011 -0500

    Make it optional whether replacement or addition is done in transfer operations.

diff --git a/src/ConnectBridgedSessionsOperation.cpp b/src/ConnectBridgedSessionsOperation.cpp
index 55770a6..ab1dc2c 100644
--- a/src/ConnectBridgedSessionsOperation.cpp
+++ b/src/ConnectBridgedSessionsOperation.cpp
@@ -51,6 +51,7 @@ ConnectBridgedSessionsOperation::ConnectBridgedSessionsOperation
                             const std::string& operationId,
                             const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& sessionToReplace, 
                             const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& bridgedSession, 
+                            bool replaceSession,
                             const ::Ice::Current& current,
                             const SessionContextPtr& context,
                             OperationsManager* const listener)
@@ -63,7 +64,8 @@ ConnectBridgedSessionsOperation::ConnectBridgedSessionsOperation
                                       ConnectBridgedSessionsOp::STATE_CONNECT,
                                       operationId),
            mSessionToReplace(sessionToReplace),
-           mBridgedSession(bridgedSession)
+           mBridgedSession(bridgedSession),
+           mReplaceSession(replaceSession)
 {
     mStateMachine.addState(ConnectBridgedSessionsOp::STATE_CONNECT, 
                            boost::bind(&ConnectBridgedSessionsOperation::connectBridgedSessionsState, this));
@@ -77,6 +79,7 @@ ConnectBridgedSessionsOperationPtr ConnectBridgedSessionsOperation::create
                     const std::string& operationId,
                     const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& sessionToReplace, 
                     const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& bridgedSession, 
+                    bool replaceSession,
                     const ::Ice::Current& current,
                     const SessionContextPtr& context,
                     OperationsManager* const listener)
@@ -86,6 +89,7 @@ ConnectBridgedSessionsOperationPtr ConnectBridgedSessionsOperation::create
                                                                                operationId,
                                                                                sessionToReplace,
                                                                                bridgedSession,
+                                                                               replaceSession,
                                                                                current,
                                                                                context,
                                                                                listener));
@@ -165,8 +169,16 @@ void ConnectBridgedSessionsOperation::connectBridgedSessionsState()
     // Now replace the sessions.
     try
     {
-        lg(Debug) << BOOST_CURRENT_FUNCTION << ": Asking bridge to replace sessions." ;
-        mergeBridge->replaceSession(mSessionToReplace, migratingSessions);
+        if (mReplaceSession)
+        {
+            lg(Debug) << BOOST_CURRENT_FUNCTION << ": Asking bridge to add sessions." ;
+            mergeBridge->replaceSession(mSessionToReplace, migratingSessions);
+        }
+        else
+        {
+            lg(Debug) << BOOST_CURRENT_FUNCTION << ": Asking bridge to replace sessions." ;
+            mergeBridge->addSessions(migratingSessions);
+        }
     }
     catch(const Ice::Exception& e)
     {
diff --git a/src/ConnectBridgedSessionsOperation.h b/src/ConnectBridgedSessionsOperation.h
index f8304dc..3313664 100644
--- a/src/ConnectBridgedSessionsOperation.h
+++ b/src/ConnectBridgedSessionsOperation.h
@@ -64,6 +64,7 @@ public:
                           const std::string& operationId,
                           const AsteriskSCF::SessionCommunications::V1::SessionPrx& sessionToReplace, 
                           const AsteriskSCF::SessionCommunications::V1::SessionPrx& bridgedSession, 
+                          bool replaceSession,
                           const Ice::Current& current,
                           const SessionContextPtr& context,
                           OperationsManager* const listener);
@@ -75,6 +76,7 @@ protected:
                                     const std::string& operationId,
                                     const AsteriskSCF::SessionCommunications::V1::SessionPrx& sessionToReplace, 
                                     const AsteriskSCF::SessionCommunications::V1::SessionPrx& bridgedSession, 
+                                    bool replaceSession,
                                     const Ice::Current& current,
                                     const SessionContextPtr& context,
                                     OperationsManager* const listener);
@@ -90,6 +92,7 @@ private:
     // Operation input params. 
      AsteriskSCF::SessionCommunications::V1::SessionPrx mSessionToReplace;
      AsteriskSCF::SessionCommunications::V1::SessionPrx mBridgedSession;
+     bool mReplaceSession;
 
 }; // class ConnectBridgedSessionsOperation
 
diff --git a/src/ConnectBridgedSessionsWithDestinationOperation.cpp b/src/ConnectBridgedSessionsWithDestinationOperation.cpp
index 93c0110..fea353f 100644
--- a/src/ConnectBridgedSessionsWithDestinationOperation.cpp
+++ b/src/ConnectBridgedSessionsWithDestinationOperation.cpp
@@ -213,6 +213,7 @@ ConnectBridgedSessionsWithDestinationOperation::ConnectBridgedSessionsWithDestin
                           const std::string& operationId,
                           const SessionPrx& sessionToReplace, 
                           const ::std::string& destination, 
+                          bool replaceSession,
                           const ::AsteriskSCF::SessionCommunications::ExtensionPoints::V1::SessionCreationHookPrx& oneShotHook,
                           const ::Ice::Current& current,
                           const SessionContextPtr& context,
@@ -226,6 +227,7 @@ ConnectBridgedSessionsWithDestinationOperation::ConnectBridgedSessionsWithDestin
                                 operationId),
         mSessionToReplace(sessionToReplace),
         mDestination(destination),
+        mReplaceSession(replaceSession),
         mHook(oneShotHook)
 {
     initStateMachine();
@@ -239,6 +241,7 @@ ConnectBridgedSessionsWithDestinationOperationPtr ConnectBridgedSessionsWithDest
                           const std::string& operationId,
                           const SessionPrx& sessionToReplace, 
                           const ::std::string& destination, 
+                          bool replaceSession,
                           const ::AsteriskSCF::SessionCommunications::ExtensionPoints::V1::SessionCreationHookPrx& oneShotHook,
                           const ::Ice::Current& current,
                           const SessionContextPtr& context,
@@ -249,6 +252,7 @@ ConnectBridgedSessionsWithDestinationOperationPtr ConnectBridgedSessionsWithDest
                                                         operationId,
                                                         sessionToReplace,
                                                         destination,
+                                                        replaceSession,
                                                         oneShotHook,
                                                         current,
                                                         context,
@@ -477,8 +481,16 @@ void ConnectBridgedSessionsWithDestinationOperation::establishBridgeState()
     // Modify the bridge
     try
     {
-        lg(Debug) << BOOST_CURRENT_FUNCTION << ": Replacing session with newly routed destination " << mDestination;
-        mBridge->replaceSession(mSessionToReplace, newSessions);
+        if (mReplaceSession)
+        {
+            lg(Debug) << BOOST_CURRENT_FUNCTION << ": Replacing session with newly routed destination " << mDestination;
+            mBridge->replaceSession(mSessionToReplace, newSessions);
+        }
+        else
+        {
+            lg(Debug) << BOOST_CURRENT_FUNCTION << ": Adding newly routed destination to session's bridge " << mDestination;
+            mBridge->addSessions(newSessions);
+        }
     }
     catch (const Ice::Exception &e)
     {
diff --git a/src/ConnectBridgedSessionsWithDestinationOperation.h b/src/ConnectBridgedSessionsWithDestinationOperation.h
index 988ab96..c750c99 100644
--- a/src/ConnectBridgedSessionsWithDestinationOperation.h
+++ b/src/ConnectBridgedSessionsWithDestinationOperation.h
@@ -71,6 +71,7 @@ public:
                                                                     const std::string& operationId,
                                                                     const AsteriskSCF::SessionCommunications::V1::SessionPrx& sessionToReplace, 
                                                                     const std::string& destination, 
+                                                                    bool replaceSession,
                                                                     const ::AsteriskSCF::SessionCommunications::ExtensionPoints::V1::SessionCreationHookPrx& oneShotHook,
                                                                     const ::Ice::Current& current,
                                                                     const SessionContextPtr& context,
@@ -112,6 +113,7 @@ protected:
                         const std::string& operationId,
                         const AsteriskSCF::SessionCommunications::V1::SessionPrx& sessionToReplace, 
                         const std::string& destination, 
+                        bool replaceSession,
                         const ::AsteriskSCF::SessionCommunications::ExtensionPoints::V1::SessionCreationHookPrx& oneShotHook,
                         const ::Ice::Current& current,
                         const SessionContextPtr& context,
@@ -167,6 +169,7 @@ private:
     // Operation input params. 
     AsteriskSCF::SessionCommunications::V1::SessionPrx mSessionToReplace;
     std::string mDestination;
+    bool mReplaceSession;
     AsteriskSCF::SessionCommunications::ExtensionPoints::V1::SessionCreationHookPrx mHook;
     ::Ice::Current mIceCurrent;
 
diff --git a/src/SessionRouter.cpp b/src/SessionRouter.cpp
index 8c9962f..9d9477a 100644
--- a/src/SessionRouter.cpp
+++ b/src/SessionRouter.cpp
@@ -203,6 +203,7 @@ void SessionRouter::connectBridgedSessionsWithDestination_async(const ::Asterisk
                                                                 const ::std::string& operationId, 
                                                                 const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& sessionToReplace, 
                                                                 const ::std::string& destination, 
+                                                                bool replaceSession,
                                                                 const ::AsteriskSCF::SessionCommunications::ExtensionPoints::V1::SessionCreationHookPrx& oneShotHook,
                                                                 const ::Ice::Current& current)
 {
@@ -221,6 +222,7 @@ void SessionRouter::connectBridgedSessionsWithDestination_async(const ::Asterisk
                                                                       operationId,
                                                                       sessionToReplace, 
                                                                       destination, 
+                                                                      replaceSession,
                                                                       oneShotHook,
                                                                       current, 
                                                                       mImpl->mSessionContext,
@@ -235,13 +237,15 @@ void SessionRouter::connectBridgedSessionsWithDestination_async(const ::Asterisk
 void SessionRouter::connectBridgedSessions_async(const ::AsteriskSCF::SessionCommunications::V1::AMD_SessionRouter_connectBridgedSessionsPtr& cb, 
                                                  const ::std::string& operationId, 
                                                  const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& sessionToReplace, 
-                                                 const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& bridgedSession,  
+                                                 const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& bridgedSession,
+                                                 bool replaceSession,
                                                  const ::Ice::Current& current)
 {
     WorkPtr op(ConnectBridgedSessionsOperation::create(cb, 
                                                        operationId,
                                                        sessionToReplace, 
                                                        bridgedSession, 
+                                                       replaceSession,
                                                        current, 
                                                        mImpl->mSessionContext,
                                                        mImpl.get()));
diff --git a/src/SessionRouter.h b/src/SessionRouter.h
index a2fccc8..bc098d4 100644
--- a/src/SessionRouter.h
+++ b/src/SessionRouter.h
@@ -81,6 +81,7 @@ public:
                     const std::string& operationId, 
                     const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& sessionToReplace, 
                     const ::std::string& destination, 
+                    bool replaceSession,
                     const ::AsteriskSCF::SessionCommunications::ExtensionPoints::V1::SessionCreationHookPrx& oneShotHook,
                     const ::Ice::Current& );
 
@@ -102,6 +103,7 @@ public:
                     const std::string& operationId, 
                     const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& sessionToReplace, 
                     const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& bridgedSession,  
+                    bool replaceSession,
                     const ::Ice::Current&);
 
 private:
diff --git a/test/TestRouting.cpp b/test/TestRouting.cpp
index 9dfb84d..2ce0d51 100644
--- a/test/TestRouting.cpp
+++ b/test/TestRouting.cpp
@@ -457,7 +457,7 @@ BOOST_FIXTURE_TEST_CASE(BlindTransfer, PerTestFixture)
         BOOST_CHECK(SharedTestData::instance.mBridgeConnected);
 
         // Now transfer to a new extension.
-        SharedTestData::instance.sessionRouter->connectBridgedSessionsWithDestination(IceUtil::generateUUID(), session, "103", 0);
+        SharedTestData::instance.sessionRouter->connectBridgedSessionsWithDestination(IceUtil::generateUUID(), session, "103", true, 0);
 
         BOOST_CHECK(SharedTestData::instance.mSessionReplaced);
 
@@ -529,7 +529,7 @@ BOOST_FIXTURE_TEST_CASE(AttendedTransfer, PerTestFixture)
 
         // Now bridge 102 and 104 into the first pair's bridge
         BridgePrx survivingBridge = session101->getBridge(); // Cache for testing.
-        SharedTestData::instance.sessionRouter->connectBridgedSessions("Test_BlindTransfer_" + IceUtil::generateUUID(), session101, session103);
+        SharedTestData::instance.sessionRouter->connectBridgedSessions("Test_BlindTransfer_" + IceUtil::generateUUID(), session101, session103, true);
 
         BOOST_CHECK(SharedTestData::instance.mSessionReplaced);
 
@@ -809,7 +809,7 @@ BOOST_FIXTURE_TEST_CASE(FailoverConnectBridgedSessWithDest, PerTestFixture)
         string operationId = IceUtil::generateUUID();
 
         // Now transfer to a new extension. In our test mode, this operation will never complete.
-        SharedTestData::instance.sessionRouter->begin_connectBridgedSessionsWithDestination(operationId, session, "103", 0);
+        SharedTestData::instance.sessionRouter->begin_connectBridgedSessionsWithDestination(operationId, session, "103", true, 0);
 
         for (int counter=0; SharedTestData::instance.mSessionReplaced == false; counter++)
         {
@@ -840,7 +840,7 @@ BOOST_FIXTURE_TEST_CASE(FailoverConnectBridgedSessWithDest, PerTestFixture)
         BOOST_CHECK(SharedTestData::instance.serviceReplicaMgmt->isActive() == true);
 
         // Let the backup session router try to route using same operationId. Synchronous call.
-        SharedTestData::instance.backupSessionRouter->connectBridgedSessionsWithDestination(operationId, session, "103", 0);
+        SharedTestData::instance.backupSessionRouter->connectBridgedSessionsWithDestination(operationId, session, "103", true, 0);
 
         // The lookup should not be done again. 
         BOOST_CHECK(SharedTestData::instance.endpointLocator->mLookupCalled == false);

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


-- 
asterisk-scf/integration/routing.git



More information about the asterisk-scf-commits mailing list