[asterisk-scf-commits] asterisk-scf/integration/slice.git branch "srtp-support" created.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Mon Jul 11 09:42:34 CDT 2011


branch "srtp-support" has been created
        at  2894f8805b5062e96034b636b9916d86cb46331c (commit)

- Log -----------------------------------------------------------------
commit 2894f8805b5062e96034b636b9916d86cb46331c
Author: Brent Eagles <beagles at digium.com>
Date:   Mon Jul 11 10:34:32 2011 -0230

    Initial additions for adding SRTP support. I have taken a very
    direct approach to this feature, basically looking at it as a
    permutation of RTP. We may want to alter this in the future.

diff --git a/slice/AsteriskSCF/Media/RTP/MediaRTPIf.ice b/slice/AsteriskSCF/Media/RTP/MediaRTPIf.ice
index d59ba3e..d231637 100644
--- a/slice/AsteriskSCF/Media/RTP/MediaRTPIf.ice
+++ b/slice/AsteriskSCF/Media/RTP/MediaRTPIf.ice
@@ -29,26 +29,35 @@ module RTP
 ["suppress"]
 module V1
 {
-   /**
-    * String representation of the version of this interface
-    */
-   const string Version = "V1";
+    /**
+     * String representation of the version of this interface
+     */
+    const string Version = "V1";
 
-   /**
-    * Extended discovery class for RTP media services.
-    */
-   unsliceable class RTPServiceLocatorParams extends AsteriskSCF::Core::Discovery::V1::ServiceLocatorParams
-   {
-      /**
-       * A sequence of formats that the RTP media service is expected to transport.
-       */
-      AsteriskSCF::Media::V1::FormatSeq formats;
+    /**
+     * Extended discovery class for RTP media services.
+     */
+    unsliceable class RTPServiceLocatorParams extends AsteriskSCF::Core::Discovery::V1::ServiceLocatorParams
+    {
+        /**
+         * A sequence of formats that the RTP media service is expected to transport.
+         */
+        AsteriskSCF::Media::V1::FormatSeq formats;
 
-      /**
-       * Whether IPv6 is to be used or not.
-       */
-      bool ipv6 = false;
-   };
+        /**
+         * Whether IPv6 is to be used or not.
+         */
+        bool ipv6 = false;
+
+        /**
+         * Flag to indicate whether the service is SRTP capable or not.
+         *
+         * TODO: If a service potentially has a lot of variation in capabilities, a dictionary or similar may be
+         * more appropriate here. Subclassing does not necessarily work because a service may support one type
+         * of feature set and not another. 
+         */
+        bool srtpCapable = false;
+    };
 
     /**
      * Extend discovery class to enable RTP over ICE negotiated media flows.
@@ -172,6 +181,73 @@ module V1
    };
 
    /**
+    * Indicates that the SRTP functionality is not available at the moment. 
+    */
+   exception SRTPUnavailable
+   {
+   };
+
+   /**
+    * General exception to indicate that attempts to establish an SRTP enabled flow have failed.
+    */
+   exception SRTPFailure
+   {
+   };
+
+   /**
+    * Exception indicating the session has already started.
+    */
+   exception SRTPAlreadyStarted
+   {
+   };
+
+   /**
+    * Interface to an SRTP enabled RTP session.
+    */
+   interface SRTPSession extends RTPSession
+   {
+
+       /**
+        *
+        * Set the key information for the local endpoint. 
+        *
+        * @param suiteName The type of crypto suite to be used.
+        *
+        * @param keyInfo The key for the specified crypto suite (may be empty).
+        * 
+        * @param enableAuthentication Specify that the connection should be authenticated.
+        *
+        * @param enableEncryption Specify that the RTP flows should be encrypted.
+        *
+        * @throws SRTPUnavailable if the SRTP functionality is unavailable at the moment, really should not happen.
+        *
+        */
+       void setOptions(string suiteName, string keyInfo, bool enableAuthentication, bool enableEncryption) 
+           throws SRTPUnavailable;
+
+       /**
+        * Set the key information and initiates communication with peer.
+        * 
+        * @param suiteName The type of crypto suite to be used.
+        *
+        * @param keyInfo The key for the specified crypto suite (may be empty).
+        * 
+        * @param enableAuthentication Specify that the connection should be authenticated.
+        *
+        * @param enableEncryption Specify that the RTP flows should be encrypted.
+        *
+        * @throws SRTPUnavailable if the SRTP functionality is unavailable at the moment, really should not happen.
+        *
+        * @throws SRTPFailure if authentication/encryption with the peer has failed.
+        * 
+        * @throws SRTPAlreadyStarted if this is a duplicate call to start.
+        *
+        */
+       void start(string suiteName, string keyInfo, bool enableAuthentication, bool enableEncryption) throws
+           SRTPUnavailable, SRTPFailure, SRTPAlreadyStarted;
+   };
+
+   /**
     * This exception will be thrown by the media service if the session cannot be allocated for some
     * reason. It shall include a descriptive message as to why the request failed.
     */
@@ -180,6 +256,7 @@ module V1
        string message;
    };
 
+
    /**
     * Interface to an RTP media service.
     */
@@ -187,7 +264,7 @@ module V1
    {
       /**
        * Method which creates a new RTP session and returns a proxy to it.
-       *
+       * 
        * @param params Parameters to configure the RTP session with.
        *
        * @return RTPSession* A proxy to the new RTP session.

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


-- 
asterisk-scf/integration/slice.git



More information about the asterisk-scf-commits mailing list