[asterisk-scf-commits] asterisk-scf/release/slice.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Fri Feb 18 12:25:06 CST 2011


branch "master" has been updated
       via  093dd4f755efcb495b31bb805838690d22138039 (commit)
       via  f08f95b47099e7310580f29f164c842d47f3061c (commit)
       via  fff2150a0cbf51c4848c59b46a822ecd99f7bb54 (commit)
       via  89e06ac4dbdf1d9d6043a7770497dc83a05ae17a (commit)
       via  06e3aa507539fe0e017ebcfce6d476e33507ff2e (commit)
       via  82d142a052204f76cd21b8ecc58f69147e95491e (commit)
       via  2e556b3559e046ba4407f0e2924ba5e6e9a5f1eb (commit)
       via  b365c6903c0a09324ebdd9d664bf592fa127d5e4 (commit)
       via  1512425da52259210df6fea339798a9351256a7c (commit)
       via  9ea5281dc525bf6fcb641bca2f8dfbf27764f788 (commit)
       via  6c31bea4b36ce5d3b0b3a93fdc8ef77df822bcca (commit)
       via  5ac2f708432de5cd30c47895e61f710bb06b8f3f (commit)
       via  f2f3868111b19b3abbcb629bc8c68bd3fde6e926 (commit)
       via  b96fd90a5a103a5972174e44b3ec84c90d89701f (commit)
       via  047f8c507d73e216eb0fbab40e7f7ee945c481a4 (commit)
      from  0cde8ca15d8fe0848732a1d7fc2989a189af3f54 (commit)

Summary of changes:
 AsteriskSCF/SIP/SIPExtensionPointIf.ice            |  210 ++++++++++++++++++++
 .../System/{Time/TimeIf.ice => Hook/HookIf.ice}    |   43 ++---
 make-ruby-api.sh                                   |    3 +-
 3 files changed, 230 insertions(+), 26 deletions(-)
 create mode 100644 AsteriskSCF/SIP/SIPExtensionPointIf.ice
 copy AsteriskSCF/System/{Time/TimeIf.ice => Hook/HookIf.ice} (59%)


- Log -----------------------------------------------------------------
commit 093dd4f755efcb495b31bb805838690d22138039
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Fri Feb 18 12:20:21 2011 -0600

    Convert DigestChallenge variants from an enum member field to subclasses.
    
    Add visitor-pattern metadata for DigestChallenge so it can be used when
    DigestChallengeSeq is passed around.

diff --git a/AsteriskSCF/SIP/SIPExtensionPointIf.ice b/AsteriskSCF/SIP/SIPExtensionPointIf.ice
index ad6db50..65fcee5 100644
--- a/AsteriskSCF/SIP/SIPExtensionPointIf.ice
+++ b/AsteriskSCF/SIP/SIPExtensionPointIf.ice
@@ -138,25 +138,33 @@ module V1
     {
     };
 
-    enum DigestAlgorithm
+    ["visitor"] local class DigestChallengeVisitor
     {
-	MD5,
-	MD5sess,
-	AKAv1MD5,
-	AKAv1MD5sess,
-	AKAv2MD5,
-	AKAv2MD5sess
     };
 
-    class DigestChallenge
+    ["visitor:::AsteriskSCF::SIP::ExtensionPoint::V1::DigestChallengeVisitor"] class DigestChallenge
     {
 	string username;
 	string password;
 	Ice::StringSeq domain;
 	string realm;
-	Ice::StringSeq nonce;
 	Ice::StringSeq opaque;
-	DigestAlgorithm algorithm;
+    };
+
+    class MD5DigestChallenge extends DigestChallenge
+    {
+	// Indicates whether 'MD5' or 'MD5-sess' should be used
+	bool sessionMode;
+    };
+
+    class AKAv1DigestChallenge extends MD5DigestChallenge
+    {
+	string nonce;
+    };
+
+    class AKAv2DigestChallenge extends MD5DigestChallenge
+    {
+	string nonce;
     };
 
     sequence<DigestChallenge> DigestChallengeSeq;

