Module: kamailio
Branch: master
Commit: 1a7ab6a5fc9b02f9e431e6d21f652de6283489c0
URL: https://github.com/kamailio/kamailio/commit/1a7ab6a5fc9b02f9e431e6d21f652de…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-06-12T11:07:46+02:00
siputils: docs for functions encoding/decoding contact uri using params
---
Modified: src/modules/siputils/doc/siputils_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/1a7ab6a5fc9b02f9e431e6d21f652de…
Patch: https://github.com/kamailio/kamailio/commit/1a7ab6a5fc9b02f9e431e6d21f652de…
---
diff --git a/src/modules/siputils/doc/siputils_admin.xml b/src/modules/siputils/doc/siputils_admin.xml
index a430f85cc9..25336cc207 100644
--- a/src/modules/siputils/doc/siputils_admin.xml
+++ b/src/modules/siputils/doc/siputils_admin.xml
@@ -1157,6 +1157,102 @@ if(is_first_hop()) { ... }
...
sip_p_charging_vector("g");
...
+</programlisting>
+ </example>
+ </section>
+ <section id="siputils.f.contact_param_encode">
+ <title>
+ <function moreinfo="none">contact_param_encode(pname, saddr)</function>
+ </title>
+ <para>
+ This function encodes URI inside Contact headers by building a new
+ URI from 'saddr' parameter and adding a parameter with the name 'pname'
+ containing incoming URI encoded in Base64URL format.
+ </para>
+ <para>Meaning of the parameters is as follows:</para>
+ <itemizedlist>
+ <listitem>
+ <para><emphasis>pname</emphasis> - name of the new URI parameter to
+ hold the encoded incoming URI.
+ </para>
+ </listitem>
+ <listitem>
+ <para><emphasis>saddr</emphasis> - local server address, can be
+ host part, host-port part or host-port-params part.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE.
+ </para>
+ <example>
+ <title><function>contact_param_encode</function> usage</title>
+ <programlisting format="linespecific">
+...
+if (is_method("REGISTER") and src_ip == 10.0.0.0/8) {
+ contact_param_encode("ksu", "1.2.3.4:5060;transport=tcp");
+}
+...
+</programlisting>
+ </example>
+ </section>
+ <section id="siputils.f.contact_param_decode">
+ <title>
+ <function moreinfo="none">contact_param_decode(pname)</function>
+ </title>
+ <para>
+ This function decodes URI inside Contact headers by building a new
+ URI from 'pname' parameter, decoding its value from Base64URL.
+ </para>
+ <para>Meaning of the parameters is as follows:</para>
+ <itemizedlist>
+ <listitem>
+ <para><emphasis>pname</emphasis> - name of the incoming URI parameter
+ holding the encoded URI value.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE.
+ </para>
+ <example>
+ <title><function>contact_param_decode</function> usage</title>
+ <programlisting format="linespecific">
+...
+if (is_method("REGISTER") and src_ip == 1.2.3.4) {
+ contact_param_decode("ksu");
+}
+...
+</programlisting>
+ </example>
+ </section>
+ <section id="siputils.f.contact_param_decode_ruri">
+ <title>
+ <function moreinfo="none">contact_param_decode_uri(pname)</function>
+ </title>
+ <para>
+ This function decodes R-URI (request URI) by building a new
+ R-URI from 'pname' parameter, decoding its value from Base64URL.
+ </para>
+ <para>Meaning of the parameters is as follows:</para>
+ <itemizedlist>
+ <listitem>
+ <para><emphasis>pname</emphasis> - name of the incoming URI parameter
+ holding the encoded URI value.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ This function can be used from REQUEST_ROUTE.
+ </para>
+ <example>
+ <title><function>contact_param_decode_ruri</function> usage</title>
+ <programlisting format="linespecific">
+...
+if (is_method("INVITE") and src_ip == 1.2.3.4) {
+ contact_param_decode_ruri("ksu");
+}
+...
</programlisting>
</example>
</section>
#### 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
- [x] Tested changes locally
#### Description
add missing function
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2354
-- Commit Summary --
* sqlops: export sql_pvquery to KEMI
-- File Changes --
M src/modules/sqlops/sqlops.c (59)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2354.patchhttps://github.com/kamailio/kamailio/pull/2354.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/2354
<!-- 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 -->
- [X] PR should be backported to stable branches
- [X] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
When adding/removing a destination from a set, the load is currently non preserved, which leads to unbalanced load.
This PR addresses the issue without affecting the behavior when loading/reloading the whole list.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2353
-- Commit Summary --
* dispatcher: keep current destinations' load when adding/removing
-- File Changes --
M src/modules/dispatcher/dispatch.c (19)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2353.patchhttps://github.com/kamailio/kamailio/pull/2353.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/2353