andrei
you wrote in july regarding async (delayed reply) support for t_uac_dlg:
Ok, I'll add async support (in fact delayed reply support since it's not
true async), at least to xmlrpc (turns out that it's quite easy since
xmlrpc reuses sr tcp). For ctl/binrpc it would be easy for datagram
sockets (udp or unix datagram socket) and more difficult (but possible)
for stream sockets (tcp or unix stream).
However it might take a while until there will be a workable version.
any idea, if this will be available in first release of sip-router? if
yes, i could plan to start using sip-router. if not, i need to plan for
something else.
-- juha
Module: sip-router
Branch: master
Commit: 6dac6b618015314811b94127490e906d535f44fd
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6dac6b6…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Thu Aug 20 16:12:35 2009 +0300
pv: new pv class $sel(name)
- access select (ser cfg variables) values via PV framework
- read-only PV
- examples: $sel(@ruri), $sel((a)via[2].host)
---
modules_k/pv/pv.c | 4 +++
modules_k/pv/pv_select.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++
modules_k/pv/pv_select.h | 36 ++++++++++++++++++++++++
3 files changed, 107 insertions(+), 0 deletions(-)
diff --git a/modules_k/pv/pv.c b/modules_k/pv/pv.c
index f990a55..b284bbd 100644
--- a/modules_k/pv/pv.c
+++ b/modules_k/pv/pv.c
@@ -35,6 +35,7 @@
#include "pv_shv.h"
#include "pv_time.h"
#include "pv_trans.h"
+#include "pv_select.h"
MODULE_VERSION
@@ -64,6 +65,9 @@ static pv_export_t mod_pvs[] = {
{ {"stat", sizeof("stat")-1}, /* statistics */
PVT_OTHER, pv_get_stat, 0,
pv_parse_stat_name, 0, 0, 0 },
+ { {"sel", sizeof("sel")-1}, /* select */
+ PVT_OTHER, pv_get_select, 0,
+ pv_parse_select_name, 0, 0, 0 },
{{"avp", (sizeof("avp")-1)}, PVT_AVP, pv_get_avp, pv_set_avp,
pv_parse_avp_name, pv_parse_index, 0, 0},
diff --git a/modules_k/pv/pv_select.c b/modules_k/pv/pv_select.c
new file mode 100644
index 0000000..8634052
--- /dev/null
+++ b/modules_k/pv/pv_select.c
@@ -0,0 +1,67 @@
+/*
+ * $Id$
+ *
+ * Copyright (C) 2001-2003 FhG Fokus
+ *
+ * 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
+ */
+
+/*!
+ * \file
+ * \brief Implementation for Select Pseudo-variables
+ */
+
+#include "../../select.h"
+#include "pv_select.h"
+
+int pv_parse_select_name(pv_spec_p sp, str *in)
+{
+ select_t *sel = 0;
+ char c;
+ char *p;
+ if (in == NULL || in->s == NULL || sp == NULL)
+ return -1;
+
+ c = in->s[in->len];
+ in->s[in->len] = '\0';
+ p = in->s;
+ if(parse_select(&p, &sel)<0)
+ {
+ LM_ERR("invalid select name [%.*s]\n",
+ in->len, in->s);
+ in->s[in->len] = c;
+ return -1;
+ }
+ in->s[in->len] = c;
+ sp->pvp.pvn.u.dname = (void*)sel;
+ sp->pvp.pvn.type = PV_NAME_OTHER;
+ return 0;
+}
+
+
+int pv_get_select(struct sip_msg *msg, pv_param_t *param, pv_value_t *res)
+{
+ str s = {0, 0};
+ select_t *sel = 0;
+
+ sel = (select_t*)param->pvn.u.dname;
+
+ if(sel==0 || run_select(&s, sel, msg)<0 || s.s==0)
+ return pv_get_null(msg, param, res);
+ return pv_get_strval(msg, param, res, &s);
+}
+
diff --git a/modules_k/pv/pv_select.h b/modules_k/pv/pv_select.h
new file mode 100644
index 0000000..84c872f
--- /dev/null
+++ b/modules_k/pv/pv_select.h
@@ -0,0 +1,36 @@
+/*
+ * $Id$
+ *
+ * Copyright (C) 2001-2003 FhG Fokus
+ *
+ * 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
+ */
+
+/*!
+ * \file
+ * \brief Headers for Stats Pseudo-variables
+ */
+
+#ifndef _PV_SELECT_H_
+#define _PV_SELECT_H_
+
+#include "../../pvar.h"
+
+int pv_parse_select_name(pv_spec_p sp, str *in);
+int pv_get_select(struct sip_msg *msg, pv_param_t *param, pv_value_t *res);
+
+#endif
Module: sip-router
Branch: master
Commit: 5ec9f271fad97a4abbf151e55eaf509c3d9f5722
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=5ec9f27…
Author: Henning Westerholt <henning.westerholt(a)1und1.de>
Committer: Henning Westerholt <henning.westerholt(a)1und1.de>
Date: Wed Aug 19 16:40:04 2009 +0200
cr: documentation extension related to the prime route behaviour (port r5898)
---
modules/carrierroute/README | 12 ++++++++++--
modules/carrierroute/doc/carrierroute_admin.xml | 12 +++++++++++-
2 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/modules/carrierroute/README b/modules/carrierroute/README
index eba27e5..7192926 100644
--- a/modules/carrierroute/README
+++ b/modules/carrierroute/README
@@ -511,8 +511,16 @@ rewrite_user, hash_source, descavp)
the destination or the number of channels. This function is
only usable with rewrite_user and prefix_matching containing a
valid string. This string needs to be numerical if the
- match_mode parameter is set to 10. It uses the prime hash
- algorithm to calculate the hash values.
+ match_mode parameter is set to 10.
+
+ It uses the prime hash algorithm to calculate the hash values.
+ This means that the fuction behaves different then the normal
+ routing function. If you don't know what this prime
+ functionality is, you should just use the cr_route function.
+ The prime routing algorithm not use the configured
+ probabilities in order to route requests, it just uses a fixed
+ hash distribution. If one of the hash targets is not available,
+ and no backup rule is configured, the function will return -1.
Meaning of the parameters is as follows:
* carrier - The routing tree to be used. Additional to a
diff --git a/modules/carrierroute/doc/carrierroute_admin.xml b/modules/carrierroute/doc/carrierroute_admin.xml
index d6b927f..7814d83 100644
--- a/modules/carrierroute/doc/carrierroute_admin.xml
+++ b/modules/carrierroute/doc/carrierroute_admin.xml
@@ -507,7 +507,17 @@ cr_tree_rewrite_uri(tree, domain)
number of channels.
This function is only usable with rewrite_user and prefix_matching
containing a valid string. This string needs to be numerical if the match_mode
- parameter is set to 10. It uses the prime hash algorithm to calculate the hash values.
+ parameter is set to 10.
+ </para>
+ <para>
+ It uses the prime hash algorithm to calculate the hash values. This
+ means that the fuction behaves different then the normal routing
+ function. If you don't know what this prime functionality is,
+ you should just use the <emphasis>cr_route</emphasis> function. The
+ prime routing algorithm not use the configured probabilities in
+ order to route requests, it just uses a fixed hash distribution. If
+ one of the hash targets is not available, and no backup rule is
+ configured, the function will return -1.
</para>
<para>Meaning of the parameters is as follows:</para>
<itemizedlist>