[asterisk-scf-commits] asterisk-scf/release/routing.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Mon Dec 19 16:10:47 CST 2011


branch "master" has been updated
       via  f0c19132f4e6a9329c0a926c30ff1a4452d37ffd (commit)
       via  bf1358f2fb72b4d872a48b8ef8202889e15a0086 (commit)
       via  d54963ea7e2d8690c9874bbe55268aeb4d2e74e7 (commit)
       via  eb9868d45c3513f1640448b08c8a4e2c78726c8a (commit)
       via  3ad50958f01a2c12188dc73338e9c751d32ba183 (commit)
       via  9dc9d9fc66a8475e74e2b80c1c736ff91f823555 (commit)
       via  0de4e641e2bd3fe51617a76db5c65c1708157ca6 (commit)
       via  18eef1429f7f1d94be88a99d8a0d3c4873e8939a (commit)
      from  0b68e05bf1bf1dd4d25587a6478cd275e8362811 (commit)

Summary of changes:
 .../BasicRoutingStateReplicationIf.ice             |    1 +
 src/ConnectBridgedSessionsOperation.cpp            |   12 ++++++++++--
 ...nectBridgedSessionsWithDestinationOperation.cpp |   12 ++++++++++--
 src/RouteSessionOperation.cpp                      |   13 +++++++++++--
 src/RouteSessionOperation.h                        |    6 ++++++
 src/SessionRouter.cpp                              |    4 ++++
 src/SessionRouter.h                                |    2 ++
 test/MockBridge.cpp                                |   17 +++++++++++++++--
 test/MockBridge.h                                  |    4 ++--
 test/MockBridgeManager.cpp                         |    8 +++++++-
 test/MockBridgeManager.h                           |    5 ++++-
 test/MockSession.cpp                               |   12 ++++++++----
 test/TestRouting.cpp                               |   15 ++++++++-------
 13 files changed, 88 insertions(+), 23 deletions(-)


- Log -----------------------------------------------------------------
commit f0c19132f4e6a9329c0a926c30ff1a4452d37ffd
Merge: bf1358f 0b68e05
Author: Mark Michelson <mmichelson at digium.com>
Date:   Mon Dec 19 16:11:32 2011 -0600

    Merge branch 'master' of git.asterisk.org:asterisk-scf/release/routing


commit bf1358f2fb72b4d872a48b8ef8202889e15a0086
Merge: b803dcb d54963e
Author: Mark Michelson <mmichelson at digium.com>
Date:   Mon Dec 19 15:47:50 2011 -0600

    Merge branch 'party-id'


commit d54963ea7e2d8690c9874bbe55268aeb4d2e74e7
Author: Mark Michelson <mmichelson at digium.com>
Date:   Fri Dec 2 16:02:12 2011 -0600

    Adjust for changes in the slice.

diff --git a/src/ConnectBridgedSessionsOperation.cpp b/src/ConnectBridgedSessionsOperation.cpp
index 77c4a81..cc3bc51 100644
--- a/src/ConnectBridgedSessionsOperation.cpp
+++ b/src/ConnectBridgedSessionsOperation.cpp
@@ -52,7 +52,6 @@ ConnectBridgedSessionsOperation::ConnectBridgedSessionsOperation
                             const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& sessionToReplace, 
                             const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& bridgedSession, 
                             bool replaceSession,
-                            const AsteriskSCF::SessionCommunications::PartyIdentification::V1::ConnectedLinePtr& connectedLine,
                             const ::Ice::Current& current,
                             const SessionContextPtr& context,
                             OperationsManager* const listener)
@@ -66,8 +65,7 @@ ConnectBridgedSessionsOperation::ConnectBridgedSessionsOperation
                                       operationId),
            mSessionToReplace(sessionToReplace),
            mBridgedSession(bridgedSession),
-           mReplaceSession(replaceSession),
-           mConnectedLine(connectedLine)
+           mReplaceSession(replaceSession)
 {
     mStateMachine.addState(ConnectBridgedSessionsOp::STATE_CONNECT, 
                            boost::bind(&ConnectBridgedSessionsOperation::connectBridgedSessionsState, this));
@@ -82,7 +80,6 @@ ConnectBridgedSessionsOperationPtr ConnectBridgedSessionsOperation::create
                     const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& sessionToReplace, 
                     const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& bridgedSession, 
                     bool replaceSession,
-                    const AsteriskSCF::SessionCommunications::PartyIdentification::V1::ConnectedLinePtr& connectedLine,
                     const ::Ice::Current& current,
                     const SessionContextPtr& context,
                     OperationsManager* const listener)
@@ -93,7 +90,6 @@ ConnectBridgedSessionsOperationPtr ConnectBridgedSessionsOperation::create
                                                                                sessionToReplace,
                                                                                bridgedSession,
                                                                                replaceSession,
-                                                                               connectedLine,
                                                                                current,
                                                                                context,
                                                                                listener));
@@ -156,6 +152,14 @@ void ConnectBridgedSessionsOperation::connectBridgedSessionsState()
 
     SessionSeq migratingSessions = removeSessionsFromBridge(oldBridge, mBridgedSession);
 
