Module: sip-router
Branch: master
Commit: 6339389bae85814264a923ebbf938d70fa22c4db
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6339389…
Author: Olle E. Johansson <oej(a)edvina.net>
Committer: Olle E. Johansson <oej(a)edvina.net>
Date: Sun Oct 14 17:24:21 2012 +0200
async: Speling erors fixed
---
modules/async/README | 51 ++++++++++++++++--------------------
modules/async/doc/async_admin.xml | 44 ++++++++++++++-----------------
2 files changed, 43 insertions(+), 52 deletions(-)
diff --git a/modules/async/README b/modules/async/README
index 21b2cc2..91ea07f 100644
--- a/modules/async/README
+++ b/modules/async/README
@@ -59,16 +59,16 @@ Chapter 1. Admin Guide
1. Overview
- This module provides asynchornous operations for handling SIP requests
- in configuration file.
+ This module provides asynchronous operations for handling SIP requests
+ in the configuration file.
- It uses t_suspend() and t_continue() from TM module.
+ Async uses t_suspend() and t_continue() from the TM and TMX modules.
- 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., $avp(...),
- $xavp(...), $shv(...), htable $sht(...)).
+ Note that after invoking the an asynchronous operation, the processing
+ will continue later in another application process. Therefore variables
+ stored in private memory should not be used, try to use shared memory
+ if you want to get values after the processing is resumed (e.g.,
+ $avp(...), $xavp(...), $shv(...), htable $sht(...)).
2. Dependencies
@@ -79,6 +79,7 @@ Chapter 1. Admin Guide
The following modules must be loaded before this module:
* tm - transaction management.
+ tmx - transaction management extensions.
2.2. External Libraries or Applications
@@ -92,7 +93,7 @@ Chapter 1. Admin Guide
3.1. workers (int)
- Number of worker processes to be started to handle the asynchornous
+ Number of worker processes to be started to handle the asynchronous
tasks.
Default value is 1.
@@ -109,22 +110,22 @@ modparam("async", "workers", 2)
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
+ Simulate a sleep of 'seconds' and then continue the processing of the
+ 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 script 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.
+ The sleep parameter represent the number of seconds to suspend the
+ processing of a SIP request. Maximum value is 100. The parameter can be
+ a static integer or a variable 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.
+ Since the SIP request handling is resumed in another process, the
+ config file execution state is practically lost. Therefore beware that
+ the execution of config after resume will end once the route[routename]
+ is finished.
This function can be used from REQUEST_ROUTE.
@@ -142,17 +143,11 @@ route[RESUME] {
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).
+ returns false.
- The sleep parameter represent the number of seconds to suppend the
+ The sleep parameter represent the number of seconds to suspend 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.
+ static integer or a variable holding an integer.
This function can be used from REQUEST_ROUTE.
diff --git a/modules/async/doc/async_admin.xml b/modules/async/doc/async_admin.xml
index e4ddde4..b8744b9 100644
--- a/modules/async/doc/async_admin.xml
+++ b/modules/async/doc/async_admin.xml
@@ -16,17 +16,17 @@
<section>
<title>Overview</title>
<para>
- This module provides asynchornous operations for handling SIP requests
- in configuration file.
+ This module provides asynchronous operations for handling SIP requests
+ in the configuration file.
</para>
<para>
- It uses t_suspend() and t_continue() from TM module.
+ Async uses t_suspend() and t_continue() from the TM and TMX modules.
</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., $avp(...),
+ Note that after invoking the an asynchronous operation, the processing
+ will continue later in another application process. Therefore variables
+ stored in private memory should not be used, try to use shared memory if you
+ want to get values after the processing is resumed (e.g., $avp(...),
$xavp(...), $shv(...), htable $sht(...)).
</para>
</section>
@@ -42,6 +42,9 @@
<para>
<emphasis>tm</emphasis> - transaction management.
</para>
+ <para>
+ <emphasis>tmx</emphasis> - transaction management extensions.
+ </para>
</listitem>
</itemizedlist>
</para>
@@ -66,7 +69,7 @@
<section>
<title><varname>workers</varname> (int)</title>
<para>
- Number of worker processes to be started to handle the asynchornous
+ Number of worker processes to be started to handle the asynchronous
tasks.
</para>
<para>
@@ -92,23 +95,23 @@ modparam("async", "workers", 2)
<function moreinfo="none">async_route(routename, seconds)</function>
</title>
<para>
- Simulate a sleep of 'seconds' and then continue the processing of SIP
+ Simulate a sleep of 'seconds' and then continue the processing of the 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 script 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.
+ The sleep parameter represent the number of seconds to suspend the
+ processing of a SIP request. Maximum value is 100. The parameter can be
+ a static integer or a variable 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
+ the config file execution state is practically lost. Therefore beware
that the execution of config after resume will end once the
route[routename] is finished.
</para>
@@ -137,19 +140,12 @@ route[RESUME] {
<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).
+ returns false.
</para>
<para>
- The sleep parameter represent the number of seconds to suppend the
+ The sleep parameter represent the number of seconds to suspend 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.
+ a static integer or a variable holding an integer.
</para>
<para>
This function can be used from REQUEST_ROUTE.
Module: sip-router
Branch: master
Commit: f8e02b3bbe83315d8228005d4388434b62473c61
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=f8e02b3…
Author: Olle E. Johansson <oej(a)edvina.net>
Committer: Olle E. Johansson <oej(a)edvina.net>
Date: Sun Oct 14 17:13:01 2012 +0200
msilo: Updating docs
Fixing a typo and while at it updating some texts.
---
modules_k/msilo/README | 12 ++++++------
modules_k/msilo/doc/msilo_admin.xml | 12 ++++++------
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/modules_k/msilo/README b/modules_k/msilo/README
index ef5b7d8..cec269e 100644
--- a/modules_k/msilo/README
+++ b/modules_k/msilo/README
@@ -199,11 +199,11 @@ Chapter 1. Admin Guide
in database for offline messages intended for that user. All of them
will be sent to contact address provided in REGISTER request.
- It may happen the SIP user to be registered but his SIP User Agent to
- have no support for MESSAGE request. In this case it should be used the
- "failure_route" to store the undelivered requests.
+ It may happen that the SIP user to be registered use a SIP User Agent
+ that has no support for MESSAGE requests. In this case the
+ "failure_route" should be used to re-store the undelivered requests.
- Another functionality provided by the modules is to send messages at a
+ Another functionality provided by the module is to send messages at a
certain time -- the reminder functionality. Using config logic, a
received message can be stored and delivered at a time specified while
storing with the 'snd_time_avp'.
@@ -219,7 +219,7 @@ Chapter 1. Admin Guide
* database module - mysql, dbtext or other module that implements the
"db" interface and provides support for storing/receiving data
to/from a database system.
- * TM--transaction module--is used to send SIP requests.
+ * TM--transaction module-- used to send SIP requests.
2.2. External libraries or applications
@@ -317,7 +317,7 @@ modparam("msilo", "contact_hdr", "Contact: <sip:null@example.com>\r\n")
Example 1.5. Set the "extra_hdrs" parameter
...
-modparam("msilo", "contact_hdr", "X-Extra: $tu\r\nY-Extra: foo\r\n")
+modparam("msilo", "extra_hdrs", "X-Extra: $tu\r\nY-Extra: foo\r\n")
...
3.6. offline_message (string)
diff --git a/modules_k/msilo/doc/msilo_admin.xml b/modules_k/msilo/doc/msilo_admin.xml
index abb25ae..22de746 100644
--- a/modules_k/msilo/doc/msilo_admin.xml
+++ b/modules_k/msilo/doc/msilo_admin.xml
@@ -41,12 +41,12 @@
be sent to contact address provided in REGISTER request.
</para>
<para>
- It may happen the &sip; user to be registered but his &sip; User Agent
- to have no support for MESSAGE request. In this case it should be used
- the <quote>failure_route</quote> to store the undelivered requests.
+ It may happen that the &sip; user to be registered use a &sip; User Agent
+ that has no support for MESSAGE requests. In this case the <quote>failure_route</quote>
+ should be used to re-store the undelivered requests.
</para>
<para>
- Another functionality provided by the modules is to send messages at
+ Another functionality provided by the module is to send messages at
a certain time -- the reminder functionality. Using config logic, a
received message can be stored and delivered at a time specified while
storing with the 'snd_time_avp'.
@@ -69,7 +69,7 @@
</listitem>
<listitem>
<para>
- <emphasis>TM</emphasis>--transaction module--is used to
+ <emphasis>TM</emphasis>--transaction module-- used to
send &sip; requests.
</para>
</listitem>
@@ -192,7 +192,7 @@ modparam("msilo", "contact_hdr", "Contact: <sip:null@example.com>\r\n")
<title>Set the <quote>extra_hdrs</quote> parameter</title>
<programlisting format="linespecific">
...
-modparam("msilo", "contact_hdr", "X-Extra: $tu\r\nY-Extra: foo\r\n")
+modparam("msilo", "extra_hdrs", "X-Extra: $tu\r\nY-Extra: foo\r\n")
...
</programlisting>
</example>
Looking into supported AUIDs - XCAP application usages - in Kamailio I find different answers in different parts.
---------
xcap_client has this function:
int get_auid_flag(str auid)
{
static str pres_rules = str_init("pres-rules");
static str rls_services = str_init("rls-services");
if (STR_MATCH(auid, pres_rules))
return PRES_RULES;
else if (STR_MATCH(auid, rls_services))
return RESOURCE_LIST;
return -1;
}
In the XCAP server we have a function xcaps_path_get_auid_type that has the following:
* pres-rules
* org.openmobilealliance.pres-rules
* rls-services
*pidf-manipulation
* resource-lists
* xcap-caps
* org.openmobilealliance.user-profile
* org.openmobilealliance.pres-content
* org.openmobilealliance.search
= 9 AUIDs
These are funny enough defined in xcap_client/xcap_callbacks.h:
#define PRES_RULES 1<<1
#define RESOURCE_LIST 1<<2
#define RLS_SERVICE 1<<3
#define PIDF_MANIPULATION 1<<4
#define XCAP_CAPS 1<<5
#define USER_PROFILE 1<<6
#define PRES_CONTENT 1<<7
#define SEARCH 1<<8
= 8 AUIDs
The supported AUIDs are not really listed anywhere. In the README there's an example xcap-caps that list
<auids>
<auid>rls-services</auid>
<auid>pidf-manipulation</auid>
<auid>xcap-caps</auid>
<auid>resource-lists</auid>
<auid>pres-rules</auid>
<auid>org.openmobilealliance.pres-rules</auid>
</auids>
Only six AUIDs.
* Can the developers involved explain the level of support we have for the nine AUIDs listed in xcap-server, so I can document this?
* Should we add a few more to the xcap-client?
We also have an xcap library in the source that the kamailio modules doesn't use, but the ser xcap client module use. Any reason why this
library was not used? Just curious.
Thanks!
/O
A message stolen from OpenSIPS-devel that I think may be good input here as well.
/O
Vidarebefordrat brev:
> Från: Saúl Ibarra Corretgé <saul(a)ag-projects.com>
> Ämne: [OpenSIPS-Devel] Avoiding creating outgoing TCP connections for NOTIFY requests
> Datum: 8 oktober 2012 18:06:13 CEST
> Till: OpenSIPS devel mailling list <devel(a)lists.opensips.org>
> Svara till: OpenSIPS devel mailling list <devel(a)lists.opensips.org>
>
> Hi all,
>
> In order to avoid creating an outgoing TCP connection which would block needlessly we have the ability to use tcp_no_new_conn_bflag. When looking up the location for a user all flags will be loaded, so if we specified the said flag when the user was registered a new connection will not be attempted if there is no connection.
>
> However AFAIK this doesn't apply to NOTIFY requests generated by OpenSIPS when using presence. Scenario is simple: user subscribes using TCP, her connection breaks, someone sends a PUBLISH. OpenSIPS will try to open a connection to deliver the NOTIFY. This is what I'd like to avoid.
>
> First thing that comes to my mind is reusing the idea with tcp_no_new_conn_bflag, so if a user sets if before calling handle_subscribe, in-dialog NOTIFY requests would not attempt to create the connection.
>
> Thoughts, proposals, patches are welcome :-)
>
>
> Regards,
>
> --
> Saúl Ibarra Corretgé
> AG Projects
>
>
>
>
> _______________________________________________
> Devel mailing list
> Devel(a)lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Hello,
i found that $T_barnch_idx returns inconsistent numbers for the same branch.
If printed in REQUEST_ROUTE, the value is alwasy 1 more that in REPLY_ROUTE.
The branch index is set using tm_ctx_set_branch_index(branch) in a lot of
places, but only in t_fwd.c it is set with tm_ctx_set_branch_index(branch+1).
If i change that to the same as elsewhere, the numbering is consistent. I'd
like to get an ACK from a tm guru before i commit this fix, because i have
no idea what side-effects this might have.
--- a/modules/tm/t_fwd.c
+++ b/modules/tm/t_fwd.c
@@ -317,7 +317,7 @@ static int prepare_new_uac( struct cell *t, struct sip_msg *i_req,
/* run branch_route actions if provided */
backup_route_type = get_route_type();
set_route_type(BRANCH_ROUTE);
- tm_ctx_set_branch_index(branch+1);
+ tm_ctx_set_branch_index(branch);
/* no need to backup/set avp lists: the on_branch route is run
only in the main route context (e.g. t_relay() in the main
route) or in the failure route context (e.g. append_branch &
--
Greetings,
Alex Hermann
it would be nice to get rid of these:
CC (cc) [U sip-proxy_ctl] sercmd.o
sercmd.c: In function ‘main’:
sercmd.c:2164:6: warning: variable ‘interactive’ set but not used [-Wunused-but-set-variable]
sercmd.c:2161:6: warning: variable ‘rec’ set but not used [-Wunused-but-set-variable]
sercmd.c:2157:6: warning: variable ‘port_no’ set but not used [-Wunused-but-set-variable]
-- juha