Module: sip-router
Branch: master
Commit: c3e19d24545e45e021000a53dc8b448cbe9442d3
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c3e19d2…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Sun Sep 26 15:02:20 2010 +0200
core: print function name by default in LOGs
---
dprint.h | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/dprint.h b/dprint.h
index 8f50b1f..2da1243 100644
--- a/dprint.h
+++ b/dprint.h
@@ -41,6 +41,9 @@
/** if defined the function name will also be logged. */
#ifdef NO_LOG_FUNC_NAME
# undef LOG_FUNC_NAME
+#else
+/* by default log the function name */
+# define LOG_FUNC_NAME
#endif /* NO_LOG_FUNC_NAME */
/* C >= 99 has __func__, older gcc versions have __FUNCTION__ */
i noticed that in debian squeeze, libcurl3-dev has been replaced by
libcurl4-openssl-dev. perhaps 'libcurl3-dev' in Build-Depends entry of
debian/control should thus be changed to 'libcurl3-dev |
libcurl4-openssl-dev' ?
-- juha
Module: sip-router
Branch: master
Commit: c96d8658da505cddd402963d3469acdd69ac1b5e
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c96d865…
Author: Juha Heinanen <jh(a)tutpro.com>
Committer: Juha Heinanen <jh(a)tutpro.com>
Date: Sat Sep 25 09:32:35 2010 +0300
modules/lcr: minor fix and improvement
- RPC command lcr.reload caused db tables to be loaded in some
situations more than once.
- If defunct column value of a gw is max UNIX timestamp value 4294967295
or greater, gw is considered currently unused and is not loaded into
memory at all.
---
modules/lcr/README | 4 +++-
modules/lcr/doc/lcr_admin.xml | 3 +++
modules/lcr/lcr_mod.c | 41 ++++++++++++++++++++++-------------------
modules/lcr/lcr_rpc.c | 7 ++-----
4 files changed, 30 insertions(+), 25 deletions(-)
diff --git a/modules/lcr/README b/modules/lcr/README
index 5a4a31a..44b9f1f 100644
--- a/modules/lcr/README
+++ b/modules/lcr/README
@@ -473,7 +473,9 @@ modparam("lcr", "flags_column", "gw_flags")
3.15. defunct_column (string)
Name of the column holding UNIX timestamp telling the time until which
- the gw is considered as defunct.
+ the gw is considered as defunct. If timestamp value is 4294967295 (=
+ max UNIX timestamp value) or greater, gw is considered currently unused
+ and is not loaded into memory at all.
Default value is “defunct”.
diff --git a/modules/lcr/doc/lcr_admin.xml b/modules/lcr/doc/lcr_admin.xml
index 764392f..ab0b45e 100644
--- a/modules/lcr/doc/lcr_admin.xml
+++ b/modules/lcr/doc/lcr_admin.xml
@@ -438,6 +438,9 @@ modparam("lcr", "flags_column", "gw_flags")
<para>
Name of the column holding UNIX timestamp telling the
time until which the gw is considered as defunct.
+ If timestamp value is 4294967295 (= max UNIX timestamp value)
+ or greater, gw is considered currently unused and is not
+ loaded into memory at all.
</para>
<para>
<emphasis>
diff --git a/modules/lcr/lcr_mod.c b/modules/lcr/lcr_mod.c
index 3d74975..6f705e1 100644
--- a/modules/lcr/lcr_mod.c
+++ b/modules/lcr/lcr_mod.c
@@ -1110,10 +1110,29 @@ int reload_tables()
goto err;
}
- null_gw_ip_addr = 0;
+ null_gw_ip_addr = gw_cnt = 0;
for (i = 0; i < RES_ROW_N(res); i++) {
row = RES_ROWS(res) + i;
+ if ((VAL_NULL(ROW_VALUES(row) + 11) == 1) ||
+ (VAL_TYPE(ROW_VALUES(row) + 11) != DB1_INT)) {
+ LM_ERR("lcr_gw id at row <%u> is null or not int\n", i);
+ goto err;
+ }
+ gw_id = (unsigned int)VAL_INT(ROW_VALUES(row) + 11);
+ if (VAL_NULL(ROW_VALUES(row) + 10)) {
+ defunct_until = 0;
+ } else {
+ if (VAL_TYPE(ROW_VALUES(row) + 10) != DB1_INT) {
+ LM_ERR("lcr_gw defunct at row <%u> is not int\n", i);
+ goto err;
+ }
+ defunct_until = (unsigned int)VAL_INT(ROW_VALUES(row) + 10);
+ if (defunct_until > 4294967294UL) {
+ LM_DBG("skipping disabled gw <%u>\n", gw_id);
+ continue;
+ }
+ }
if (!VAL_NULL(ROW_VALUES(row)) &&
(VAL_TYPE(ROW_VALUES(row)) != DB1_STRING)) {
LM_ERR("lcr_gw gw_name at row <%u> is not null or string\n", i);
@@ -1277,22 +1296,8 @@ int reload_tables()
goto err;
}
flags = (unsigned int)VAL_INT(ROW_VALUES(row) + 9);
- if (VAL_NULL(ROW_VALUES(row) + 10)) {
- defunct_until = 0;
- } else {
- if (VAL_TYPE(ROW_VALUES(row) + 10) != DB1_INT) {
- LM_ERR("lcr_gw defunct at row <%u> is not int\n", i);
- goto err;
- }
- defunct_until = (unsigned int)VAL_INT(ROW_VALUES(row) + 10);
- }
- if ((VAL_NULL(ROW_VALUES(row) + 11) == 1) ||
- (VAL_TYPE(ROW_VALUES(row) + 11) != DB1_INT)) {
- LM_ERR("lcr_gw id at row <%u> is null or not int\n", i);
- goto err;
- }
- gw_id = (unsigned int)VAL_INT(ROW_VALUES(row) + 11);
- if (!insert_gw(gws, i + 1, gw_id, gw_name, gw_name_len,
+ gw_cnt++;
+ if (!insert_gw(gws, gw_cnt, gw_id, gw_name, gw_name_len,
scheme, (unsigned int)ip_addr.s_addr, port,
transport, params, params_len, hostname,
hostname_len, ip_string, strip, tag, tag_len, flags,
@@ -1303,8 +1308,6 @@ int reload_tables()
lcr_dbf.free_result(dbh, res);
res = NULL;
-
- gw_cnt = i;
qsort(&(gws[1]), gw_cnt, sizeof(struct gw_info), comp_gws);
gws[0].ip_addr = gw_cnt;
diff --git a/modules/lcr/lcr_rpc.c b/modules/lcr/lcr_rpc.c
index f19297b..2f0d43f 100644
--- a/modules/lcr/lcr_rpc.c
+++ b/modules/lcr/lcr_rpc.c
@@ -46,12 +46,9 @@ static const char* reload_doc[2] = {
static void reload(rpc_t* rpc, void* c)
{
- int i;
lock_get(reload_lock);
- for (i = 1; i <= lcr_count_param; i++) {
- if (reload_tables(i) != 1)
- rpc->fault(c, 500, "LCR Module Reload Failed");
- }
+ if (reload_tables() != 1)
+ rpc->fault(c, 500, "LCR Module Reload Failed");
lock_release(reload_lock);
}
Hello,
before any major release of kamailio (openser), we install and run it
live on voipuser.org sip service. It runs there for more than two weeks
now, it even survived a 18 hours scan attack (approx 12.5 mio requests
"with love from Latvia" - I will write an article about it), so it looks
very solid.
However, there are two features were enabled for this version and are
not really heavily used yet: tls and presence/xcap.
So if you don't plan to test by yourself a local instance of version 3.1
and have time, then maybe you can help by registering some phones at
voipuser.org and play a bit there -- it will be very appreciated to
report if works for you.
If you dont have an account there or don't know about it, some details
here: VoIPUser.org is hosting also our kamailio (openser) forum for many
many years now, the service is open and free, when you register at
http://www.voipuser.org for the forum, you get a sip account as well
(there are some goodies included, like incoming UK did and INUM).
For tls:
- just configure your phone to use tls - if you need it, the port for
tls is 5061. For example, with snom 370 you have to set the outbound
proxy address to: sip.voipuser.org;transport=tls.
For presence/xcap:
- you can test if you have clients supporting SIMPLE presence in
Presence Agent mode (not end-to-end mode)
- the embedded xcap server is enabled, you have to set the xcap root url
to http://sip.voipuser.org:5060/xcap-root or
https://sip.voipuser.org:5061/xcap-root . Authentication for xcap
service is done using same sip username and password
Thanks,
Daniel
--
Daniel-Constantin Mierla
http://www.asipto.com
Patches item #2270836, was opened at 2008-11-12 19:46
Message generated for change (Comment added) made by miconda
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=743022&aid=2270836&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: ver devel
>Status: Closed
>Resolution: Accepted
Priority: 5
Private: No
Submitted By: Alex Balashov - Evariste System (abalashov)
>Assigned to: Daniel-Constantin Mierla (miconda)
Summary: is_known_dlg() exported function from dialog.
Initial Comment:
Provides a new exported function from the dialog module - is_known_dlg(). This can be used from script to determine if the message being processed is part of an existing dialog tracked by the dialog module, rrespective of the use of profiles.
Because the dialog module is plugged into the RR / TMCB event loop it is aware of all dialogs regardless of whether profiles are used. Thus, this function will return positively if any message is part of a known existing dialog.
I have included documentation changes in doc/dialog_admin.xml.
This patch is against the kamailio-1.4.1-notls release tarball, not trunk. But it should apply to devel version regardless.
----------------------------------------------------------------------
>Comment By: Daniel-Constantin Mierla (miconda)
Date: 2010-09-24 14:03
Message:
Applied on git master.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=743022&aid=2270836&group_…
Patches item #3035804, was opened at 2010-07-28 11:03
Message generated for change (Comment added) made by miconda
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=743022&aid=3035804&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: ver 1.5.x
>Status: Closed
>Resolution: Accepted
Priority: 5
Private: No
Submitted By: Alex Hermann (axlh)
>Assigned to: Daniel-Constantin Mierla (miconda)
Summary: Multiple return values for force_rtp_proxy
Initial Comment:
Add a separate return value (-2) when an rtp proxy has already mangled the packet. makes it possible to determine in the script if an rtpproxy is in the audio path.
----------------------------------------------------------------------
>Comment By: Daniel-Constantin Mierla (miconda)
Date: 2010-09-24 12:55
Message:
Applied on git master.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=743022&aid=3035804&group_…