+    SessionWithSessionInfoSeq infoSeq;
+    for (SessionSeq::iterator sessionIter = migratingSessions.begin(); sessionIter != migratingSessions.end(); ++sessionIter)
+    {
+        SessionInfoPtr info = (*sessionIter)->getInfo();
+        SessionWithSessionInfo swsi = {*sessionIter, info};
+        infoSeq.push_back(swsi);
+    }
+
     // Check for early termination by the source.
     if (mListenerManager->getListener()->isTerminated())
     {
@@ -173,17 +177,15 @@ void ConnectBridgedSessionsOperation::connectBridgedSessionsState()
     // Now replace the sessions.
     try
     {
-        AsteriskSCF::SessionCommunications::PartyIdentification::V1::ConnectedLineSeq connectedLines;
-        connectedLines.push_back(mConnectedLine);
         if (mReplaceSession)
         {
             lg(Debug) << BOOST_CURRENT_FUNCTION << ": Asking bridge to add sessions." ;
-            mergeBridge->replaceSession(mSessionToReplace, migratingSessions, connectedLines);
+            mergeBridge->replaceSession(mSessionToReplace, infoSeq);
         }
         else
         {
             lg(Debug) << BOOST_CURRENT_FUNCTION << ": Asking bridge to replace sessions." ;
-            mergeBridge->addSessions(migratingSessions, connectedLines);
+            mergeBridge->addSessions(infoSeq);
         }
     }
     catch(const Ice::Exception& e)
diff --git a/src/ConnectBridgedSessionsOperation.h b/src/ConnectBridgedSessionsOperation.h
index c16782e..3313664 100644
--- a/src/ConnectBridgedSessionsOperation.h
+++ b/src/ConnectBridgedSessionsOperation.h
@@ -65,7 +65,6 @@ public:
                           const AsteriskSCF::SessionCommunications::V1::SessionPrx& sessionToReplace, 
                           const AsteriskSCF::SessionCommunications::V1::SessionPrx& bridgedSession, 
                           bool replaceSession,
-                          const AsteriskSCF::SessionCommunications::PartyIdentification::V1::ConnectedLinePtr& connectedLine,
                           const Ice::Current& current,
                           const SessionContextPtr& context,
                           OperationsManager* const listener);
@@ -78,7 +77,6 @@ protected:
                                     const AsteriskSCF::SessionCommunications::V1::SessionPrx& sessionToReplace, 
                                     const AsteriskSCF::SessionCommunications::V1::SessionPrx& bridgedSession, 
                                     bool replaceSession,
-                                    const AsteriskSCF::SessionCommunications::PartyIdentification::V1::ConnectedLinePtr& connectedLine,
                                     const Ice::Current& current,
                                     const SessionContextPtr& context,
                                     OperationsManager* const listener);
@@ -95,7 +93,6 @@ private:
      AsteriskSCF::SessionCommunications::V1::SessionPrx mSessionToReplace;
      AsteriskSCF::SessionCommunications::V1::SessionPrx mBridgedSession;
      bool mReplaceSession;
-     AsteriskSCF::SessionCommunications::PartyIdentification::V1::ConnectedLinePtr mConnectedLine;
 
 }; // class ConnectBridgedSessionsOperation
 
diff --git a/src/ConnectBridgedSessionsWithDestinationOperation.cpp b/src/ConnectBridgedSessionsWithDestinationOperation.cpp
index 9de97d0..9dd9f08 100644
--- a/src/ConnectBridgedSessionsWithDestinationOperation.cpp
+++ b/src/ConnectBridgedSessionsWithDestinationOperation.cpp
@@ -462,6 +462,13 @@ void ConnectBridgedSessionsWithDestinationOperation::establishBridgeState()
 
     // Add a session 
     SessionSeq newSessions = createSessionForEndpoints(mLookupResult, mDestination, mHook, mListenerManager);
+    SessionWithSessionInfoSeq infoSeq;
+    for (SessionSeq::iterator sessionIter = newSessions.begin(); sessionIter != newSessions.end(); ++sessionIter)
+    {
+        SessionInfoPtr info = (*sessionIter)->getInfo();
+        SessionWithSessionInfo swsi = {*sessionIter, info};
+        infoSeq.push_back(swsi);
+    }
 
     if (mListenerManager->getListener()->getNumSessions() < 2)
     {
@@ -487,12 +494,12 @@ void ConnectBridgedSessionsWithDestinationOperation::establishBridgeState()
         if (mReplaceSession)
         {
             lg(Debug) << BOOST_CURRENT_FUNCTION << ": Replacing session with newly routed destination " << mDestination;
-            mBridge->replaceSession(mSessionToReplace, newSessions, ConnectedLineSeq());
+            mBridge->replaceSession(mSessionToReplace, infoSeq);
         }
         else
         {
             lg(Debug) << BOOST_CURRENT_FUNCTION << ": Adding newly routed destination to session's bridge " << mDestination;
-            mBridge->addSessions(newSessions, ConnectedLineSeq());
+            mBridge->addSessions(infoSeq);
         }
     }
     catch (const Ice::Exception &e)