commit f08f95b47099e7310580f29f164c842d47f3061c
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Thu Feb 10 11:49:35 2011 -0600

    After further discussion, two changes are in order:
    
    * There is no need for operations that register hooks to return a
      HookId-type object; the only object required to be able to unregister
      the hook in the future is the proxy to the hook, so a second object
      is unnecessary.
    
    * When registering a hook on an Extension Point, there is a need to
      be able to specify a priority (lower number == higher priority), so
      that hooks can be configured to run in a deterministic order.

diff --git a/AsteriskSCF/SIP/SIPExtensionPointIf.ice b/AsteriskSCF/SIP/SIPExtensionPointIf.ice
index 9b9f642..ad6db50 100644
--- a/AsteriskSCF/SIP/SIPExtensionPointIf.ice
+++ b/AsteriskSCF/SIP/SIPExtensionPointIf.ice
@@ -188,8 +188,8 @@ module V1
 
     interface AuthExtensionPoint
     {
-	AsteriskSCF::System::Hook::V1::HookId addAuthHook(AuthHook *hook, RequestTypeSeq requestTypes);
-	void removeAuthHook(AsteriskSCF::System::Hook::V1::HookId id);
+	void addAuthHook(AuthHook *hook, int priority, RequestTypeSeq requestTypes);
+	void removeAuthHook(AuthHook *hook);
 	void clearAuthHooks();
     };
 
