[asterisk-scf-commits] asterisk-scf/integration/sip.git branch "session-decorator" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Wed Jun 29 16:36:28 CDT 2011
branch "session-decorator" has been updated
via bd53a89af2c3104984d46c118e2b7b158155f25c (commit)
via c58ab8b3d3623ccd57d63077f902eda632faaf7d (commit)
from 59ccbfc493c091ebfe6d2a71d61026d9abf5a77c (commit)
Summary of changes:
src/PJSipManager.cpp | 6 ++++--
src/PJSipManager.h | 4 +++-
src/PJSipSessionModule.cpp | 31 +++++++++++++++++++++++++++++++
src/PJSipSessionModule.h | 26 +++++++++++++++++++++++++-
src/PJSipSessionModuleConstruction.cpp | 17 +++++++++++++++--
src/SipEndpoint.cpp | 9 +++------
src/SipEndpointFactory.cpp | 4 ----
src/SipEndpointFactory.h | 7 -------
src/SipSession.cpp | 10 ++++------
src/SipSession.h | 6 ++----
src/SipSessionManagerApp.cpp | 2 +-
11 files changed, 88 insertions(+), 34 deletions(-)
- Log -----------------------------------------------------------------
commit bd53a89af2c3104984d46c118e2b7b158155f25c
Author: Mark Michelson <mmichelson at digium.com>
Date: Wed Jun 29 16:36:22 2011 -0500
Register the decorator extension point with the service locator.
diff --git a/src/PJSipManager.cpp b/src/PJSipManager.cpp
index 407dcbe..c7402ce 100644
--- a/src/PJSipManager.cpp
+++ b/src/PJSipManager.cpp
@@ -82,11 +82,12 @@ void PJSipManager::registerSessionModule(const boost::shared_ptr<SipEndpointFact
const AsteriskSCF::Core::Discovery::V1::ServiceLocatorPrx& serviceLocator,
const AsteriskSCF::Discovery::SmartProxy<SipStateReplicatorPrx>& stateReplicator,
const AsteriskSCF::System::Component::V1::ReplicaPtr& replica,
- const Ice::ObjectAdapterPtr& adapter
+ const Ice::ObjectAdapterPtr& adapter,
+ const AsteriskSCF::Core::Discovery::V1::ServiceLocatorManagementPrx& serviceLocatorManagement
)
{
mSessionModule = new PJSipSessionModule(mEndpoint, endpointFactoryPtr, sessionRouter,
- serviceLocator, stateReplicator, replica, adapter);
+ serviceLocator, stateReplicator, replica, adapter, serviceLocatorManagement);
}
void PJSipManager::registerLoggingModule()
diff --git a/src/PJSipManager.h b/src/PJSipManager.h
index 3149c76..75c7f87 100644
--- a/src/PJSipManager.h
+++ b/src/PJSipManager.h
@@ -75,7 +75,8 @@ public:
const AsteriskSCF::Core::Discovery::V1::ServiceLocatorPrx& serviceLocator,
const AsteriskSCF::Discovery::SmartProxy<SipStateReplicatorPrx>& stateReplicator,
const AsteriskSCF::System::Component::V1::ReplicaPtr& replica,
- const Ice::ObjectAdapterPtr& adapter
+ const Ice::ObjectAdapterPtr& adapter,
+ const AsteriskSCF::Core::Discovery::V1::ServiceLocatorManagementPrx& serviceLocatorManagement
);
/**
diff --git a/src/PJSipSessionModule.h b/src/PJSipSessionModule.h
index 4798c64..c743a55 100644
--- a/src/PJSipSessionModule.h
+++ b/src/PJSipSessionModule.h
@@ -107,7 +107,8 @@ public:
const AsteriskSCF::Core::Discovery::V1::ServiceLocatorPrx& serviceLocator,
const AsteriskSCF::Discovery::SmartProxy<SipStateReplicatorPrx>& stateReplicator,
const AsteriskSCF::System::Component::V1::ReplicaPtr& replica,
- const Ice::ObjectAdapterPtr& adapter);
+ const Ice::ObjectAdapterPtr& adapter,
+ const AsteriskSCF::Core::Discovery::V1::ServiceLocatorManagementPrx& serviceLocatorManagement);
~PJSipSessionModule();
pj_status_t load(pjsip_endpoint *endpoint);
pj_status_t start();
@@ -155,6 +156,7 @@ private:
AsteriskSCF::System::ThreadPool::V1::PoolListenerPtr mPoolListener;
SipSessionDecoratorPtr mSessionDecorator;
Ice::ObjectAdapterPtr mAdapter;
+ AsteriskSCF::Core::Discovery::V1::ServiceManagementPrx mDecoratorService;
};
typedef IceUtil::Handle<PJSipSessionModule> PJSipSessionModulePtr;
diff --git a/src/PJSipSessionModuleConstruction.cpp b/src/PJSipSessionModuleConstruction.cpp
index 12fb15e..6dd0a56 100644
--- a/src/PJSipSessionModuleConstruction.cpp
+++ b/src/PJSipSessionModuleConstruction.cpp
@@ -113,7 +113,8 @@ PJSipSessionModule::PJSipSessionModule(pjsip_endpoint *endpt,
const AsteriskSCF::Core::Discovery::V1::ServiceLocatorPrx& serviceLocator,
const AsteriskSCF::Discovery::SmartProxy<SipStateReplicatorPrx>& stateReplicator,
const AsteriskSCF::System::Component::V1::ReplicaPtr& replica,
- const Ice::ObjectAdapterPtr& adapter)
+ const Ice::ObjectAdapterPtr& adapter,
+ const AsteriskSCF::Core::Discovery::V1::ServiceLocatorManagementPrx& serviceLocatorManagement)
: mName(moduleName), mEndpointFactory(endpointFactoryPtr),
mSessionRouter(sessionRouter), mServiceLocator(serviceLocator),
mStateReplicator(stateReplicator), mReplica(replica), mEndpoint(endpt),
@@ -132,7 +133,12 @@ PJSipSessionModule::PJSipSessionModule(pjsip_endpoint *endpt,
mModule.on_tx_response = NULL;
mModule.on_tsx_state = NULL;
- mAdapter->add(mSessionDecorator, mAdapter->getCommunicator()->stringToIdentity(DecoratorId));
+ Ice::ObjectPrx decoratorObjPrx = mAdapter->add(mSessionDecorator, mAdapter->getCommunicator()->stringToIdentity(DecoratorId));
+ AsteriskSCF::SessionCommunications::ExtensionPoints::V1::SessionDecoratorExtensionPointPrx decoratorPrx =
+ AsteriskSCF::SessionCommunications::ExtensionPoints::V1::SessionDecoratorExtensionPointPrx::uncheckedCast(decoratorObjPrx);
+
+ mDecoratorService = serviceLocatorManagement->addService(decoratorPrx, "Spit");
+ mDecoratorService->addLocatorParams(new AsteriskSCF::Core::Discovery::V1::ServiceLocatorParams(AsteriskSCF::SessionCommunications::ExtensionPoints::V1::SessionDecoratorLocatorCategory), "");
mPoolQueue = new AsteriskSCF::WorkQueue::WorkQueue();
mPoolListener = new PJSipSessionModuleThreadPoolListener();
@@ -175,6 +181,7 @@ PJSipSessionModule::~PJSipSessionModule()
try
{
mPoolQueue->shutdown();
+ mDecoratorService->unregister();
mAdapter->remove(mAdapter->getCommunicator()->stringToIdentity(DecoratorId));
}
catch (const AsteriskSCF::System::WorkQueue::V1::ShuttingDown&)
diff --git a/src/SipSessionManagerApp.cpp b/src/SipSessionManagerApp.cpp
index f34f1d0..12f6411 100644
--- a/src/SipSessionManagerApp.cpp
+++ b/src/SipSessionManagerApp.cpp
@@ -470,7 +470,7 @@ void SipSessionManager::registerPJSipModules()
if (*i == "Session")
{
mPJSipManager->registerSessionModule(mEndpointFactory,
- mSessionRouter, mServiceLocator, mStateReplicator, mReplicaService, mGlobalAdapter);
+ mSessionRouter, mServiceLocator, mStateReplicator, mReplicaService, mGlobalAdapter, mServiceLocatorManagement);
}
else if (*i == "Logging" || *i == "Logger")
{
commit c58ab8b3d3623ccd57d63077f902eda632faaf7d
Author: Mark Michelson <mmichelson at digium.com>
Date: Wed Jun 29 14:26:44 2011 -0500
Change decorator hooks to be stored in the session module.
This also adds the adapter to the session module so that we can
add the decorator to the adapter.
diff --git a/src/PJSipManager.cpp b/src/PJSipManager.cpp
index 928d47a..407dcbe 100644
--- a/src/PJSipManager.cpp
+++ b/src/PJSipManager.cpp
@@ -81,11 +81,12 @@ void PJSipManager::registerSessionModule(const boost::shared_ptr<SipEndpointFact
AsteriskSCF::SessionCommunications::V1::SessionRouterPrx>& sessionRouter,
const AsteriskSCF::Core::Discovery::V1::ServiceLocatorPrx& serviceLocator,
const AsteriskSCF::Discovery::SmartProxy<SipStateReplicatorPrx>& stateReplicator,
- const AsteriskSCF::System::Component::V1::ReplicaPtr& replica
+ const AsteriskSCF::System::Component::V1::ReplicaPtr& replica,
+ const Ice::ObjectAdapterPtr& adapter
)
{
mSessionModule = new PJSipSessionModule(mEndpoint, endpointFactoryPtr, sessionRouter,
- serviceLocator, stateReplicator, replica);
+ serviceLocator, stateReplicator, replica, adapter);
}
void PJSipManager::registerLoggingModule()
diff --git a/src/PJSipManager.h b/src/PJSipManager.h
index d82829e..3149c76 100644
--- a/src/PJSipManager.h
+++ b/src/PJSipManager.h
@@ -74,7 +74,8 @@ public:
sessionRouter,
const AsteriskSCF::Core::Discovery::V1::ServiceLocatorPrx& serviceLocator,
const AsteriskSCF::Discovery::SmartProxy<SipStateReplicatorPrx>& stateReplicator,
- const AsteriskSCF::System::Component::V1::ReplicaPtr& replica
+ const AsteriskSCF::System::Component::V1::ReplicaPtr& replica,
+ const Ice::ObjectAdapterPtr& adapter
);
/**
diff --git a/src/PJSipSessionModule.cpp b/src/PJSipSessionModule.cpp
index b6719d5..1bc6327 100644
--- a/src/PJSipSessionModule.cpp
+++ b/src/PJSipSessionModule.cpp
@@ -26,6 +26,7 @@
#include <AsteriskSCF/Core/Endpoint/EndpointIf.h>
#include <AsteriskSCF/Core/Routing/RoutingIf.h>
#include <AsteriskSCF/SessionCommunications/SessionCommunicationsIf.h>
+#include <AsteriskSCF/SessionCommunications/SessionCommunicationsExtensionPointsIf.h>
#include <AsteriskSCF/Media/MediaIf.h>
#include <AsteriskSCF/logger.h>
#include <AsteriskSCF/WorkQueue/WorkQueue.h>
@@ -52,6 +53,7 @@ namespace SipSessionManager
using namespace AsteriskSCF::Core::Routing::V1;
using namespace AsteriskSCF::Core::Endpoint::V1;
using namespace AsteriskSCF::SessionCommunications::V1;
+using namespace AsteriskSCF::SessionCommunications::ExtensionPoints::V1;
using namespace AsteriskSCF::Media::V1;
using namespace AsteriskSCF::Replication::SipSessionManager::V1;
using namespace AsteriskSCF::System::ThreadPool::V1;
@@ -167,6 +169,30 @@ SessionWorkPtr PJSipSessionModInfo::getSessionWork()
return mSessionWork;
}
+SipSessionDecorator::SipSessionDecorator() { }
+
+void SipSessionDecorator::addDecorator(const SessionDecoratorHookPrx& hook, const Ice::Current&)
+{
+ boost::unique_lock<boost::shared_mutex> lock(mLock);
+ hooks.push_back(hook);
+}
+void SipSessionDecorator::removeDecorator(const SessionDecoratorHookPrx& hook, const Ice::Current&)
+{
+ boost::unique_lock<boost::shared_mutex> lock(mLock);
+ hooks.erase(std::find(hooks.begin(), hooks.end(), hook));
+}
+void SipSessionDecorator::clearDecorators(const Ice::Current&)
+{
+ boost::unique_lock<boost::shared_mutex> lock(mLock);
+ hooks.clear();
+}
+
+SessionDecoratorHookSeq SipSessionDecorator::getHooks()
+{
+ boost::shared_lock<boost::shared_mutex> lock(mLock);
+ return hooks;
+}
+
void PJSipSessionModule::replicateState(PJSipDialogModInfo *dlgInfo, PJSipTransactionModInfo *tsxInfo,
PJSipSessionModInfo *sessionInfo)
{
@@ -1529,6 +1555,11 @@ QueuePtr PJSipSessionModule::getThreadPoolQueue()
return mPoolQueue;
}
+SessionDecoratorHookSeq PJSipSessionModule::getSessionDecoratorHooks()
+{
+ return mSessionDecorator->getHooks();
+}
+
void PJSipSessionModule::enqueueSessionWork(const SuspendableWorkPtr& work, pjsip_inv_session *inv)
{
PJSipSessionModInfo *session_mod_info =
diff --git a/src/PJSipSessionModule.h b/src/PJSipSessionModule.h
index 7b4cd30..4798c64 100644
--- a/src/PJSipSessionModule.h
+++ b/src/PJSipSessionModule.h
@@ -82,6 +82,22 @@ private:
typedef IceUtil::Handle<PJSipSessionModuleThreadPoolListener> PJSipSessionModuleThreadPoolListenerPtr;
+class SipSessionDecorator : public AsteriskSCF::SessionCommunications::ExtensionPoints::V1::SessionDecoratorExtensionPoint
+{
+public:
+ SipSessionDecorator();
+ void addDecorator(const AsteriskSCF::SessionCommunications::ExtensionPoints::V1::SessionDecoratorHookPrx& hook, const Ice::Current&);
+ void removeDecorator(const AsteriskSCF::SessionCommunications::ExtensionPoints::V1::SessionDecoratorHookPrx& hook, const Ice::Current&);
+ void clearDecorators(const Ice::Current&);
+ AsteriskSCF::SessionCommunications::ExtensionPoints::V1::SessionDecoratorHookSeq getHooks();
+
+private:
+ AsteriskSCF::SessionCommunications::ExtensionPoints::V1::SessionDecoratorHookSeq hooks;
+ boost::shared_mutex mLock;
+};
+
+typedef IceUtil::Handle<SipSessionDecorator> SipSessionDecoratorPtr;
+
class PJSipSessionModule : public PJSipModule
{
public:
@@ -90,7 +106,8 @@ public:
sessionRouter,
const AsteriskSCF::Core::Discovery::V1::ServiceLocatorPrx& serviceLocator,
const AsteriskSCF::Discovery::SmartProxy<SipStateReplicatorPrx>& stateReplicator,
- const AsteriskSCF::System::Component::V1::ReplicaPtr& replica);
+ const AsteriskSCF::System::Component::V1::ReplicaPtr& replica,
+ const Ice::ObjectAdapterPtr& adapter);
~PJSipSessionModule();
pj_status_t load(pjsip_endpoint *endpoint);
pj_status_t start();
@@ -117,6 +134,9 @@ public:
pjsip_inv_session *);
AsteriskSCF::System::WorkQueue::V1::QueuePtr getThreadPoolQueue();
+
+ AsteriskSCF::SessionCommunications::ExtensionPoints::V1::SessionDecoratorHookSeq getSessionDecoratorHooks();
+
private:
void handleNewInvite(pjsip_rx_data *rdata);
void handleInviteResponse(pjsip_inv_session *inv, pjsip_rx_data *rdata, pjsip_dialog *dlg);
@@ -133,6 +153,8 @@ private:
AsteriskSCF::System::ThreadPool::V1::PoolPtr mPool;
AsteriskSCF::System::WorkQueue::V1::QueuePtr mPoolQueue;
AsteriskSCF::System::ThreadPool::V1::PoolListenerPtr mPoolListener;
+ SipSessionDecoratorPtr mSessionDecorator;
+ Ice::ObjectAdapterPtr mAdapter;
};
typedef IceUtil::Handle<PJSipSessionModule> PJSipSessionModulePtr;
diff --git a/src/PJSipSessionModuleConstruction.cpp b/src/PJSipSessionModuleConstruction.cpp
index 0b034aa..12fb15e 100644
--- a/src/PJSipSessionModuleConstruction.cpp
+++ b/src/PJSipSessionModuleConstruction.cpp
@@ -25,6 +25,7 @@ using namespace AsteriskSCF::System::Logging;
namespace
{
Logger lg = getLoggerFactory().getLogger("AsteriskSCF.SipSessionManager");
+const std::string DecoratorId("SipSessionDecorator");
}
namespace AsteriskSCF
@@ -111,10 +112,12 @@ PJSipSessionModule::PJSipSessionModule(pjsip_endpoint *endpt,
const AsteriskSCF::Discovery::SmartProxy<AsteriskSCF::SessionCommunications::V1::SessionRouterPrx>& sessionRouter,
const AsteriskSCF::Core::Discovery::V1::ServiceLocatorPrx& serviceLocator,
const AsteriskSCF::Discovery::SmartProxy<SipStateReplicatorPrx>& stateReplicator,
- const AsteriskSCF::System::Component::V1::ReplicaPtr& replica)
+ const AsteriskSCF::System::Component::V1::ReplicaPtr& replica,
+ const Ice::ObjectAdapterPtr& adapter)
: mName(moduleName), mEndpointFactory(endpointFactoryPtr),
mSessionRouter(sessionRouter), mServiceLocator(serviceLocator),
- mStateReplicator(stateReplicator), mReplica(replica), mEndpoint(endpt)
+ mStateReplicator(stateReplicator), mReplica(replica), mEndpoint(endpt),
+ mAdapter(adapter)
{
sessionModule = this;
mModule.name = pj_str(moduleName);
@@ -129,6 +132,8 @@ PJSipSessionModule::PJSipSessionModule(pjsip_endpoint *endpt,
mModule.on_tx_response = NULL;
mModule.on_tsx_state = NULL;
+ mAdapter->add(mSessionDecorator, mAdapter->getCommunicator()->stringToIdentity(DecoratorId));
+
mPoolQueue = new AsteriskSCF::WorkQueue::WorkQueue();
mPoolListener = new PJSipSessionModuleThreadPoolListener();
@@ -170,6 +175,7 @@ PJSipSessionModule::~PJSipSessionModule()
try
{
mPoolQueue->shutdown();
+ mAdapter->remove(mAdapter->getCommunicator()->stringToIdentity(DecoratorId));
}
catch (const AsteriskSCF::System::WorkQueue::V1::ShuttingDown&)
{
diff --git a/src/SipEndpoint.cpp b/src/SipEndpoint.cpp
index 06b5d2e..2a6af1a 100644
--- a/src/SipEndpoint.cpp
+++ b/src/SipEndpoint.cpp
@@ -189,8 +189,7 @@ AsteriskSCF::SessionCommunications::V1::SessionPrx SipEndpoint::createSession(co
}
SipSessionPtr session = new SipSession(mImplPriv->mAdapter, this, destination, listener, mImplPriv->mManager,
- mImplPriv->mServiceLocator, mImplPriv->mReplica, mImplPriv->mConfig.sessionConfig.rtpOverIPv6, true,
- mImplPriv->mEndpointFactory->getDecorators());
+ mImplPriv->mServiceLocator, mImplPriv->mReplica, mImplPriv->mConfig.sessionConfig.rtpOverIPv6, true);
mImplPriv->mSessions.push_back(session);
std::cout << "And now we're returing a session proxy..." << std::endl;
return session->getSessionProxy();
@@ -199,8 +198,7 @@ AsteriskSCF::SessionCommunications::V1::SessionPrx SipEndpoint::createSession(co
AsteriskSCF::SipSessionManager::SipSessionPtr SipEndpoint::createSession(const std::string& destination)
{
SipSessionPtr session = new SipSession(mImplPriv->mAdapter, this, destination, 0, mImplPriv->mManager,
- mImplPriv->mServiceLocator, mImplPriv->mReplica, mImplPriv->mConfig.sessionConfig.rtpOverIPv6, false,
- mImplPriv->mEndpointFactory->getDecorators());
+ mImplPriv->mServiceLocator, mImplPriv->mReplica, mImplPriv->mConfig.sessionConfig.rtpOverIPv6, false);
mImplPriv->mSessions.push_back(session);
return session;
}
@@ -211,8 +209,7 @@ AsteriskSCF::SipSessionManager::SipSessionPtr SipEndpoint::createSession(const s
const AsteriskSCF::Media::V1::StreamSinkSeq& sinks)
{
SipSessionPtr session = new SipSession(mImplPriv->mAdapter, this, destination, sessionid, mediaid, mediasession,
- sources, sinks, mImplPriv->mManager, mImplPriv->mServiceLocator, mImplPriv->mReplica, false,
- mImplPriv->mEndpointFactory->getDecorators());
+ sources, sinks, mImplPriv->mManager, mImplPriv->mServiceLocator, mImplPriv->mReplica, false);
mImplPriv->mSessions.push_back(session);
return session;
}
diff --git a/src/SipEndpointFactory.cpp b/src/SipEndpointFactory.cpp
index ff5b6b3..61349c9 100644
--- a/src/SipEndpointFactory.cpp
+++ b/src/SipEndpointFactory.cpp
@@ -60,10 +60,6 @@ void SipEndpointFactory::generateRoutingDestinations(AsteriskSCF::Core::Routing:
destinations.push_back((*iter)->getName());
}
}
-AsteriskSCF::SessionCommunications::ExtensionPoints::V1::SessionDecoratorHookSeq SipEndpointFactory::getDecorators()
-{
- return mHooks;
-}
}; // end SipSessionManager
}; // end AsteriskSCF
diff --git a/src/SipEndpointFactory.h b/src/SipEndpointFactory.h
index f29e8dc..6dca59f 100644
--- a/src/SipEndpointFactory.h
+++ b/src/SipEndpointFactory.h
@@ -48,8 +48,6 @@ public:
SipEndpointPtr findByName(const std::string& endpointName);
void generateRoutingDestinations(AsteriskSCF::Core::Routing::V1::RegExSeq&);
-
- AsteriskSCF::SessionCommunications::ExtensionPoints::V1::SessionDecoratorHookSeq getDecorators();
private:
/**
* A pointer to the object adapter that endpoints will be added to.
@@ -75,11 +73,6 @@ private:
* A pointer to the replica information.
*/
AsteriskSCF::System::Component::V1::ReplicaPtr mReplica;
-
- /**
- * All the registered session decorator hooks
- */
- AsteriskSCF::SessionCommunications::ExtensionPoints::V1::SessionDecoratorHookSeq mHooks;
};
}; // end SipSessionManager
diff --git a/src/SipSession.cpp b/src/SipSession.cpp
index 35a1285..a3b47bb 100644
--- a/src/SipSession.cpp
+++ b/src/SipSession.cpp
@@ -357,8 +357,7 @@ void SipSession::setSessionProxy(const AsteriskSCF::SessionCommunications::Exten
SipSession::SipSession(const Ice::ObjectAdapterPtr& adapter, const SipEndpointPtr& endpoint,
const std::string& destination, const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx& listener,
PJSipManager *manager, const AsteriskSCF::Core::Discovery::V1::ServiceLocatorPrx& serviceLocator,
- const AsteriskSCF::System::Component::V1::ReplicaPtr& replica, bool ipv6, bool isUAC,
- const AsteriskSCF::SessionCommunications::ExtensionPoints::V1::SessionDecoratorHookSeq& hooks)
+ const AsteriskSCF::System::Component::V1::ReplicaPtr& replica, bool ipv6, bool isUAC)
: mImplPriv(new SipSessionPriv(adapter, endpoint, destination, manager, serviceLocator, replica))
{
if (listener != 0)
@@ -366,7 +365,7 @@ SipSession::SipSession(const Ice::ObjectAdapterPtr& adapter, const SipEndpointPt
mImplPriv->mListeners.push_back(listener);
}
- setSessionProxy(hooks);
+ setSessionProxy(mImplPriv->mManager->getSessionModule()->getSessionDecoratorHooks());
mImplPriv->mMediaSession = new SipMediaSession(this);
mImplPriv->mMediaSessionProxy =
@@ -391,11 +390,10 @@ SipSession::SipSession(const Ice::ObjectAdapterPtr& adapter, const SipEndpointPt
const Ice::Identity& mediaid, const AsteriskSCF::Media::V1::SessionPrx& mediasession,
const AsteriskSCF::Media::V1::StreamSourceSeq& sources, const AsteriskSCF::Media::V1::StreamSinkSeq& sinks,
PJSipManager *manager, const AsteriskSCF::Core::Discovery::V1::ServiceLocatorPrx& serviceLocator,
- const AsteriskSCF::System::Component::V1::ReplicaPtr& replica, bool isUAC,
- const AsteriskSCF::SessionCommunications::ExtensionPoints::V1::SessionDecoratorHookSeq& hooks)
+ const AsteriskSCF::System::Component::V1::ReplicaPtr& replica, bool isUAC)
: mImplPriv(new SipSessionPriv(adapter, endpoint, destination, manager, serviceLocator, replica))
{
- setSessionProxy(hooks);
+ setSessionProxy(mImplPriv->mManager->getSessionModule()->getSessionDecoratorHooks());
mImplPriv->mMediaSession = new SipMediaSession(this);
mImplPriv->mMediaSessionProxy =
diff --git a/src/SipSession.h b/src/SipSession.h
index d3d838a..54b7b95 100644
--- a/src/SipSession.h
+++ b/src/SipSession.h
@@ -99,16 +99,14 @@ public:
const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx&, PJSipManager *manager,
const AsteriskSCF::Core::Discovery::V1::ServiceLocatorPrx& serviceLocator,
const AsteriskSCF::System::Component::V1::ReplicaPtr& replica,
- bool ipv6, bool isUAC,
- const AsteriskSCF::SessionCommunications::ExtensionPoints::V1::SessionDecoratorHookSeq& hooks);
+ bool ipv6, bool isUAC);
SipSession(const Ice::ObjectAdapterPtr&, const SipEndpointPtr&, const std::string&, const Ice::Identity&,
const Ice::Identity&, const AsteriskSCF::Media::V1::SessionPrx&,
const AsteriskSCF::Media::V1::StreamSourceSeq&, const AsteriskSCF::Media::V1::StreamSinkSeq&,
PJSipManager *manager, const AsteriskSCF::Core::Discovery::V1::ServiceLocatorPrx& serviceLocator,
const AsteriskSCF::System::Component::V1::ReplicaPtr& replica,
- bool isUAC,
- const AsteriskSCF::SessionCommunications::ExtensionPoints::V1::SessionDecoratorHookSeq& hooks);
+ bool isUAC);
bool operator==(const SipSession &other) const;
diff --git a/src/SipSessionManagerApp.cpp b/src/SipSessionManagerApp.cpp
index 1d89753..f34f1d0 100644
--- a/src/SipSessionManagerApp.cpp
+++ b/src/SipSessionManagerApp.cpp
@@ -470,7 +470,7 @@ void SipSessionManager::registerPJSipModules()
if (*i == "Session")
{
mPJSipManager->registerSessionModule(mEndpointFactory,
- mSessionRouter, mServiceLocator, mStateReplicator, mReplicaService);
+ mSessionRouter, mServiceLocator, mStateReplicator, mReplicaService, mGlobalAdapter);
}
else if (*i == "Logging" || *i == "Logger")
{
-----------------------------------------------------------------------
--
asterisk-scf/integration/sip.git
More information about the asterisk-scf-commits
mailing list