Module: kamailio
Branch: master
Commit: 3c41036806dc1468ecf53b6753dc430df639b02b
URL: https://github.com/kamailio/kamailio/commit/3c41036806dc1468ecf53b6753dc430…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-06-19T19:03:53+02:00
dispatcher: docs - fixed closing tag for xml itemizedlist
---
Modified: src/modules/dispatcher/doc/dispatcher_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/3c41036806dc1468ecf53b6753dc430…
Patch: https://github.com/kamailio/kamailio/commit/3c41036806dc1468ecf53b6753dc430…
---
diff --git a/src/modules/dispatcher/doc/dispatcher_admin.xml b/src/modules/dispatcher/doc/dispatcher_admin.xml
index 20512651ca..b113b284fd 100644
--- a/src/modules/dispatcher/doc/dispatcher_admin.xml
+++ b/src/modules/dispatcher/doc/dispatcher_admin.xml
@@ -1316,7 +1316,7 @@ if(ds_select("1", "$var(a)")) {
a variable holding an integer value.
</para>
</listitem>
- <itemizedlist>
+ </itemizedlist>
<para>
If the bit 2 in 'flags' is set, the rest of the addresses from the
destination groups are stored in XAVP list (limited with an optional 'limit'
Module: kamailio
Branch: master
Commit: 8446409d77fe82a38eec772bbcf92bea34d44e35
URL: https://github.com/kamailio/kamailio/commit/8446409d77fe82a38eec772bbcf92be…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-06-19T18:53:13+02:00
dispatcher: documentation for ds_select_routes()
---
Modified: src/modules/dispatcher/doc/dispatcher_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/8446409d77fe82a38eec772bbcf92be…
Patch: https://github.com/kamailio/kamailio/commit/8446409d77fe82a38eec772bbcf92be…
---
diff --git a/src/modules/dispatcher/doc/dispatcher_admin.xml b/src/modules/dispatcher/doc/dispatcher_admin.xml
index 19c68bf4b3..20512651ca 100644
--- a/src/modules/dispatcher/doc/dispatcher_admin.xml
+++ b/src/modules/dispatcher/doc/dispatcher_admin.xml
@@ -1276,6 +1276,77 @@ if(ds_select("1", "$var(a)")) {
exit;
}
...
+</programlisting>
+ </example>
+ </section>
+ <section id="dispatcher.f.ds_select_routes">
+ <title>
+ <function moreinfo="none">ds_select_routes(rules, mode [, limit])</function>
+ </title>
+ <para>
+ The method selects destinations following the rules combining groups add
+ algorithms, controlling where the first destination address is pushed,
+ and optionally setting a limit of selected addresses.
+ </para>
+ <para>Parameters:</para>
+ <itemizedlist>
+ <listitem>
+ <para><emphasis>rules</emphasis> - a string in the format
+ "grp1=alg1;grp2=alg2;...grpN=algN", where grpX is an integer number
+ identifying a dispatcher set id and algN is a dispatcher algorithm
+ identifier. No white spaces should be given in the parameter value.
+ The parameter can contain pseudo-variables.
+ </para>
+ </listitem>
+ <listitem>
+ <para><emphasis>mode</emphasis> - control where to push the first
+ selected target address. Valid values are: '0', 'd' or 'D' to push
+ the address in destination URI; '1', 'r' or 'R' to push the address
+ in R-URI; '2', 'x' or 'X' to push the address only in the XAVP when
+ failure rerouting is enabled. Note that only first character of the
+ parameter matters, therefore once case use a more meaningful value
+ such as 'ruri' instead of 'r'. The parameter can contain pseudo
+ variables.
+ </para>
+ </listitem>
+ <listitem>
+ <para><emphasis>limit</emphasis> - a positive integer value to
+ restrict the number of selected target addresses. If it is 0, then
+ no limit is considered. The parameter can be a static integer or
+ a variable holding an integer value.
+ </para>
+ </listitem>
+ <itemizedlist>
+ <para>
+ If the bit 2 in 'flags' is set, the rest of the addresses from the
+ destination groups are stored in XAVP list (limited with an optional 'limit'
+ parameter). You can execute 'ds_next_domain()' or 'ds_next_dst()' to use
+ next address to achieve serial forking to all possible destinations.
+ </para>
+ <para>
+ This function can be used from ANY_ROUTE.
+ </para>
+ <example>
+ <title><function>ds_select_routes</function> usage</title>
+ <programlisting format="linespecific">
+...
+$var(alg) = 4;
+$var(limit) = 8;
+if(ds_select_routes("1=4;2=$var(alg)", "ruri", "$var(limit)")) {
+ t_on_failure("REROUTE");
+ t_relay();
+ exit;
+}
+failure_route[REROUTE] {
+ if(t_check_status("408|5[0-9][0-9]")) {
+ if(ds_next_domain()) {
+ t_on_failure("REROUTE");
+ t_relay();
+ exit;
+ }
+ }
+}
+...
</programlisting>
</example>
</section>
<!-- Kamailio Pull Request Template -->
<!--
IMPORTANT:
- for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
- pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
- backports to stable branches must be done with 'git cherry-pick -x ...'
- code is contributed under BSD for core and main components (tm, sl, auth, tls)
- code is contributed GPLv2 or a compatible license for the other components
- GPL code is contributed with OpenSSL licensing exception
-->
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, ...)
- [x] Each component has a single commit (if not, squash them into one commit)
- [x] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [x] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [ ] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
As you can see looking at the modifications stats counters where increment twice.
Hi @oej, If you find a few minutes you could review this MR.
Not sure if you remember, this was introduced in a bug fix (see below)
I kept some of your modifications, they seem more strait forward anyway.
```
commit b0cd09d2b451005a736396e6f38eac139ec31301
Author: Olle E. Johansson <oej(a)edvina.net>
Date: Wed May 11 21:59:44 2016 +0200
dialog Make sure statistics are updated when initializing from database
Issue #424
```
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/1566
-- Commit Summary --
* [dialog] stats incremented twice
-- File Changes --
M src/modules/dialog/dialog.c (7)
M src/modules/dialog/dlg_db_handler.c (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/1566.patchhttps://github.com/kamailio/kamailio/pull/1566.diff
--
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/pull/1566