diff --git a/AsteriskSCF/System/Hook/HookIf.ice b/AsteriskSCF/System/Hook/HookIf.ice
index c9693fa..c205a2e 100644
--- a/AsteriskSCF/System/Hook/HookIf.ice
+++ b/AsteriskSCF/System/Hook/HookIf.ice
@@ -28,11 +28,6 @@ module Hook
 module V1
 {
 
-    struct HookId
-    {
-	string id;
-    };
-
     enum HookStatus
     {
 	/* Hook successfully processed input/returned result */

commit fff2150a0cbf51c4848c59b46a822ecd99f7bb54
Merge: 89e06ac 0cde8ca
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Thu Feb 10 11:46:58 2011 -0600

    Merge branch 'master' into sip-auth-hook


commit 89e06ac4dbdf1d9d6043a7770497dc83a05ae17a
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Wed Feb 9 10:30:33 2011 -0600

    Add RequestInfo subclasses for all IANA-registered SIP request methods.

diff --git a/AsteriskSCF/SIP/SIPExtensionPointIf.ice b/AsteriskSCF/SIP/SIPExtensionPointIf.ice
index e2071dd..9b9f642 100644
--- a/AsteriskSCF/SIP/SIPExtensionPointIf.ice
+++ b/AsteriskSCF/SIP/SIPExtensionPointIf.ice
@@ -68,6 +68,76 @@ module V1
 	RequestTransport transport;
     };
 
+    // RFC 3261 - ACK method
+    class AckRequestInfo extends RequestInfo
+    {
+    };
+
+    // RFC 3261 - BYE method
+    class ByeRequestInfo extends RequestInfo
+    {
+    };
+
+    // RFC 3261 - CANCEL method
+    class CancelRequestInfo extends RequestInfo
+    {
+    };
+
+    // RFC 6086 - INFO method
+    class InfoRequestInfo extends RequestInfo
+    {
+    };
+
+    // RFC 3261/6026 - INVITE method
+    class InviteRequestInfo extends RequestInfo
+    {
+    };
+
+    // RFC 3428 - MESSAGE method
+    class MessageRequestInfo extends RequestInfo
+    {
+    };
+
+    // RFC 3265 - NOTIFY method
+    class NotifyRequestInfo extends RequestInfo
+    {
+    };
+
+    // RFC 3261 - OPTIONS method
+    class OptionsRequestInfo extends InviteRequestInfo
+    {
+    };
+
+    // RFC 3262 - PRACK method
+    class PrackRequestInfo extends RequestInfo
+    {
+    };
+
+    // RFC 3903 - PUBLISH method
+    class PublishRequestInfo extends RequestInfo
+    {
+    };
+
+    // RFC 3515 - REFER method
+    class ReferRequestInfo extends RequestInfo
+    {
+    };
+
+    // RFC 3261 - REGISTER method
+    class RegisterRequestInfo extends RequestInfo
+    {
+    };
+
+    // RFC 3265 - SUBSCRIBE method
+    class SubscribeRequestInfo extends RequestInfo
+    {
+    };
+
+    // RFC 3311 - UPDATE method
+    class UpdateRequestInfo extends RequestInfo
+    {
+    };
+
     enum DigestAlgorithm
     {
 	MD5,
@@ -108,6 +178,8 @@ module V1
 	NonDialog,
 	// Examples of 'In Dialog' requests include (but are not limited to):
 	// (RFC3261) INVITE with a valid To tag denoting an existing dialog
+	// (RFC3261) ACK with a valid To tag denoting an existing dialog
+	// (RFC3261) BYE with a valid To tag denoting an existing dialog
 	// (RFC3265) SUBSCRIBE with a valid To tag denoting an existing dialog
 	InDialog,
     };

commit 06e3aa507539fe0e017ebcfce6d476e33507ff2e
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Wed Feb 9 10:19:44 2011 -0600

    Document some examples of SIP methods that fall into each category
    of RequestType.

diff --git a/AsteriskSCF/SIP/SIPExtensionPointIf.ice b/AsteriskSCF/SIP/SIPExtensionPointIf.ice
index dffcd74..e2071dd 100644
--- a/AsteriskSCF/SIP/SIPExtensionPointIf.ice
+++ b/AsteriskSCF/SIP/SIPExtensionPointIf.ice
@@ -98,8 +98,17 @@ module V1
 
     enum RequestType
     {
+	// Examples of 'Dialog Establishing' requests include (but are not limited to):
+	// (RFC3261) INVITE without a To tag
+	// (RFC3265) SUBSCRIBE without a To tag
 	DialogEstablishing,
+	// Examples of 'Non Dialog' requests include (but are not limited to):
+	// (RFC3261) OPTIONS
+	// (RFC3261) REGISTER
 	NonDialog,
+	// Examples of 'In Dialog' requests include (but are not limited to):
+	// (RFC3261) INVITE with a valid To tag denoting an existing dialog
+	// (RFC3265) SUBSCRIBE with a valid To tag denoting an existing dialog
 	InDialog,
     };
 

commit 82d142a052204f76cd21b8ecc58f69147e95491e
Merge: 2e556b3 7d1de75
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Tue Feb 8 16:08:50 2011 -0600

    Merge branch 'master' into sip-auth-hook
    
    Conflicts:
    	make-mono-api.sh


commit 2e556b3559e046ba4407f0e2924ba5e6e9a5f1eb
Merge: b365c69 a4973ac
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Tue Feb 8 06:37:45 2011 -0600

    Merge branch 'master' into sip-auth-hook


commit b365c6903c0a09324ebdd9d664bf592fa127d5e4
Author: David M. Lee <dlee at digium.com>
Date:   Mon Feb 7 19:12:06 2011 -0600

    Fixed a couple of copy/paste errors.

diff --git a/make-python-api.sh b/make-python-api.sh
index 539ed18..3300179 100755
--- a/make-python-api.sh
+++ b/make-python-api.sh
@@ -6,7 +6,7 @@ then
     exit 1
 fi
 
-if [ ! -x "${ICE_HOME}/bin/slice2cs" ]
+if [ ! -x "${ICE_HOME}/bin/slice2py" ]
 then
     echo "slice2py translator not found in ICE_HOME"
     echo "(${ICE_HOME})"
diff --git a/make-ruby-api.sh b/make-ruby-api.sh
index 4241a00..decc27a 100755
--- a/make-ruby-api.sh
+++ b/make-ruby-api.sh
@@ -6,7 +6,7 @@ then
     exit 1
 fi
 
-if [ ! -x "${ICE_HOME}/bin/slice2cs" ]
+if [ ! -x "${ICE_HOME}/bin/slice2rb" ]
 then
     echo "slice2rb translator not found in ICE_HOME"
     echo "(${ICE_HOME})"

commit 1512425da52259210df6fea339798a9351256a7c
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Mon Feb 7 19:53:37 2011 +0100

    Build Mono API with warnings turned into errors
    and with DEBUG defined.

diff --git a/make-mono-api.sh b/make-mono-api.sh
index a8ad426..2bf5471 100755
--- a/make-mono-api.sh
+++ b/make-mono-api.sh
@@ -26,6 +26,6 @@ do
 done
 
 echo "Compiling generated C# into a library..."
-gmcs -debug -out:mono/AsteriskSCF-API.dll -t:library -recurse:'mono/generated/*.cs' Properties/AssemblyInfo.cs "-lib:${ICE_HOME}/bin" -r:Ice
+gmcs -warnaserror -debug -define:DEBUG -out:mono/AsteriskSCF-API.dll -t:library -recurse:'mono/generated/*.cs' Properties/AssemblyInfo.cs "-lib:${ICE_HOME}/bin" -r:Ice
 
 echo "Finished."

commit 9ea5281dc525bf6fcb641bca2f8dfbf27764f788
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Mon Feb 7 19:53:15 2011 +0100

    slice2rb now supports plugins, so use
    SliceVisitorPattern when building the API.

diff --git a/make-ruby-api.sh b/make-ruby-api.sh
index 01bbe81..4241a00 100755
--- a/make-ruby-api.sh
+++ b/make-ruby-api.sh
@@ -22,8 +22,7 @@ do
     slicedir=`dirname "${slice}"`
     mkdir -p "ruby/${slicedir}"
     echo "Translating ${slice} into Ruby..."
-#   --plugin SliceVisitorPattern:create
-    ${ICE_HOME}/bin/slice2rb -I ${ICE_HOME}/slice -I . --output-dir "ruby/${slicedir}" --checksum "${slice}"
+    ${ICE_HOME}/bin/slice2rb -I ${ICE_HOME}/slice -I . --output-dir "ruby/${slicedir}" --checksum --plugin SliceVisitorPattern:create "${slice}"
 done
 
 echo "Finished."

commit 6c31bea4b36ce5d3b0b3a93fdc8ef77df822bcca
Merge: 5ac2f70 fe141a9
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Mon Feb 7 13:15:39 2011 +0100

    Merge branch 'master' into sip-auth-hook


commit 5ac2f708432de5cd30c47895e61f710bb06b8f3f
Merge: f2f3868 738e77d
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Mon Feb 7 13:05:21 2011 +0100

    Merge branch 'master' into sip-auth-hook


commit f2f3868111b19b3abbcb629bc8c68bd3fde6e926
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Mon Feb 7 13:04:34 2011 +0100

    Byte-compile generated Python sources.

diff --git a/make-python-api.sh b/make-python-api.sh
index afac053..5ee04bb 100755
--- a/make-python-api.sh
+++ b/make-python-api.sh
@@ -25,4 +25,10 @@ do
     ${ICE_HOME}/bin/slice2py -I ${ICE_HOME}/slice -I . --output-dir python --checksum --plugin SliceVisitorPattern:create --prefix "${prefix}" "${slice}"
 done
 
+find python -name \*.py -print | while read py
+do
+    echo "Compiling ${py}..."
+    pycompile "${py}"
+done
+
 echo "Finished."

commit b96fd90a5a103a5972174e44b3ec84c90d89701f
Merge: 047f8c5 d8ee2a8
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Mon Feb 7 12:59:58 2011 +0100

    Merge branch 'master' into sip-auth-hook


commit 047f8c507d73e216eb0fbab40e7f7ee945c481a4
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Fri Feb 4 16:45:16 2011 +0100

    Add an initial version of the basic Hook interface and a SIP
    authentication Extension Point. This all came from the relevant
    wiki pages on wiki.asterisk.org, with some minor modifications
    along the way.

diff --git a/AsteriskSCF/SIP/SIPExtensionPointIf.ice b/AsteriskSCF/SIP/SIPExtensionPointIf.ice
new file mode 100644
index 0000000..dffcd74
--- /dev/null
+++ b/AsteriskSCF/SIP/SIPExtensionPointIf.ice
@@ -0,0 +1,121 @@
+/*
+ * Asterisk SCF -- An open-source communications framework.
+ *
+ * Copyright (C) 2011, Digium, Inc.
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk SCF project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE.txt file
+ * at the top of the source tree.
+ */
+
+#pragma once
+
+#include <Ice/BuiltinSequences.ice>
+
+#include <AsteriskSCF/System/Hook/HookIf.ice>
+
+module AsteriskSCF
+{
+
+module SIP
+{
+
+module ExtensionPoint
+{
+
+["suppress"]
+module V1
+{
+
+    dictionary<string, string> ParamDict;
+
+    enum RequestTransport
+    {
+	UDP,
+	TCP,
+	TLS
+    };
+
+    class RequestInfo
+    {
+	// The display name in the From header
+	string fromName;
+	// The URI in the From header
+	string fromURI;
+	// URI parameters in the From header
+	ParamDict fromParams;
+	// The display name in the To header
+	string toName;
+	// The URI in the To header
+	string toURI;
+	// URI parameters in the To header
+	ParamDict toParams;
+	// The request URI
+	string requestURI;
+	// request URI parameters
+	ParamDict requestURIParams;
+	// Source IP address
+	string IPAddr;
+	// Source Port
+	int port;
+	// Transport over which request was received
+	RequestTransport transport;
+    };
+
+    enum DigestAlgorithm
+    {
+	MD5,
+	MD5sess,
+	AKAv1MD5,
+	AKAv1MD5sess,
+	AKAv2MD5,
+	AKAv2MD5sess
+    };
+
+    class DigestChallenge
+    {
+	string username;
+	string password;
+	Ice::StringSeq domain;
+	string realm;
+	Ice::StringSeq nonce;
+	Ice::StringSeq opaque;
+	DigestAlgorithm algorithm;
+    };
+
+    sequence<DigestChallenge> DigestChallengeSeq;
+
+    interface AuthHook
+    {
+	AsteriskSCF::System::Hook::V1::HookResult challengeRequest(RequestInfo info, out DigestChallengeSeq challenges);
+    };
+
+    enum RequestType
+    {
+	DialogEstablishing,
+	NonDialog,
+	InDialog,
+    };
+
+    sequence<RequestType> RequestTypeSeq;
+
+    interface AuthExtensionPoint
+    {
+	AsteriskSCF::System::Hook::V1::HookId addAuthHook(AuthHook *hook, RequestTypeSeq requestTypes);
+	void removeAuthHook(AsteriskSCF::System::Hook::V1::HookId id);
+	void clearAuthHooks();
+    };
+
+}; /* End of module V1 */
+
+}; /* End of module ExtensionPoint */
+
+}; /* End of module SIP */
+
+}; /* End of module AsteriskSCF */
diff --git a/AsteriskSCF/System/Hook/HookIf.ice b/AsteriskSCF/System/Hook/HookIf.ice
new file mode 100644
index 0000000..c9693fa
--- /dev/null
+++ b/AsteriskSCF/System/Hook/HookIf.ice
@@ -0,0 +1,58 @@
+/*
+ * Asterisk SCF -- An open-source communications framework.
+ *
+ * Copyright (C) 2011, Digium, Inc.
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk SCF project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE.txt file
+ * at the top of the source tree.
+ */
+
+#pragma once
+
+module AsteriskSCF
+{
+
+module System
+{
+
+module Hook
+{
+
+module V1
+{
+
+    struct HookId
+    {
+	string id;
+    };
+
+    enum HookStatus
+    {
+	/* Hook successfully processed input/returned result */
+	Succeeded,
+	/* Hook failed to process input or return result */
+	Failed,
+	/* Hook declined to process input and return result */
+	Declined
+    };
+
+    struct HookResult
+    {
+	HookStatus status;
+	string info;
+    };
+
+}; /* End of V1 */
+
+}; /* End of Hook */
+
+}; /* End of System */
+
+}; /* End of AsteriskSCF */

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


-- 
asterisk-scf/release/slice.git



More information about the asterisk-scf-commits mailing list