As of today, I still haven't managed to make the following kamailio
modules compile:
cpl-c, dialog, dispatcher, domain, domainpolicy, enum, msilo,
nathelper, nat_traveral, osp, path, perl, perlvdb, presence, pv, qos,
ratelimit, registrar, rls, rtimer, seas, sipitrace, sl, snmpstats,
sst, texops, uac, uac_redirect, usrloc, utils
This does not necessarily mean that the modules above are difficult to
update, but only that they require manual changes and I haven't had
the time to do them yet.
Some of the modules require changes in the sip-router core which are
underway.
If you would like to help update one of the modules above and make
them work on the sip-router core, then, please, let me know. I would
especially appreciate help with the following modules:
perl, perlvdb, pv, snmpstas
because I don't know much about them.
And if you don't have the time or knowledge necessary to convert
modules, we would still appreciate if you could review changes we did
so far. Here is how you can review module changes:
1) Through gitweb
Go to
http://git.sip-router.org/cgi-bin/gitweb.cgi?p=kamailio-3.0/.git;a=heads
and click on a module that interests you. You'll be presented with the
history of the module. Commits on the top of the list are those that I
made to make the module work with the sip-router core. The oldest
commit in most modules which is related to the update to sip-router is:
"Define OPENSER_MOD_INTERFACE in Makefile."
All modules contain that one, so you only need to look at commits that
are newer than this one. There are some exceptions though, such as the
acc module, where the above mentioned commit is not the last one.
2) With git
Clone the repository using:
$ git clone git://git.sip-router.org/kamailio-3.0
Checkout the branch of the module you are interested in:
$ git co -b acc origin/acc
And examine the history of the module with git log:
$ git log -u
Jan.
Module: sip-router
Branch: janakj/kcore
Commit: fa8a216f382be9852eeecb86c04a846d69deef71
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=fa8a216…
Author: Jan Janak <jan(a)iptel.org>
Committer: Jan Janak <jan(a)iptel.org>
Date: Wed Mar 11 00:05:31 2009 +0100
Adding core_stats.[ch] from kamailio
---
lib/kcore/core_stats.c | 71 +++++++++++++++++++++++++++++++++++++++++++
lib/kcore/core_stats.h | 79 ++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 150 insertions(+), 0 deletions(-)
diff --git a/lib/kcore/core_stats.c b/lib/kcore/core_stats.c
new file mode 100644
index 0000000..6f5ebb6
--- /dev/null
+++ b/lib/kcore/core_stats.c
@@ -0,0 +1,71 @@
+/*
+ * $Id$
+ *
+ * Copyright (C) 2006 Voice Sistem SRL
+ *
+ * This file is part of Kamailio, a free SIP server.
+ *
+ * Kamailio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Kamailio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * History:
+ * ---------
+ * 2006-01-23 first version (bogdan)
+ * 2006-11-28 Added statistics for the number of bad URI's, methods, and
+ * proxy requests (Jeffrey Magder - SOMA Networks)
+ */
+
+/*!
+ * \file
+ * \brief Kamailio Core statistics
+ */
+
+
+#include <string.h>
+
+#include "statistics.h"
+
+
+#ifdef STATISTICS
+
+stat_var* rcv_reqs; /*!< received requests */
+stat_var* rcv_rpls; /*!< received replies */
+stat_var* fwd_reqs; /*!< forwarded requests */
+stat_var* fwd_rpls; /*!< forwarded replies */
+stat_var* drp_reqs; /*!< dropped requests */
+stat_var* drp_rpls; /*!< dropped replies */
+stat_var* err_reqs; /*!< error requests */
+stat_var* err_rpls; /*!< error replies */
+stat_var* bad_URIs; /*!< number of bad URIs */
+stat_var* unsupported_methods; /*!< unsupported methods */
+stat_var* bad_msg_hdr; /*!< messages with bad header */
+
+
+/*! exported core statistics */
+stat_export_t core_stats[] = {
+ {"rcv_requests" , 0, &rcv_reqs },
+ {"rcv_replies" , 0, &rcv_rpls },
+ {"fwd_requests" , 0, &fwd_reqs },
+ {"fwd_replies" , 0, &fwd_rpls },
+ {"drop_requests" , 0, &drp_reqs },
+ {"drop_replies" , 0, &drp_rpls },
+ {"err_requests" , 0, &err_reqs },
+ {"err_replies" , 0, &err_rpls },
+ {"bad_URIs_rcvd", 0, &bad_URIs },
+ {"unsupported_methods", 0, &unsupported_methods },
+ {"bad_msg_hdr", 0, &bad_msg_hdr },
+ {0,0,0}
+};
+
+#endif
diff --git a/lib/kcore/core_stats.h b/lib/kcore/core_stats.h
new file mode 100644
index 0000000..cbd8821
--- /dev/null
+++ b/lib/kcore/core_stats.h
@@ -0,0 +1,79 @@
+/*
+ * $Id$
+ *
+ * Copyright (C) 2006 Voice Sistem SRL
+ *
+ * This file is part of Kamailio, a free SIP server.
+ *
+ * Kamailio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Kamailio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * History:
+ * ---------
+ * 2006-01-23 first version (bogdan)
+ * 2006-11-28 Added statistics for the number of bad URI's, methods, and
+ * proxy requests (Jeffrey Magder - SOMA Networks)
+ */
+
+/*!
+ * \file
+ * \brief Kamailio statistics
+ */
+
+
+#ifndef _CORE_STATS_H_
+#define _CORE_STATS_H_
+
+#include "statistics.h"
+
+#ifdef STATISTICS
+/*! exported core statistics */
+extern stat_export_t core_stats[];
+
+/*! \brief received requests */
+extern stat_var* rcv_reqs;
+
+/*! \brief received replies */
+extern stat_var* rcv_rpls;
+
+/*! \brief forwarded requests */
+extern stat_var* fwd_reqs;
+
+/*! \brief forwarded replies */
+extern stat_var* fwd_rpls;
+
+/*! \brief dropped requests */
+extern stat_var* drp_reqs;
+
+/*! \brief dropped replies */
+extern stat_var* drp_rpls;
+
+/*! \brief error requests */
+extern stat_var* err_reqs;
+
+/*! \brief error replies */
+extern stat_var* err_rpls;
+
+/*! \brief Set in parse_uri() */
+extern stat_var* bad_URIs;
+
+/*! \brief Set in parse_method() */
+extern stat_var* unsupported_methods;
+
+/*! \brief Set in get_hdr_field(). */
+extern stat_var* bad_msg_hdr;
+
+#endif /*STATISTICS*/
+
+#endif /*_CORE_STATS_H_*/
Module: sip-router
Branch: master
Commit: 1ac9ca35f15bd9358feaa5820835c7d3ae87fec1
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=1ac9ca3…
Author: Jan Janak <jan(a)iptel.org>
Committer: Jan Janak <jan(a)iptel.org>
Date: Wed Mar 11 01:12:24 2009 +0100
Added missing hash_func.h header
h_table.h uses TABLE_ENTRIES macro but did not include hash_func.h
where the macro is defined. When h_table.h is included from another
modules which does not include hash_func.h then the modules does
not compile
---
modules/tm/h_table.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/modules/tm/h_table.h b/modules/tm/h_table.h
index d69daa8..1710584 100644
--- a/modules/tm/h_table.h
+++ b/modules/tm/h_table.h
@@ -71,6 +71,7 @@
#include "../../usr_avp.h"
#include "../../timer.h"
#include "../../atomic_ops.h"
+#include "../../hash_func.h"
#include "config.h"
/* if TM_DIFF_RT_TIMEOUT is defined, different retransmissions timeouts
Hello,
I just updated the kamailio-3.0 git repository, changes include:
* kamailio statistics code is now in libkcore
* snmpstats module has been updated and compiles
* Hennings' new memcached module is in the repository.
I also pulled latest changes from all repositories involved and
updated all branches.
Make sure that you use -f option when you do git pull or git fetch
(the repository has branches that use git-rebase and so the -f option
will most likely be necessary).
Jan.
Daniel-Constantin Mierla writes:
> > thanks for that. there is still work to do regarding t_relay failures
> > (also applies to fork.cfg). based on today's tests (that i wrote
> > another message about), i'm totally confused regarding tm's t_relay
> > behavior. there is no documentation on de-arming of route blocks,
> you have to give "0" as parameter to functions arming tm route
> > blocks.
yes, i know that. i meant automatic de-arming when t_relay is called.
at least in some case i have noticed earlier that if i don't set again
failure/branck/reply routes in failure route, they are not necessarily
set when t_relay is called in failure route.
> Probably different codes should be returned in case of errors, to
> differentiate the behavior in the config.
i would prefer that the default behavior is that failure route is called
no matter what error happened. there could be a way to override that if
someone wants to have more manual control.
for example, lets say that there is a syntax error in r-uri of a
branch that is being t_relayed. if failure route is set, it should get
called with error "400 Bad Request".
i cc this to sr-dev lists, since in my opinion sip-router tm module
should allow user friendly, simple handling of t_relay failures.
-- juha
Hello,
There are two functions in the implementation of timers in kamailio,
register_timer and register_timer_process. What is the different between those
two functions and which should be used when? I noticed that, for example, the
htable module seems to be using them interchangeably, there is a modparam
which controls which function is gonna be used.
Can we replace register_timer_process with register_timer function from the
sip-router core?
thanks, Jan.