THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A new Flyspray task has been opened. Details are below.
User who did this - Sebastian Damm (sdamm)
Attached to Project - sip-router
Summary - Change default max_limit in maxfwd module to RfC3261 recommended value
Task Type - Bug Report
Category - Module
Status - Unconfirmed
Assigned To -
Operating System - All
Severity - Low
Priority - Normal
Reported Version - 4.1
Due in Version - Undecided
Due Date - Undecided
Details - RfC3261 says about the Max-Forwards header:
A UAC MUST insert a Max-Forwards header field into each request it originates with a value that SHOULD be 70.
Since Kamailio 4.0 the default max_limit of the Max-Forwards header in maxfwd module has been decreased from 256 to 16. This might surprise users upgrading and could even lead to interoperability issues, because when converting calls from SIP to ISUP, the value can be used to set the Hop Counter, and when assuming 70 as the starting value, the system can reject the packet because the Hop Counter is already too high.
Attached is a patch setting the default max_limit to 70.
One or more files have been attached.
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=418
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: 23bc165dc1f697714a922afb5806abe162033ad1
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=23bc165…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Mon Apr 14 22:27:20 2014 +0200
sqlops: documentation for sql_query_async()
---
modules/sqlops/README | 32 ++++++++++++++++++++++++---
modules/sqlops/doc/sqlops_admin.xml | 40 +++++++++++++++++++++++++++++++++++
2 files changed, 68 insertions(+), 4 deletions(-)
diff --git a/modules/sqlops/README b/modules/sqlops/README
index 5be7274..1ad1be6 100644
--- a/modules/sqlops/README
+++ b/modules/sqlops/README
@@ -35,6 +35,7 @@ Daniel-Constantin Mierla
4.2. sql_xquery(connection, query, result)
4.3. sql_pvquery(connection, query, result)
4.4. sql_result_free(result)
+ 4.5. sql_query_async(connection, query)
5. Exported pseudo-variables
@@ -49,8 +50,9 @@ Daniel-Constantin Mierla
1.4. sql_xquery() usage
1.5. sql_pvquery() usage
1.6. sql_result_free() usage
- 1.7. $dbr(result=>key) usage
- 1.8. $sqlrows(con) usage
+ 1.7. sql_query_async() usage
+ 1.8. $dbr(result=>key) usage
+ 1.9. $sqlrows(con) usage
Chapter 1. Admin Guide
@@ -73,6 +75,7 @@ Chapter 1. Admin Guide
4.2. sql_xquery(connection, query, result)
4.3. sql_pvquery(connection, query, result)
4.4. sql_result_free(result)
+ 4.5. sql_query_async(connection, query)
5. Exported pseudo-variables
@@ -169,6 +172,7 @@ modparam("sqlops", "sqlres", "ra")
4.2. sql_xquery(connection, query, result)
4.3. sql_pvquery(connection, query, result)
4.4. sql_result_free(result)
+ 4.5. sql_query_async(connection, query)
Note that sql_query(), sql_xquery() and sql_pvquery() functions have
the following return values:
@@ -270,6 +274,26 @@ xlog("number of rows in table domain: $dbr(ra=>rows)\n");
sql_result_free("ra");
...
+4.5. sql_query_async(connection, query)
+
+ Make an async SQL query using 'connection', if implemented by db driver
+ module (e.g., db_mysql). The query is executed in another process and
+ result is not available back to config, thus it should be used only for
+ sql statements that don't return values (e.g., insert, delete,
+ update...).
+ * connection - the name of the connection to be used for the query
+ (defined via "sqlcon" parameter).
+ * query - SQL query string or pseudo-variables containing SQL query.
+
+ This function can be used from ANY_ROUTE.
+
+ Example 1.7. sql_query_async() usage
+...
+modparam("sqlops","sqlcon","ca=>dbdriver://username:password@dbhost/dbname")
+...
+sql_query_async("ca", "delete from domain");
+...
+
5. Exported pseudo-variables
5.1. $dbr(result=>key)
@@ -290,7 +314,7 @@ sql_result_free("ra");
integer.
* colname[N] - return the name of the N-th column in the result set.
- Example 1.7. $dbr(result=>key) usage
+ Example 1.8. $dbr(result=>key) usage
...
modparam("sqlops","sqlcon","ca=>dbdriver://username:password@dbhost/dbname")
...
@@ -349,7 +373,7 @@ if (sql_xquery("ca", "select * from domain", "ra") == 1)
"con" must be the name identifying a DB connection.
- Example 1.8. $sqlrows(con) usage
+ Example 1.9. $sqlrows(con) usage
...
modparam("sqlops","sqlcon","ca=>dbdriver://username:password@dbhost/dbname")
...
diff --git a/modules/sqlops/doc/sqlops_admin.xml b/modules/sqlops/doc/sqlops_admin.xml
index b11f7e2..ec61cac 100644
--- a/modules/sqlops/doc/sqlops_admin.xml
+++ b/modules/sqlops/doc/sqlops_admin.xml
@@ -376,6 +376,46 @@ sql_result_free("ra");
</programlisting>
</example>
</section>
+ <section id="sqlops.f.sql_query_async">
+ <title>
+ <function moreinfo="none">sql_query_async(connection, query)</function>
+ </title>
+ <para>
+ Make an async SQL query using 'connection', if implemented by db
+ driver module (e.g., db_mysql). The query is executed in another
+ process and result is not available back to config, thus it should
+ be used only for sql statements that don't return values (e.g.,
+ insert, delete, update...).
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <emphasis>connection</emphasis> - the name of the connection
+ to be used for the query (defined via <quote>sqlcon</quote>
+ parameter).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>query</emphasis> - SQL query string or
+ pseudo-variables containing SQL query.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ This function can be used from ANY_ROUTE.
+ </para>
+ <example>
+ <title><function>sql_query_async()</function> usage</title>
+ <programlisting format="linespecific">
+...
+modparam("sqlops","sqlcon","ca=>&exampledb;")
+...
+sql_query_async("ca", "delete from domain");
+...
+</programlisting>
+ </example>
+ </section>
</section>
<section>
Module: sip-router
Branch: master
Commit: ca92959a8709982554721c63376a5fb009fb0aff
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=ca92959…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Mon Apr 14 22:16:20 2014 +0200
lib/srdb1: extented DBv1 with async raw query and async insert
- functions that should be executed in async mode
---
lib/srdb1/db.h | 34 ++++++++++++++++++++++++++++++++++
lib/srdb1/db_id.c | 1 +
2 files changed, 35 insertions(+), 0 deletions(-)
diff --git a/lib/srdb1/db.h b/lib/srdb1/db.h
index cf33062..0b51245 100644
--- a/lib/srdb1/db.h
+++ b/lib/srdb1/db.h
@@ -194,6 +194,23 @@ typedef int (*db_raw_query_f) (const db1_con_t* _h, const str* _s, db1_res_t** _
/**
+ * \brief Raw SQL query via async framework.
+ *
+ * This function can be used to do database specific queries. Please
+ * use this function only if needed, as this creates portability issues
+ * for the different databases. Also keep in mind that you need to
+ * escape all external data sources that you use. You could use the
+ * escape_common and unescape_common functions in the core for this task.
+ * \see escape_common
+ * \see unescape_common
+ * \param _h structure representing database connection
+ * \param _s the SQL query
+ * \return returns 0 if everything is OK, otherwise returns value < 0
+ */
+typedef int (*db_raw_query_async_f) (const db1_con_t* _h, const str* _s);
+
+
+/**
* \brief Free a result allocated by db_query.
*
* This function frees all memory allocated previously in db_query. Its
@@ -326,6 +343,21 @@ typedef int (*db_insert_update_f) (const db1_con_t* _h, const db_key_t* _k,
typedef int (*db_insert_delayed_f) (const db1_con_t* _h, const db_key_t* _k,
const db_val_t* _v, const int _n);
+/**
+ * \brief Insert a row into the specified table via async framework.
+ *
+ * This function implements INSERT DELAYED SQL directive. It is possible to
+ * insert one or more rows in a table with delay using this function.
+ * \param _h database connection handle
+ * \param _k array of keys (column names)
+ * \param _v array of values for keys specified in _k parameter
+ * \param _n number of keys-value pairs int _k and _v parameters
+ * \return returns 0 if everything is OK, otherwise returns value < 0
+ */
+typedef int (*db_insert_async_f) (const db1_con_t* _h, const db_key_t* _k,
+ const db_val_t* _v, const int _n);
+
+
/**
* \brief Retrieve the number of affected rows for the last query.
@@ -388,11 +420,13 @@ typedef struct db_func {
in a table */
db_insert_update_f insert_update; /* Insert into table, update on duplicate key */
db_insert_delayed_f insert_delayed; /* Insert delayed into table */
+ db_insert_async_f insert_async; /* Insert async into table */
db_affected_rows_f affected_rows; /* Numer of affected rows for last query */
db_start_transaction_f start_transaction; /* Start a single transaction consisting of multiple queries */
db_end_transaction_f end_transaction; /* End a transaction */
db_abort_transaction_f abort_transaction; /* Abort a transaction */
db_query_f query_lock; /* query a table and lock rows for update */
+ db_raw_query_async_f raw_query_async; /* Raw query - SQL */
} db_func_t;
diff --git a/lib/srdb1/db_id.c b/lib/srdb1/db_id.c
index d37e521..497913a 100644
--- a/lib/srdb1/db_id.c
+++ b/lib/srdb1/db_id.c
@@ -254,6 +254,7 @@ struct db_id* new_db_id(const str* url, db_pooling_t pooling)
if (pooling == DB_POOLING_NONE) ptr->poolid = ++poolid;
else ptr->poolid = 0;
ptr->pid = my_pid();
+ ptr->url.s = (char*)ptr + sizeof(struct db_id);
ptr->url.len = url->len;
strncpy(ptr->url.s, url->s, url->len);
ptr->url.s[url->len] = '\0';
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A new Flyspray task has been opened. Details are below.
User who did this - Bill Radis (radisb)
Attached to Project - sip-router
Summary - Dialog never times-out when ka_timer < 10, even on 481 or 408(fake) response
Task Type - Bug Report
Category - dialog
Status - Unconfirmed
Assigned To -
Operating System - All
Severity - Low
Priority - Normal
Reported Version - Development
Due in Version - Undecided
Due Date - Undecided
Details - In the dialog module (https://github.com/kamailio/kamailio/blob/master/modules/dialog/dlg_req_wit…) in line 264 there is this code:
if(ps->code==408 || ps->code==481) {
if(update_dlg_timer(&dlg->tl, 10)<0) {
LM_ERR("failed to update dialog lifetime\n");
goto done;
}
dlg->lifetime = 10;
dlg->dflags |= DLG_FLAG_CHANGED;
}
This code is for updating the dialog's lifetime when a timeout occurs (by a fake 408 reply) or a 481 is received.
But in the call
update_dlg_timer(&dlg->tl, 10)
in the code above, the second argument is a hardcoded 10, which causes the dialog to refresh its lifetime to 10 more seconds, every time a timeout (or 481) occurs. But when ka_timer is < 10 secs this gets refreshed again before the dialog expires. I did a test with
update_dlg_timer(&dlg->tl, 1)
and it correctly works for values of ka_timer >= 2
I cant say the correct value, propably should be 1, so that the dialog gets expired the next second that the dlg_timer_routine runs. Anyway this value should be less than the ka_timer value so there should be a minimum valid ka_timer value. So maybe (ka_timer - 1) ?
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=417
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.