[asterisk-scf-commits] asterisk-scf/integration/sip.git branch "master" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Tue Sep 14 10:50:03 CDT 2010
branch "master" has been updated
via 00f0346a18da53a37de6b8456980934db1920ab3 (commit)
via 5ffad148e7609b6b45d023d2f720f4131c81ec23 (commit)
from 6be6579071dfae3228f3c6e5887db952240a5445 (commit)
Summary of changes:
local-slice/SipStateReplicationIf.ice | 2 +-
src/SipChannelServiceApp.cpp | 26 ++++++++++++++++++++++++++
2 files changed, 27 insertions(+), 1 deletions(-)
- Log -----------------------------------------------------------------
commit 00f0346a18da53a37de6b8456980934db1920ab3
Merge: 5ffad14 6be6579
Author: Mark Michelson <mmichelson at digium.com>
Date: Tue Sep 14 10:51:08 2010 -0500
Merge branch 'master' of git.asterisk.org:asterisk-scf/integration/sip
commit 5ffad148e7609b6b45d023d2f720f4131c81ec23
Author: Mark Michelson <mmichelson at digium.com>
Date: Tue Sep 14 10:50:20 2010 -0500
Push current changes. Does not properly link.
diff --git a/local-slice/SipStateReplicationIf.ice b/local-slice/SipStateReplicationIf.ice
index 464170e..e6cf259 100644
--- a/local-slice/SipStateReplicationIf.ice
+++ b/local-slice/SipStateReplicationIf.ice
@@ -10,7 +10,7 @@ module SIP
["suppress"]
module V1
{
-
+ const string StateReplicatorDiscoveryCategory = "SipStateReplicator";
class SipStateItem
{
string mId;
diff --git a/src/SipChannelServiceApp.cpp b/src/SipChannelServiceApp.cpp
index 6e3f471..b06a439 100644
--- a/src/SipChannelServiceApp.cpp
+++ b/src/SipChannelServiceApp.cpp
@@ -26,6 +26,7 @@
#include "SipEndpointFactory.h"
#include "PJSipSessionModule.h"
#include "SipSession.h"
+#include "SipStateReplicator.h"
using namespace std;
using namespace AsteriskSCF::SipChannelService;
@@ -94,6 +95,11 @@ public: // Overrides of the SipChannelServiceDataModel singleton's public inter
return mPJSipManager;
}
+ virtual SipStateReplicatorPrx getStateReplicator() const
+ {
+ return mStateReplicator;
+ }
+
virtual bool IsPaused() const
{
return mPaused;
@@ -114,6 +120,7 @@ public: // Implementation details are visible to this file's classes.
boost::shared_ptr<SipEndpointFactory> mEndpointFactory;
ServiceLocatorPrx mServiceLocator;
PJSipManager *mPJSipManager;
+ SipStateReplicatorPrx mStateReplicator;
bool mPaused;
@@ -151,6 +158,7 @@ private:
void setCategory(Discovery::V1::ServiceManagementPrx serviceManagement, const string &category);
void locateRoutingService();
void locateSessionRouter();
+ void locateStateReplicator();
void locateBridgeService();
void registerWithRoutingService();
void deregisterFromRoutingService();
@@ -351,6 +359,21 @@ void SipChannelServiceApp::locateRoutingService()
}
+void SipChannelServiceApp::locateStateReplicator()
+{
+ if (mDataModelInstance.mServiceLocator == 0)
+ {
+ mDataModelInstance.mServiceLocator = ServiceLocatorPrx::checkedCast(communicator()->propertyToProxy("LocatorService.Proxy"));
+ }
+
+ ServiceLocatorParamsPtr genericparams = new ServiceLocatorParams();
+ genericparams->category = SIP::V1::StateReplicatorDiscoveryCategory;
+
+ Ice::ObjectPrx objectPrx = mDataModelInstance.mServiceLocator->locate(genericparams);
+ mDataModelInstance.mStateReplicator = SIP::V1::SipStateReplicatorPrx::checkedCast(objectPrx);
+
+}
+
/**
* Get a reference to the Session Routing Service interface that we care about, and cache it in the Data Model.
* This will allow us to route sessions.
@@ -501,6 +524,9 @@ int SipChannelServiceApp::run(int argc, char* argv[])
// Locate the Session Router so we can REALLY do routing.
locateSessionRouter();
+ // Locate the State Replicator so we can fail over!
+ locateStateReplicator();
+
// Register our Endpoint Locator so that we can provide endpoints to the
// Routing Service for the endpoints we manage.
registerWithRoutingService();
-----------------------------------------------------------------------
--
asterisk-scf/integration/sip.git
More information about the asterisk-scf-commits
mailing list