diff --git a/src/SessionRouter.cpp b/src/SessionRouter.cpp
index cec08c7..b11d788 100644
--- a/src/SessionRouter.cpp
+++ b/src/SessionRouter.cpp
@@ -243,7 +243,6 @@ void SessionRouter::connectBridgedSessions_async(const ::AsteriskSCF::SessionCom
                                                  const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& sessionToReplace, 
                                                  const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& bridgedSession,
                                                  bool replaceSession,
-                                                 const ::AsteriskSCF::SessionCommunications::PartyIdentification::V1::ConnectedLinePtr& connectedLine,
                                                  const ::Ice::Current& current)
 {
     WorkPtr op(ConnectBridgedSessionsOperation::create(cb, 
@@ -251,7 +250,6 @@ void SessionRouter::connectBridgedSessions_async(const ::AsteriskSCF::SessionCom
                                                        sessionToReplace, 
                                                        bridgedSession, 
                                                        replaceSession,
-                                                       connectedLine,
                                                        current, 
                                                        mImpl->mSessionContext,
                                                        mImpl.get()));
diff --git a/src/SessionRouter.h b/src/SessionRouter.h
index 203a6c9..f71aa5e 100644
--- a/src/SessionRouter.h
+++ b/src/SessionRouter.h
@@ -106,7 +106,6 @@ public:
                     const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& sessionToReplace, 
                     const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& bridgedSession,  
                     bool replaceSession,
-                    const ::AsteriskSCF::SessionCommunications::PartyIdentification::V1::ConnectedLinePtr& connectedLine,
                     const ::Ice::Current&);
 
 private:
diff --git a/test/MockBridge.cpp b/test/MockBridge.cpp
index 3b11958..3ce705c 100644
--- a/test/MockBridge.cpp
+++ b/test/MockBridge.cpp
@@ -72,11 +72,18 @@ MockBridge::~MockBridge()
     mListener = 0;
 }
 
