Module: sip-router
Branch: master
Commit: 73ad320cc6ddc2df267cc05b3856eed1698c0e3b
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=73ad320…
Author: Richard Good <richard.good(a)smilecoms.com>
Committer: Richard Good <richard.good(a)smilecoms.com>
Date: Fri Jan 31 09:36:57 2014 +0200
modules/ims_usrloc_scscf: New features to fully support subscription to reg_event
Main change add API to presence module library to store the callid/totag/fromtag presentity combination
Also only remove IMPU from usrloc if there are no subscriptions to it
---
modules/ims_usrloc_scscf/impurecord.c | 46 +++++++++------
modules/ims_usrloc_scscf/impurecord.h | 2 +-
modules/ims_usrloc_scscf/subscribe.c | 103 +++++++++++++++++++++++++++++++--
modules/ims_usrloc_scscf/subscribe.h | 9 +++-
modules/ims_usrloc_scscf/udomain.c | 20 +++++--
modules/ims_usrloc_scscf/ul_mod.c | 65 ++++++++++++++++++++-
modules/ims_usrloc_scscf/ul_mod.h | 11 ++++
modules/ims_usrloc_scscf/usrloc.c | 2 +
modules/ims_usrloc_scscf/usrloc.h | 10 +++-
9 files changed, 233 insertions(+), 35 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=73a…
Module: sip-router
Branch: master
Commit: 52c05835058a0813df1bf2291669bfe539f52a71
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=52c0583…
Author: Luis Martin Gil <martingil.luis(a)gmail.com>
Committer: Luis Martin Gil <martingil.luis(a)gmail.com>
Date: Fri Jan 31 02:46:17 2014 +0000
pkg/centos: added snmpstats MIB files to spec file
- Some files were missing from the snmpstats module
when packing into rpm. Adding them to the rpm spec file
---
pkg/kamailio/centos/6/kamailio.spec | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/pkg/kamailio/centos/6/kamailio.spec b/pkg/kamailio/centos/6/kamailio.spec
index 8cdd254..a4470ee 100644
--- a/pkg/kamailio/centos/6/kamailio.spec
+++ b/pkg/kamailio/centos/6/kamailio.spec
@@ -1047,6 +1047,11 @@ fi
%defattr(-,root,root)
%{_docdir}/kamailio/modules/README.snmpstats
%{_libdir}/kamailio/modules/snmpstats.so
+%{_datadir}/snmp/mibs/KAMAILIO-MIB
+%{_datadir}/snmp/mibs/KAMAILIO-REG-MIB
+%{_datadir}/snmp/mibs/KAMAILIO-SIP-COMMON-MIB
+%{_datadir}/snmp/mibs/KAMAILIO-SIP-SERVER-MIB
+%{_datadir}/snmp/mibs/KAMAILIO-TC
%files sqlite
Module: sip-router
Branch: master
Commit: 40ea6ffd76cf32aafc594038d17555edbc816b50
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=40ea6ff…
Author: Hugh Waite <hugh.waite(a)crocodile-rcs.com>
Committer: Hugh Waite <hugh.waite(a)crocodile-rcs.com>
Date: Thu Jan 30 21:58:43 2014 +0000
mqueue: Add new psuedo-variable to return mqueue size
- Using PV will return a value when the length is zero
---
modules/mqueue/README | 78 +++++++++++++++++++++--------------
modules/mqueue/doc/mqueue_admin.xml | 30 +++++++++++---
modules/mqueue/mqueue_api.c | 25 +++++++++++
modules/mqueue/mqueue_api.h | 2 +
modules/mqueue/mqueue_mod.c | 2 +
5 files changed, 100 insertions(+), 37 deletions(-)
diff --git a/modules/mqueue/README b/modules/mqueue/README
index 8d41f8a..b58607c 100644
--- a/modules/mqueue/README
+++ b/modules/mqueue/README
@@ -1,3 +1,4 @@
+
mqueue Module
Elena-Ramona Modroiu
@@ -18,7 +19,7 @@ Alex Balashov
<abalashov(a)evaristesys.com>
Copyright � 2010 Elena-Ramona Modroiu (asipto.com)
- __________________________________________________________________
+ _________________________________________________________________
Table of Contents
@@ -36,10 +37,12 @@ Alex Balashov
4. Functions
- 4.1. mq_add(queue, key, value)
- 4.2. mq_fetch(queue)
- 4.3. mq_pv_free(queue)
- 4.4. mq_size(queue)
+ 4.1. mq_add(queue, key, value)
+ 4.2. mq_fetch(queue)
+ 4.3. mq_pv_free(queue)
+ 4.4. mq_size(queue)
+
+ 5. Exported Pseudo-variables
List of Examples
@@ -65,20 +68,22 @@ Chapter 1. Admin Guide
4. Functions
- 4.1. mq_add(queue, key, value)
- 4.2. mq_fetch(queue)
- 4.3. mq_pv_free(queue)
- 4.4. mq_size(queue)
+ 4.1. mq_add(queue, key, value)
+ 4.2. mq_fetch(queue)
+ 4.3. mq_pv_free(queue)
+ 4.4. mq_size(queue)
+
+ 5. Exported Pseudo-variables
1. Overview
- The mqueue module offers a generic message queue system in shared
- memory for inter-process communication using the config file. One
- example of usage is to send time consuming operations to one or several
- timer processes that consumes items in the queue, without affecting SIP
- message handling in the socket-listening process.
+ The mqueue module offers a generic message queue system in shared
+ memory for inter-process communication using the config file. One
+ example of usage is to send time consuming operations to one or
+ several timer processes that consumes items in the queue, without
+ affecting SIP message handling in the socket-listening process.
- There can be many defined queues. Access to queued values is done via
+ There can be many defined queues. Access to queued values is done via
pseudo variables.
2. Dependencies
@@ -93,7 +98,7 @@ Chapter 1. Admin Guide
2.2. External Libraries or Applications
- The following libraries or applications must be installed before
+ The following libraries or applications must be installed before
running Kamailio with this module loaded:
* None.
@@ -105,15 +110,15 @@ Chapter 1. Admin Guide
Definition of a memory queue
- Default value is "none".
+ Default value is "none".
- Value must be a list of parameters: attr=value;... The attribute 'name'
- is mandatory, defining the name of the queue. Optional attribute 'size'
- specifies the maximum number of items in queue, if it is execeeded the
- oldest one is removed.
+ Value must be a list of parameters: attr=value;... The attribute
+ 'name' is mandatory, defining the name of the queue. Optional
+ attribute 'size' specifies the maximum number of items in queue, if it
+ is execeeded the oldest one is removed.
- The parameter can be set many times, each holding the definition of one
- queue.
+ The parameter can be set many times, each holding the definition of
+ one queue.
Example 1.1. Set mqueue parameter
...
@@ -123,14 +128,14 @@ modparam("mqueue", "mqueue", "name=qaz")
4. Functions
- 4.1. mq_add(queue, key, value)
- 4.2. mq_fetch(queue)
- 4.3. mq_pv_free(queue)
- 4.4. mq_size(queue)
+ 4.1. mq_add(queue, key, value)
+ 4.2. mq_fetch(queue)
+ 4.3. mq_pv_free(queue)
+ 4.4. mq_size(queue)
4.1. mq_add(queue, key, value)
- Add a new item (key, value) in the queue. If max size of queue is
+ Add a new item (key, value) in the queue. If max size of queue is
exceeded, the oldest one is removed.
Example 1.2. mq_add usage
@@ -140,10 +145,10 @@ mq_add("myq", "$rU", "call from $fU");
4.2. mq_fetch(queue)
- Take oldest item from queue and fill $mqk(queue) and $mqv(queue) pseudo
- variables.
+ Take oldest item from queue and fill $mqk(queue) and $mqv(queue)
+ pseudo variables.
- Return: true on success (1); false on failure (-1) or no item fetched
+ Return: true on success (1); false on failure (-1) or no item fetched
(-2).
Example 1.3. mq_fetch usage
@@ -173,3 +178,14 @@ mq_pv_free("myq");
$var(q_size) = mq_size("queue");
xlog("L_INFO", "Size of queue is: $var(q_size)\n");
...
+
+5. Exported Pseudo-variables
+
+ * $mqv(mqueue) - the most recent item key fetched from the specified
+ mqueue
+ * $mqv(mqueue) - the most recent item value fetched from the
+ specified mqueue
+ * $mq_size(mqueue) - the size of the specified mqueue
+
+ Exported pseudo-variables are documented at
+ http://www.kamailio.org/wiki/.
diff --git a/modules/mqueue/doc/mqueue_admin.xml b/modules/mqueue/doc/mqueue_admin.xml
index a444cc4..1aee029 100644
--- a/modules/mqueue/doc/mqueue_admin.xml
+++ b/modules/mqueue/doc/mqueue_admin.xml
@@ -61,7 +61,7 @@
<section>
<title>Parameters</title>
- <section>
+ <section id="mqueue.p.mqueue">
<title><varname>mqueue</varname> (string)</title>
<para>
Definition of a memory queue
@@ -96,7 +96,7 @@ modparam("mqueue", "mqueue", "name=qaz")
<section>
<title>Functions</title>
- <section>
+ <section id="mqueue.f.mq_add">
<title>
<function moreinfo="none">mq_add(queue, key, value)</function>
</title>
@@ -114,7 +114,7 @@ mq_add("myq", "$rU", "call from $fU");
</example>
</section>
- <section>
+ <section id="mqueue.f.mq_fetch">
<title>
<function moreinfo="none">mq_fetch(queue)</function>
</title>
@@ -139,7 +139,7 @@ while(mq_fetch("myq"))
</example>
</section>
- <section>
+ <section id="mqueue.f.mq_pv_free">
<title>
<function moreinfo="none">mq_pv_free(queue)</function>
</title>
@@ -157,7 +157,7 @@ mq_pv_free("myq");
</example>
</section>
- <section>
+ <section id="mqueue.f.mq_size">
<title>
<function moreinfo="none">mq_size(queue)</function>
</title>
@@ -176,6 +176,24 @@ xlog("L_INFO", "Size of queue is: $var(q_size)\n");
</section>
</section>
-
+
+ <section>
+ <title>Exported Pseudo-variables</title>
+ <itemizedlist>
+ <listitem>
+ <emphasis>$mqv(mqueue)</emphasis> - the most recent item key fetched from the specified mqueue
+ </listitem>
+ <listitem>
+ <emphasis>$mqv(mqueue)</emphasis> - the most recent item value fetched from the specified mqueue
+ </listitem>
+ <listitem>
+ <emphasis>$mq_size(mqueue)</emphasis> - the size of the specified mqueue
+ </listitem>
+ </itemizedlist>
+ <para>
+ Exported pseudo-variables are documented at &kamwikilink;.
+ </para>
+ </section>
+
</chapter>
diff --git a/modules/mqueue/mqueue_api.c b/modules/mqueue/mqueue_api.c
index 4a36909..e060991 100644
--- a/modules/mqueue/mqueue_api.c
+++ b/modules/mqueue/mqueue_api.c
@@ -456,6 +456,31 @@ int pv_get_mqv(struct sip_msg *msg, pv_param_t *param,
return pv_get_strval(msg, param, res, &mp->item->val);
}
+/**
+ *
+ */
+int pv_get_mq_size(struct sip_msg *msg, pv_param_t *param,
+ pv_value_t *res)
+{
+ int mqs = -1;
+ str *in = pv_get_mq_name(msg, ¶m->pvn.u.isname.name.s);
+
+ if (in == NULL)
+ {
+ LM_ERR("failed to get mq name\n");
+ return -1;
+ }
+
+ mqs = _mq_get_csize(in);
+
+ if (mqs < 0)
+ {
+ LM_ERR("mqueue not found: %.*s\n", in->len, in->s);
+ return -1;
+ }
+
+ return pv_get_sintval(msg, param, res, mqs);
+}
/* Return head->csize for a given queue */
int _mq_get_csize(str *name)
diff --git a/modules/mqueue/mqueue_api.h b/modules/mqueue/mqueue_api.h
index cb695f1..1c69c69 100644
--- a/modules/mqueue/mqueue_api.h
+++ b/modules/mqueue/mqueue_api.h
@@ -33,6 +33,8 @@ int pv_get_mqk(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
int pv_get_mqv(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res);
+int pv_get_mq_size(struct sip_msg *msg, pv_param_t *param,
+ pv_value_t *res);
int mq_head_defined(void);
void mq_destroy(void);
diff --git a/modules/mqueue/mqueue_mod.c b/modules/mqueue/mqueue_mod.c
index 3eacf02..2115630 100644
--- a/modules/mqueue/mqueue_mod.c
+++ b/modules/mqueue/mqueue_mod.c
@@ -59,6 +59,8 @@ static pv_export_t mod_pvs[] = {
pv_parse_mq_name, 0, 0, 0 },
{ {"mqv", sizeof("mqv")-1}, PVT_OTHER, pv_get_mqv, 0,
pv_parse_mq_name, 0, 0, 0 },
+ { {"mq_size", sizeof("mq_size")-1}, PVT_OTHER, pv_get_mq_size, 0,
+ pv_parse_mq_name, 0, 0, 0 },
{ {0, 0}, 0, 0, 0, 0, 0, 0, 0 }
};
Hello,
the current server hosting the apt repositories for debian and ubuntu is
scheduled for replacement. It hasn't been updated with new packages in a
while.
Courtesy of Sipwise, a new build system is under development and should
be available in the near future.
Meanwhile, we plan to clone the existing packages to another server and
have them available till the new system is up and running.
As all these involve operations requiring DNS change and file transfer,
the repositories might be unavailable from time to time.
Many thanks to Jon Bonilla that took care of building the deb packages
so far and Inaki Baz Castillo for hosting the afferent repositories.
Note also that all Kamailio packages for latest version are also
available via the official repositories from Debian unstable (sid) -
thanks to Victor Seva for the work on it. Perhaps testing will get them
soon and with the next stable version, should be no longer needed to use
our repositories by users of Debian. We plan to keep ours as well.
Cheers,
Daniel
--
Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda