Peter Dunkley wrote:
The warning I am seeing is:
14(6323) WARNING: <core> [timer_funcs.h:119]: WARNING: timer:
add_timeout: 0 expire timer added
I have started to get the same warning.
-- Juha
Hello Sir,
I am newer to SER and keen to know about it. How to count usage of voip
using SER? Please help.
Thanks & Regards,
Sayantan Laha
Senior Software Engineer
MasterCom TechServices Pvt. Ltd
Mob:-+91-9869321411
Module: sip-router
Branch: master
Commit: a078f2d1dd19d83a9e740834403f48fdf6088d2b
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a078f2d…
Author: pd <peter.dunkley(a)crocodile-rcs.com>
Committer: pd <peter.dunkley(a)crocodile-rcs.com>
Date: Thu Aug 18 15:12:33 2011 +0100
modules_k/presence_xml: Modified pres_check_activities() to return -2 when part of the XML tree is not present
- This is needed because some presence UAs (such as pua_usrloc) only
fill in the basic part of the tree. This change enables you to
distinguish between not having a particular activity set (by a client
that supports that) and not having any activities at all (by clients
that only support basic presence).
---
modules_k/presence_xml/README | 4 +++-
modules_k/presence_xml/doc/presence_xml_admin.xml | 9 ++++++++-
modules_k/presence_xml/pres_check.c | 10 ++++++----
3 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/modules_k/presence_xml/README b/modules_k/presence_xml/README
index 8756ea8..59099eb 100644
--- a/modules_k/presence_xml/README
+++ b/modules_k/presence_xml/README
@@ -320,11 +320,13 @@ modparam("presence_xml", "passive_mode", 1)
Return code:
* 1 - if a match is found.
* -1 - if a match is not found.
+ * -2 - if /presence/person or /presence/person/activity do not exist.
Example 1.12. pres_check_activities usage
...
if (pres_check_basic("$ru", "open")) {
- if (pres_check_activities("$ru", "unknown") || !is_method("INVITE"))
+ pres_check_activities("$ru", "unknown");
+ if ($retcode || $retcode == -2 || !is_method("INVITE"))
t_relay();
else
send_reply("486", "Busy Here");
diff --git a/modules_k/presence_xml/doc/presence_xml_admin.xml b/modules_k/presence_xml/doc/presence_xml_admin.xml
index 059bb97..7bfe201 100644
--- a/modules_k/presence_xml/doc/presence_xml_admin.xml
+++ b/modules_k/presence_xml/doc/presence_xml_admin.xml
@@ -381,6 +381,12 @@ modparam("presence_xml", "passive_mode", 1)
<emphasis> -1 - if a match is not found</emphasis>.
</para>
</listitem>
+ <listitem>
+ <para>
+ <emphasis> -2 - if /presence/person or /presence/person/activity do not exist</emphasis>.
+ </para>
+ </listitem>
+
</itemizedlist>
</para>
<example>
@@ -388,7 +394,8 @@ modparam("presence_xml", "passive_mode", 1)
<programlisting format="linespecific">
...
if (pres_check_basic("$ru", "open")) {
- if (pres_check_activities("$ru", "unknown") || !is_method("INVITE"))
+ pres_check_activities("$ru", "unknown");
+ if ($retcode || $retcode == -2 || !is_method("INVITE"))
t_relay();
else
send_reply("486", "Busy Here");
diff --git a/modules_k/presence_xml/pres_check.c b/modules_k/presence_xml/pres_check.c
index 40ce7fb..fea420b 100644
--- a/modules_k/presence_xml/pres_check.c
+++ b/modules_k/presence_xml/pres_check.c
@@ -98,7 +98,7 @@ int presxml_check_basic(struct sip_msg *msg, char *presentity_uri, char *status)
goto error;
}
- while (tuple->next != NULL)
+ while (tuple != NULL)
{
if (xmlStrcasecmp(tuple->name, (unsigned char *) "tuple") == 0)
{
@@ -189,17 +189,19 @@ int presxml_check_activities(struct sip_msg *msg, char *presentity_uri, char *ac
if ((person = xmlDocGetNodeByName(xmlDoc, "person", NULL)) == NULL)
{
- LM_ERR("unable to extract 'person'\n");
+ LM_DBG("unable to extract 'person'\n");
+ retval = -2;
goto error;
}
- while (person->next != NULL)
+ while (person != NULL)
{
if (xmlStrcasecmp(person->name, (unsigned char *) "person") == 0)
{
if ((activitiesNode = xmlNodeGetNodeByName(person, "activities", NULL)) == NULL)
{
- LM_ERR("while extracting 'actvities' node\n");
+ LM_DBG("unable to extract 'actvities' node\n");
+ retval = -2;
goto error;
}
Module: sip-router
Branch: master
Commit: 24d30bd0f9fd378c9f34829bfffdd725b3b57edf
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=24d30bd…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Thu Aug 18 10:46:48 2011 +0200
dmq: fixed missing tags in xml docs
- added README to GIT repository
---
modules_k/dmq/README | 135 +++++++++++++++++++++++++++++++++++++++
modules_k/dmq/doc/dmq_admin.xml | 3 +
2 files changed, 138 insertions(+), 0 deletions(-)
diff --git a/modules_k/dmq/README b/modules_k/dmq/README
new file mode 100644
index 0000000..f363ae7
--- /dev/null
+++ b/modules_k/dmq/README
@@ -0,0 +1,135 @@
+Distributed Message Queue Module
+
+Marius Ovidiu Bucur
+
+Edited by
+
+Marius Ovidiu Bucur
+
+ Copyright � 2011 Marius Bucur
+ __________________________________________________________________
+
+ Table of Contents
+
+ 1. Admin Guide
+
+ 1. Overview
+ 2. Dependencies
+
+ 2.1. Kamailio Modules
+ 2.2. External Libraries or Applications
+
+ 3. Exported Parameters
+
+ 3.1. dmq_server_address(str)
+ 3.2. dmq_notification_address(str)
+
+ 2. Developer Guide
+
+ 1. dmq_load_api(dmq_api_t* api)
+
+ List of Examples
+
+ 1.1. Set dmq_server_address parameter
+ 1.2. Set dmq_notification_address parameter
+ 2.1. dmq_api_t structure
+
+Chapter 1. Admin Guide
+
+ Table of Contents
+
+ 1. Overview
+ 2. Dependencies
+
+ 2.1. Kamailio Modules
+ 2.2. External Libraries or Applications
+
+ 3. Exported Parameters
+
+ 3.1. dmq_server_address(str)
+ 3.2. dmq_notification_address(str)
+
+1. Overview
+
+ The DMQ module implements a distributed message passing system on top
+ of Kamailio. The DMQ nodes within the system are grouped in a logical
+ entity called DMQ bus and are able to communicate with each others by
+ sending/receiving messages (either by broadcast or sending a DMQ
+ message to a specific node). The system transparently deals with node
+ discovery, node consistency within the DMQ bus, retransmissions, etc.
+
+2. Dependencies
+
+ 2.1. Kamailio Modules
+ 2.2. External Libraries or Applications
+
+2.1. Kamailio Modules
+
+ The following modules must be loaded before this module:
+ * sl.
+ * tm.
+
+2.2. External Libraries or Applications
+
+ * Each peer needs to use its own serialization mechanism. Some
+ examples are libtpl, protobuf. .
+
+3. Exported Parameters
+
+ 3.1. dmq_server_address(str)
+ 3.2. dmq_notification_address(str)
+
+3.1. dmq_server_address(str)
+
+ The local server address.
+
+ The modules needs it to know on which interface the DMQ engine should
+ send and receive messages.
+
+ Default value is "NULL".
+
+ Example 1.1. Set dmq_server_address parameter
+...
+modparam("dmq", "dmq_server_address", "mysql://openser:openserrw@localhost/opens
+er")
+...
+
+3.2. dmq_notification_address(str)
+
+ The address of the DMQ node from which the local node should retrieve
+ initial information.
+
+ Default value is "NULL".
+
+ Example 1.2. Set dmq_notification_address parameter
+...
+modparam("dmq", "dmq_notification_address", "mysql://openser:openserrw@localhost
+/openser")
+...
+
+Chapter 2. Developer Guide
+
+ Table of Contents
+
+ 1. dmq_load_api(dmq_api_t* api)
+
+ The module provides the following functions that can be used in other
+ Kamailio modules.
+
+1. dmq_load_api(dmq_api_t* api)
+
+ This function binds the dmq modules and fills the structure with the
+ exported functions -> register_dmq_peer - registers an entity as a DMQ
+ peer which permits receiving/sending messages between nodes which
+ support the same peer, -> bcast_message - broadcast a DMQ message to
+ all peers available in the DMQ bus, -> send_message - sends a DMQ
+ message to a specific peer in the local DMQ bus.
+
+ Example 2.1. dmq_api_t structure
+...
+typedef struct dmq_api {
+ register_dmq_peer_t register_dmq_peer;
+ bcast_message_t bcast_message;
+ send_message_t send_message;
+} dmq_api_t;
+...
diff --git a/modules_k/dmq/doc/dmq_admin.xml b/modules_k/dmq/doc/dmq_admin.xml
index 9692d4f..b986899 100644
--- a/modules_k/dmq/doc/dmq_admin.xml
+++ b/modules_k/dmq/doc/dmq_admin.xml
@@ -58,7 +58,9 @@
</listitem>
</itemizedlist>
</section>
+ </section>
+ <section>
<title>Exported Parameters</title>
<section>
<title><varname>dmq_server_address</varname>(str)</title>
@@ -99,5 +101,6 @@ modparam("dmq", "dmq_notification_address", "&defaultdb;")
</programlisting>
</example>
</section>
+ </section>
</chapter>