Module: kamailio
Branch: master
Commit: c349530a1419c23bd4fb02c619788dadcae23f70
URL: https://github.com/kamailio/kamailio/commit/c349530a1419c23bd4fb02c619788da…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2021-09-21T21:01:12+02:00
modules: readme files regenerated - kazoo ... [skip ci]
---
Modified: src/modules/kazoo/README
Modified: src/modules/registrar/README
---
Diff: https://github.com/kamailio/kamailio/commit/c349530a1419c23bd4fb02c619788da…
Patch: https://github.com/kamailio/kamailio/commit/c349530a1419c23bd4fb02c619788da…
---
diff --git a/src/modules/kazoo/README b/src/modules/kazoo/README
index ab9206a243..7497dd20e8 100644
--- a/src/modules/kazoo/README
+++ b/src/modules/kazoo/README
@@ -443,9 +443,9 @@ modparam("kazoo", "amqp_connection", "kazoo://guest:guest@otherhost:5672")
handles control to the next sub-loop.
...
while(true) // main loop
- while(ACK or timeout) // acknowledge from worker process
- while(SEND or timeout) // anything to send ?
- while(CONSUME or timeout) // any data on consumed exchanges ?
+while(ACK or timeout) // acknowledge from worker process
+while(SEND or timeout) // anything to send ?
+while(CONSUME or timeout) // any data on consumed exchanges ?
...
4.2.1. amqp_consumer_loop_count(int)
@@ -652,11 +652,11 @@ modparam("kazoo", "pua_mode", 0)
Example 1.22. kazoo_publish usage
...
-$var(amqp_payload_request) = "{'Event-Category' : 'directory', 'Event-Name' : 'r
-eg_success', 'Contact' : '" + $var(fs_contact) + "', 'Call-ID' : '" + $ci + "',
-'Realm' : '" + $fd +"', 'Username' : '" + $fU + "', 'From-User' : '" + $fU + "',
- 'From-Host' : '" + $fd + "', 'To-User' : '" + $tU +"', 'To-Host' : '" + $td + "
-', 'User-Agent' : '" + $ua +"' ," + $var(register_contants)+ " }";
+$var(amqp_payload_request) = $_s({"Event-Category" : "directory", "Event-Name" :
+ "reg_success", "Contact" : "$(ct{s.escape.common}{s.replace,\','}{s.replace,$$,
+})", "Call-ID" : "$ci", "Realm" : "$fd", "Username" : "$fU", "From-User" : "$fU"
+, "From-Host" : "$fd", "To-User" : "$tU", "To-Host" : "$td", "User-Agent" : "$(u
+a{s.escape.common}{s.replace,\','}{s.replace,$$,})" });
$var(amqp_routing_key) = "registration.success." + $(fd{kz.encode}) + "." + $fU;
kazoo_publish("callmgr", $var(amqp_routing_key), $var(amqp_payload_request));
...
diff --git a/src/modules/registrar/README b/src/modules/registrar/README
index 94ab08ab3c..7643dfee4f 100644
--- a/src/modules/registrar/README
+++ b/src/modules/registrar/README
@@ -725,15 +725,20 @@ modparam("registrar", "reg_callid_avp", "$avp(s:avp)")
Defines the name of XAVP class to store runtime module config values.
The values are stored as inner XAVPs, like $xavp(class=>attribute).
Valid inner XAVP names:
- * expires - the number of maximum contacts to be stored for the
- current registration AoR. It overwrites the 'max_contacts' module
- parameter value.
- * q - the expires value, to overwrite the value from SIP headers.
+ * match_callid - filter contacts by callid. Used in registered().
+ * match_contact - filter contacts by contact. Used in registered().
+ * match_received - filter contacts by received. Used in registered().
+ * rlf_bflags - filter contacts by branch flags. Used in lookup().
+ * q - q value of contact (integer 0-1000). It overrides q value given
+ in contact header and default_q parameter. Used in save().
+ * expires - the expires value, to overwrite the value from SIP
+ headers. Used in save().
* max_contacts - the number of maximum contacts to be stored for the
current registration AoR. It overwrites the 'max_contacts' module
- parameter value.
+ parameter value. Used in save().
* socket - the string representing the socket on which the register
- request was received, as alternative to using the sock_hdr.
+ request was received, as alternative to using the sock_hdr. Used in
+ save().
For example. if this parameter is set to 'reg', then the number of
maximum contacts can be set in $xavp(reg=>max_contacts).
@@ -1120,7 +1125,7 @@ lookup_branches("location");
* uri (optional) - SIP URI to do be used instead of Request/To-URI.
It can be a dynamic string with pseudo-variables.
* match_option (optional) - flag parameter to restrict contact
- search. use reg_xavp_cfg to set the values to compare to.
+ search. use xavp_cfg to set the values to compare to.
flag values is as follows:
+ 1 - match_callid
+ 2 - match_received
### Description
Example 1.21. kazoo_publish usage
contains string
```
$var(amqp_payload_request) = "{'Event-Category' : 'directory', 'Event-Name' : 'reg_success', 'Contact' : '" + $var(fs_contact) + "', 'Call-ID' : '" + $ci + "', 'Realm' : '" + $fd +"', 'Username' : '" + $fU + "', 'From-User' : '" + $fU + "', 'From-Host' : '" + $fd + "', 'To-User' : '" + $tU +"', 'To-Host' : '" + $td + "', 'User-Agent' : '" + $ua +"' ," + $var(register_contants)+ " }";
```
This example did not work because the string generates broken JSON:
1. here present value ` $var(register_contants)` but key is not present
2. JSON key and value must be started and terminated by `"` symbol (not by `'`)
--
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/2627
#### Pre-Submission Checklist
- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, ...)
- [ ] 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:
- [ ] PR should be backported to stable branches
- [x] Tested changes locally
- [x] Related to issue #2627
#### Description
Fixed json example and space formating
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2855
-- Commit Summary --
* kazoo: fixed json body in example
* kazoo: docbook - fixed 'Attribute "xmlns:xi" must be declared for element type'
* kazoo: docbook - fixed 'Document root element "chapter", must match DOCTYPE root "book".'
* kazoo: docbook files space formating
-- File Changes --
M src/modules/kazoo/doc/kazoo_admin.xml (1259)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2855.patchhttps://github.com/kamailio/kamailio/pull/2855.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/2855
* fix docs for expires/q attributes
* add all available attributes and note in which function they are used
<!-- 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
- [ ] 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
<!-- Describe your changes in detail -->
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2860
-- Commit Summary --
* <a href="https://github.com/kamailio/kamailio/pull/2860/commits/13fc6f45ac5c8d01e6c9…">registrar: docs for xavp_cfg</a>
-- File Changes --
M src/modules/registrar/doc/registrar_admin.xml (40)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2860.patchhttps://github.com/kamailio/kamailio/pull/2860.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/2860
Module: kamailio
Branch: master
Commit: fe4b180d3d2c42beec8299938f7935b0c67ef4d2
URL: https://github.com/kamailio/kamailio/commit/fe4b180d3d2c42beec8299938f7935b…
Author: Bastian Triller <bastian.triller(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-09-21T20:55:40+02:00
registrar: docs for xavp_cfg
* fix docs for expires/q attributes
* add all available attributes and note in which function they are used
---
Modified: src/modules/registrar/doc/registrar_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/fe4b180d3d2c42beec8299938f7935b…
Patch: https://github.com/kamailio/kamailio/commit/fe4b180d3d2c42beec8299938f7935b…
---
diff --git a/src/modules/registrar/doc/registrar_admin.xml b/src/modules/registrar/doc/registrar_admin.xml
index 09d41843dd..50ba66f38f 100644
--- a/src/modules/registrar/doc/registrar_admin.xml
+++ b/src/modules/registrar/doc/registrar_admin.xml
@@ -745,15 +745,41 @@ modparam("registrar", "reg_callid_avp", "$avp(s:avp)")
<itemizedlist>
<listitem>
<para>
- <emphasis>expires</emphasis> - the number of maximum
- contacts to be stored for the current registration AoR. It
- overwrites the 'max_contacts' module parameter value.
+ <emphasis>match_callid</emphasis> - filter contacts by callid.
+ Used in registered().
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>match_contact</emphasis> - filter contacts by contact.
+ Used in registered().
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>match_received</emphasis> - filter contacts by received.
+ Used in registered().
</para>
</listitem>
<listitem>
<para>
- <emphasis>q</emphasis> - the expires value, to overwrite the
+ <emphasis>rlf_bflags</emphasis> - filter contacts by branch flags.
+ Used in lookup().
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>q</emphasis> - q value of contact
+ (integer 0-1000). It overrides q value given in
+ contact header and default_q parameter.
+ Used in save().
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>expires</emphasis> - the expires value, to overwrite the
value from SIP headers.
+ Used in save().
</para>
</listitem>
<listitem>
@@ -761,6 +787,7 @@ modparam("registrar", "reg_callid_avp", "$avp(s:avp)")
<emphasis>max_contacts</emphasis> - the number of maximum
contacts to be stored for the current registration AoR. It
overwrites the 'max_contacts' module parameter value.
+ Used in save().
</para>
</listitem>
<listitem>
@@ -768,6 +795,7 @@ modparam("registrar", "reg_callid_avp", "$avp(s:avp)")
<emphasis>socket</emphasis> - the string representing the
socket on which the register request was received, as alternative
to using the sock_hdr.
+ Used in save().
</para>
</listitem>
</itemizedlist>
@@ -1117,7 +1145,7 @@ end
are returned.
</para>
</listitem>
- </itemizedlist>
+ </itemizedlist>
<para>
<emphasis>
Default value is NULL (disabled).
@@ -1451,7 +1479,7 @@ lookup_branches("location");
<listitem>
<para>
<emphasis>match_option</emphasis> (optional) - flag parameter to restrict
- contact search. use reg_xavp_cfg to set the values to compare to.
+ contact search. use xavp_cfg to set the values to compare to.
</para>
<para>flag values is as follows:</para>
<itemizedlist>
Module: kamailio
Branch: master
Commit: 22f8dca3ff941addf69148f237c1127e271b00e1
URL: https://github.com/kamailio/kamailio/commit/22f8dca3ff941addf69148f237c1127…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2021-09-21T16:01:16+02:00
modules: readme files regenerated - posops ... [skip ci]
---
Modified: src/modules/posops/README
---
Diff: https://github.com/kamailio/kamailio/commit/22f8dca3ff941addf69148f237c1127…
Patch: https://github.com/kamailio/kamailio/commit/22f8dca3ff941addf69148f237c1127…
---
diff --git a/src/modules/posops/README b/src/modules/posops/README
index d10e25fb3e..319e654c50 100644
--- a/src/modules/posops/README
+++ b/src/modules/posops/README
@@ -37,6 +37,8 @@ Daniel-Constantin Mierla
4.5. pos_headers_end()
4.6. pos_body_start()
4.7. pos_body_end()
+ 4.8. pos_find_str(idx, val)
+ 4.9. pos_findi_str(idx, val)
List of Examples
@@ -48,6 +50,8 @@ Daniel-Constantin Mierla
1.6. pos_headers_end() usage
1.7. pos_body_start() usage
1.8. pos_body_end() usage
+ 1.9. pos_find_str() usage
+ 1.10. pos_findi_str() usage
Chapter 1. Admin Guide
@@ -72,6 +76,8 @@ Chapter 1. Admin Guide
4.5. pos_headers_end()
4.6. pos_body_start()
4.7. pos_body_end()
+ 4.8. pos_find_str(idx, val)
+ 4.9. pos_findi_str(idx, val)
1. Overview
@@ -124,6 +130,8 @@ modparam("posops", "idx0", -200)
4.5. pos_headers_end()
4.6. pos_body_start()
4.7. pos_body_end()
+ 4.8. pos_find_str(idx, val)
+ 4.9. pos_findi_str(idx, val)
4.1. pos_append(idx, val)
@@ -221,3 +229,38 @@ $var(pos) = pos_body_start();
...
$var(pos) = pos_body_end();
...
+
+4.8. pos_find_str(idx, val)
+
+ Return the position of the val in message buffer starting at idx. In
+ case of not finding it or error, the return code is negative. If val is
+ at index 0, it returns the value specified by modparam idx0.
+
+ The idx can be an integer value or a variable holding an integer.
+
+ The val can be a static string or variables.
+
+ This function can be used from ANY_ROUTE.
+
+ Example 1.9. pos_find_str() usage
+...
+$var(idx) = pos_find_str("100", "kamailio");
+...
+
+4.9. pos_findi_str(idx, val)
+
+ Return the position of the val (matching case insensitive) in message
+ buffer starting at idx. In case of not finding it or error, the return
+ code is negative. If val is at index 0, it returns the value specified
+ by modparam idx0.
+
+ The idx can be an integer value or a variable holding an integer.
+
+ The val can be a static string or variables.
+
+ This function can be used from ANY_ROUTE.
+
+ Example 1.10. pos_findi_str() usage
+...
+$var(idx) = pos_findi_str("100", "kamailio");
+...