+static SessionPrx extractSession(const SessionWithSessionInfo& swsi)
+{
+    return swsi.sessionProxy;
+}
+
 void MockBridge::addSessions_async(const AMD_Bridge_addSessionsPtr& callback,
-        const SessionSeq& newSessions,
-        const ConnectedLineSeq&,
+        const SessionWithSessionInfoSeq& newSessionInfos,
         const Ice::Current&)
 {
+    SessionSeq newSessions;
+    newSessions.resize(newSessionInfos.size());
+    std::transform(newSessionInfos.begin(), newSessionInfos.end(), newSessions.begin(), extractSession);
     try
     {
         addSessionsImpl(newSessions);
@@ -149,10 +156,12 @@ void MockBridge::shutdown(const Ice::Current&)
 
 void MockBridge::replaceSession_async(const AsteriskSCF::SessionCommunications::V1::AMD_Bridge_replaceSessionPtr& cb,
     const AsteriskSCF::SessionCommunications::V1::SessionPrx& sessionToReplace,
-    const AsteriskSCF::SessionCommunications::V1::SessionSeq& newSessions,
-    const ConnectedLineSeq&,
+    const AsteriskSCF::SessionCommunications::V1::SessionWithSessionInfoSeq& newSessionInfos,
     const Ice::Current&)
 {
+    SessionSeq newSessions;
+    newSessions.resize(newSessionInfos.size());
+    std::transform(newSessionInfos.begin(), newSessionInfos.end(), newSessions.begin(), extractSession);
     try
     {
         SharedTestData::instance.mSessionReplaced = true;
diff --git a/test/MockBridge.h b/test/MockBridge.h
index 5d41a3e..e32b190 100644
--- a/test/MockBridge.h
+++ b/test/MockBridge.h
@@ -35,8 +35,7 @@ public:
 
     // Overrides
     void addSessions_async(const AsteriskSCF::SessionCommunications::V1::AMD_Bridge_addSessionsPtr&,
-            const AsteriskSCF::SessionCommunications::V1::SessionSeq& newSessions,
-            const AsteriskSCF::SessionCommunications::PartyIdentification::V1::ConnectedLineSeq& connectedLines,
+            const AsteriskSCF::SessionCommunications::V1::SessionWithSessionInfoSeq& newSessionInfos,
             const Ice::Current& = ::Ice::Current());
     void destroy(const Ice::Current& ) ;
     void removeSessions_async(const AsteriskSCF::SessionCommunications::V1::AMD_Bridge_removeSessionsPtr&,
@@ -49,8 +48,7 @@ public:
 
     void replaceSession_async(const AsteriskSCF::SessionCommunications::V1::AMD_Bridge_replaceSessionPtr&,
         const AsteriskSCF::SessionCommunications::V1::SessionPrx& sessionToReplace,
-        const AsteriskSCF::SessionCommunications::V1::SessionSeq& newSessions,
-        const AsteriskSCF::SessionCommunications::PartyIdentification::V1::ConnectedLineSeq& connectedLines,
+        const AsteriskSCF::SessionCommunications::V1::SessionWithSessionInfoSeq& newSessionInfos,
         const Ice::Current&);
 
     void setCookies(const AsteriskSCF::SessionCommunications::V1::BridgeCookies& cookies, const Ice::Current&);
diff --git a/test/TestRouting.cpp b/test/TestRouting.cpp
index 2d3b138..1ab8a32 100644
--- a/test/TestRouting.cpp
+++ b/test/TestRouting.cpp
@@ -530,7 +530,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, true, session103->getConnectedLine());
+        SharedTestData::instance.sessionRouter->connectBridgedSessions("Test_BlindTransfer_" + IceUtil::generateUUID(), session101, session103, true);
 
         BOOST_CHECK(SharedTestData::instance.mSessionReplaced);
 

commit eb9868d45c3513f1640448b08c8a4e2c78726c8a
Author: Mark Michelson <mmichelson at digium.com>
Date:   Wed Nov 9 10:35:58 2011 -0600

    Adjust connectBridgedSessions to take connected line information so updates may be issued.

diff --git a/src/ConnectBridgedSessionsOperation.cpp b/src/ConnectBridgedSessionsOperation.cpp
index ab1dc2c..77c4a81 100644
--- a/src/ConnectBridgedSessionsOperation.cpp
+++ b/src/ConnectBridgedSessionsOperation.cpp
@@ -52,6 +52,7 @@ ConnectBridgedSessionsOperation::ConnectBridgedSessionsOperation
                             const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& sessionToReplace, 
                             const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& bridgedSession, 
                             bool replaceSession,
+                            const AsteriskSCF::SessionCommunications::PartyIdentification::V1::ConnectedLinePtr& connectedLine,
                             const ::Ice::Current& current,
                             const SessionContextPtr& context,
                             OperationsManager* const listener)
@@ -65,7 +66,8 @@ ConnectBridgedSessionsOperation::ConnectBridgedSessionsOperation
                                       operationId),
            mSessionToReplace(sessionToReplace),
            mBridgedSession(bridgedSession),
-           mReplaceSession(replaceSession)
+           mReplaceSession(replaceSession),
+           mConnectedLine(connectedLine)
 {
     mStateMachine.addState(ConnectBridgedSessionsOp::STATE_CONNECT, 
                            boost::bind(&ConnectBridgedSessionsOperation::connectBridgedSessionsState, this));
@@ -80,6 +82,7 @@ ConnectBridgedSessionsOperationPtr ConnectBridgedSessionsOperation::create
                     const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& sessionToReplace, 
                     const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& bridgedSession, 
                     bool replaceSession,
+                    const AsteriskSCF::SessionCommunications::PartyIdentification::V1::ConnectedLinePtr& connectedLine,
                     const ::Ice::Current& current,
                     const SessionContextPtr& context,
                     OperationsManager* const listener)
@@ -90,6 +93,7 @@ ConnectBridgedSessionsOperationPtr ConnectBridgedSessionsOperation::create
                                                                                sessionToReplace,
                                                                                bridgedSession,
                                                                                replaceSession,
+                                                                               connectedLine,
                                                                                current,
                                                                                context,
                                                                                listener));
@@ -169,15 +173,17 @@ void ConnectBridgedSessionsOperation::connectBridgedSessionsState()
     // Now replace the sessions.
     try
     {
+        AsteriskSCF::SessionCommunications::PartyIdentification::V1::ConnectedLineSeq connectedLines;
+        connectedLines.push_back(mConnectedLine);
         if (mReplaceSession)
         {
             lg(Debug) << BOOST_CURRENT_FUNCTION << ": Asking bridge to add sessions." ;
-            mergeBridge->replaceSession(mSessionToReplace, migratingSessions);
+            mergeBridge->replaceSession(mSessionToReplace, migratingSessions, connectedLines);
         }
         else
         {
             lg(Debug) << BOOST_CURRENT_FUNCTION << ": Asking bridge to replace sessions." ;
-            mergeBridge->addSessions(migratingSessions);
+            mergeBridge->addSessions(migratingSessions, connectedLines);
         }
     }
     catch(const Ice::Exception& e)
diff --git a/src/ConnectBridgedSessionsOperation.h b/src/ConnectBridgedSessionsOperation.h
index 3313664..c16782e 100644
--- a/src/ConnectBridgedSessionsOperation.h
+++ b/src/ConnectBridgedSessionsOperation.h
@@ -65,6 +65,7 @@ public:
                           const AsteriskSCF::SessionCommunications::V1::SessionPrx& sessionToReplace, 
                           const AsteriskSCF::SessionCommunications::V1::SessionPrx& bridgedSession, 
                           bool replaceSession,
+                          const AsteriskSCF::SessionCommunications::PartyIdentification::V1::ConnectedLinePtr& connectedLine,
                           const Ice::Current& current,
                           const SessionContextPtr& context,
                           OperationsManager* const listener);
