Module: sip-router
Branch: oej/permissionsrpc
Commit: db8780f0b296537bd56c6c1aaeec08d7be5a6788
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=db8780f…
Author: Olle E. Johansson <oej(a)edvina.net>
Committer: Olle E. Johansson <oej(a)edvina.net>
Date: Sun Dec 23 17:59:34 2012 +0100
Merge branch 'master' into oej/permissionsrpc
* master: (21 commits)
Revert "Changing to kamcmd"
kamcmd changes
Changing to kamcmd
kamcmd Updating docs
Change "sercmd" to "kamcmd" in module documentation files - README
kamctl Fix typo that causes the "trusted" help to be printed twice and "address" zero times
kamctl Change "sercmd" to "kamcmd" in help texts
Fixing compiler warnings
modules_s/permissions: moved to obsolete folder
modules_s/textops: moved to obsolete folder
textopsx: added functions that operate on header value
modules_k/domain: bind_domain api function takes one param
modules_k/htable: removed unused variable
nathelper(k): new test 128 to check port in contact against source port
modules_s/nathelper: moved to obsolete folder
nathelper(k): added the select for rewriting the contact
core: proper pv buffer reinitialization
dialog(k): Reworked dlg_set_timeout_by_profile() code to change dialog timeouts outside of a profile lock.
modules/app_lua: Updated app_lua to support URI lookup in registrar
modules_k/registrar: Extended C-API to include a URI lookup
...
ddelande
---
Module: sip-router
Branch: master
Commit: ecba6cf229f849dd6390bbb2b9e9e70628fd0bd7
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=ecba6cf…
Author: Jason Penton <jason.penton(a)smilecoms.com>
Committer: Jason Penton <jason.penton(a)smilecoms.com>
Date: Tue Jan 8 11:00:16 2013 +0200
modules/cdp: added omitted statistics files
---
modules/cdp/statistics.c | 56 +++++++++++++++++++++++++++++++++++++++++++++
modules/cdp/statistics.h | 57 ++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 113 insertions(+), 0 deletions(-)
diff --git a/modules/cdp/statistics.c b/modules/cdp/statistics.c
new file mode 100644
index 0000000..248026d
--- /dev/null
+++ b/modules/cdp/statistics.c
@@ -0,0 +1,56 @@
+/*
+ * $Id$
+ *
+ * Copyright (C) 2012 Smile Communications, jason.penton(a)smilecoms.com
+ * Copyright (C) 2012 Smile Communications, richard.good(a)smilecoms.com
+ *
+ * The initial version of this code was written by Dragos Vingarzan
+ * (dragos(dot)vingarzan(at)fokus(dot)fraunhofer(dot)de and the
+ * Fruanhofer Institute. It was and still is maintained in a separate
+ * branch of the original SER. We are therefore migrating it to
+ * Kamailio/SR and look forward to maintaining it from here on out.
+ * 2011/2012 Smile Communications, Pty. Ltd.
+ * ported/maintained/improved by
+ * Jason Penton (jason(dot)penton(at)smilecoms.com and
+ * Richard Good (richard(dot)good(at)smilecoms.com) as part of an
+ * effort to add full IMS support to Kamailio/SR using a new and
+ * improved architecture
+ *
+ * NB: Alot of this code was originally part of OpenIMSCore,
+ * FhG Fokus.
+ * Copyright (C) 2004-2006 FhG Fokus
+ * Thanks for great work! This is an effort to
+ * break apart the various CSCF functions into logically separate
+ * components. We hope this will drive wider use. We also feel
+ * that in this way the architecture is more complete and thereby easier
+ * to manage in the Kamailio/SR environment
+ *
+ * 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
+ *
+ */
+
+#include "statistics.h"
+
+unsigned long get_avg_cdp_response_time() {
+
+ long rpls_received = get_stat_val(replies_received);
+ if (!rpls_received)
+ return 0;
+
+ return get_stat_val(replies_response_time)/rpls_received;
+}
+
diff --git a/modules/cdp/statistics.h b/modules/cdp/statistics.h
new file mode 100644
index 0000000..889697f
--- /dev/null
+++ b/modules/cdp/statistics.h
@@ -0,0 +1,57 @@
+/*
+ * $Id$
+ *
+ * Copyright (C) 2012 Smile Communications, jason.penton(a)smilecoms.com
+ * Copyright (C) 2012 Smile Communications, richard.good(a)smilecoms.com
+ *
+ * The initial version of this code was written by Dragos Vingarzan
+ * (dragos(dot)vingarzan(at)fokus(dot)fraunhofer(dot)de and the
+ * Fruanhofer Institute. It was and still is maintained in a separate
+ * branch of the original SER. We are therefore migrating it to
+ * Kamailio/SR and look forward to maintaining it from here on out.
+ * 2011/2012 Smile Communications, Pty. Ltd.
+ * ported/maintained/improved by
+ * Jason Penton (jason(dot)penton(at)smilecoms.com and
+ * Richard Good (richard(dot)good(at)smilecoms.com) as part of an
+ * effort to add full IMS support to Kamailio/SR using a new and
+ * improved architecture
+ *
+ * NB: Alot of this code was originally part of OpenIMSCore,
+ * FhG Fokus.
+ * Copyright (C) 2004-2006 FhG Fokus
+ * Thanks for great work! This is an effort to
+ * break apart the various CSCF functions into logically separate
+ * components. We hope this will drive wider use. We also feel
+ * that in this way the architecture is more complete and thereby easier
+ * to manage in the Kamailio/SR environment
+ *
+ * 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
+ *
+ */
+
+#ifndef STATISTICS_H_
+#define STATISTICS_H_
+
+#include "../../lib/kcore/statistics.h"
+
+stat_var* stat_cdp_timeouts;
+stat_var* replies_received;
+stat_var* replies_response_time;
+
+unsigned long get_avg_cdp_response_time();
+
+#endif /* STATISTICS_H_ */
Module: sip-router
Branch: master
Commit: 9a10ed3334804f520ecdab03f1019a19e13e0494
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9a10ed3…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Committer: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Tue Jan 8 00:24:47 2013 +0000
modules_k/registrar: documented new "flow_timer" modparam
---
modules_k/registrar/README | 66 +++++++++++++++++++-------
modules_k/registrar/doc/registrar_admin.xml | 42 +++++++++++++++++
2 files changed, 90 insertions(+), 18 deletions(-)
diff --git a/modules_k/registrar/README b/modules_k/registrar/README
index 5df026e..5d57e8e 100644
--- a/modules_k/registrar/README
+++ b/modules_k/registrar/README
@@ -59,6 +59,7 @@ Bogdan-Andre Iancu
3.22. xavp_rcd (string)
3.23. gruu_enabled (integer)
3.24. outbound_mode (integer)
+ 3.25. flow_timer (integer)
4. Functions
@@ -110,15 +111,16 @@ Bogdan-Andre Iancu
1.21. Set xavp_rcd parameter
1.22. Set gruu_enabled parameter
1.23. Set outbound_mode parameter
- 1.24. save usage
- 1.25. lookup usage
- 1.26. lookup_branches usage
- 1.27. registered usage
- 1.28. add_sock_hdr usage
- 1.29. unregister usage
- 1.30. reg_fetch_contacts usage
- 1.31. reg_free_contacts usage
- 1.32. $ulc(name) usage
+ 1.24. Set flow_timer parameter
+ 1.25. save usage
+ 1.26. lookup usage
+ 1.27. lookup_branches usage
+ 1.28. registered usage
+ 1.29. add_sock_hdr usage
+ 1.30. unregister usage
+ 1.31. reg_fetch_contacts usage
+ 1.32. reg_free_contacts usage
+ 1.33. $ulc(name) usage
Chapter 1. Admin Guide
@@ -160,6 +162,7 @@ Chapter 1. Admin Guide
3.22. xavp_rcd (string)
3.23. gruu_enabled (integer)
3.24. outbound_mode (integer)
+ 3.25. flow_timer (integer)
4. Functions
@@ -274,6 +277,7 @@ Chapter 1. Admin Guide
3.22. xavp_rcd (string)
3.23. gruu_enabled (integer)
3.24. outbound_mode (integer)
+ 3.25. flow_timer (integer)
3.1. default_expires (integer)
@@ -655,6 +659,32 @@ modparam("registrar", "gruu_enabled", 0)
modparam("registrar", "outbound_mode", 2)
...
+3.25. flow_timer (integer)
+
+ If set to 0 then this module will not add a Flow-Timer: header to 200
+ OK responses to REGISTER requests.
+
+ If set to > 0 then this module will add a Flow-Timer: header containing
+ this value to 200 OK responses to REGISTER requests. This parameter may
+ only be set to a value > 0 when outbound_mode is set to 2.
+
+ When set to a value > 0 this parameter should be set to slightly less
+ than the connection timeout value between the UAC and the network (this
+ corresponds to the core tcp_connection_lifetime option and websocket
+ keepalive_timeout modparam). This parameter is most useful when you
+ have a single edge proxy/registrar. If you are using a separate SIP
+ Outbound Edge Proxy you should consider leaving this parameter set to 0
+ and adding the Flow-Timer: header on the Edge Proxy (as this allows you
+ to keep all of the timer values for a specific flow in one
+ configuration - that of the Edge Proxy).
+
+ Default value is 0.
+
+ Example 1.24. Set flow_timer parameter
+...
+modparam("registrar", "flow_timer", 25)
+...
+
4. Functions
4.1. save(domain, [, flags [, uri]])
@@ -703,7 +733,7 @@ modparam("registrar", "outbound_mode", 2)
This function can be used from REQUEST_ROUTE and REPLY_ROUTE.
- Example 1.24. save usage
+ Example 1.25. save usage
...
save("location");
save("location", "0x01");
@@ -736,7 +766,7 @@ save("location", "0x00", "sip:test@kamailio.org");
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
- Example 1.25. lookup usage
+ Example 1.26. lookup usage
...
lookup("location");
switch ($retcode) {
@@ -762,7 +792,7 @@ switch ($retcode) {
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
- Example 1.26. lookup_branches usage
+ Example 1.27. lookup_branches usage
...
lookup_branches("location");
...
@@ -781,7 +811,7 @@ lookup_branches("location");
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
- Example 1.27. registered usage
+ Example 1.28. registered usage
...
if (registered("location")) {
sl_send_reply("100", "Trying");
@@ -801,7 +831,7 @@ if (registered("location")) {
This function can be used from REQUEST_ROUTE.
- Example 1.28. add_sock_hdr usage
+ Example 1.29. add_sock_hdr usage
...
add_sock_hdr("Sock-Info");
...
@@ -819,7 +849,7 @@ add_sock_hdr("Sock-Info");
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
- Example 1.29. unregister usage
+ Example 1.30. unregister usage
...
unregister("location", "$ru");
unregister("location", "sip:user@kamailio.org");
@@ -841,7 +871,7 @@ unregister("location", "sip:user@kamailio.org");
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
- Example 1.30. reg_fetch_contacts usage
+ Example 1.31. reg_fetch_contacts usage
...
reg_fetch_contacts("location", "$ru", "callee");
reg_fetch_contacts("location", "sip:user@kamailio.org", "caller");
@@ -860,7 +890,7 @@ reg_fetch_contacts("location", "sip:user@kamailio.org", "caller");
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
- Example 1.31. reg_free_contacts usage
+ Example 1.32. reg_free_contacts usage
...
reg_free_contacts("callee");
...
@@ -926,7 +956,7 @@ reg_free_contacts("callee");
The pseudo-variable accepts positive index value to access a specific
contact record.
- Example 1.32. $ulc(name) usage
+ Example 1.33. $ulc(name) usage
...
if(reg_fetch_contacts("location", "$fu", "caller"))
{
diff --git a/modules_k/registrar/doc/registrar_admin.xml b/modules_k/registrar/doc/registrar_admin.xml
index f59e8f6..9df5e0d 100644
--- a/modules_k/registrar/doc/registrar_admin.xml
+++ b/modules_k/registrar/doc/registrar_admin.xml
@@ -765,6 +765,48 @@ modparam("registrar", "outbound_mode", 2)
</example>
</section>
+ <section>
+ <title><varname>flow_timer</varname> (integer)</title>
+ <para>
+ If set to 0 then this module will not add a Flow-Timer: header
+ to 200 OK responses to REGISTER requests.
+ </para>
+ <para>
+ If set to > 0 then this module will add a Flow-Timer: header
+ containing this value to 200 OK responses to REGISTER requests.
+ This parameter may only be set to a value > 0 when
+ <emphasis>outbound_mode</emphasis> is set to 2.
+ </para>
+ <para>
+ When set to a value > 0 this parameter should be set to slightly
+ less than the connection timeout value between the UAC and the
+ network (this corresponds to the core
+ <emphasis>tcp_connection_lifetime</emphasis> option and
+ <emphasis>websocket</emphasis>
+ <emphasis>keepalive_timeout</emphasis> modparam). This parameter
+ is most useful when you have a single edge proxy/registrar. If
+ you are using a separate SIP Outbound Edge Proxy you should
+ consider leaving this parameter set to 0 and adding the
+ Flow-Timer: header on the Edge Proxy (as this allows you to
+ keep all of the timer values for a specific flow in one
+ configuration - that of the Edge Proxy).
+ </para>
+ <para>
+ <emphasis>
+ Default value is 0.
+ </emphasis>
+ </para>
+ <example>
+ <title>Set <varname>flow_timer</varname> parameter</title>
+ <programlisting format="linespecific">
+...
+modparam("registrar", "flow_timer", 25)
+...
+ </programlisting>
+ </example>
+ </section>
+
+
</section>