[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 Aug 24 20:40:04 CDT 2010


branch "master" has been updated
       via  c2fab6f7dbd9d9238181dc30de0e8f16782a8273 (commit)
      from  38117850f8413ab7b94295797c6e8c99e5e994a2 (commit)

Summary of changes:
 src/CMakeLists.txt   |    2 ++
 src/PJSipManager.cpp |    2 +-
 src/SipEndpoint.cpp  |   22 ++++++++++++++++++----
 src/SipEndpoint.h    |    6 ++++++
 4 files changed, 27 insertions(+), 5 deletions(-)


- Log -----------------------------------------------------------------
commit c2fab6f7dbd9d9238181dc30de0e8f16782a8273
Author: Joshua Colp <jcolp at digium.com>
Date:   Tue Aug 24 22:49:49 2010 -0300

    Begin work on RTP session support. This tweaks the code a bit and also adds releasing of sessions.

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index c0d23fd..33125db 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -8,6 +8,8 @@ hydra_component_add_slice(SipChannelService EndpointIf)
 hydra_component_add_slice(SipChannelService ComponentServiceIf)
 hydra_component_add_slice(SipChannelService SessionIf)
 hydra_component_add_slice(SipChannelService BridgeServiceIf)
+hydra_component_add_slice(SipChannelService MediaIf)
+hydra_component_add_slice(SipChannelService MediaRTPIf)
 
 # Add our component's own slice types.
 hydra_component_add_slice(SipChannelService SipIf)
diff --git a/src/PJSipManager.cpp b/src/PJSipManager.cpp
index bf94263..15ebebd 100644
--- a/src/PJSipManager.cpp
+++ b/src/PJSipManager.cpp
@@ -98,7 +98,7 @@ bool PJSipManager::setTransports(pjsip_endpoint *endpoint)
 	pj_status_t status;
 	//XXX Hard-coded local addr for the time being. This will be a variable
 	//to read from a config at some point
-	char ip[] = "127.0.0.1";
+	char ip[] = "0.0.0.0:5060";
 	pj_str_t udpString = pj_str(ip);
 	//UNSPEC family means "you figure out the address family, pjlib!"
 	pj_sockaddr_parse(pj_AF_UNSPEC(), 0, &udpString, &udpAddr);
diff --git a/src/SipEndpoint.cpp b/src/SipEndpoint.cpp
index 3da06c5..4219447 100644
--- a/src/SipEndpoint.cpp
+++ b/src/SipEndpoint.cpp
@@ -170,14 +170,12 @@ SipMediaSession() : mId(IceUtil::generateUUID()) { };
 
    Hydra::Media::V1::StreamSourceSeq getSources(const Ice::Current&)
    {
-      Hydra::Media::V1::StreamSourceSeq sources;
-      return sources;
+      return mSources;
    }
 
    Hydra::Media::V1::StreamSinkSeq getSinks(const Ice::Current&)
    {
-      Hydra::Media::V1::StreamSinkSeq sinks;
-      return sinks;
+      return mSinks;
    }
 
    virtual std::string getId(const Ice::Current&)
@@ -190,6 +188,16 @@ private:
     * Unique identifier for the media session.
     */
    std::string mId;
+
+   /**
+    * Vector containing sources.
+    */
+   Hydra::Media::V1::StreamSourceSeq mSources;
+
+   /**
+    * Vector containing sinks.
+    */
+   Hydra::Media::V1::StreamSinkSeq mSinks;
 };
 
 /**
@@ -218,6 +226,12 @@ void SipEndpoint::destroy()
    mAdapter->remove(mediaSession->ice_getIdentity());
    mMediaSession = 0;
 
+   // Release all the RTP sessions we are using
+   for (std::vector<Hydra::Media::RTP::V1::RTPSessionPrx>::const_iterator i = mRTPSessions.begin(); i != mRTPSessions.end(); ++i)
+   {
+      (*i)->release();
+   }
+
    /* Now... remove ourselves from the factory, once this is done all of our references will be
     * gone and we will cease to exist.
     */
diff --git a/src/SipEndpoint.h b/src/SipEndpoint.h
index 5427800..48f0ddc 100644
--- a/src/SipEndpoint.h
+++ b/src/SipEndpoint.h
@@ -6,6 +6,7 @@
 #include <Core/Endpoint/EndpointIf.h>
 #include <Session/SessionIf.h>
 #include <Media/MediaIf.h>
+#include <Media/RTP/MediaRTPIf.h>
 
 #include <pjsip.h>
 #include <pjmedia.h>
@@ -104,6 +105,11 @@ private:
     * A proxy to the signal callback interface we should invoke signal operations on.
     */
    Hydra::Session::V1::SignalCallbackPrx mSignalCallback;
+
+   /**
+    * A vector of RTP media sessions belonging to this endpoint.
+    */
+   std::vector<Hydra::Media::RTP::V1::RTPSessionPrx> mRTPSessions;
 };
 
 }; //End namespace SipChannelService

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


-- 
asterisk-scf/integration/sip.git



More information about the asterisk-scf-commits mailing list