@@ -77,6 +78,7 @@ protected:
                                     const AsteriskSCF::SessionCommunications::V1::SessionPrx& sessionToReplace, 
                                     const AsteriskSCF::SessionCommunications::V1::SessionPrx& bridgedSession, 
                                     bool replaceSession,
+                                    const AsteriskSCF::SessionCommunications::PartyIdentification::V1::ConnectedLinePtr& connectedLine,
                                     const Ice::Current& current,
                                     const SessionContextPtr& context,
                                     OperationsManager* const listener);
@@ -93,6 +95,7 @@ private:
      AsteriskSCF::SessionCommunications::V1::SessionPrx mSessionToReplace;
      AsteriskSCF::SessionCommunications::V1::SessionPrx mBridgedSession;
      bool mReplaceSession;
+     AsteriskSCF::SessionCommunications::PartyIdentification::V1::ConnectedLinePtr mConnectedLine;
 
 }; // class ConnectBridgedSessionsOperation
 
diff --git a/src/ConnectBridgedSessionsWithDestinationOperation.cpp b/src/ConnectBridgedSessionsWithDestinationOperation.cpp
index a62b309..9de97d0 100644
--- a/src/ConnectBridgedSessionsWithDestinationOperation.cpp
+++ b/src/ConnectBridgedSessionsWithDestinationOperation.cpp
@@ -24,6 +24,7 @@
 using namespace AsteriskSCF;
 using namespace AsteriskSCF::Core::Routing::V1;
 using namespace AsteriskSCF::SessionCommunications::V1;
+using namespace AsteriskSCF::SessionCommunications::PartyIdentification::V1;
 using namespace AsteriskSCF::System::Logging;
 using namespace AsteriskSCF::BasicRoutingService;
 using namespace AsteriskSCF::Replication::BasicRoutingService::V1;
@@ -486,12 +487,12 @@ void ConnectBridgedSessionsWithDestinationOperation::establishBridgeState()
         if (mReplaceSession)
         {
             lg(Debug) << BOOST_CURRENT_FUNCTION << ": Replacing session with newly routed destination " << mDestination;
-            mBridge->replaceSession(mSessionToReplace, newSessions);
+            mBridge->replaceSession(mSessionToReplace, newSessions, ConnectedLineSeq());
         }
         else
         {
             lg(Debug) << BOOST_CURRENT_FUNCTION << ": Adding newly routed destination to session's bridge " << mDestination;
-            mBridge->addSessions(newSessions);
+            mBridge->addSessions(newSessions, ConnectedLineSeq());
         }
     }
     catch (const Ice::Exception &e)
