Module: sip-router
Branch: master
Commit: 7665c7947f839ade0e9decbad0c2db41ea29f924
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=7665c79…
Author: pd <peter.dunkley(a)crocodile-rcs.com>
Committer: pd <peter.dunkley(a)crocodile-rcs.com>
Date: Wed Oct 19 12:52:21 2011 +0100
modules_k/rls: added DB only mode to rls
- By using DB only mode RLS can be distributed across many Kamailio
servers for scaling and resilience.
- This change has been in use internally at Crocodile RCS for some time,
but it is extensive.
- The DB only mode changes have been made in a way that changes the pre-
existing (hash-table based) mode of operation as little as possible.
This original mode of operation SHOULD be unaffected by this change.
- This enhancement was made by Paul Pankhurst at Crocodile RCS.
- Also contains a small bug-fix to RLS indices by Hugh Waite.
- I have also exported the RLS API for use in app_lua
---
modules_k/rls/README | 373 +++++++-----
modules_k/rls/api.h | 28 +
modules_k/rls/doc/rls_admin.xml | 70 +++
modules_k/rls/notify.c | 85 ++-
modules_k/rls/resource_notify.c | 46 ++-
modules_k/rls/rls.c | 216 ++++++-
modules_k/rls/rls.h | 20 +-
modules_k/rls/rls_db.c | 1220 +++++++++++++++++++++++++++++++++++++++
modules_k/rls/subscribe.c | 179 ++++--
9 files changed, 1958 insertions(+), 279 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=766…
Module: sip-router
Branch: master
Commit: 659fe4b6aef276f6925e1ba08b6e61ca40e838d3
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=659fe4b…
Author: pd <peter.dunkley(a)crocodile-rcs.com>
Committer: pd <peter.dunkley(a)crocodile-rcs.com>
Date: Wed Oct 19 11:58:43 2011 +0100
lib/srdb1: added the ability to use bitwise-and in DB queries
- This is used in the changes to add db only mode to pua
- This enhancement was made by Paul Pankhurst at Crocodile RCS
---
lib/srdb1/db_op.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/lib/srdb1/db_op.h b/lib/srdb1/db_op.h
index 10ee44a..b2d04dd 100644
--- a/lib/srdb1/db_op.h
+++ b/lib/srdb1/db_op.h
@@ -42,6 +42,8 @@
#define OP_GEQ ">="
/** operator negation */
#define OP_NEQ "!="
+/** bitise AND */
+#define OP_BITWISE_AND "&"
/**
Module: sip-router
Branch: master
Commit: 90e9d7fc8fb339194c6be6eec2b1ec793e32af78
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=90e9d7f…
Author: pd <peter.dunkley(a)crocodile-rcs.com>
Committer: pd <peter.dunkley(a)crocodile-rcs.com>
Date: Wed Oct 19 12:45:28 2011 +0100
modules_k/pua: added DB only mode to PUA
- By using DB only mode PUA (and modules that use PUA like RLS) can be
distributed across many Kamailio servers for scaling and resilience.
- This change has been in use internally at Crocodile RCS for some time,
but it is extensive.
- The DB only mode changes have been made in a way that changes the pre-
existing (hash-table based) mode of operation as little as possible.
This original mode of operation SHOULD be unaffected by this change.
- This enhancement was made by Paul Pankhurst at Crocodile RCS.
---
modules_k/pua/README | 218 +++---
modules_k/pua/doc/pua_admin.xml | 32 +-
modules_k/pua/hash.c | 73 ++-
modules_k/pua/hash.h | 8 +-
modules_k/pua/pua.c | 71 ++-
modules_k/pua/pua.h | 8 +
modules_k/pua/pua_db.c | 1657 +++++++++++++++++++++++++++++++++++++++
modules_k/pua/pua_db.h | 64 ++
modules_k/pua/send_publish.c | 149 +++-
modules_k/pua/send_subscribe.c | 181 ++++-
10 files changed, 2262 insertions(+), 199 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=90e…
Module: sip-router
Branch: master
Commit: 8f00ae7a9b4e2d19bc49f62b0ab3507c283f74f4
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=8f00ae7…
Author: pd <peter.dunkley(a)crocodile-rcs.com>
Committer: pd <peter.dunkley(a)crocodile-rcs.com>
Date: Wed Oct 19 11:56:15 2011 +0100
modules/textopsx, modules_k/alias_db, modules_k/pua_usrloc: added missing api.h files from previous commits
---
modules/textopsx/api.h | 48 ++++++++++++++++++++++++++++++++++++++++++++
modules_k/alias_db/api.h | 26 +++++++++++++++++++++++
modules_k/pua_usrloc/api.h | 26 +++++++++++++++++++++++
3 files changed, 100 insertions(+), 0 deletions(-)
diff --git a/modules/textopsx/api.h b/modules/textopsx/api.h
new file mode 100644
index 0000000..d88abfa
--- /dev/null
+++ b/modules/textopsx/api.h
@@ -0,0 +1,48 @@
+/*
+ * 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 TEXTOPSX_API_H_
+#define TEXTOPSX_API_H_
+#include "../../str.h"
+#include "../../sr_module.h"
+
+
+/*
+ * Struct with the textopsx api.
+ */
+typedef struct textopsx_binds {
+ cmd_function msg_apply_changes;
+} textopsx_api_t;
+
+typedef int (*bind_textopsx_f)(textopsx_api_t*);
+
+/*
+ * Function to be called direclty from other modules to load
+ * the textops API.
+ */
+inline static int load_textopsx_api(textopsx_api_t *tob){
+ bind_textopsx_f bind_textopsx_exports;
+ if(!(bind_textopsx_exports=(bind_textopsx_f)find_export("bind_textopsx", 1, 0))){
+ LM_ERR("Failed to import bind_textopsx\n");
+ return -1;
+ }
+ return bind_textopsx_exports(tob);
+}
+
+#endif /*TEXTX_OPS_API_H_*/
diff --git a/modules_k/alias_db/api.h b/modules_k/alias_db/api.h
new file mode 100644
index 0000000..b5c81b6
--- /dev/null
+++ b/modules_k/alias_db/api.h
@@ -0,0 +1,26 @@
+#ifndef ALIASDB_API_H
+#define ALIASDB_API_H
+#include "../../str.h"
+
+typedef int (*alias_db_lookup_t)(struct sip_msg*, str table);
+
+typedef struct alias_db_binds {
+ alias_db_lookup_t alias_db_lookup;
+} alias_db_api_t;
+
+typedef int (*bind_alias_db_f)(alias_db_api_t*);
+
+int bind_alias_db(struct alias_db_binds*);
+
+inline static int alias_db_load_api(alias_db_api_t *pxb)
+{
+ bind_alias_db_f bind_alias_db_exports;
+ if (!(bind_alias_db_exports = (bind_alias_db_f)find_export("bind_alias_db", 1, 0)))
+ {
+ LM_ERR("Failed to import bind_alias_db\n");
+ return -1;
+ }
+ return bind_alias_db_exports(pxb);
+}
+
+#endif /*ALIASDB_API_H*/
diff --git a/modules_k/pua_usrloc/api.h b/modules_k/pua_usrloc/api.h
new file mode 100644
index 0000000..b341d55
--- /dev/null
+++ b/modules_k/pua_usrloc/api.h
@@ -0,0 +1,26 @@
+#ifndef PUAUSRLOC_API_H
+#define PUAUSRLOC_API_H
+#include "../../str.h"
+
+typedef int (*pua_set_publish_t)(struct sip_msg*, char *, char *);
+
+typedef struct pua_usrloc_binds {
+ pua_set_publish_t pua_set_publish;
+} pua_usrloc_api_t;
+
+typedef int (*bind_pua_usrloc_f)(pua_usrloc_api_t*);
+
+int bind_pua_usrloc(struct pua_usrloc_binds*);
+
+inline static int pua_usrloc_load_api(pua_usrloc_api_t *pxb)
+{
+ bind_pua_usrloc_f bind_pua_usrloc_exports;
+ if (!(bind_pua_usrloc_exports = (bind_pua_usrloc_f)find_export("bind_pua_usrloc", 1, 0)))
+ {
+ LM_ERR("Failed to import bind_pua_usrloc\n");
+ return -1;
+ }
+ return bind_pua_usrloc_exports(pxb);
+}
+
+#endif /*PUAUSRLOC_API_H*/