THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has been changed. The changes are listed below. For full information about what has changed, visit the URL and click the History tab.
FS#123 - Provide processed message in tm callbacks whenever possible
User who did this: Timo Reimann (tr)
Task details edited:
-------
In Kamailio 1.5, certain callbacks (namely TMCB_RESPONSE_PRE_OUT,
TMCB_RESPONSE_OUT, and TMCB_REQUEST_BUILT) provided the entire processed message (i.e., after headers were modified) in tmcb_params->extra1 as *str. AFAICS, sr's equivalent to that parameter is send_buf in the tmcb_params structure. However, the only sr callbacks that do provide the processed messages are TMCB_REQUEST_SENT and TMCB_RESPONSE_SENT which, had no perfect correspondency in Kamailio (*_OUT callbacks would not be called for retransmissions).
Technically, this makes complete sense because the two *_SENT callbacks and the send_buf variable are available only when WITH_ONSEND is defined. Also, I noticed that these callbacks are handled through run_onsend_callbacks2() instead of run_trans_callbacks(). Only the former fill send_buf and hence pass processed messages as part of the callback.
Please pass processed messages for all callbacks where a processed message is supposed to be available, i.e., all *_OUT and *_READY callbacks.
(An email on the sr-dev list was originally posted by me on 28.7.2011. See [[http://lists.sip-router.org/pipermail/sr-dev/2010-July/008351.html|here]])
-------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=123
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.
A new Flyspray task has been opened. Details are below.
User who did this - Timo Reimann (tr)
Attached to Project - sip-router
Summary - Provide processed message in tm callbacks whenever possible
Task Type - Feature Request
Category - tm
Status - Assigned
Assigned To - Andrei Pelinescu-Onciul
Operating System - All
Severity - Low
Priority - Normal
Reported Version - Development
Due in Version - Undecided
Due Date - Undecided
Details - In Kamailio 1.5, certain callbacks (namely TMCB_RESPONSE_PRE_OUT,
TMCB_RESPONSE_OUT, and TMCB_REQUEST_BUILT) provided the entire processed message (i.e., after headers were modified) in tmcb_params->extra1 as *str. AFAICS, sr's equivalent to that parameter is send_buf in the tmcb_params structure. However, the only sr callbacks that do provide the processed messages are TMCB_REQUEST_SENT and TMCB_RESPONSE_SENT which, had no perfect correspondency in Kamailio (*_OUT callbacks would not be called for retransmissions).
Technically, this makes complete sense because the two *_SENT callbacks and the send_buf variable are available only when WITH_ONSEND is defined. Also, I noticed that these callbacks are handled through run_onsend_callbacks2() instead of run_trans_callbacks(). Only the former fill send_buf and hence pass processed messages as part of the callback.
Please pass processed messages for all callbacks where a processed message is supposed to be available, i.e., all *_OUT and *_READY callbacks.
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=123
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.
A user has added themself to the list of users assigned to this task.
FS#123 - Provide processed message in tm callbacks whenever possible
User who did this - Timo Reimann (tr)
http://sip-router.org/tracker/index.php?do=details&task_id=123
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#122 - Kamailio 3.1.3 crash
User who did this - Timo Reimann (tr)
----------
Hey Jasmin,
I agree with you that dialogs should be tracked as soon as possible. As long as there is a message available for parsing, this should be feasible IMHO, hopefully including message-to-dialog matching based on the DID. The various use cases are indeed troublesome, however, which is why I think a fair amount of conceptual changes will be required. As a minimum requirement, we need to define a standard function for accessing dialogs that may be called in all thinkable situations. get_current_dialog() is a good candidate for that; however, it is not being used consistently across the various module parts.
Regarding using dlg_manage() for in-dialog requests with event routes: Can you file a separate bug report on this so that we (I!) can keep track of it more easily?
Oh and thanks for the time travel paper, looks promising -- will turn that into a Kamailio module ASAP. ;)
--Timo
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=122#comment200
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.
looks like xlog module is not supported by lua. so i tried to use
sr.log function.
when i make in lua script call
sr.log(2, "Executing lua script\n");
i get to syslog
Apr 14 20:39:17 sip /usr/sbin/sip-proxy[23495]: ERROR: app_lua [app_lua_sr.c:92]: Executing lua script
why ERROR level, since according to
http://sip-router.org/wiki/cookbooks/core-cookbook/devel#debug
level 2 means L_INFO?
-- juha
Hello,
I've setup a siremis installation using mysql for siremis tables. Now having kamailio with postgresql on another machine, I've chosen Postgresql in seremis setup under SIP DB and correctly inserted the right username/password/host. Connection was successfully.
The problem rises when you try to query something owned by kamailio-db: the query builded from seremis is not written for a postgresql database but is still written to be used in a mysql database. Here an example:
An exception occurred while executing this script:
Error message: #0, Error in query:: SELECT T0.id, T0.username, T0.domain, T0.password, T0.email_address, T0.ha1, T0.ha1b, T0.rpid FROM `subscriber` T0 LIMIT 10. SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near "`" at character 101
Script name and line number of error: /var/www/siremis-2.0.0/openbiz/bin/data/BizDataObj_Lite.php:447
Obviously, nothing works. The only things working are all those operation using mysql as db.
Have I setup wrong my installation or is it not possible to use two different databases?
Thanks a lot,
Giorgio Maria Santini
Hey Carsten,
going forward on IMS, is your plan to standardise on K dialog or S dialog
for SR3? Have been going through the code of the scscf which relies on S
dialog. K dialog has alot more functionality and state management? what are
your thoughts? Having completed a PoC Ro interface (which you wil notice
from the code is based on K dialog) I now need to incorporate into existing
S-CSCF, which will have to be changed from using S dialog to K dialog.
Cheers
Jason
Module: sip-router
Branch: master
Commit: e1d1c774c9ac0b4d9103f4a1c5e9b550adbb2f38
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e1d1c77…
Author: Timo Teräs <timo.teras(a)iki.fi>
Committer: Timo Teräs <timo.teras(a)iki.fi>
Date: Wed Apr 6 09:33:10 2011 +0300
modules_k/uac: fix from/to restore for small original URI
Seems that the URI length check is superfluous and fails under
certain conditions. It does not make sense for the URI to have
zero bytes, so just use the first seen zero byte as end marker.
I have a reproducible test case where the restore inserts URI
with multiple zero-bytes to wire. This happens if the original
URI is smaller than the one we rewrote it to using uac_replace_from.
---
modules_k/uac/from.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/modules_k/uac/from.c b/modules_k/uac/from.c
index 4657e11..50822b6 100644
--- a/modules_k/uac/from.c
+++ b/modules_k/uac/from.c
@@ -463,15 +463,17 @@ int restore_from( struct sip_msg *msg, int *is_from )
LM_ERR("new URI shorter than old URI\n");
goto failed;
}
- for( i=0 ; i<old_uri.len ; i++ )
+ for( i=0 ; i<old_uri.len ; i++ ) {
new_uri.s[i] ^= old_uri.s[i];
- if (new_uri.len==old_uri.len) {
- for( ; new_uri.len && (new_uri.s[new_uri.len-1]==0) ; new_uri.len-- );
- if (new_uri.len==0) {
- LM_ERR("new URI got 0 len\n");
- goto failed;
+ if (new_uri.s[i] == 0) {
+ new_uri.len = i;
+ break;
}
}
+ if (new_uri.len==0) {
+ LM_ERR("new URI got 0 len\n");
+ goto failed;
+ }
LM_DBG("decoded uris are: new=[%.*s] old=[%.*s]\n",
new_uri.len, new_uri.s, old_uri.len, old_uri.s);
Module: sip-router
Branch: 3.1
Commit: f3690cfddd08f43d7afb651a8d9f05b31e2174c2
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=f3690cf…
Author: Timo Teräs <timo.teras(a)iki.fi>
Committer: Timo Teräs <timo.teras(a)iki.fi>
Date: Wed Apr 6 09:33:10 2011 +0300
modules_k/uac: fix from/to restore for small original URI
Seems that the URI length check is superfluous and fails under
certain conditions. It does not make sense for the URI to have
zero bytes, so just use the first seen zero byte as end marker.
I have a reproducible test case where the restore inserts URI
with multiple zero-bytes to wire. This happens if the original
URI is smaller than the one we rewrote it to using uac_replace_from.
(cherry picked from commit e1d1c774c9ac0b4d9103f4a1c5e9b550adbb2f38)
---
modules_k/uac/from.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/modules_k/uac/from.c b/modules_k/uac/from.c
index 4657e11..50822b6 100644
--- a/modules_k/uac/from.c
+++ b/modules_k/uac/from.c
@@ -463,15 +463,17 @@ int restore_from( struct sip_msg *msg, int *is_from )
LM_ERR("new URI shorter than old URI\n");
goto failed;
}
- for( i=0 ; i<old_uri.len ; i++ )
+ for( i=0 ; i<old_uri.len ; i++ ) {
new_uri.s[i] ^= old_uri.s[i];
- if (new_uri.len==old_uri.len) {
- for( ; new_uri.len && (new_uri.s[new_uri.len-1]==0) ; new_uri.len-- );
- if (new_uri.len==0) {
- LM_ERR("new URI got 0 len\n");
- goto failed;
+ if (new_uri.s[i] == 0) {
+ new_uri.len = i;
+ break;
}
}
+ if (new_uri.len==0) {
+ LM_ERR("new URI got 0 len\n");
+ goto failed;
+ }
LM_DBG("decoded uris are: new=[%.*s] old=[%.*s]\n",
new_uri.len, new_uri.s, old_uri.len, old_uri.s);