Module: kamailio
Branch: master
Commit: ab1d3a3302760713722b2fd3ef41615c53b597dc
URL: https://github.com/kamailio/kamailio/commit/ab1d3a3302760713722b2fd3ef41615…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2017-07-26T09:31:32+02:00
modules: readme files regenerated - dialplan ... [skip ci]
---
Modified: src/modules/dialplan/README
---
Diff: https://github.com/kamailio/kamailio/commit/ab1d3a3302760713722b2fd3ef41615…
Patch: https://github.com/kamailio/kamailio/commit/ab1d3a3302760713722b2fd3ef41615…
---
diff --git a/src/modules/dialplan/README b/src/modules/dialplan/README
index f073564db1..cde96e214d 100644
--- a/src/modules/dialplan/README
+++ b/src/modules/dialplan/README
@@ -54,6 +54,7 @@ Luis Martin
5.11. attrs_pvar (string)
5.12. fetch_rows (int)
5.13. match_dynamic (int)
+ 5.14. append_branch (int)
6. Functions
@@ -87,11 +88,12 @@ Luis Martin
1.11. Set attrs_pvar parameter
1.12. Set fetch_rows parameter
1.13. Set match_dynamic parameter
- 1.14. dp_replace usage
- 1.15. dp_match usage
- 1.16. dp_translate usage
+ 1.14. Set append_branch parameter
+ 1.15. dp_replace usage
+ 1.16. dp_match usage
1.17. dp_translate usage
- 1.18. Example of rules
+ 1.18. dp_translate usage
+ 1.19. Example of rules
Chapter 1. Admin Guide
@@ -120,6 +122,7 @@ Chapter 1. Admin Guide
5.11. attrs_pvar (string)
5.12. fetch_rows (int)
5.13. match_dynamic (int)
+ 5.14. append_branch (int)
6. Functions
@@ -219,6 +222,7 @@ Chapter 1. Admin Guide
5.11. attrs_pvar (string)
5.12. fetch_rows (int)
5.13. match_dynamic (int)
+ 5.14. append_branch (int)
5.1. db_url (string)
@@ -375,6 +379,20 @@ modparam("dialplan", "fetch_rows", 4000)
modparam("dialplan", "match_dynamic", 1)
...
+5.14. append_branch (int)
+
+ If set to 1, the module appends a new outgoing branch when request URI
+ (r-uri) or its user part are changed by dp_translate() or dp_replace()
+ inside a failure_route block. Set it to 0 if the branch should not be
+ added.
+
+ Default value is “1”.
+
+ Example 1.14. Set append_branch parameter
+...
+modparam("dialplan", "append_branch", 0)
+...
+
6. Functions
6.1. dp_replace(dpid, inval, outvar)
@@ -405,7 +423,7 @@ modparam("dialplan", "match_dynamic", 1)
This function can be used from ANY_ROUTE.
- Example 1.14. dp_replace usage
+ Example 1.15. dp_replace usage
...
dp_replace("240", "$rU", "$var(newru)");
xlog("'$rU' was translated to '$var(newru)'\n");
@@ -432,7 +450,7 @@ dp_replace("240", "+49$rU", "$var(newval)");
This function can be used from ANY_ROUTE.
- Example 1.15. dp_match usage
+ Example 1.16. dp_match usage
...
dp_match("240", "+49$rU");
xlog("the attributes associated with '+49$rU' are '$var(attrs)'\n");
@@ -473,13 +491,13 @@ xlog("the attributes associated with '+49$rU' are '$var(attrs)'\n");
This function can be used from ANY_ROUTE.
- Example 1.16. dp_translate usage
+ Example 1.17. dp_translate usage
...
dp_translate("240", "$ruri.user/$avp(s:dest)");
xlog("translated to var $avp(s:dest) \n");
...
- Example 1.17. dp_translate usage
+ Example 1.18. dp_translate usage
...
$avp(s:src) = $ruri.user;
dp_translate("$var(x)", "$avp(s:src)/$var(y)");
@@ -549,7 +567,7 @@ xlog("translated to var $var(y) \n");
Some sample records from a dialplan table are presented in the next
figure.
- Example 1.18. Example of rules
+ Example 1.19. Example of rules
...
dpid: 1
pr: 1
Module: kamailio
Branch: master
Commit: 2cae9f8a301befb0a00f1831c9d5773924e35c10
URL: https://github.com/kamailio/kamailio/commit/2cae9f8a301befb0a00f1831c9d5773…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-07-25T19:41:05+02:00
dialplan: added documentation for dp_match() and dp_translate()
---
Modified: src/modules/dialplan/doc/dialplan_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/2cae9f8a301befb0a00f1831c9d5773…
Patch: https://github.com/kamailio/kamailio/commit/2cae9f8a301befb0a00f1831c9d5773…
---
diff --git a/src/modules/dialplan/doc/dialplan_admin.xml b/src/modules/dialplan/doc/dialplan_admin.xml
index 8153974401..073c2b24ed 100644
--- a/src/modules/dialplan/doc/dialplan_admin.xml
+++ b/src/modules/dialplan/doc/dialplan_admin.xml
@@ -394,6 +394,103 @@ modparam("dialplan", "match_dynamic", 1)
<section>
<title>Functions</title>
+ <section id="dialplan.p.dp_replace">
+ <title>
+ <function moreinfo="none">dp_replace(dpid, inval, outvar)</function>
+ </title>
+ <para>
+ The function translates the input value 'inval' using the rules with dialplan
+ id 'dpid', storing the value in the variable 'outvar'. If the rule that was
+ applied has attributes, they are stored in the variable provided via the
+ module parameter 'attrs_pvar'.
+ </para>
+ <para>
+ The behavior is same as dp_translate("dpid", "inval/outvar"), but the
+ parameters have a more flexible format.
+ </para>
+ <para>Meaning of the parameters is as follows:</para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <emphasis>dpid</emphasis> - the dialplan id to match the rules and apply
+ the transformations. It can be a static string or a config variable
+ holding an integer value.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>inval</emphasis> - input value. It can be a static or a
+ dynamic string. The dynamic string can contain config variables,
+ combined or not with static strings, that are evaluated at runtime.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>outvar</emphasis> - output variable name. The value resulted
+ after applying the matching rule is stored in this variable. The name
+ must refer to a writable variable.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ This function can be used from ANY_ROUTE.
+ </para>
+ <example>
+ <title><function>dp_replace</function> usage</title>
+ <programlisting format="linespecific">
+...
+dp_replace("240", "$rU", "$var(newru)");
+xlog("'$rU' was translated to '$var(newru)'\n");
+dp_replace("240", "+49$rU", "$var(newval)");
+...
+ </programlisting>
+ </example>
+ </section>
+
+ <section id="dialplan.p.dp_match">
+ <title>
+ <function moreinfo="none">dp_match(dpid, inval)</function>
+ </title>
+ <para>
+ The function matches the input value 'inval' using the rules with dialplan
+ id 'dpid'. If the rule that was applied has attributes, they are stored in
+ the variable provided via the module parameter 'attrs_pvar'.
+ </para>
+ <para>
+ The behavior is same as dp_translate("dpid", "inval"), but the
+ parameters have a more flexible format.
+ </para>
+ <para>Meaning of the parameters is as follows:</para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <emphasis>dpid</emphasis> - the dialplan id to match the rules and apply
+ the transformations. It can be a static string or a config variable
+ holding an integer value.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>inval</emphasis> - input value. It can be a static or a
+ dynamic string. The dynamic string can contain config variables,
+ combined or not with static strings, that are evaluated at runtime.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ This function can be used from ANY_ROUTE.
+ </para>
+ <example>
+ <title><function>dp_match</function> usage</title>
+ <programlisting format="linespecific">
+...
+dp_match("240", "+49$rU");
+xlog("the attributes associated with '+49$rU' are '$var(attrs)'\n");
+...
+ </programlisting>
+ </example>
+ </section>
+
<section id="dialplan.p.dp_translate">
<title>
<function moreinfo="none">dp_translate(id, [src[/dest]])</function>
Module: kamailio
Branch: master
Commit: 2c105fa6a66e24a6d9e24f96b0f4c04b60ce0da9
URL: https://github.com/kamailio/kamailio/commit/2c105fa6a66e24a6d9e24f96b0f4c04…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-07-25T19:41:05+02:00
dialplan: added dp_match() and dp_replace() functions
- alternatives to dp_translate() with dedicated required parameters
(avoiding second parameter of two variables separated by '/')
- dp_match(dpid, inval)
- dp_replace(dpid, inval, outvar)
- dpid can be interger or variable
- inval can be a static or dynamic (with vars) string
- outvar has to be a writable variable
---
Modified: src/modules/dialplan/dialplan.c
Modified: src/modules/dialplan/dialplan.h
Modified: src/modules/dialplan/dp_repl.c
---
Diff: https://github.com/kamailio/kamailio/commit/2c105fa6a66e24a6d9e24f96b0f4c04…
Patch: https://github.com/kamailio/kamailio/commit/2c105fa6a66e24a6d9e24f96b0f4c04…
Module: kamailio
Branch: master
Commit: 8db85222c3f82e8af1fbeb38eaabb9aec99ecab2
URL: https://github.com/kamailio/kamailio/commit/8db85222c3f82e8af1fbeb38eaabb9a…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2017-07-25T14:01:22+02:00
modules: readme files regenerated - pv ... [skip ci]
---
Modified: src/modules/pv/README
---
Diff: https://github.com/kamailio/kamailio/commit/8db85222c3f82e8af1fbeb38eaabb9a…
Patch: https://github.com/kamailio/kamailio/commit/8db85222c3f82e8af1fbeb38eaabb9a…
---
diff --git a/src/modules/pv/README b/src/modules/pv/README
index d30fea9c67..428a27c958 100644
--- a/src/modules/pv/README
+++ b/src/modules/pv/README
@@ -371,12 +371,14 @@ pv_xavp_print();
4.11. pv_var_to_xavp(varname, xname)
- Copy script variables values to a xavp.
+ Copy the script variable value into an xavp.
First parameter can be '*' in order to copy all script variables.
Second parameter is the name of the destination xavp. If xavp already
exists it will be reset first.
+ Both parameters can contain variables that are evaluated at runtime.
+
Function can be used from ANY_ROUTE.
Example 1.14. pv_var_to_xavp() usage
@@ -395,7 +397,9 @@ $xavp("ok[0]=>foo") now is "foo indeed"
4.12. pv_xavp_to_var(xname)
- Copy xavp values to vars. Reverse of pv_var_to_xavp().
+ Copy xavp values into vars. Reverse of pv_var_to_xavp().
+
+ Both parameters can contain variables that are evaluated at runtime.
Function can be used from ANY_ROUTE.
Module: kamailio
Branch: master
Commit: e9a132afc0fa4b02a7030c2c20ade65a1d693006
URL: https://github.com/kamailio/kamailio/commit/e9a132afc0fa4b02a7030c2c20ade65…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-07-25T13:49:05+02:00
pv: notes about dynamic parameters for xavp to var funtions
---
Modified: src/modules/pv/doc/pv_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/e9a132afc0fa4b02a7030c2c20ade65…
Patch: https://github.com/kamailio/kamailio/commit/e9a132afc0fa4b02a7030c2c20ade65…
---
diff --git a/src/modules/pv/doc/pv_admin.xml b/src/modules/pv/doc/pv_admin.xml
index 31929efa7f..bd5a7ab6f4 100644
--- a/src/modules/pv/doc/pv_admin.xml
+++ b/src/modules/pv/doc/pv_admin.xml
@@ -400,10 +400,16 @@ pv_xavp_print();
<function moreinfo="none">pv_var_to_xavp(varname, xname)</function>
</title>
<para>
- Copy script variables values to a xavp.
+ Copy the script variable value into an xavp.
</para>
<para>
- First parameter can be '*' in order to copy all script variables. Second parameter is the name of the destination xavp. If xavp already exists it will be reset first.
+ First parameter can be '*' in order to copy all script variables.
+ Second parameter is the name of the destination xavp.
+ If xavp already exists it will be reset first.
+ </para>
+ <para>
+ Both parameters can contain variables that are evaluated at
+ runtime.
</para>
<para>
Function can be used from ANY_ROUTE.
@@ -431,7 +437,11 @@ $xavp("ok[0]=>foo") now is "foo indeed"
<function moreinfo="none">pv_xavp_to_var(xname)</function>
</title>
<para>
- Copy xavp values to vars. Reverse of pv_var_to_xavp().
+ Copy xavp values into vars. Reverse of pv_var_to_xavp().
+ </para>
+ <para>
+ Both parameters can contain variables that are evaluated at
+ runtime.
</para>
<para>
Function can be used from ANY_ROUTE.
### Description
I want use kamailio on Alpine linux dist. All looks fine except tls module.
During config file checking i got errors
```
/ #
/ # vi /etc/kamailio/kamailio.cfg
/ # kamailio -c -f /etc/kamailio/kamailio.cfg
loading modules under config path: /usr/lib/kamailio/modules/
0(15) ERROR: <core> [core/sr_module.c:570]: load_module(): could not find module <mi_fifo> in </usr/lib/kamailio/modules/>
0(15) CRITICAL: <core> [core/cfg.y:3400]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 218, column 12-23: failed to load module
0(15) ERROR: <core> [core/sr_module.c:570]: load_module(): could not find module <mi_rpc> in </usr/lib/kamailio/modules/>
0(15) CRITICAL: <core> [core/cfg.y:3400]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 234, column 12-22: failed to load module
0(15) ERROR: <core> [core/sr_module.c:582]: load_module(): could not open module </usr/lib/kamailio/modules/tls.so>: Error relocating /usr/lib/kamailio/modules/tls.so: EC_KEY_new_by_curve_name: symbol not found
0(15) CRITICAL: <core> [core/cfg.y:3400]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 265, column 12-19: failed to load module
0(15) ERROR: <core> [core/modparam.c:152]: set_mod_param_regex(): No module matching <mi_fifo> found
0(15) CRITICAL: <core> [core/cfg.y:3403]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 285, column 67: Can't set module parameter
0(15) ERROR: <core> [core/modparam.c:152]: set_mod_param_regex(): No module matching <tls> found
0(15) CRITICAL: <core> [core/cfg.y:3403]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 411, column 50: Can't set module parameter
ERROR: bad config file (5 errors)
0(15) INFO: <core> [core/sctp_core.c:53]: sctp_core_destroy(): SCTP API not initialized
/ #
/ #
```
Error
load_module(): could not open module </usr/lib/kamailio/modules/tls.so>: Error relocating /usr/lib/kamailio/modules/tls.so: EC_KEY_new_by_curve_name: symbol not found
#### Reproduction
docker run -it alpine sh
apk --no-cache add alpine-sdk linux-headers bison flex libressl-dev
cd kamailio
sed -i -e 's/0x10100000L/0x10100000L || defined(LIBRESSL_VERSION_NUMBER)/' src/modules/tls/tls_locking.c
make include_modules="tls" cfg
make all
make install
sed -i '1s/^/#!define WITH_TLS\n/' /usr/local/etc/kamailio/kamailio.cfg
/usr/local/sbin/kamailio -c -f /usr/local/etc/kamailio/kamailio.cfg
#### Log Messages
```
@8bdc47c389e6:/usr/local/etc/kamailio$ /usr/local/sbin/kamailio -c -f /usr/local/etc/kamailio/kamailio.cfg
0(22421) ERROR: <core> [core/sr_module.c:582]: load_module(): could not open module </usr/local/lib64/kamailio/modules/tls.so>: Error relocating /usr/local/lib64/kamailio/modules/tls.so: SSL_CTX_set_min_proto_version: symbol not found
0(22421) CRITICAL: <core> [core/cfg.y:3426]: yyerror_at(): parse error in config file /usr/local/etc/kamailio/kamailio.cfg, line 276, column 12-19: failed to load module
0(22421) ERROR: <core> [core/modparam.c:152]: set_mod_param_regex(): No module matching <tls> found
0(22421) CRITICAL: <core> [core/cfg.y:3429]: yyerror_at(): parse error in config file /usr/local/etc/kamailio/kamailio.cfg, line 426, column 60: Can't set module parameter
ERROR: bad config file (2 errors)
0(22421) INFO: <core> [core/sctp_core.c:53]: sctp_core_destroy(): SCTP API not initialized
```
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
@8bdc47c389e6:/usr/local/etc/kamailio$ /usr/local/sbin/kamailio -v
version: kamailio 5.1.0-dev5 (x86_64/linux)
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled on 20:55:58 Jul 21 2017 with gcc 6.2.1
@8bdc47c389e6:/usr/local/etc/kamailio$
```
* **Operating System**:
Alpine linux 3.6
```
@8bdc47c389e6:/usr/local/etc/kamailio$ uname -a
Linux 8bdc47c389e6 3.10.0-514.16.1.el7.x86_64 #1 SMP Wed Apr 12 15:04:24 UTC 2017 x86_64 Linux```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1188
Module: kamailio
Branch: master
Commit: e6c9474e456fb0673c87f87a325d9dc40aa10d32
URL: https://github.com/kamailio/kamailio/commit/e6c9474e456fb0673c87f87a325d9dc…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-07-21T10:27:57+02:00
core: cfg ctx - removed unused variable
---
Modified: src/core/cfg/cfg_ctx.c
---
Diff: https://github.com/kamailio/kamailio/commit/e6c9474e456fb0673c87f87a325d9dc…
Patch: https://github.com/kamailio/kamailio/commit/e6c9474e456fb0673c87f87a325d9dc…
---
diff --git a/src/core/cfg/cfg_ctx.c b/src/core/cfg/cfg_ctx.c
index 6dc9a469c0..d251b11317 100644
--- a/src/core/cfg/cfg_ctx.c
+++ b/src/core/cfg/cfg_ctx.c
@@ -1373,8 +1373,7 @@ int cfg_get_default_value_by_name(cfg_ctx_t *ctx, str *group_name,
cfg_mapping_t *var;
void *p;
static str s; /* we need the value even
- after the function returns */
- cfg_group_inst_t *group_inst;
+ * after the function returns */
/* verify the context even if we do not need it now
to make sure that a cfg driver has called the function