[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 7 22:48:40 CDT 2010
branch "master" has been updated
via e3db50eb22955dd4a886b253a807eea9120ec277 (commit)
via 1e694a0b1eabbbdb22e71569fd3bda4333d4f0b4 (commit)
from a75e8099c8befd7f11c721e81562b8217f309145 (commit)
Summary of changes:
src/SipEndpoint.cpp | 6 +++++-
src/SipSession.cpp | 5 ++++-
2 files changed, 9 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit e3db50eb22955dd4a886b253a807eea9120ec277
Author: Joshua Colp <jcolp at digium.com>
Date: Wed Sep 8 00:51:08 2010 -0300
Obey the law! (Or the configuration restricting inbound only or outbound only calling)
diff --git a/src/SipEndpoint.cpp b/src/SipEndpoint.cpp
index 64bedb7..bca9435 100644
--- a/src/SipEndpoint.cpp
+++ b/src/SipEndpoint.cpp
@@ -174,7 +174,11 @@ std::string SipEndpoint::getId(const Ice::Current&)
AsteriskSCF::SessionCommunications::V1::SessionPrx SipEndpoint::createSession(const std::string& destination, const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx& listener, const Ice::Current&)
{
- // Based on the configuration are we permitted to call this endpoint?
+ if (mImplPriv->mConfig.sessionConfig.callDirection != BOTH && mImplPriv->mConfig.sessionConfig.callDirection != INBOUND)
+ {
+ // TODO: We should have an exception here
+ return 0;
+ }
SipSessionPtr session = new SipSession(mImplPriv->mAdapter, this, destination, listener);
mImplPriv->mSessions.push_back(session);
commit 1e694a0b1eabbbdb22e71569fd3bda4333d4f0b4
Author: Joshua Colp <jcolp at digium.com>
Date: Wed Sep 8 00:43:11 2010 -0300
It is entirely possible for sessions to not have an initial listener.
diff --git a/src/SipSession.cpp b/src/SipSession.cpp
index e64c7a7..52eb676 100644
--- a/src/SipSession.cpp
+++ b/src/SipSession.cpp
@@ -131,7 +131,10 @@ SipSessionPriv(Ice::ObjectAdapterPtr adapter, SipEndpointPtr endpoint, const std
SipSession::SipSession(Ice::ObjectAdapterPtr adapter, SipEndpointPtr endpoint, const std::string& destination, const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx& listener)
: mImplPriv(new SipSessionPriv(adapter, endpoint, destination))
{
- mImplPriv->mListeners.push_back(listener);
+ if (listener != 0)
+ {
+ mImplPriv->mListeners.push_back(listener);
+ }
mImplPriv->mSessionProxy = AsteriskSCF::SessionCommunications::V1::SessionPrx::uncheckedCast(adapter->addWithUUID(this));
-----------------------------------------------------------------------
--
asterisk-scf/integration/sip.git
More information about the asterisk-scf-commits
mailing list