Module: kamailio
Branch: master
Commit: 426787068bab1dbeb07ca7b973ac90a91a980628
URL: https://github.com/kamailio/kamailio/commit/426787068bab1dbeb07ca7b973ac90a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-05-10T19:42:48+02:00
pv: docs for xavp_lshift() function
---
Modified: src/modules/pv/doc/pv_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/426787068bab1dbeb07ca7b973ac90a…
Patch: https://github.com/kamailio/kamailio/commit/426787068bab1dbeb07ca7b973ac90a…
---
diff --git a/src/modules/pv/doc/pv_admin.xml b/src/modules/pv/doc/pv_admin.xml
index dca9392822..bc36df564b 100644
--- a/src/modules/pv/doc/pv_admin.xml
+++ b/src/modules/pv/doc/pv_admin.xml
@@ -732,6 +732,39 @@ xavp_child_rm("x", "y");
...
xavi_child_rm("WhatEver", "FoO");
# same result as: $xavi(whatever=>foo) = $null;
+...
+ </programlisting>
+ </example>
+ </section>
+ <section id="pv.f.xavp_lshift">
+ <title>
+ <function moreinfo="none">xavp_lshift(xname, idx)</function>
+ </title>
+ <para>
+ Left shift with rotation of the xavps with name xname so that
+ the one at the index idx becomes the first and the ones before
+ it are at the end of the list.
+ </para>
+ <para>
+ The first parameter has to be the name of XAVP in the root list.
+ The second parameter is the index of the XAVP that becomes the
+ first one.
+ </para>
+ <para>
+ The parameters can be with variables.
+ </para>
+ <para>
+ Function can be used from ANY ROUTE.
+ </para>
+ <example>
+ <title><function>xavp_lshift</function> usage</title>
+ <programlisting format="linespecific">
+...
+$xavp(n) = 10;
+$xavp(n) = 20;
+$xavp(n) = 30;
+xavp_lshift("n", "1");
+# results in: $xavp(n) having the list of values 20 30 10
...
</programlisting>
</example>
Module: kamailio
Branch: master
Commit: 7e88c988a4843ee35172809c6955eac870229ff1
URL: https://github.com/kamailio/kamailio/commit/7e88c988a4843ee35172809c6955eac…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2022-05-09T18:46:15+02:00
modules: readme files regenerated - geoip2 ... [skip ci]
---
Modified: src/modules/geoip2/README
---
Diff: https://github.com/kamailio/kamailio/commit/7e88c988a4843ee35172809c6955eac…
Patch: https://github.com/kamailio/kamailio/commit/7e88c988a4843ee35172809c6955eac…
---
diff --git a/src/modules/geoip2/README b/src/modules/geoip2/README
index 80691c5516..3f09eb637a 100644
--- a/src/modules/geoip2/README
+++ b/src/modules/geoip2/README
@@ -135,6 +135,8 @@ modparam("geoip2", "path", "/usr/local/share/GeoIP/GeoLite2-City.mmdb")
Match ipaddr against the GeoIP database and set the pvc container. The
function has to be called before accessing a key via: $gip2(pvc=>key).
+ At least one function needs to be present that access the pvc
+ container, otherwise this function will not work.
Example 1.2. geoip2_match usage
...
Module: kamailio
Branch: master
Commit: 0c16d6824fda729bf481e300992fb6bad057c89d
URL: https://github.com/kamailio/kamailio/commit/0c16d6824fda729bf481e300992fb6b…
Author: Henning Westerholt <hw(a)gilawa.com>
Committer: Henning Westerholt <hw(a)gilawa.com>
Date: 2022-05-09T16:43:22Z
geoip2: log errors for cases where the container could not evaluated and add docs
- log errors for cases where the container could not evaluated due to missing
initialization of the pvc container because no actual access is done in the cfg
- add documentation describing that at least one access to the container is necessary
for the match function to work correctly
---
Modified: src/modules/geoip2/doc/geoip2_admin.xml
Modified: src/modules/geoip2/geoip2_pv.c
---
Diff: https://github.com/kamailio/kamailio/commit/0c16d6824fda729bf481e300992fb6b…
Patch: https://github.com/kamailio/kamailio/commit/0c16d6824fda729bf481e300992fb6b…
---
diff --git a/src/modules/geoip2/doc/geoip2_admin.xml b/src/modules/geoip2/doc/geoip2_admin.xml
index 8c5a96caa8..a82b1a9a29 100644
--- a/src/modules/geoip2/doc/geoip2_admin.xml
+++ b/src/modules/geoip2/doc/geoip2_admin.xml
@@ -112,6 +112,8 @@ modparam("geoip2", "path", "/usr/local/share/GeoIP/GeoLite2-City.mmdb")
<para>
Match ipaddr against the GeoIP database and set the pvc container. The
function has to be called before accessing a key via: $gip2(pvc=>key).
+ At least one function needs to be present that access the pvc container,
+ otherwise this function will not work.
</para>
<example>
<title><function>geoip2_match</function> usage</title>
diff --git a/src/modules/geoip2/geoip2_pv.c b/src/modules/geoip2/geoip2_pv.c
index 0995ae2d25..ff427f259f 100644
--- a/src/modules/geoip2/geoip2_pv.c
+++ b/src/modules/geoip2/geoip2_pv.c
@@ -565,14 +565,14 @@ int geoip2_update_pv(str *tomatch, str *name)
if(tomatch->len>255)
{
- LM_DBG("target too long (max 255): %s\n", tomatch->s);
+ LM_ERR("target too long (max 255): %s\n", tomatch->s);
return -3;
}
gr = sr_geoip2_get_record(name);
if(gr==NULL)
{
- LM_DBG("container not found: %s\n", tomatch->s);
+ LM_ERR("container not found: %s\n", tomatch->s);
return - 4;
}
Hello,
it was discussed a couple of times during the past Kamailio development
meetings and several days ago the works started to convert the Kamailio
Wiki content to markdown format and host the files on Kamailio
github.com organisation.
The Dokuwiki engine has served us very well during more than a decade
and a half, but open editing had to be disabled many years ago due to
bad actors pushing inappropriate content. The contributors had to make a
dedicated account on our portal only for Wiki editing. More recently we
had add another layer of protection requiring to grant manually edit
permissions to newly created wiki accounts because bots started to work
around CAPTCHA and other security extensions, posting again
inappropriate content.
All these added to operational overhead, but also made it difficult for
new people to contribute, specially for small editing to fix typos or
add usage examples.
Thanks to Kenneth Stowe, who undertook the first big effort of
converting the Dowkuwiki files to markdown format, we are now in the
position of moving further with the plans of using github for hosting
the content of the wiki and enable easier contributions via pull
requests. The history of changes done via Dokuwiki show up now as git
commits.
The github repository for the wiki content is available at:
* https://github.com/kamailio/kamailio-wiki
It is still work in progress, therefore we ask for the help of community
to speed up the conversion, among the tasks that need to be done:
* convert relative links between wiki pages – the conversion tools
used relative paths without file extensions, like:
[Install Kamailio v4.4.x From GIT](/install/4.4.x/git)
They have to be converted to relative path with .md extension in order
to be able to browse directly :n the github.com portal — practically the
leading / has to be removed and .md added at the end, like:
[Install Kamailio v4.4.x From GIT](install/4.4.x/git.md)
* some section heading markers were not detected/converted, onee may
notice many equal signs (=) around a section name, it has to be replaced
with the appropriate markdown format based on hash signs (#). For example:
======= Install And Maintain Kamailio v4.4.x From GIT =======
Should be converted to:
# Install And Maintain Kamailio v4.4.x From GIT
* some Dokuwiki paragraphs used special formatting based on plugins,
for example the notes, warnings, … had special colors. The common
markdown format does not specify a syntax to color the text, the propose
solution is to use emoji at the start of the paragraph to signal its
special purpose. For example, the Dokuwiki content:
<color blue>//IMPORTANT: Content for older releases than 3.2.0 is
available at the **Old Wiki Site**://</color>
Has to be transformed to:
:fire:*IMPORTANT: Content for older releases than 3.2.0 is available at
the **Old Wiki Site**:*
You are welcome to propose a better syntax for this kind of transformation.
* review config examples and evaluate what improvements can be done
(e.g., in terms of formatting and syntax highlighting)
Any of these changes do not require any C programming knowledge, nor
much Kamailio config knowledge. Can be your first contribution to the
project and it will be very appreciated. It can also help you learn more
about Kamailio, because you may discover documentation that you were not
aware of.
A very important decision is how to present the wiki markdown content on
kamailio.org website. Besides being able to see it on github repository,
we want to process the markdown pages somehow and make them available in
html format on kamailio.org website for easier navigation and better
indexing (e.g., with tables of content for large pages). If you are
aware of a suitable cli or web app that can convert markdown to html and
generate table of content, let us know.
Any questions and suggestions should be addressed to
sr-users(a)lists.kamailio.org mailing list. Looking forward to your
contributions on this community effort!
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Online
* https://www.asipto.com/sw/kamailio-advanced-training-online/