Module: sip-router
Branch: sr_3.0
Commit: 6186194a7e6153871d9da019e64916f6f73ec922
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6186194…
Author: Jan Janak <jan(a)ryngle.com>
Committer: Jan Janak <jan(a)ryngle.com>
Date: Mon Oct 26 14:37:22 2009 +0100
domain: Do not report errors when domain cannot be extracted from URI.
We should not report an error to syslog when lookup_domain fails to
parse the URI it was given as argument. That URI usually comes from
SIP messages we received from another implementation and we cannot
guarantee that they will always be well-formed. Generating an error
each time we receive a malformed SIP message can easily result in
denial of service.
---
modules_s/domain/domain_mod.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules_s/domain/domain_mod.c b/modules_s/domain/domain_mod.c
index e5d5cb0..b175ff8 100644
--- a/modules_s/domain/domain_mod.c
+++ b/modules_s/domain/domain_mod.c
@@ -440,7 +440,7 @@ static int lookup_domain(struct sip_msg* msg, char* flags, char* fp)
track = 0;
if (get_str_fparam(&domain, msg, (fparam_t*)fp) != 0) {
- ERR("Cannot get domain name to lookup\n");
+ DBG("lookup_domain: Cannot get the domain name to lookup\n");
return -1;
}
Module: sip-router
Branch: master
Commit: 6907fb8dc86953dfae0e2924a2c5a24feff3ecad
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6907fb8…
Author: Jan Janak <jan(a)ryngle.com>
Committer: Jan Janak <jan(a)ryngle.com>
Date: Mon Oct 26 14:37:22 2009 +0100
domain: Do not report errors when domain cannot be extracted from URI.
We should not report an error to syslog when lookup_domain fails to
parse the URI it was given as argument. That URI usually comes from
SIP messages we received from another implementation and we cannot
guarantee that they will always be well-formed. Generating an error
each time we receive a malformed SIP message can easily result in
denial of service.
---
modules_s/domain/domain_mod.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules_s/domain/domain_mod.c b/modules_s/domain/domain_mod.c
index e5d5cb0..b175ff8 100644
--- a/modules_s/domain/domain_mod.c
+++ b/modules_s/domain/domain_mod.c
@@ -440,7 +440,7 @@ static int lookup_domain(struct sip_msg* msg, char* flags, char* fp)
track = 0;
if (get_str_fparam(&domain, msg, (fparam_t*)fp) != 0) {
- ERR("Cannot get domain name to lookup\n");
+ DBG("lookup_domain: Cannot get the domain name to lookup\n");
return -1;
}
Module: sip-router
Branch: master
Commit: 47e9d6d83617e79c774c8815ec88610dc24e3dc4
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=47e9d6d…
Author: Jan Janak <jan(a)ryngle.com>
Committer: Jan Janak <jan(a)ryngle.com>
Date: Mon Oct 26 14:15:53 2009 +0100
parse_sip_msg_uri: Log broken URIs only when debugging is enabled.
Logging broken Request-URIs with LOG(L_ERR) generates too much traffic
in syslog by default. Broken Request-URIs are beyond our control and
we should not generate an error message each time we receive and parse
one. We log them only when debugging is enabled.
---
parser/parse_uri.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/parser/parse_uri.c b/parser/parse_uri.c
index 60f28c5..b9d487e 100644
--- a/parser/parse_uri.c
+++ b/parser/parse_uri.c
@@ -1403,8 +1403,8 @@ int parse_sip_msg_uri(struct sip_msg* msg)
tmp_len=msg->first_line.u.request.uri.len;
}
if (parse_uri(tmp, tmp_len, &msg->parsed_uri)<0){
- LOG(L_ERR, "ERROR: parse_sip_msg_uri: bad uri <%.*s>\n",
- tmp_len, tmp);
+ DBG("ERROR: parse_sip_msg_uri: bad uri <%.*s>\n",
+ tmp_len, tmp);
msg->parsed_uri_ok=0;
return -1;
}
Module: sip-router
Branch: master
Commit: 084221763b27e7fab9fa2b860651972a97056467
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=0842217…
Author: oej <oej(a)edvina.net>
Committer: oej <oej(a)edvina.net>
Date: Sun Oct 25 21:30:00 2009 +0100
Last doxygen updates of today.
---
modules_k/presence/bind_presence.c | 5 ++++-
modules_k/presence/bind_presence.h | 6 +++---
modules_k/presence/doc/presence_admin.xml | 24 ++++++++++++------------
3 files changed, 19 insertions(+), 16 deletions(-)
diff --git a/modules_k/presence/bind_presence.c b/modules_k/presence/bind_presence.c
index c2093cb..154c220 100644
--- a/modules_k/presence/bind_presence.c
+++ b/modules_k/presence/bind_presence.c
@@ -27,7 +27,10 @@
*/
/*! \file
- * \brief Kamailio presence module
+ * \brief SIP-Router Presence :: Kamailio generic presence module
+ *
+ * This is the core presence module, used in combination with other modules.
+ *
* \ingroup presence
*/
diff --git a/modules_k/presence/bind_presence.h b/modules_k/presence/bind_presence.h
index 44858e2..5800315 100644
--- a/modules_k/presence/bind_presence.h
+++ b/modules_k/presence/bind_presence.h
@@ -25,10 +25,10 @@
* --------
* 2007-04-17 initial version (anca)
*/
-
/*! \file
- * \brief Kamailio presence module
- * \ingroup presence
+ * \brief SIP-Router Presence :: Kamailio generic presence module
+ *
+ * \ingroup presence
*/
diff --git a/modules_k/presence/doc/presence_admin.xml b/modules_k/presence/doc/presence_admin.xml
index 4273d7d..2dd8ec6 100644
--- a/modules_k/presence/doc/presence_admin.xml
+++ b/modules_k/presence/doc/presence_admin.xml
@@ -27,8 +27,8 @@
is periodically updated in the database, while for PUBLISH only the presence
or absence of stored info for a certain resource is maintained in memory
to avoid unnecessary, costly database operations.
- It is possible to disable in-memory caching by configurng a fallback to database mode
- (by setting module parameter "fallback2db"). In this mode, in case a searched record is not
+ It is possible to disable in-memory caching by configuring a fallback to database mode
+ (by setting the module parameter "fallback2db"). In this mode, in case a searched record is not
found in cache, the search is continued in database. This is useful for
an architecture in which processing and memory load might be divided on
several &kamailio; instances, maybe on different servers using the same database.
@@ -102,7 +102,7 @@
<programlisting format="linespecific">
...
modparam("presence", "db_url",
- "mysql://openser:openserrw@192.168.2.132/openser")
+ "&defaultdb;")
...
</programlisting>
</example>
@@ -225,7 +225,7 @@ modparam("presence", "to_tag_pref", 'pres')
<para>
The value in seconds that should be subtracted from the expires value when
sending a 200OK for a publish. It is used for forcing the client
- cu send an update before the old publish expires.
+ to send an update before the old publish expires.
</para>
<para>
<emphasis>Default value is <quote>0</quote>.
@@ -265,7 +265,7 @@ modparam("presence", "max_expires", 3600)
<title><varname>server_address</varname> (str)</title>
<para>
The presence server address which will become the value of Contact header filed
- for 200OK replies to Subscribe and Publish and in Notify messages.
+ for 200 OK replies to SUBSCRIBE and PUBLISH and in NOTIFY messages.
</para>
<example>
<title>Set <varname>server_address</varname> parameter</title>
@@ -299,8 +299,8 @@ modparam("presence", "fallback2db", 1)
<title><varname>subs_htable_size</varname> (int)</title>
<para>
The size of the in-memory hash table to store subscription dialogs.
- This parameter will be used as the power of 2 when computing table size.
- </para>
+ This parameter will be used as the power of 2 when computing table size.
+ </para>
<para>
<emphasis>Default value is <quote>9 (512)</quote>.
</emphasis>
@@ -318,8 +318,8 @@ modparam("presence", "subs_htable_size", 11)
<section>
<title><varname>pres_htable_size</varname> (int)</title>
<para>
- The size of the in-memory hash table to store publish records.
- This parameter will be used as the power of 2 when computing table size.
+ The size of the in-memory hash table to store publish records.
+ This parameter will be used as the power of 2 when computing table size.
</para>
<para>
<emphasis>Default value is <quote>9 (512)</quote>.
@@ -368,10 +368,10 @@ modparam("presence", "enable_sphere_check", 1)
</title>
<para>
Handles PUBLISH requests by storing and updating
- published information in memory cach and database, then calls functions to send
+ published information in memory cache and database, then calls functions to send
NOTIFY messages when changes in the published information occur.
It takes one argument -> sender_uri. The parameter was added
- for enabling BLA implementation. If present, Notification of
+ for enabling BLA implementation. If present, notification of
a change in published state is not sent to the respective uri
even though a subscription exists.
It should be taken from the Sender header. It was left at the
@@ -425,7 +425,7 @@ modparam("presence", "enable_sphere_check", 1)
</title>
<para>
The function which handles SUBSCRIBE requests. It stores or
- updates information in memory and database and calls functions to send Notify
+ updates information in memory and database and calls functions to send NOTIFY
messages when a SUBSCRIBE which initiate a dialog is received
</para>
<para>
Module: sip-router
Branch: master
Commit: 3f9a5599b58ae23aaea5fc160a65b157566d3721
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=3f9a559…
Author: oej <oej(a)edvina.net>
Committer: oej <oej(a)edvina.net>
Date: Sun Oct 25 21:03:57 2009 +0100
Updates (doxygen documentation) to message waiting indication module
---
modules_k/presence_mwi/README | 70 ++++++++++++---------
modules_k/presence_mwi/add_events.c | 14 +++-
modules_k/presence_mwi/add_events.h | 8 +++
modules_k/presence_mwi/doc/presence_mwi_admin.xml | 6 +-
modules_k/presence_mwi/presence_mwi.c | 8 +++
modules_k/presence_mwi/presence_mwi.h | 8 +++
6 files changed, 79 insertions(+), 35 deletions(-)
diff --git a/modules_k/presence_mwi/README b/modules_k/presence_mwi/README
index ea03c92..44557ff 100644
--- a/modules_k/presence_mwi/README
+++ b/modules_k/presence_mwi/README
@@ -12,60 +12,72 @@ Juha Heinanen
Copyright � 2007 Juha Heinanen
Revision History
- Revision $Revision: 1 $ $Date: 2007-04-30 14:05:57 +0200 (Mon,
- 30 Jan 2007) $
- __________________________________________________________
+ Revision $Revision: 1 $ $Date: 2007-04-30 14:05:57 +0200 (Mon, 30 Jan
+ 2007) $
+ __________________________________________________________________
Table of Contents
1. Admin Guide
- 1.1. Overview
- 1.2. Dependencies
+ 1. Overview
+ 2. Dependencies
- 1.2.1. Kamailio Modules
- 1.2.2. External Libraries or Applications
+ 2.1. Kamailio Modules
+ 2.2. External Libraries or Applications
- 1.3. Exported Parameters
- 1.4. Exported Functions
+ 3. Exported Parameters
+ 4. Exported Functions
Chapter 1. Admin Guide
-1.1. Overview
+ Table of Contents
+
+ 1. Overview
+ 2. Dependencies
+
+ 2.1. Kamailio Modules
+ 2.2. External Libraries or Applications
- The module does specific handling for notify-subscribe
- message-summary (message waiting indication) events as
- specified in RFC 3842. It is used with the general event
- handling module, presence. It constructs and adds
- message-summary event to it.
+ 3. Exported Parameters
+ 4. Exported Functions
- The module does not currently implement any authorization
- rules. It assumes that publish requests are only issued by a
- voicemail application and subscribe requests only by the owner
- of voicemail box. Authorization can thus be easily done by
- Kamailio configuration file before calling handle_publish() and
- handle_subscribe() functions.
+1. Overview
+
+ The module does specific handling for notify-subscribe message-summary
+ (message waiting indication) events as specified in RFC 3842. It is
+ used with the general event handling module, presence. It constructs
+ and adds message-summary event to it.
+
+ The module does not currently implement any authorization rules. It
+ assumes that publish requests are only issued by a voicemail
+ application and subscribe requests only by the owner of voicemail box.
+ Authorization can thus be easily done by Kamailio configuration file
+ before calling handle_publish() and handle_subscribe() functions.
The module implements a simple check of content type
- application/simple-message-summary: Content must start with
- Messages-Waiting status line followed by zero or more lines
- that consist of tabs and printable ASCII characters.
+ "application/simple-message-summary:" Content must start with
+ "Messages-Waiting" status line followed by zero or more lines that
+ consist of tabs and printable ASCII characters.
+
+2. Dependencies
-1.2. Dependencies
+ 2.1. Kamailio Modules
+ 2.2. External Libraries or Applications
-1.2.1. Kamailio Modules
+2.1. Kamailio Modules
The following modules must be loaded before this module:
* presence.
-1.2.2. External Libraries or Applications
+2.2. External Libraries or Applications
None.
-1.3. Exported Parameters
+3. Exported Parameters
None.
-1.4. Exported Functions
+4. Exported Functions
None to be used in configuration file.
diff --git a/modules_k/presence_mwi/add_events.c b/modules_k/presence_mwi/add_events.c
index 2fcee56..fb0b44a 100644
--- a/modules_k/presence_mwi/add_events.c
+++ b/modules_k/presence_mwi/add_events.c
@@ -24,6 +24,14 @@
* 2007-05-1 initial version (jih)
*/
+/*!
+ * \file
+ * \brief SIP-router Presence :: Message-waiting indication support
+ * \ingroup presence
+ * Module: \ref presence
+ */
+
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -31,14 +39,14 @@
#include "../presence/event_list.h"
#include "presence_mwi.h"
-/* utility function that skips spaces and tabs */
+/*! \brief utility function that skips spaces and tabs */
inline char *eat_sp_tab(char *at, char *over)
{
while((at < over) && ((*at == ' ') || (*at == '\t'))) at++;
return at;
}
-/* utility function that skips printable ascii chars */
+/*! \brief utility function that skips printable ascii chars */
inline char *eat_printable(char *at, char *over)
{
while ((at < over) && ((*at == '\t') || ((*at >= 32) && (*at <= 126))))
@@ -46,7 +54,7 @@ inline char *eat_printable(char *at, char *over)
return at;
}
-/*
+/*! \brief
* event specific publish handling - check if body format is ok
*/
int mwi_publ_handl(struct sip_msg* msg)
diff --git a/modules_k/presence_mwi/add_events.h b/modules_k/presence_mwi/add_events.h
index b44fa17..e63b425 100644
--- a/modules_k/presence_mwi/add_events.h
+++ b/modules_k/presence_mwi/add_events.h
@@ -24,6 +24,14 @@
* 2007-05-1 initial version (jih)
*/
+/*!
+ * \file
+ * \brief SIP-router Presence :: Message Waiting indication
+ * \ingroup presence
+ * Module: \ref presence
+ */
+
+
#ifndef _MWI_ADD_EV_H_
#define _MWI_ADD_EV_H_
diff --git a/modules_k/presence_mwi/doc/presence_mwi_admin.xml b/modules_k/presence_mwi/doc/presence_mwi_admin.xml
index c99d95f..acd66a5 100644
--- a/modules_k/presence_mwi/doc/presence_mwi_admin.xml
+++ b/modules_k/presence_mwi/doc/presence_mwi_admin.xml
@@ -28,15 +28,15 @@
The module does not currently implement any authorization
rules. It assumes that publish requests are only issued by
a voicemail application and subscribe requests only by
- the owner of voicemail box. Authorization can thus
+ the owner of voicemail box. Authorization can thus
be easily done by &kamailio; configuration file before
calling handle_publish() and handle_subscribe()
functions.
</para>
<para>
The module implements a simple check of content type
- application/simple-message-summary: Content must start
- with Messages-Waiting status line followed by zero or
+ <quote>application/simple-message-summary:</quote> Content must start
+ with <quote>Messages-Waiting</quote> status line followed by zero or
more lines that consist of tabs and printable ASCII
characters.
</para>
diff --git a/modules_k/presence_mwi/presence_mwi.c b/modules_k/presence_mwi/presence_mwi.c
index ea4ad2b..fc03c7f 100644
--- a/modules_k/presence_mwi/presence_mwi.c
+++ b/modules_k/presence_mwi/presence_mwi.c
@@ -24,6 +24,14 @@
* 2007-05-1 initial version (jih)
*/
+/*!
+ * \file
+ * \brief SIP-router Presence :: Message waiting indication
+ * \ingroup presence
+ * Module: \ref presence
+ */
+
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/modules_k/presence_mwi/presence_mwi.h b/modules_k/presence_mwi/presence_mwi.h
index 9d7a664..f77ab8b 100644
--- a/modules_k/presence_mwi/presence_mwi.h
+++ b/modules_k/presence_mwi/presence_mwi.h
@@ -24,6 +24,14 @@
* 2007-05-1 initial version (jih)
*/
+/*!
+ * \file
+ * \brief SIP-router Presence :: Message waiting indication
+ * \ingroup presence
+ * Module: \ref presence
+ */
+
+
#ifndef _PRES_MWI_H_
#define _PRES_MWI_H_