Module: sip-router
Branch: master
Commit: 09205865f98136e0354539f09f4961ca016a915b
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=0920586…
Author: Timo Teräs <timo.teras(a)iki.fi>
Committer: Timo Teräs <timo.teras(a)iki.fi>
Date: Thu Nov 15 16:11:41 2012 +0200
modules_k/db_sqlite: fix crash with computed fields in custom queries
Computed fields do not have decltype available, so guess the proper
field type based on the result type of the first row. This does not
work if the first row has null type as result, but is the best we can
do easily and fixes gives right result in most cases.
Reported-by: Pedro Antonio Vico Solano <pvsolano(a)amper.es>
---
modules_k/db_sqlite/dbase.c | 28 +++++++++++++++++++++++++++-
1 files changed, 27 insertions(+), 1 deletions(-)
diff --git a/modules_k/db_sqlite/dbase.c b/modules_k/db_sqlite/dbase.c
index c1d3b71..c4df4ce 100644
--- a/modules_k/db_sqlite/dbase.c
+++ b/modules_k/db_sqlite/dbase.c
@@ -288,6 +288,24 @@ static int decltype_to_dbtype(const char *decltype)
return DB1_INT;
}
+static int type_to_dbtype(int type)
+{
+ switch (type) {
+ case SQLITE_INTEGER:
+ return DB1_INT;
+ case SQLITE_FLOAT:
+ return DB1_DOUBLE;
+ case SQLITE_TEXT:
+ return DB1_STR;
+ case SQLITE_BLOB:
+ return DB1_BLOB;
+ default:
+ /* Unknown, or NULL column value. Assume this is a
+ * string. */
+ return DB1_STR;
+ }
+}
+
static str* str_dup(const char *_s)
{
str *s;
@@ -348,10 +366,18 @@ int db_sqlite_store_result(const db1_con_t* _h, db1_res_t** _r)
RES_COL_N(res) = rc;
for (i = 0; i < RES_COL_N(res); i++) {
+ const char *decltype;
+ int dbtype;
+
RES_NAMES(res)[i] = str_dup(sqlite3_column_name(conn->stmt, i));
if (RES_NAMES(res)[i] == NULL)
goto no_mem;
- RES_TYPES(res)[i] = decltype_to_dbtype(sqlite3_column_decltype(conn->stmt, i));
+ decltype = sqlite3_column_decltype(conn->stmt, i);
+ if (decltype != NULL)
+ dbtype = decltype_to_dbtype(decltype);
+ else
+ dbtype = type_to_dbtype(sqlite3_column_type(conn->stmt, i));
+ RES_TYPES(res)[i] = dbtype;
}
}
if (num_rows >= num_alloc) {
Dear list,
I've successfully set up a Kamailio proxy build from the development
trunk and configured it with the WebSockets example configuration file
(adapted to my needs). I'm using sipml5 to test and if the two clients
are within the same network everything works fine. As soon as one of the
clients is on a different network I can initiate a call but there's no
audio and video. This is probably a NAT issue so I wondered if anyone
else got this working. If it's something in the Kamailio config, please
let me know. If it's something in sipml5 I'll take it there. Boghe and
IMSDroid aren't working either (they don't update the receive column in
my location table, but that could be a Kamailio config error on my side
too) so it could be related to the Doubango framework too.
Thanks in advance,
Jeremy
Module: sip-router
Branch: master
Commit: a30d64af62684c8bba61bbb842209046daab97d5
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a30d64a…
Author: Olle E. Johansson <oej(a)edvina.net>
Committer: Olle E. Johansson <oej(a)edvina.net>
Date: Tue Nov 13 15:45:18 2012 +0100
Exec module: Documentation update, typo fix
---
modules_k/exec/README | 14 +++++++-------
modules_k/exec/doc/exec_admin.xml | 17 ++++++++---------
2 files changed, 15 insertions(+), 16 deletions(-)
diff --git a/modules_k/exec/README b/modules_k/exec/README
index f821e77..0b7c1da 100644
--- a/modules_k/exec/README
+++ b/modules_k/exec/README
@@ -71,10 +71,10 @@ Chapter 1. Admin Guide
1. Overview
- Exec module allows to start an external command from a Kamailio script.
- The commands may be any valid shell commands--the command string is
- passed to shell using "popen" command. Kamailio passes additionally lot
- of information about request in environment variables:
+ The exec module allows external commands to be executed from a Kamailio
+ script. The commands may be any valid shell commands--the command
+ string is passed to the shell using "popen" command. Kamailio passes
+ additional information about the request in environment variables:
* SIP_HF_<hf_name> contains value of each header field in request. If
a header field occurred multiple times, values are concatenated and
comma-separated. <hf_name> is in capital letters. Ff a header-field
@@ -85,12 +85,12 @@ Chapter 1. Admin Guide
* SIP_DID is dialog identifier, which is the same as to-tag.
Initially, it is empty.
* SIP_SRCIP is source IP address from which request came.
- * SIP_ORURI is original request URI.
+ * SIP_ORURI is the original request URI.
* SIP_RURI is current request URI (if unchanged, equal to original).
* SIP_USER is userpart of current request URI.
* SIP_OUSER is userpart of original request URI.
- NOTE: The envirnment variables must be specified with double $ (e.g.,
+ NOTE: The environment variables must be specified with double $ (e.g.,
$$SIP_OUSER) in the parameters given to exec functions. Otherwise they
will be evaluated as Kamailio pseudo-variables, throwing errors.
@@ -193,7 +193,7 @@ exec_msg("echo TEST > /tmp/$rU.txt");
4.3. exec_avp(command [, avplist])
Executes an external command. Each line from output of the command is
- saved in an AVP from 'avplist'. If 'avplist' is missing, the AVP are
+ saved in an AVP from 'avplist'. If 'avplist' is missing, the AVPs are
named 1, 2, 3, ...
Meaning of the parameters is as follows:
diff --git a/modules_k/exec/doc/exec_admin.xml b/modules_k/exec/doc/exec_admin.xml
index 632bb52..45ae097 100644
--- a/modules_k/exec/doc/exec_admin.xml
+++ b/modules_k/exec/doc/exec_admin.xml
@@ -16,11 +16,10 @@
<section>
<title>Overview</title>
<para>
- Exec module allows to start an external command from a &kamailio; script.
- The commands may be any valid shell commands--the command string is
- passed to shell using <quote>popen</quote> command. &kamailio; passes
- additionally lot of information about request in environment
- variables:
+ The exec module allows external commands to be executed from a &kamailio;
+ script. The commands may be any valid shell commands--the command string is
+ passed to the shell using <quote>popen</quote> command. &kamailio; passes
+ additional information about the request in environment variables:
</para>
<itemizedlist>
<listitem>
@@ -52,7 +51,7 @@
</listitem>
<listitem>
<para>
- SIP_ORURI is original request &uri;.
+ SIP_ORURI is the original request &uri;.
</para>
</listitem>
<listitem>
@@ -73,7 +72,7 @@
</listitem>
</itemizedlist>
<para>
- NOTE: The envirnment variables must be specified with double $
+ NOTE: The environment variables must be specified with double $
(e.g., $$SIP_OUSER) in the parameters given to exec functions.
Otherwise they will be evaluated as &kamailio; pseudo-variables,
throwing errors.
@@ -85,7 +84,7 @@
<section>
<title>&kamailio; Modules</title>
<para>
- The following modules must be loaded before this module:
+ The following modules must be loaded before this module:
<itemizedlist>
<listitem>
<para>
@@ -238,7 +237,7 @@ exec_msg("echo TEST > /tmp/$rU.txt");
<para>
Executes an external command. Each line from output of the command
is saved in an AVP from 'avplist'. If 'avplist' is missing, the
- AVP are named 1, 2, 3, ...
+ AVPs are named 1, 2, 3, ...
</para>
<para>Meaning of the parameters is as follows:</para>
<itemizedlist>
Module: sip-router
Branch: master
Commit: 114d674da5383edf3970093618d2fb98768e2aff
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=114d674…
Author: Olle E. Johansson <oej(a)edvina.net>
Committer: Olle E. Johansson <oej(a)edvina.net>
Date: Tue Nov 13 15:37:18 2012 +0100
registrar Documentation update
---
modules_k/registrar/README | 42 ++++++++++++++-------------
modules_k/registrar/doc/registrar_admin.xml | 30 ++++++++++---------
2 files changed, 38 insertions(+), 34 deletions(-)
diff --git a/modules_k/registrar/README b/modules_k/registrar/README
index bff756d..5ad9b14 100644
--- a/modules_k/registrar/README
+++ b/modules_k/registrar/README
@@ -186,17 +186,18 @@ Chapter 1. Admin Guide
1.1. PATH support
1.2. GRUU Support
- The module contains REGISTER processing logic.
+ The module contains REGISTER processing logic. The actual location
+ database is managed by the USRLOC module.
1.1. PATH support
- Register module includes Path support (according to RFC 3327) for usage
- in registrars and home-proxies.
+ The Register module includes Path support (according to RFC 3327) for
+ usage in registrars and home-proxies.
- A call to save(...) stores, if path-support is enabled in the
- registrar-module, the values of the Path Header(s) along with the
- contact into usrloc. There are three modes regarding the reply to a
- REGISTER including one or more Path HFs:
+ If path support is enabled in the registrar module, a call to save(...)
+ stores the values of the Path Header(s) along with the contact into
+ usrloc. There are three modes regarding the reply to a REGISTER
+ including one or more Path HFs:
* off - stores the value of the Path headers into usrloc without
passing it back to the UAC in the reply.
* lazy - stores the Path header and passes it back to the UAC if
@@ -348,13 +349,13 @@ modparam("registrar", "default_q", 1000)
3.6. realm_prefix (string)
- Prefix to be automatically strip from realm. As an alternative to SRV
- records (not all SIP clients support SRV lookup), a subdomain of the
- master domain can be defined for SIP purposes (like sip.mydomain.net
- pointing to same IP address as the SRV record for mydomain.net). By
- ignoring the realm_prefix "sip.", at registration, sip.mydomain.net
- will be equivalent to mydomain.net.This parameter can be modified via
- ser config framework.
+ Prefix to be automatically stripped from realm. As an alternative to
+ SRV records (not all SIP clients support SRV lookup), a subdomain of
+ the master domain can be defined for SIP purposes (like
+ sip.mydomain.net pointing to same IP address as the SRV record for
+ mydomain.net). By ignoring the realm_prefix "sip.", at registration,
+ sip.mydomain.net will be equivalent to mydomain.net.This parameter can
+ be modified via the Kamailio config framework.
Default value is NULL (none).
@@ -372,7 +373,7 @@ modparam("registrar", "realm_prefix", "sip.")
structure and can be later used by tm for forking. If the parameter is
set to 0, only Request-URI will be overwritten with the highest-q rated
contact and the rest will be left unprocessed. This parameter can be
- modified via ser config framework.
+ modified via Kamailio config framework.
Default value is 1.
@@ -391,7 +392,7 @@ modparam("registrar", "append_branches", 0)
If set to 1 then AOR comparison and also storing will be case
sensitive, if set to 0 then AOR comparison and storing will be case
insensitive--This is recommended. This parameter can be modified via
- ser config framework.
+ Kamailio config framework.
Default value is 0.
@@ -436,7 +437,8 @@ modparam("registrar", "received_param", "rcv")
The parameter can be used to limit the number of contacts per AOR
(Address of Record) in the user location database. Value 0 disables the
- check. This parameter can be modified via ser config framework.
+ check. This parameter can be modified via the Kamailio config
+ framework.
Default value is 0.
@@ -452,7 +454,7 @@ modparam("registrar", "max_contacts", 10)
It can, for example, happen when the max_contacts parameter is set and
the processing of REGISTER request would exceed the limit. In this case
the registrar would generate "503 Service Unavailable" response. This
- parameter can be modified via ser config framework.
+ parameter can be modified via the Kamailio config framework.
If you want to add the Retry-After header field in 5xx replies, set
this parameter to a value grater than zero (0 means do not add the
@@ -471,7 +473,7 @@ modparam("registrar", "retry_after", 30)
for a header which contains a socket description (IP:port). This socket
info will be stored by register instead of the received socket info.
- This make sens only in multiple replicated servers scenarios.
+ This makes sense only in multiple replicated servers scenarios.
Default value is -1 (no flag).
@@ -486,7 +488,7 @@ modparam("registrar", "sock_flag", 18)
the received socket info. The header will be read only if the flag
sock_flag is set.
- This make sens only in multiple replicated servers scenarios.
+ This makes sense only in multiple replicated servers scenarios.
Default value is NULL.
diff --git a/modules_k/registrar/doc/registrar_admin.xml b/modules_k/registrar/doc/registrar_admin.xml
index 91b2832..022dabc 100644
--- a/modules_k/registrar/doc/registrar_admin.xml
+++ b/modules_k/registrar/doc/registrar_admin.xml
@@ -15,18 +15,19 @@
<section>
<title>Overview</title>
- <para>The module contains REGISTER processing logic.</para>
+ <para>The module contains REGISTER processing logic. The actual location
+ database is managed by the USRLOC module.
+ </para>
<section>
<title>PATH support</title>
<para>
- Register module includes Path support (according to RFC 3327)
+ The Register module includes Path support (according to RFC 3327)
for usage in registrars and home-proxies.
</para>
<para>
- A call to save(...) stores, if path-support is enabled
- in the registrar-module, the values of the Path
- Header(s) along with the contact into usrloc. There are
- three modes regarding the reply to a REGISTER including
+ If path support is enabled in the registrar module, a call to save(...)
+ stores the values of the Path Header(s) along with the contact into usrloc.
+ There are three modes regarding the reply to a REGISTER including
one or more Path HFs:
</para>
<itemizedlist>
@@ -247,13 +248,13 @@ modparam("registrar", "default_q", 1000)
<section>
<title><varname>realm_prefix</varname> (string)</title>
<para>
- Prefix to be automatically strip from realm. As an alternative to
+ Prefix to be automatically stripped from realm. As an alternative to
SRV records (not all SIP clients support SRV lookup), a subdomain of
the master domain can be defined for SIP purposes (like
sip.mydomain.net pointing to same IP address as the SRV record for
mydomain.net). By ignoring the realm_prefix "sip.", at registration,
sip.mydomain.net will be equivalent to mydomain.net.This parameter
- can be modified via ser config framework.
+ can be modified via the &kamailio; config framework.
</para>
<para>
<emphasis>
@@ -281,7 +282,7 @@ modparam("registrar", "realm_prefix", "sip.")
appended to sip_msg structure and can be later used by tm for forking.
If the parameter is set to 0, only Request-URI will be overwritten
with the highest-q rated contact and the rest will be left unprocessed.
- This parameter can be modified via ser config framework.
+ This parameter can be modified via &kamailio; config framework.
</para>
<para>
<emphasis>
@@ -312,7 +313,7 @@ modparam("registrar", "append_branches", 0)
If set to 1 then <acronym>AOR</acronym> comparison and also
storing will be case sensitive, if set to 0 then <acronym>AOR</acronym>
comparison and storing will be case insensitive--This is recommended.
- This parameter can be modified via ser config framework.
+ This parameter can be modified via &kamailio; config framework.
</para>
<para>
<emphasis>
@@ -385,7 +386,8 @@ modparam("registrar", "received_param", "rcv")
<para>
The parameter can be used to limit the number of contacts per
AOR (Address of Record) in the user location database. Value 0
- disables the check. This parameter can be modified via ser config framework.
+ disables the check. This parameter can be modified via the &kamailio;
+ config framework.
</para>
<para>
<emphasis>
@@ -411,7 +413,7 @@ modparam("registrar", "max_contacts", 10)
<varname>max_contacts</varname> parameter is set and the
processing of REGISTER request would exceed the limit. In this case
the registrar would generate "503 Service Unavailable" response.
- This parameter can be modified via ser config framework.
+ This parameter can be modified via the &kamailio; config framework.
</para>
<para>
If you want to add the Retry-After header field in 5xx replies, set
@@ -442,7 +444,7 @@ modparam("registrar", "retry_after", 30)
socket info.
</para>
<para>
- This make sens only in multiple replicated servers scenarios.
+ This makes sense only in multiple replicated servers scenarios.
</para>
<para>
<emphasis>
@@ -467,7 +469,7 @@ modparam("registrar", "sock_flag", 18)
flag sock_flag is set.
</para>
<para>
- This make sens only in multiple replicated servers scenarios.
+ This makes sense only in multiple replicated servers scenarios.
</para>
<para>
<emphasis>
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#253 - If no NAPTR then SRV must be queried for more than UDP
User who did this - Mészáros Mihály (misi)
----------
Please review my commit in git misi/dns_srv
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=253#comment748
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.
I've been doing some testing of MSRP clients, using Kamailio as the MSRP
relay. While testing file transfers, I found that certain files were
getting stuck at a consistent offset, though the offset varied depending
on the file. With TCP traces, I found that Kamailio continues to send
200 responses to the file sender, but stops forwarding the chunks to the
receiver. This seems to continue until the TCP read buffer overflows,
at which point further chunks are forwarded as normal (the previous
chunks are lost).
I suspected it may be due to file content, so after narrowing down the
chunk sizes, I've identified the two-character problem sequence: 0a 2d
(a.k.a. line-feed dash). I can reproduce the issue with a simple,
single-chunk message where the body only contains these two characters.
Is Kamailio getting this confused with the start of the MSRP end-line?
An example message is below, with all the CRs and LFs made explicit:
MSRP wm4qf7sj SEND\r\n
To-Path: msrp://192.168.0.74:2855/s.7692.44.867977799;tcp
msrp://192.168.0.74:2855/s.7693.28.862091983;tcp
msrp://192.168.0.144:2855/7k5myvdmx7;tcp\r\n
From-Path: msrp://192.168.0.124:2855/8ka1fpl1bw;tcp\r\n
Message-ID: 3561360866.5sxkocu6\r\n
Success-Report: yes\r\n
Failure-Report: yes\r\n
Content-Disposition: inline\r\n
Byte-Range: 1-2/2\r\n
Content-Type: text/plain\r\n
\r\n
\n-\r\n
-------wm4qf7sj$\r\n
Regards,
Gavin
Hi,
Any hints how to make the send() function accepting a PV? I'm a bit lost
where to start since it's a core function. Or is there an alternative to
send() to forward a request without any modification (especially without
adding a Via) based on a PV?
Thanks for any guides,
Andreas