[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
Mon Sep 27 09:20:34 CDT 2010


branch "master" has been updated
       via  dc70c323cfcea21949da69bf0b4a31184c7ba475 (commit)
      from  6a2dd6761ebbd38b4b2053f083aca1c7fd9f0df2 (commit)

Summary of changes:
 src/PJSipSessionModule.cpp |    4 ++++
 src/SipSession.cpp         |   16 ++++++++++++++++
 src/SipSession.h           |    4 ++++
 3 files changed, 24 insertions(+), 0 deletions(-)


- Log -----------------------------------------------------------------
commit dc70c323cfcea21949da69bf0b4a31184c7ba475
Author: Joshua Colp <jcolp at digium.com>
Date:   Mon Sep 27 11:23:48 2010 -0300

    Populate the remaining parts of the session state item.

diff --git a/src/PJSipSessionModule.cpp b/src/PJSipSessionModule.cpp
index 150639c..ec94970 100644
--- a/src/PJSipSessionModule.cpp
+++ b/src/PJSipSessionModule.cpp
@@ -176,6 +176,9 @@ void PJSipSessionModInfo::updateSessionState(pjsip_inv_session *inv_session)
 {
    if (mSession)
    {
+      mSessionState->mEndpointName = mSession->getEndpoint()->getName();
+      mSessionState->mSessionObjectId = mSession->getSessionProxy()->ice_getIdentity();
+      mSessionState->mMediaSessionObjectId = mSession->getMediaSessionProxy()->ice_getIdentity();
       mSessionState->mSources = mSession->getSources();
       mSessionState->mSinks = mSession->getSinks();
       //getMediaSession requires an Ice::Current reference. Since
@@ -183,6 +186,7 @@ void PJSipSessionModInfo::updateSessionState(pjsip_inv_session *inv_session)
       //instead.
       Ice::Current dummy;
       mSessionState->mMediaSession = mSession->getMediaSession(dummy);
+      mSessionState->mListeners = mSession->getListeners();
    }
 
    //Now we get stuff from the inv_session itself.
diff --git a/src/SipSession.cpp b/src/SipSession.cpp
index a19dc92..7373a6e 100644
--- a/src/SipSession.cpp
+++ b/src/SipSession.cpp
@@ -590,6 +590,14 @@ std::vector<AsteriskSCF::SessionCommunications::V1::SessionListenerPrx>& SipSess
 }
 
 /**
+ * Internal function which gets the endpoint associated with the session.
+ */
+SipEndpointPtr SipSession::getEndpoint()
+{
+   return mImplPriv->mEndpoint;
+}
+
+/**
  * Internal function which gets the proxy to the session.
  */
 AsteriskSCF::SessionCommunications::V1::SessionPrx& SipSession::getSessionProxy()
@@ -598,6 +606,14 @@ AsteriskSCF::SessionCommunications::V1::SessionPrx& SipSession::getSessionProxy(
 }
 
 /**
+ * Internal function which gets the proxy to the media session.
+ */
+AsteriskSCF::Media::V1::SessionPrx& SipSession::getMediaSessionProxy()
+{
+   return mImplPriv->mMediaSessionProxy;
+}
+
+/**
  * Internal function which sets the listeners explicitly.
  */
 void SipSession::setListeners(const AsteriskSCF::SIP::V1::SessionListenerSeq& listeners)
diff --git a/src/SipSession.h b/src/SipSession.h
index dc9e5b1..86ca0d1 100644
--- a/src/SipSession.h
+++ b/src/SipSession.h
@@ -93,8 +93,12 @@ public:
 
    std::vector<AsteriskSCF::SessionCommunications::V1::SessionListenerPrx>& getListeners();
 
+   SipEndpointPtr getEndpoint();
+
    AsteriskSCF::SessionCommunications::V1::SessionPrx& getSessionProxy();
 
+   AsteriskSCF::Media::V1::SessionPrx& getMediaSessionProxy();
+
    void setListeners(const AsteriskSCF::SIP::V1::SessionListenerSeq&);
 private:
    void requestRTPSessions(AsteriskSCF::Media::V1::FormatSeq& formats);

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


-- 
asterisk-scf/integration/sip.git



More information about the asterisk-scf-commits mailing list