diff --git a/src/SessionRouter.cpp b/src/SessionRouter.cpp
index b11d788..cec08c7 100644
--- a/src/SessionRouter.cpp
+++ b/src/SessionRouter.cpp
@@ -243,6 +243,7 @@ void SessionRouter::connectBridgedSessions_async(const ::AsteriskSCF::SessionCom
                                                  const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& sessionToReplace, 
                                                  const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& bridgedSession,
                                                  bool replaceSession,
+                                                 const ::AsteriskSCF::SessionCommunications::PartyIdentification::V1::ConnectedLinePtr& connectedLine,
                                                  const ::Ice::Current& current)
 {
     WorkPtr op(ConnectBridgedSessionsOperation::create(cb, 
@@ -250,6 +251,7 @@ void SessionRouter::connectBridgedSessions_async(const ::AsteriskSCF::SessionCom
                                                        sessionToReplace, 
                                                        bridgedSession, 
                                                        replaceSession,
+                                                       connectedLine,
                                                        current, 
                                                        mImpl->mSessionContext,
                                                        mImpl.get()));
diff --git a/src/SessionRouter.h b/src/SessionRouter.h
index f71aa5e..203a6c9 100644
--- a/src/SessionRouter.h
+++ b/src/SessionRouter.h
@@ -106,6 +106,7 @@ public:
                     const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& sessionToReplace, 
                     const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& bridgedSession,  
                     bool replaceSession,
+                    const ::AsteriskSCF::SessionCommunications::PartyIdentification::V1::ConnectedLinePtr& connectedLine,
                     const ::Ice::Current&);
 
 private:
diff --git a/test/MockBridge.cpp b/test/MockBridge.cpp
index e0fc4f0..3b11958 100644
--- a/test/MockBridge.cpp
+++ b/test/MockBridge.cpp
@@ -19,6 +19,7 @@
 #include "SharedTestData.h"
 
 using namespace AsteriskSCF::SessionCommunications::V1;
+using namespace AsteriskSCF::SessionCommunications::PartyIdentification::V1;
 
 namespace AsteriskSCF
 {
@@ -71,7 +72,9 @@ MockBridge::~MockBridge()
     mListener = 0;
 }
 
-void MockBridge::addSessions_async(const AMD_Bridge_addSessionsPtr& callback, const SessionSeq& newSessions,
+void MockBridge::addSessions_async(const AMD_Bridge_addSessionsPtr& callback,
+        const SessionSeq& newSessions,
+        const ConnectedLineSeq&,
         const Ice::Current&)
 {
     try
@@ -147,6 +150,7 @@ void MockBridge::shutdown(const Ice::Current&)
 void MockBridge::replaceSession_async(const AsteriskSCF::SessionCommunications::V1::AMD_Bridge_replaceSessionPtr& cb,
     const AsteriskSCF::SessionCommunications::V1::SessionPrx& sessionToReplace,
     const AsteriskSCF::SessionCommunications::V1::SessionSeq& newSessions,
+    const ConnectedLineSeq&,
     const Ice::Current&)
 {
     try
diff --git a/test/MockBridge.h b/test/MockBridge.h
index 7204363..5d41a3e 100644
--- a/test/MockBridge.h
+++ b/test/MockBridge.h
@@ -36,6 +36,7 @@ public:
     // Overrides
     void addSessions_async(const AsteriskSCF::SessionCommunications::V1::AMD_Bridge_addSessionsPtr&,
             const AsteriskSCF::SessionCommunications::V1::SessionSeq& newSessions,
+            const AsteriskSCF::SessionCommunications::PartyIdentification::V1::ConnectedLineSeq& connectedLines,
             const Ice::Current& = ::Ice::Current());
     void destroy(const Ice::Current& ) ;
     void removeSessions_async(const AsteriskSCF::SessionCommunications::V1::AMD_Bridge_removeSessionsPtr&,
@@ -49,6 +50,7 @@ public:
     void replaceSession_async(const AsteriskSCF::SessionCommunications::V1::AMD_Bridge_replaceSessionPtr&,
         const AsteriskSCF::SessionCommunications::V1::SessionPrx& sessionToReplace,
         const AsteriskSCF::SessionCommunications::V1::SessionSeq& newSessions,
+        const AsteriskSCF::SessionCommunications::PartyIdentification::V1::ConnectedLineSeq& connectedLines,
         const Ice::Current&);
 
     void setCookies(const AsteriskSCF::SessionCommunications::V1::BridgeCookies& cookies, const Ice::Current&);
diff --git a/test/TestRouting.cpp b/test/TestRouting.cpp
index 357d3a9..2d3b138 100644
--- a/test/TestRouting.cpp
+++ b/test/TestRouting.cpp
@@ -39,6 +39,7 @@ using namespace std;
 using namespace AsteriskSCF::Core::Routing::V1;
 using namespace AsteriskSCF::Core::Endpoint::V1;
 using namespace AsteriskSCF::SessionCommunications::V1;
+using namespace AsteriskSCF::SessionCommunications::PartyIdentification::V1;
 using namespace AsteriskSCF::Core::Discovery::V1;
 using namespace AsteriskSCF::RoutingTest;
 using namespace AsteriskSCF::System::Component::V1;
@@ -529,7 +530,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, true);
+        SharedTestData::instance.sessionRouter->connectBridgedSessions("Test_BlindTransfer_" + IceUtil::generateUUID(), session101, session103, true, session103->getConnectedLine());
 
         BOOST_CHECK(SharedTestData::instance.mSessionReplaced);
 

commit 3ad50958f01a2c12188dc73338e9c751d32ba183
Author: Mark Michelson <mmichelson at digium.com>
Date:   Thu Oct 13 18:51:15 2011 -0500

    Adjust for privacy and redirection reasons.

diff --git a/test/MockSession.cpp b/test/MockSession.cpp
index 0a79a7c..cc48d47 100644
--- a/test/MockSession.cpp
+++ b/test/MockSession.cpp
@@ -67,7 +67,8 @@ MockSession::MockSession(const string& legId,
 
     NamePtr name = new Name("bar");
     NumberPtr number = new Number("100");
-    IdPtr testId = new Id(name, number);
+    PrivacyPtr privacy = new Privacy(false);
+    IdPtr testId = new Id(name, number, privacy);
     IdSeq idSeq;
     idSeq.push_back(testId);
     mCaller = new Caller(idSeq);
@@ -76,20 +77,23 @@ MockSession::MockSession(const string& legId,
 
     NamePtr dialedName = new Name("foo");
     NumberPtr dialedNumber = new Number("104");
-    IdPtr dialedId = new Id(dialedName, dialedNumber);
+    PrivacyPtr dialedPrivacy = new Privacy(false);
+    IdPtr dialedId = new Id(dialedName, dialedNumber, dialedPrivacy);
     IdSeq dialedSeq;
     dialedSeq.push_back(dialedId);
     mDialed = new Dialed(dialedNumber);
 
     NamePtr redirName = new Name("scud");
     NumberPtr redirNumber = new Number("666");
-    IdPtr connectedId = new Id(redirName, redirNumber);
+    PrivacyPtr redirPrivacy = new Privacy(false);
+    IdPtr connectedId = new Id(redirName, redirNumber, redirPrivacy);
     IdSeq idSeq2;
     idSeq2.push_back(connectedId);
     mConnectedLine = new ConnectedLine(idSeq2);
 
     RedirectionSeq redirects;
-    RedirectionPtr redirect = new Redirection(dialedId, connectedId);
+    RedirectionReasonPtr reason(new RedirectionReason(Unknown));
+    RedirectionPtr redirect = new Redirection(dialedId, connectedId, reason);
     redirects.push_back(redirect);
     mRedirections = new Redirections(redirects);
 }

commit 9dc9d9fc66a8475e74e2b80c1c736ff91f823555
Author: Mark Michelson <mmichelson at digium.com>
Date:   Thu Oct 13 13:55:06 2011 -0500

    Add redirection support to routeSession()

diff --git a/src/RouteSessionOperation.cpp b/src/RouteSessionOperation.cpp
index 42f2129..5afa4d8 100644
--- a/src/RouteSessionOperation.cpp
+++ b/src/RouteSessionOperation.cpp
@@ -217,6 +217,7 @@ RouteSessionOperation::RouteSessionOperation(const AMD_SessionRouter_routeSessio
                                              const ::std::string& destination, 
                                              const ::AsteriskSCF::SessionCommunications::ExtensionPoints::V1::SessionCreationHookPrx& oneShotHook,
                                              const ::AsteriskSCF::SessionCommunications::PartyIdentification::V1::CallerPtr& callerID,
+                                             const ::AsteriskSCF::SessionCommunications::PartyIdentification::V1::RedirectionsPtr& redirects,
                                              const ::Ice::Current& current,
                                              const SessionContextPtr& context,
                                              OperationsManager* const listener) 
@@ -230,7 +231,8 @@ RouteSessionOperation::RouteSessionOperation(const AMD_SessionRouter_routeSessio
            mSource(source),
            mDestination(destination),
            mHook(oneShotHook),
-           mCallerID(callerID)
+           mCallerID(callerID),
+           mRedirects(redirects)
 {
     initStateMachine();
 }
@@ -244,6 +246,7 @@ RouteSessionOperationPtr RouteSessionOperation::create(const AMD_SessionRouter_r
                               const ::std::string& destination, 
                               const ::AsteriskSCF::SessionCommunications::ExtensionPoints::V1::SessionCreationHookPrx& oneShotHook,
                               const ::AsteriskSCF::SessionCommunications::PartyIdentification::V1::CallerPtr& callerID,
+                              const ::AsteriskSCF::SessionCommunications::PartyIdentification::V1::RedirectionsPtr& redirects,
                               const ::Ice::Current& current,
                               const SessionContextPtr& context,
                               OperationsManager* const listener) 
@@ -255,6 +258,7 @@ RouteSessionOperationPtr RouteSessionOperation::create(const AMD_SessionRouter_r
                                                             destination,
                                                             oneShotHook,
                                                             callerID,
+                                                            redirects,
                                                             current,
                                                             context,
                                                             listener));
@@ -501,7 +505,7 @@ void RouteSessionOperation::establishBridgeState()
         bridgedSessions.insert(bridgedSessions.end(), newSessions.begin(), newSessions.end());
 
         lg(Debug) <<  BOOST_CURRENT_FUNCTION << ": Creating bridge.";
-        bridge = mSessionContext->bridgeManager->createBridge(mSource, bridgedSessions, 0, mCallerID);
+        bridge = mSessionContext->bridgeManager->createBridge(mSource, bridgedSessions, 0, mCallerID, mRedirects);
     }
     catch (const Ice::Exception &e)
     {
diff --git a/src/RouteSessionOperation.h b/src/RouteSessionOperation.h
index 882be57..6a725cb 100644
--- a/src/RouteSessionOperation.h
+++ b/src/RouteSessionOperation.h
@@ -71,6 +71,7 @@ public:
                                            const ::std::string& destination, 
                                            const ::AsteriskSCF::SessionCommunications::ExtensionPoints::V1::SessionCreationHookPrx& oneShotHook,
                                            const ::AsteriskSCF::SessionCommunications::PartyIdentification::V1::CallerPtr& callerID,
+                                           const ::AsteriskSCF::SessionCommunications::PartyIdentification::V1::RedirectionsPtr& redirects,
                                            const ::Ice::Current& current,
                                            const SessionContextPtr& context,
                                            OperationsManager* const listener);
@@ -107,6 +108,7 @@ protected:
                           const ::std::string& destination, 
                           const ::AsteriskSCF::SessionCommunications::ExtensionPoints::V1::SessionCreationHookPrx& oneShotHook,
                           const ::AsteriskSCF::SessionCommunications::PartyIdentification::V1::CallerPtr& callerID,
+                          const ::AsteriskSCF::SessionCommunications::PartyIdentification::V1::RedirectionsPtr& redirects,
                           const ::Ice::Current& current,
                           const SessionContextPtr& context,
                           OperationsManager* const listener);
@@ -179,6 +181,7 @@ private:
     std::string mDestination;
     AsteriskSCF::SessionCommunications::ExtensionPoints::V1::SessionCreationHookPrx mHook;
     AsteriskSCF::SessionCommunications::PartyIdentification::V1::CallerPtr mCallerID;
+    AsteriskSCF::SessionCommunications::PartyIdentification::V1::RedirectionsPtr mRedirects;
     std::vector<RouteSessionOp::OperationState> mReplicatedStates;
 
 }; // class RouteSessionOperation
diff --git a/src/SessionRouter.cpp b/src/SessionRouter.cpp
index a517b39..b11d788 100644
--- a/src/SessionRouter.cpp
+++ b/src/SessionRouter.cpp
@@ -165,6 +165,7 @@ void SessionRouter::routeSession_async(const ::AsteriskSCF::SessionCommunication
                                        const ::std::string& destination, 
                                        const ::AsteriskSCF::SessionCommunications::ExtensionPoints::V1::SessionCreationHookPrx& oneShotHook,
                                        const ::AsteriskSCF::SessionCommunications::PartyIdentification::V1::CallerPtr& callerID,
+                                       const ::AsteriskSCF::SessionCommunications::PartyIdentification::V1::RedirectionsPtr& redirects,
                                        const ::Ice::Current& current)
 {
     // Check the cache for a replica with this transaction Id.
@@ -184,6 +185,7 @@ void SessionRouter::routeSession_async(const ::AsteriskSCF::SessionCommunication
                                              destination, 
                                              oneShotHook,
                                              callerID,
+                                             redirects,
                                              current, 
                                              mImpl->mSessionContext,
                                              mImpl.get()));
diff --git a/src/SessionRouter.h b/src/SessionRouter.h
index daba8bb..f71aa5e 100644
--- a/src/SessionRouter.h
+++ b/src/SessionRouter.h
@@ -63,6 +63,7 @@ public:
                     const ::std::string& destination, 
                     const ::AsteriskSCF::SessionCommunications::ExtensionPoints::V1::SessionCreationHookPrx& oneShotHook,
                     const ::AsteriskSCF::SessionCommunications::PartyIdentification::V1::CallerPtr& callerID,
+                    const ::AsteriskSCF::SessionCommunications::PartyIdentification::V1::RedirectionsPtr& redirects,
                     const ::Ice::Current&);
 
     /**
diff --git a/test/MockBridgeManager.cpp b/test/MockBridgeManager.cpp
index 1109599..f9af4c6 100644
--- a/test/MockBridgeManager.cpp
+++ b/test/MockBridgeManager.cpp
@@ -36,6 +36,7 @@ void MockBridgeManager::createBridge_async(const AMD_BridgeManager_createBridgeP
         const SessionSeq& sessions,
         const BridgeListenerPrx& listener,
         const CallerPtr&, 
+        const RedirectionsPtr&, 
         const Ice::Current&)
 {
     try
diff --git a/test/MockBridgeManager.h b/test/MockBridgeManager.h
index 391fb2a..36b7293 100644
--- a/test/MockBridgeManager.h
+++ b/test/MockBridgeManager.h
@@ -35,7 +35,8 @@ public:
             const AsteriskSCF::SessionCommunications::V1::SessionPrx& source,
             const AsteriskSCF::SessionCommunications::V1::SessionSeq& sessions,
             const AsteriskSCF::SessionCommunications::V1::BridgeListenerPrx& listener,
-            const AsteriskSCF::SessionCommunications::PartyIdentification::V1::CallerPtr& callerID, const Ice::Current&);
+            const AsteriskSCF::SessionCommunications::PartyIdentification::V1::CallerPtr& callerID,
+            const AsteriskSCF::SessionCommunications::PartyIdentification::V1::RedirectionsPtr& redirects, 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 a662136..357d3a9 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, session->getCaller());
+        SharedTestData::instance.sessionRouter->routeSession(IceUtil::generateUUID(), session, "102", 0, session->getCaller(), session->getRedirections());
 
         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, session->getCaller());
+        SharedTestData::instance.sessionRouter->routeSession(IceUtil::generateUUID(), session, "102", 0, session->getCaller(), session->getRedirections());
 
         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, session101->getCaller());
+        SharedTestData::instance.sessionRouter->routeSession("Test_AttendedTransfer_102_" + IceUtil::generateUUID(), session101, "102", 0, session101->getCaller(), session101->getRedirections());
 
         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, session103->getCaller());
+        SharedTestData::instance.sessionRouter->routeSession("Test_AttendedTransfer_104_" + IceUtil::generateUUID(), session103, "104", 0, session103->getCaller(), session103->getRedirections());
 
         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, session->getCaller());
+        SharedTestData::instance.sessionRouter->begin_routeSession(operationId, session, "102", 0, session->getCaller(), session->getRedirections());
 
         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, session->getCaller());
+        SharedTestData::instance.backupSessionRouter->routeSession(operationId, session, "102", 0, session->getCaller(), session->getRedirections());
 
         // 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, session->getCaller());
+        SharedTestData::instance.sessionRouter->routeSession(IceUtil::generateUUID(), session, "102", 0, session->getCaller(), session->getRedirections());
 
         BridgePrx bridge = session->getBridge();
         BOOST_CHECK(bridge != 0);

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&);
 
     /**

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


-- 
asterisk-scf/release/routing.git



More information about the asterisk-scf-commits mailing list