[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 21 07:26:19 CDT 2010
branch "master" has been updated
via a518d25213bdf8db66fea715d0d8b2ae5c6c4764 (commit)
via 621ff53d42716920877195f92d28b82d06fe9068 (commit)
via 232102429d1a5731dfd9e2c0b43e5bf0bed045cb (commit)
from d257d40461e57f1c4c759e370e84db34d3ca9448 (commit)
Summary of changes:
local-slice/SipStateReplicationIf.ice | 3 +++
src/CMakeLists.txt | 2 ++
src/SipEndpoint.cpp | 10 ++++++++++
src/SipEndpoint.h | 3 +++
src/SipSession.cpp | 20 ++++++++++++++++++++
src/SipSession.h | 2 ++
6 files changed, 40 insertions(+), 0 deletions(-)
- Log -----------------------------------------------------------------
commit a518d25213bdf8db66fea715d0d8b2ae5c6c4764
Author: Joshua Colp <jcolp at digium.com>
Date: Tue Sep 21 09:31:35 2010 -0300
Add the ability to create a replica session on an endpoint.
diff --git a/src/SipEndpoint.cpp b/src/SipEndpoint.cpp
index 20d9910..8cfbd17 100644
--- a/src/SipEndpoint.cpp
+++ b/src/SipEndpoint.cpp
@@ -199,6 +199,16 @@ AsteriskSCF::SipChannelService::SipSessionPtr SipEndpoint::createSession(const s
return session;
}
+AsteriskSCF::SipChannelService::SipSessionPtr SipEndpoint::createSession(const std::string& destination, const Ice::Identity& sessionid,
+ const Ice::Identity& mediaid, const AsteriskSCF::Media::V1::SessionPrx& mediasession,
+ const AsteriskSCF::Media::V1::StreamSourceSeq& sources,
+ const AsteriskSCF::Media::V1::StreamSinkSeq& sinks)
+{
+ SipSessionPtr session = new SipSession(mImplPriv->mAdapter, this, destination, sessionid, mediaid, mediasession, sources, sinks);
+ mImplPriv->mSessions.push_back(session);
+ return session;
+}
+
void SipEndpoint::removeSession(AsteriskSCF::SessionCommunications::V1::SessionPtr session)
{
SipSessionPtr sipsession = SipSessionPtr::dynamicCast(session);
diff --git a/src/SipEndpoint.h b/src/SipEndpoint.h
index 3c6db62..5f3d2cd 100644
--- a/src/SipEndpoint.h
+++ b/src/SipEndpoint.h
@@ -220,6 +220,9 @@ public:
// TODO: Find a way to use SipSessionPtr here, right now trying to do so results in the world exploding due to dependency insanity
AsteriskSCF::SipChannelService::SipSessionPtr createSession(const std::string&);
+ AsteriskSCF::SipChannelService::SipSessionPtr createSession(const std::string&, const Ice::Identity&, const Ice::Identity&,
+ const AsteriskSCF::Media::V1::SessionPrx&, const AsteriskSCF::Media::V1::StreamSourceSeq&,
+ const AsteriskSCF::Media::V1::StreamSinkSeq&);
void removeSession(AsteriskSCF::SessionCommunications::V1::SessionPtr);
diff --git a/src/SipSession.cpp b/src/SipSession.cpp
index d1f8040..cad1164 100644
--- a/src/SipSession.cpp
+++ b/src/SipSession.cpp
@@ -146,6 +146,26 @@ SipSession::SipSession(Ice::ObjectAdapterPtr adapter, SipEndpointPtr endpoint, c
requestRTPSessions(formats);
}
+/**
+ * Replica constructor.
+ */
+SipSession::SipSession(Ice::ObjectAdapterPtr adapter, SipEndpointPtr endpoint, const std::string& destination, const Ice::Identity& sessionid,
+ const Ice::Identity& mediaid, const AsteriskSCF::Media::V1::SessionPrx& mediasession, const AsteriskSCF::Media::V1::StreamSourceSeq& sources,
+ const AsteriskSCF::Media::V1::StreamSinkSeq& sinks)
+: mImplPriv(new SipSessionPriv(adapter, endpoint, destination))
+{
+ mImplPriv->mSessionProxy = AsteriskSCF::SessionCommunications::V1::SessionPrx::uncheckedCast(adapter->add(this, sessionid));
+
+ mImplPriv->mMediaSession = new SipMediaSession(this);
+ mImplPriv->mMediaSessionProxy = AsteriskSCF::Media::V1::SessionPrx::uncheckedCast(adapter->add(mImplPriv->mMediaSession, mediaid));
+
+ AsteriskSCF::Media::RTP::V1::RTPSessionPrx rtpsession = AsteriskSCF::Media::RTP::V1::RTPSessionPrx::uncheckedCast(mediasession);
+ mImplPriv->mRTPSessions.push_back(rtpsession);
+
+ mImplPriv->mSources = sources;
+ mImplPriv->mSinks = sinks;
+}
+
AsteriskSCF::SessionCommunications::V1::SessionInfoPtr SipSession::addListener(const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx& listener, const Ice::Current& current)
{
mImplPriv->mListeners.push_back(listener);
diff --git a/src/SipSession.h b/src/SipSession.h
index bfd186f..10fcfae 100644
--- a/src/SipSession.h
+++ b/src/SipSession.h
@@ -46,6 +46,8 @@ class SipSession : public AsteriskSCF::SessionCommunications::V1::Session
{
public:
SipSession(Ice::ObjectAdapterPtr, SipEndpointPtr, const std::string&, const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx&);
+ SipSession(Ice::ObjectAdapterPtr, 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&);
bool operator==(const SipSession &other) const;
commit 621ff53d42716920877195f92d28b82d06fe9068
Author: Joshua Colp <jcolp at digium.com>
Date: Mon Sep 20 21:48:00 2010 -0300
Add object identity information to the session state item so we can add things to the ASM with the correct ID.
diff --git a/local-slice/SipStateReplicationIf.ice b/local-slice/SipStateReplicationIf.ice
index ff35e0c..326994a 100644
--- a/local-slice/SipStateReplicationIf.ice
+++ b/local-slice/SipStateReplicationIf.ice
@@ -1,5 +1,6 @@
#pragma once
#include <Ice/BuiltinSequences.ice>
+#include <Ice/Identity.ice>
#include "Media/MediaIf.ice"
#include "SessionCommunications/SessionCommunicationsIf.ice"
@@ -91,6 +92,8 @@ module V1
{
//XXX There probably needs to be a lot more specified
//here, but frankly I have no clue.
+ Ice::Identity mSessionObjectId;
+ Ice::Identity mMediaSessionObjectId;
AsteriskSCF::Media::V1::StreamSourceSeq mSources;
AsteriskSCF::Media::V1::StreamSinkSeq mSinks;
AsteriskSCF::Media::V1::Session *mMediaSession;
commit 232102429d1a5731dfd9e2c0b43e5bf0bed045cb
Author: Joshua Colp <jcolp at digium.com>
Date: Mon Sep 20 19:16:19 2010 -0300
Get replication goodies into the main SIP component.
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 7cfe462..3a66aac 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -31,6 +31,8 @@ hydra_component_add_file(SipChannelService PJSipManager.cpp)
hydra_component_add_file(SipChannelService PJSipManager.h)
hydra_component_add_file(SipChannelService PJSipSessionModule.cpp)
hydra_component_add_file(SipChannelService PJSipSessionModule.h)
+hydra_component_add_file(SipChannelService SipStateReplicator.cpp)
+hydra_component_add_file(SipChannelService SipStateReplicator.h)
hydra_component_add_ice_libraries(SipChannelService IceStorm)
-----------------------------------------------------------------------
--
asterisk-scf/integration/sip.git
More information about the asterisk-scf-commits
mailing list