Explorar el Código

snmpstats Add support for the new transports as well as new roles

The edgeproxyServer is a SIP Outbound edge proxy that manages flows to NATted clients.
The sipcaptureServer collects SIP messages for Homer SIP capture
Olle E. Johansson hace 12 años
padre
commit
0964bc96b1

+ 5 - 2
modules/snmpstats/README

@@ -302,7 +302,8 @@ Chapter 1. Admin Guide
    and will be used in determining what is returned for the
    kamailioSIPEntityType scalar. Valid parameters are:
 
-   registrarServer, redirectServer, proxyServer, userAgent, other
+   registrarServer, redirectServer, proxyServer, userAgent,
+   edgeproxyServer, sipcaptureServer,other
 
    Example 1.1. Setting the sipEntityType parameter
 ...
@@ -312,7 +313,9 @@ modparam("snmpstats", "sipEntityType", "proxyServer")
 
    Note that as the above example shows, you can define this parameter
    more than once. This is of course because a given Kamailio instance can
-   take on more than one role.
+   take on more than one role. The edgeproxyServer is an edge server using
+   the outbound module and path extensions. The sipcaptureServer is a
+   Homer Sip Capture server that collect SIP messages.
 
 4.2. MsgQueueMinorThreshold (Integer)
 

+ 4 - 2
modules/snmpstats/doc/snmpstats_admin.xml

@@ -259,7 +259,7 @@
 
 		<para>
 		<emphasis>
-		registrarServer, redirectServer, proxyServer, userAgent, other
+		registrarServer, redirectServer, proxyServer, userAgent, edgeproxyServer, sipcaptureServer,other
 		</emphasis>
 		</para>
 
@@ -276,7 +276,9 @@ modparam("snmpstats", "sipEntityType", "proxyServer")
 		<para>
 		Note that as the above example shows, you can define this parameter more
 		than once.  This is of course because a given Kamailio instance can take on
-		more than one role.
+		more than one role. The edgeproxyServer is an edge server using the outbound
+		module and path extensions. The sipcaptureServer is a Homer Sip Capture
+		server that collect SIP messages.
 		</para>
 	</section>
 

+ 1 - 1
modules/snmpstats/mibs/KAMAILIO-SIP-COMMON-MIB

@@ -338,7 +338,7 @@ KAMAILIO-SIP-COMMON-MIB DEFINITIONS ::= BEGIN
        		bit 4: Transport Layer Security Protocol over TCP
        		bit 5: Transport Layer Security Protocol over SCTP
        		bit 6: WebSocket transport
-       		bit 7: WebSocket transport over HTTP/TLS (WSS)
+       		bit 7: WebSocket transport over HTTP/TLS (WSS)"
        ::= { kamailioSIPPortEntry 4 }
 
    --

+ 18 - 6
modules/snmpstats/mibs/KAMAILIO-TC

@@ -23,7 +23,7 @@ IMPORTS
 
 
 kamailioTcModule MODULE-IDENTITY
-	LAST-UPDATED	"201301081200Z"
+	LAST-UPDATED	"201304041200Z"
 	ORGANIZATION	"Kamailio"
 	CONTACT-INFO
 		"http://www.kamailio.org"
@@ -51,16 +51,22 @@ KamailioSIPTransportProtocol ::= TEXTUAL-CONVENTION
                  bit 1   : User Datagram Protocol.
                  bit 2   : Transmission Control Protocol.
                  bit 3   : Stream Control Transmission Protocol.
-                 bit 4   : Transport Layer Security Protocol."
+                 bit 4   : Transport Layer Security Protocol.
+                 bit 5   : SCTP/Transport Layer Security Protocol.
+                 bit 6   : WebSocket transport (http)
+		 bit 7   : WebSocket over HTTP/TLS (wss)"
            SYNTAX     BITS {
                             other(0),  -- none of the following
 
                             udp(1),
                             tcp(2),
                             sctp(3),
-                            tls(4)
+                            tls(4),
+                            sctp_tls(5),
+			    ws(6),
+			    wss(7)
            }
---         REFERENCE "RFC 3261, Section 18"
+--         REFERENCE "RFC 4780, SipTCTransportProtocol"
 
 KamailioSIPEntityRole ::= TEXTUAL-CONVENTION
            STATUS current
@@ -68,13 +74,20 @@ KamailioSIPEntityRole ::= TEXTUAL-CONVENTION
                 "This convention defines the role of a SIP entity.
                  Examples of SIP entities are proxies, user agents,
                  redirect servers, registrars or combinations of
-                 the above."
+                 the above.
+		Kamailio adds the role 'edgeproxyServer' for
+		operation of a SIP outbound edge proxy node.
+		Kamailio adds the role 'sipcaptureServer' for
+		operation of a Homer SIPcapture node."
+		"
            SYNTAX BITS {
                             other(0),
                             userAgent(1),
                             proxyServer(2),
                             redirectServer(3),
                             registrarServer(4)
+                            edgeproxyServer(5)
+                            sipcaptureServer(6)
            }
 
 
@@ -87,7 +100,6 @@ KamailioSIPMethodIdentifier ::= TEXTUAL-CONVENTION
              of all defined SIP methods.
 
              Experimental support of extension methods is
-
              acceptable and expected.  Extention methods are
              those defined in Internet-Draft documents but
              not yet allocated an official number by IANA.

+ 6 - 0
modules/snmpstats/snmpSIPCommonObjects.c

@@ -502,6 +502,12 @@ int handleSipEntityType( modparam_t type, void* val)
 	else if (strcasecmp(strEntityType, "registrarServer") == 0) {
 		kamailioEntityType |= TC_SIP_ENTITY_ROLE_REGISTRAR_SERVER;
 	}
+	else if (strcasecmp(strEntityType, "edgeproxyServer") == 0) {
+		kamailioEntityType |= TC_SIP_ENTITY_ROLE_EDGEPROXY_SERVER;
+	}
+	else if (strcasecmp(strEntityType, "sipcaptureServer") == 0) {
+		kamailioEntityType |= TC_SIP_ENTITY_ROLE_SIPCAPTURE_SERVER;
+	}
 	else {
 		LM_ERR("The configuration file specified sipEntityType=%s,"
 				" an unknown type\n", strEntityType);

+ 2 - 0
modules/snmpstats/snmpstats_globals.h

@@ -73,6 +73,8 @@
 #define TC_SIP_ENTITY_ROLE_PROXY_SERVER     (128 >> 2)
 #define TC_SIP_ENTITY_ROLE_REDIRECT_SERVER  (128 >> 3)
 #define TC_SIP_ENTITY_ROLE_REGISTRAR_SERVER (128 >> 4)
+#define TC_SIP_ENTITY_ROLE_EDGEPROXY_SERVER (128 >> 5)
+#define TC_SIP_ENTITY_ROLE_SIPCAPTURE_SERVER (128 >> 6)
 
 #define TC_SIP_OPTION_TAG_REQUIRE       (128 >> 0)
 #define TC_SIP_OPTION_TAG_PROXY_REQUIRE (128 >> 1)