THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#133 - kamailio 3.1.3 Presence + XCAP problem, is it a bug?
User who did this - laura testi (lau.testi)
----------
Hi,
In order to solve the problem, we have applied a little change on the presence module behavior.
Here some details, that I would share with you:
The function we have modified is the one below:
int pres_update_status(subs_t subs, str reason, db_key_t* query_cols,db_val_t* query_vals, int n_query_cols, subs_t** subs_array)
and the “diff” output beetwen the orig and the new presence.c file is:
# diff presence.c.orig presence.c.patch
714a715,721
> if(subs.status!=status && status==1)
> {
> subs.status= TERMINATED_STATUS;
> subs.reason.s= "deleted";
> subs.reason.len= 7;
> }
Our modification acts on the watchers_table state update:
during a watcher state update, if:
• the Xcap PRE-Rules doc doesn’t contain the record of an contact
and
• the previous state of a watcher in the watcher table is equal to “1” (active)
then the new state is set to “3” (reason=deleted).
Using this fix, the add/delete contact strange behavior described in our previous email seems to be solved....
Kind Regards,
laura
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=133#comment230
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#133 - kamailio 3.1.3 Presence + XCAP problem, is it a bug?
User who did this - laura testi (lau.testi)
----------
Hi,
In order to solve the problem, we have applied a little change on the presence module behavior.
Here some details, that I would share with you:
The function we have modified is the one below:
int pres_update_status(subs_t subs, str reason, db_key_t* query_cols,db_val_t* query_vals, int n_query_cols, subs_t** subs_array)
and the “diff” output beetwen the orig and the new presence.c file is:
# diff presence.c.orig presence.c.patch
714a715,721
> if(subs.status!=status && status==1)
> {
> subs.status= TERMINATED_STATUS;
> subs.reason.s= "deleted";
> subs.reason.len= 7;
> }
Our modification acts on the watchers_table state update:
during a watcher state update, if:
• the Xcap PRE-Rules doc doesn’t contain the record of an contact
and
• the previous state of a watcher in the watcher table is equal to “1” (active)
then the new state is set to “3” (reason=deleted).
Using this fix, the add/delete contact strange behavior described in our previous email seems to be solved....
Kind Regards,
laura
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=133#comment229
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
Module: sip-router
Branch: master
Commit: 31b97e44437d66aef098f553417c647025f323cc
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=31b97e4…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sun Jun 26 11:42:01 2011 +0200
async: documented async_route() function
---
modules/async/README | 43 ++++++++++++++++++++++++++++++++----
modules/async/doc/async_admin.xml | 42 +++++++++++++++++++++++++++++++++++-
2 files changed, 79 insertions(+), 6 deletions(-)
diff --git a/modules/async/README b/modules/async/README
index c10a562..e01da48 100644
--- a/modules/async/README
+++ b/modules/async/README
@@ -29,12 +29,14 @@ Daniel-Constantin Mierla
4. Exported Functions
- 4.1. async_sleep(seconds)
+ 4.1. async_route(routename, seconds)
+ 4.2. async_sleep(seconds)
List of Examples
1.1. Set workers parameter
1.2. async_sleep usage
+ 1.3. async_sleep usage
Chapter 1. Admin Guide
@@ -52,7 +54,8 @@ Chapter 1. Admin Guide
4. Exported Functions
- 4.1. async_sleep(seconds)
+ 4.1. async_route(routename, seconds)
+ 4.2. async_sleep(seconds)
1. Overview
@@ -101,9 +104,39 @@ modparam("async", "workers", 2)
4. Exported Functions
- 4.1. async_sleep(seconds)
+ 4.1. async_route(routename, seconds)
+ 4.2. async_sleep(seconds)
-4.1. async_sleep(seconds)
+4.1. async_route(routename, seconds)
+
+ Simulate a sleep of 'seconds' and then continue the processing of SIP
+ request with the route[routename]. In case of internal errors, the
+ function returns false, otherwise the function exits the execution of
+ config at that moment (return 0 behaviour).
+
+ The routename parameter can be a static string or a dynamic string
+ value with config variables.
+
+ The sleep parameter represent the number of seconds to suppend the
+ processing of SIP request. Maximum value is 100. The parameter can be a
+ static integer or a varaible holding an integer.
+
+ Since the SIP request handling is resumed in another process,
+ practically the config file execution state is lost. Therefore beware
+ that the execution of config after resume will end once the
+ route[routename] is finished.
+
+ Example 1.2. async_sleep usage
+...
+async_route("RESUME", "4");
+...
+route[RESUME] {
+ send_reply("404", "Not found");
+ exit;
+}
+...
+
+4.2. async_sleep(seconds)
Simulate a sleep of 'seconds' and then continue the processing of SIP
request with the next action. In case of internal errors, the function
@@ -119,7 +152,7 @@ modparam("async", "workers", 2)
that the execution of config after resume will end once the route block
where async_sleep() is called is finished.
- Example 1.2. async_sleep usage
+ Example 1.3. async_sleep usage
...
async_sleep("4");
send_reply("404", "Not found");
diff --git a/modules/async/doc/async_admin.xml b/modules/async/doc/async_admin.xml
index 2506f06..3fbaeab 100644
--- a/modules/async/doc/async_admin.xml
+++ b/modules/async/doc/async_admin.xml
@@ -87,7 +87,47 @@ modparam("async", "workers", 2)
<section>
<title>Exported Functions</title>
- <section>
+ <section>
+ <title>
+ <function moreinfo="none">async_route(routename, seconds)</function>
+ </title>
+ <para>
+ Simulate a sleep of 'seconds' and then continue the processing of SIP
+ request with the route[routename]. In case of internal errors, the
+ function returns false, otherwise the function exits the execution of
+ config at that moment (return 0 behaviour).
+ </para>
+ <para>
+ The routename parameter can be a static string or a dynamic string
+ value with config variables.
+ </para>
+ <para>
+ The sleep parameter represent the number of seconds to suppend the
+ processing of SIP request. Maximum value is 100. The parameter can be
+ a static integer or a varaible holding an integer.
+ </para>
+ <para>
+ Since the SIP request handling is resumed in another process,
+ practically the config file execution state is lost. Therefore beware
+ that the execution of config after resume will end once the
+ route[routename] is finished.
+ </para>
+ <example>
+ <title><function>async_sleep</function> usage</title>
+ <programlisting format="linespecific">
+...
+async_route("RESUME", "4");
+...
+route[RESUME] {
+ send_reply("404", "Not found");
+ exit;
+}
+...
+</programlisting>
+ </example>
+ </section>
+
+ <section>
<title>
<function moreinfo="none">async_sleep(seconds)</function>
</title>
Module: sip-router
Branch: master
Commit: bf05608198b343960d85bcfd6d210dba5fada5f5
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=bf05608…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sun Jun 26 11:05:23 2011 +0200
async: added module documentation
---
modules/async/README | 127 +++++++++++++++++++++++++++++++++++++
modules/async/doc/Makefile | 4 +
modules/async/doc/async.xml | 37 +++++++++++
modules/async/doc/async_admin.xml | 124 ++++++++++++++++++++++++++++++++++++
4 files changed, 292 insertions(+), 0 deletions(-)
diff --git a/modules/async/README b/modules/async/README
new file mode 100644
index 0000000..c10a562
--- /dev/null
+++ b/modules/async/README
@@ -0,0 +1,127 @@
+ASYNC Module
+
+Daniel-Constantin Mierla
+
+ <miconda(a)gmail.com>
+
+Edited by
+
+Daniel-Constantin Mierla
+
+ <miconda(a)gmail.com>
+
+ Copyright � 2011 asipto.com
+ __________________________________________________________________
+
+ 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. workers (int)
+
+ 4. Exported Functions
+
+ 4.1. async_sleep(seconds)
+
+ List of Examples
+
+ 1.1. Set workers parameter
+ 1.2. async_sleep usage
+
+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. workers (int)
+
+ 4. Exported Functions
+
+ 4.1. async_sleep(seconds)
+
+1. Overview
+
+ This module provides asynchornous operations for handling SIP requests
+ in configuration file.
+
+ It uses t_suspend() and t_continue() from TM module.
+
+ Note that after invoking the an asyncronous operation, the processing
+ will continue later, in another application process. Therefore, do not
+ rely on variables stored in private memory, used shared memory if you
+ want to get values after the processing is resumend (e.g., $shv(...) of
+ htable $sht(...)).
+
+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:
+ * tm - transaction management.
+
+2.2. External Libraries or Applications
+
+ The following libraries or applications must be installed before
+ running Kamailio with this module loaded:
+ * None
+
+3. Exported Parameters
+
+ 3.1. workers (int)
+
+3.1. workers (int)
+
+ Number of worker processes to be started to handle the asynchornous
+ tasks.
+
+ Default value is 1.
+
+ Example 1.1. Set workers parameter
+...
+modparam("async", "workers", 2)
+...
+
+4. Exported Functions
+
+ 4.1. async_sleep(seconds)
+
+4.1. async_sleep(seconds)
+
+ Simulate a sleep of 'seconds' and then continue the processing of SIP
+ request with the next action. In case of internal errors, the function
+ returns false, otherwise the function exits the execution of config at
+ that moment (return 0 behaviour).
+
+ The sleep parameter represent the number of seconds to suppend the
+ processing of SIP request. Maximum value is 100. The parameter can be a
+ static integer or a varaible holding an integer.
+
+ Since the SIP request handling is resumed in another process,
+ practically the config file execution state is lost. Therefore beware
+ that the execution of config after resume will end once the route block
+ where async_sleep() is called is finished.
+
+ Example 1.2. async_sleep usage
+...
+async_sleep("4");
+send_reply("404", "Not found");
+exit;
+...
diff --git a/modules/async/doc/Makefile b/modules/async/doc/Makefile
new file mode 100644
index 0000000..97b75e9
--- /dev/null
+++ b/modules/async/doc/Makefile
@@ -0,0 +1,4 @@
+docs = async.xml
+
+docbook_dir = ../../../docbook
+include $(docbook_dir)/Makefile.module
diff --git a/modules/async/doc/async.xml b/modules/async/doc/async.xml
new file mode 100644
index 0000000..a722fb0
--- /dev/null
+++ b/modules/async/doc/async.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding='ISO-8859-1'?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+
+<!-- Include general documentation entities -->
+<!ENTITY % docentities SYSTEM "../../../docbook/entities.xml">
+%docentities;
+
+]>
+
+<book xmlns:xi="http://www.w3.org/2001/XInclude">
+ <bookinfo>
+ <title>ASYNC Module</title>
+ <productname class="trade">sip-router.org</productname>
+ <authorgroup>
+ <author>
+ <firstname>Daniel-Constantin</firstname>
+ <surname>Mierla</surname>
+ <email>miconda(a)gmail.com</email>
+ </author>
+ <editor>
+ <firstname>Daniel-Constantin</firstname>
+ <surname>Mierla</surname>
+ <email>miconda(a)gmail.com</email>
+ </editor>
+ </authorgroup>
+ <copyright>
+ <year>2011</year>
+ <holder>asipto.com</holder>
+ </copyright>
+ </bookinfo>
+ <toc></toc>
+
+ <xi:include href="async_admin.xml"/>
+
+
+</book>
diff --git a/modules/async/doc/async_admin.xml b/modules/async/doc/async_admin.xml
new file mode 100644
index 0000000..2506f06
--- /dev/null
+++ b/modules/async/doc/async_admin.xml
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding='ISO-8859-1'?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+
+<!-- Include general documentation entities -->
+<!ENTITY % docentities SYSTEM "../../../docbook/entities.xml">
+%docentities;
+
+]>
+<!-- Module User's Guide -->
+
+<chapter>
+
+ <title>&adminguide;</title>
+
+ <section>
+ <title>Overview</title>
+ <para>
+ This module provides asynchornous operations for handling SIP requests
+ in configuration file.
+ </para>
+ <para>
+ It uses t_suspend() and t_continue() from TM module.
+ </para>
+ <para>
+ Note that after invoking the an asyncronous operation, the processing
+ will continue later, in another application process. Therefore, do not
+ rely on variables stored in private memory, used shared memory if you
+ want to get values after the processing is resumend (e.g., $shv(...)
+ of htable $sht(...)).
+ </para>
+ </section>
+
+ <section>
+ <title>Dependencies</title>
+ <section>
+ <title>&kamailio; Modules</title>
+ <para>
+ The following modules must be loaded before this module:
+ <itemizedlist>
+ <listitem>
+ <para>
+ <emphasis>tm</emphasis> - transaction management.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </section>
+ <section>
+ <title>External Libraries or Applications</title>
+ <para>
+ The following libraries or applications must be installed before running
+ &kamailio; with this module loaded:
+ <itemizedlist>
+ <listitem>
+ <para>
+ <emphasis>None</emphasis>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </section>
+ </section>
+ <section>
+ <title>Exported Parameters</title>
+ <section>
+ <title><varname>workers</varname> (int)</title>
+ <para>
+ Number of worker processes to be started to handle the asynchornous
+ tasks.
+ </para>
+ <para>
+ <emphasis>
+ Default value is 1.
+ </emphasis>
+ </para>
+ <example>
+ <title>Set <varname>workers</varname> parameter</title>
+ <programlisting format="linespecific">
+...
+modparam("async", "workers", 2)
+...
+</programlisting>
+ </example>
+ </section>
+ </section>
+
+ <section>
+ <title>Exported Functions</title>
+ <section>
+ <title>
+ <function moreinfo="none">async_sleep(seconds)</function>
+ </title>
+ <para>
+ Simulate a sleep of 'seconds' and then continue the processing of SIP
+ request with the next action. In case of internal errors, the function
+ returns false, otherwise the function exits the execution of config
+ at that moment (return 0 behaviour).
+ </para>
+ <para>
+ The sleep parameter represent the number of seconds to suppend the
+ processing of SIP request. Maximum value is 100. The parameter can be
+ a static integer or a varaible holding an integer.
+ </para>
+ <para>
+ Since the SIP request handling is resumed in another process,
+ practically the config file execution state is lost. Therefore beware
+ that the execution of config after resume will end once the route block
+ where async_sleep() is called is finished.
+ </para>
+ <example>
+ <title><function>async_sleep</function> usage</title>
+ <programlisting format="linespecific">
+...
+async_sleep("4");
+send_reply("404", "Not found");
+exit;
+...
+</programlisting>
+ </example>
+ </section>
+ </section>
+</chapter>
+
Module: sip-router
Branch: master
Commit: 581ab12a38919932309e179464b46eaca9d5768c
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=581ab12…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sat Jun 25 21:10:08 2011 +0200
xlog(k): use the function from core to get action struct
- an internal function was moved to core and the code updated to use it
---
modules_k/xlog/xlog.c | 18 +-----------------
1 files changed, 1 insertions(+), 17 deletions(-)
diff --git a/modules_k/xlog/xlog.c b/modules_k/xlog/xlog.c
index d626b0a..fc406ec 100644
--- a/modules_k/xlog/xlog.c
+++ b/modules_k/xlog/xlog.c
@@ -279,22 +279,6 @@ static void destroy(void)
pkg_free(_xlog_buf);
}
-/**
- * get the pointer to action structure
- * - take cfg line
- * - cfg file name available, but could be long
- */
-static struct action *xlog_fixup_get_action(void **param, int param_no)
-{
- struct action *ac, ac2;
- action_u_t *au, au2;
- /* param points to au->u.string, get pointer to au */
- au = (void*) ((char *)param - ((char *)&au2.u.string-(char *)&au2));
- au = au - 1 - param_no;
- ac = (void*) ((char *)au - ((char *)&ac2.val-(char *)&ac2));
- return ac;
-}
-
static int xdbg_fixup_helper(void** param, int param_no, int mode)
{
xl_msg_t *xm;
@@ -308,7 +292,7 @@ static int xdbg_fixup_helper(void** param, int param_no, int mode)
}
memset(xm, 0, sizeof(xl_msg_t));
if(mode==1)
- xm->a = xlog_fixup_get_action(param, param_no);
+ xm->a = get_action_from_param(param, param_no);
s.s = (char*)(*param); s.len = strlen(s.s);
if(pv_parse_format(&s, &xm->m)<0)