Module: sip-router
Branch: master
Commit: 0964bc96b1e3cd3bb7478388f6df3cb69fffce64
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=0964bc9…
Author: Olle E. Johansson <oej(a)edvina.net>
Committer: Olle E. Johansson <oej(a)edvina.net>
Date: Thu Apr 4 22:27:02 2013 +0200
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
---
modules/snmpstats/README | 7 +++++--
modules/snmpstats/doc/snmpstats_admin.xml | 6 ++++--
modules/snmpstats/mibs/KAMAILIO-SIP-COMMON-MIB | 2 +-
modules/snmpstats/mibs/KAMAILIO-TC | 24 ++++++++++++++++++------
modules/snmpstats/snmpSIPCommonObjects.c | 6 ++++++
modules/snmpstats/snmpstats_globals.h | 2 ++
6 files changed, 36 insertions(+), 11 deletions(-)
diff --git a/modules/snmpstats/README b/modules/snmpstats/README
index 49d20dd..12d2c31 100644
--- a/modules/snmpstats/README
+++ b/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)
diff --git a/modules/snmpstats/doc/snmpstats_admin.xml
b/modules/snmpstats/doc/snmpstats_admin.xml
index 568e1c2..71a7b61 100644
--- a/modules/snmpstats/doc/snmpstats_admin.xml
+++ b/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>
diff --git a/modules/snmpstats/mibs/KAMAILIO-SIP-COMMON-MIB
b/modules/snmpstats/mibs/KAMAILIO-SIP-COMMON-MIB
index 939a1a7..3ceec33 100644
--- a/modules/snmpstats/mibs/KAMAILIO-SIP-COMMON-MIB
+++ b/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 }
--
diff --git a/modules/snmpstats/mibs/KAMAILIO-TC b/modules/snmpstats/mibs/KAMAILIO-TC
index 828ce2b..81d1459 100644
--- a/modules/snmpstats/mibs/KAMAILIO-TC
+++ b/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.
diff --git a/modules/snmpstats/snmpSIPCommonObjects.c
b/modules/snmpstats/snmpSIPCommonObjects.c
index f4244d5..44ffa9d 100644
--- a/modules/snmpstats/snmpSIPCommonObjects.c
+++ b/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);
diff --git a/modules/snmpstats/snmpstats_globals.h
b/modules/snmpstats/snmpstats_globals.h
index 431e907..1eb37ed 100644
--- a/modules/snmpstats/snmpstats_globals.h
+++ b/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)