THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task is now closed:
FS#447 - Update FSF address
User who did this - Daniel-Constantin Mierla (miconda)
Reason for closing: Implemented
Additional comments about closing: Thanks, patch pushed to master branch.
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=447
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 - Savolainen Dmitri (snen)
Attached to Project - sip-router
Summary - usrloc driver error on query: Duplicate entry 'XXXXXXXXXXXX' for key 'ruid_idx'
Task Type - Bug Report
Category - usrloc (k)
Status - Unconfirmed
Assigned To -
Operating System - Linux
Severity - Medium
Priority - Normal
Reported Version - 4.1
Due in Version - Undecided
Due Date - Undecided
Details - getting error ERROR: db_mysql [km_dbase.c:122]: db_mysql_submit_query(): driver error on query: Duplicate entry 'XXXXXXXXXXXX' for key 'ruid_idx'
Getting error expample
usloc params:
<code>
modparam('usrloc', 'db_mode', 2)
modparam("usrloc", "db_check_update", 1)
modparam("usrloc", "db_ops_ruid", 1)
modparam("usrloc", "timer_interval", 120) #default 60
modparam('usrloc', 'db_url', 'mysql:XXXXXXXXXXXXXXXXX')
</code>
now let's manipulate with user 1111
1. 1111 doesn't exist
<code>
mysql>select * from location where username='1111' \G
Empty set (0.00 sec)
</code>
2. add permanent location for 1111
./kamctl ul add '1111(a)erinaco.ru' 'sip:1111@192.168.10.100'
3. 1111 is in DB after some seconds (up to "timer_interval")
<code>
mysql>select * from location where username='1111' \G
*************************** 1. row ***************************
id: 111625
ruid: ulcx-53b55b8f-46d1-1
username: 1111
domain: erinaco.ru
contact: sip:1111@192.168.10.100
received: NULL
path: NULL
expires: 1970-01-01 03:00:00
q: 1.00
callid: dfjrewr12386fd6-343(a)kamailio.mi
cseq: 1
last_modified: 1970-01-01 03:00:00
flags: 0
cflags: 0
user_agent: SIP Router MI Server
socket: NULL
methods: NULL
instance: NULL
reg_id: 0
</code>
4. let's execute this again
./kamctl ul add '1111(a)erinaco.ru' 'sip:1111@192.168.10.100'
There is no any changes in db after "timer_interval"
<code>
mysql>select * from location where username='1111' \G
*************************** 1. row ***************************
id: 111626
ruid: ulcx-53b55f26-4895-1
username: 1111
domain: erinaco.ru
contact: sip:1111@192.168.10.100
received: NULL
path: NULL
expires: 1970-01-01 03:00:00
q: 1.00
callid: dfjrewr12386fd6-343(a)kamailio.mi
cseq: 1
last_modified: 1970-01-01 03:00:00
flags: 0
cflags: 0
user_agent: SIP Router MI Server
socket: NULL
methods: NULL
instance: NULL
reg_id: 0
1 row in set (0.00 sec)
</code>
Now, every "timer_interval" seconds in kamailio.log
<code>
[snen@sw4 sbin]# grep 'ulcx-53b55f26-4895-1' /var/log/kamailio.log
Jul 3 17:52:22 sw4 ./kamailio[18576]: ERROR: db_mysql [km_dbase.c:122]: db_mysql_submit_query(): driver error on query: Duplicate entry 'ulcx-53b55f26-4895-1' for key 'ruid_idx'
Jul 3 17:54:22 sw4 ./kamailio[18576]: ERROR: db_mysql [km_dbase.c:122]: db_mysql_submit_query(): driver error on query: Duplicate entry 'ulcx-53b55f26-4895-1' for key 'ruid_idx'
Jul 3 17:56:22 sw4 ./kamailio[18576]: ERROR: db_mysql [km_dbase.c:122]: db_mysql_submit_query(): driver error on query: Duplicate entry 'ulcx-53b55f26-4895-1' for key 'ruid_idx'
Jul 3 17:58:22 sw4 ./kamailio[18576]: ERROR: db_mysql [km_dbase.c:122]: db_mysql_submit_query(): driver error on query: Duplicate entry 'ulcx-53b55f26-4895-1' for key 'ruid_idx'
</code>
The reason is "modparam("usrloc", "db_check_update", 1)": affected_rows after UPDATE returns 0, and INSERT returns permanent error.
Record was marked as CS_DIRTY and will be never CS_SYNC up to kamailio reboot or registration change(that may be never for permanent registrations)
so we can see increasing the number of such records in the work process for some usage configuration.
some fixes:
* set last_modified to NOW() while updating (bad for simultaneous updates)
* "INSERT IGNORE" as usrloc module param
* do not perform DB changes, if there is no "in memory" changes (may be bad in external DB update case)
* mark record as CS_SYNC after affected_rows 0 and INSERT error, so error will be only once
in this patch INSERT error ignored after UPDATE and affected_rows 0
<code>
diff --git a/modules/usrloc/ucontact.c b/modules/usrloc/ucontact.c
index b18ce98..ad71b34 100644
--- a/modules/usrloc/ucontact.c
+++ b/modules/usrloc/ucontact.c
@@ -820,9 +820,8 @@ int db_update_ucontact_addr(ucontact_t* _c)
/* supposed to be an UPDATE, but if affected rows is 0, then try
* to do an INSERT */
if(ul_dbf.affected_rows(ul_dbh)==0) {
- LM_DBG("affected rows by UPDATE was 0, doing an INSERT\n");
- if(db_insert_ucontact(_c)<0)
- return -1;
+ LM_DBG("affected rows by UPDATE was 0, doing an INSERT without error check\n");
+ db_insert_ucontact(_c);
}
}
/* delete old db attrs and add the current list */
@@ -1006,9 +1005,8 @@ int db_update_ucontact_ruid(ucontact_t* _c)
/* supposed to be an UPDATE, but if affected rows is 0, then try
* to do an INSERT */
if(ul_dbf.affected_rows(ul_dbh)==0) {
- LM_DBG("affected rows by UPDATE was 0, doing an INSERT\n");
- if(db_insert_ucontact(_c)<0)
- return -1;
+ LM_DBG("affected rows by UPDATE was 0, doing an INSERT without error check\n");
+ db_insert_ucontact(_c);
}
}
@@ -1226,9 +1224,8 @@ int db_update_ucontact_instance(ucontact_t* _c)
/* supposed to be an UPDATE, but if affected rows is 0, then try
* to do an INSERT */
if(ul_dbf.affected_rows(ul_dbh)==0) {
- LM_DBG("affected rows by UPDATE was 0, doing an INSERT\n");
- if(db_insert_ucontact(_c)<0)
- return -1;
+ LM_DBG("affected rows by UPDATE was 0, doing an INSERT without error check\n");
+ db_insert_ucontact(_c);
}
}
</code>
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=448
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 - Anthony Messina (amessina)
Attached to Project - sip-router
Summary - Update FSF address
Task Type - Bug Report
Category - Core
Status - Unconfirmed
Assigned To -
Operating System - All
Severity - Very Low
Priority - Normal
Reported Version - Development
Due in Version - Undecided
Due Date - Undecided
Details - The attached patch updates the FSF address and applies against the git master at 639fce79466baf77bbd707eb9cef6473dcb3eb7c
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=447
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.
Hi,
I am trying to use t_suspend()/t_continue() multiple times on the same
transaction. Calling t_suspend() more than once works, but the second
time I call t_continue() the transaction is killed and a 500 response is
sent. It is the "if (branch == t->nr_of_outgoings)" check from the code
fragment below (from t_suspend.c:t_continue()) that results in the
transaction being killed - you can see the debug/error line I added to
determine this in the fragment.
Is using t_suspend()/t_continue() multiple times something that should
work?
Thanks,
Peter
if (t->uas.status < 200) {
/* No final reply has been sent yet.
* Check whether or not there is any pending branch.
*/
for ( branch = 0;
branch < t->nr_of_outgoings;
branch++
) {
if ((t->uac[branch].request.buffer != NULL)
&& (t->uac[branch].last_received < 200)
)
break;
}
if (branch == t->nr_of_outgoings) {
/* There is not any open branch so there is
* no chance that a final response will be
received. */
ret = 0;
LM_ERR("branch == t->nr_of_outgoings\n");
goto kill_trans;
}
}
--
Peter Dunkley
Technical Director
Crocodile RCS Ltd
Module: sip-router
Branch: master
Commit: 639fce79466baf77bbd707eb9cef6473dcb3eb7c
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=639fce7…
Author: Richard Fuchs <rfuchs(a)sipwise.com>
Committer: Richard Fuchs <rfuchs(a)sipwise.com>
Date: Wed Jul 2 14:53:36 2014 -0400
rtpengine: add support for TOS=... flag
---
modules/rtpengine/doc/rtpengine_admin.xml | 8 ++++++++
modules/rtpengine/rtpengine.c | 2 ++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/modules/rtpengine/doc/rtpengine_admin.xml b/modules/rtpengine/doc/rtpengine_admin.xml
index b9f62d4..7c35611 100644
--- a/modules/rtpengine/doc/rtpengine_admin.xml
+++ b/modules/rtpengine/doc/rtpengine_admin.xml
@@ -469,6 +469,14 @@ rtpengine_offer();
<emphasis>media-address=...</emphasis> - force a particular media address to
be used in the &sdp; body. Address family is detected automatically.
</para></listitem>
+ <listitem><para>
+ <emphasis>TOS=...</emphasis> - change the IP TOS value for all outgoing RTP
+ packets within the entire call in both directions. Only honoured in an
+ <quote>offer</quote>, ignored for an <quote>answer</quote>. Valid values are
+ 0 through 255, given in decimal. If this option is not specified, the TOS
+ value will revert to the default TOS (normally 184). A value of -1 may be used
+ to leave the currently used TOS unchanged.
+ </para></listitem>
</itemizedlist>
</listitem>
</itemizedlist>
diff --git a/modules/rtpengine/rtpengine.c b/modules/rtpengine/rtpengine.c
index 334688b..ce2bc78 100644
--- a/modules/rtpengine/rtpengine.c
+++ b/modules/rtpengine/rtpengine.c
@@ -1188,6 +1188,8 @@ static int parse_flags(struct ng_flags_parse *ng_flags, struct sip_msg *msg, enu
ng_flags->transport |= 0x100;
ng_flags->transport &= ~0x002;
}
+ else if (str_eq(&key, "TOS") && val.s)
+ bencode_dictionary_add_integer(ng_flags->dict, "TOS", atoi(val.s));
else
goto generic;
goto next;
I'm using the latest rtpengine master and still getting crashes once
every 1-2 days on a high call volume installation:
(gdb) where
#0 0x000000304e232925 in raise () from /lib64/libc.so.6
#1 0x000000304e234105 in abort () from /lib64/libc.so.6
#2 0x000000304e22ba4e in __assert_fail_base () from /lib64/libc.so.6
#3 0x000000304e22bb10 in __assert_fail () from /lib64/libc.so.6
#4 0x0000000000412d50 in stream_packet (fd=<value optimized out>, p=
0x7f1dcc1b1030, u=<value optimized out>) at call.c:547
#5 stream_fd_readable (fd=<value optimized out>, p=0x7f1dcc1b1030,
u=<value optimized out>) at call.c:819
#6 0x000000000040b4ce in poller_poll (p=0x10d3750,
timeout=<value optimized out>) at poller.c:354
#7 0x000000000040722d in poller_loop (d=0x10d3750) at main.c:542
#8 0x000000000040bb5f in thread_detach_func (d=<value optimized out>)
at aux.c:160
#9 0x000000304e6079d1 in start_thread () from /lib64/libpthread.so.0
#10 0x000000304e2e8b6d in clone () from /lib64/libc.so.6
Unfortunately, this packet capture is not very insightful. What's the
easiest way to build rtpengine with debug symbols so that some of these
values can be filled in?
--
Alex Balashov - Principal
Evariste Systems LLC
Tel: +1-678-954-0670
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/
Please be kind to the English language:
http://www.entrepreneur.com/article/232906
Hello,
I want to announce the next Kamailio Development Workshop, to take place
in Paris, France, during July 9-10, 2014.
This event is the next in its series targeting to show the internals of
Kamailio and enable more people to become developers as well as let
users of Kamailio to get more knowledge about the design of the
application which can have relevant impact in operating deployment.
Be aware that it is not a workshop about Kamailio installation and
administration. Its content is about writing C code to extend Kamailio.
More details can be found at:
-
http://www.kamailio.org/w/2014/06/kamailio-development-workshop-july-9-10-2…
Similar to the past events, we are considering to have a social
networking event in the evening of July 9 (most probably a dinner meetup
at a nice place in Paris), which is open for everyone, each participant
taking care of own expenses.
Cheers,
Daniel
--
Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda