Module: kamailio
Branch: master
Commit: 867294f79f30b1b737d78e623514b4b14475f9cf
URL: https://github.com/kamailio/kamailio/commit/867294f79f30b1b737d78e623514b4b…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2019-11-05T12:31:21+01:00
modules: readme files regenerated - presence_xml ... [skip ci]
---
Modified: src/modules/presence_xml/README
---
Diff: https://github.com/kamailio/kamailio/commit/867294f79f30b1b737d78e623514b4b…
Patch: https://github.com/kamailio/kamailio/commit/867294f79f30b1b737d78e623514b4b…
---
diff --git a/src/modules/presence_xml/README b/src/modules/presence_xml/README
index 2098395373..9f7a80ba05 100644
--- a/src/modules/presence_xml/README
+++ b/src/modules/presence_xml/README
@@ -34,6 +34,9 @@ Anca-Maria Vamanu
3.9. passive_mode(int)
3.10. xcapauth_userdel_reason(str)
3.11. force_dummy_presence(int)
+ 3.12. force_presence_single_body(int)
+ 3.13. presence_single_body_priorities(str)
+ 3.14. presence_single_body_lookup_element(str)
4. Functions
@@ -57,8 +60,11 @@ Anca-Maria Vamanu
1.9. Set passive_mode parameter
1.10. Set xcapauth_userdel_reason parameter
1.11. Set force_dummy_presence parameter
- 1.12. pres_check_basic usage
- 1.13. pres_check_activities usage
+ 1.12. Set force_presence_single_body parameter
+ 1.13. Set presence_single_body_priorities parameter
+ 1.14. Set presence_single_body_lookup_element parameter
+ 1.15. pres_check_basic usage
+ 1.16. pres_check_activities usage
Chapter 1. Admin Guide
@@ -83,6 +89,9 @@ Chapter 1. Admin Guide
3.9. passive_mode(int)
3.10. xcapauth_userdel_reason(str)
3.11. force_dummy_presence(int)
+ 3.12. force_presence_single_body(int)
+ 3.13. presence_single_body_priorities(str)
+ 3.14. presence_single_body_lookup_element(str)
4. Functions
@@ -141,6 +150,9 @@ Chapter 1. Admin Guide
3.9. passive_mode(int)
3.10. xcapauth_userdel_reason(str)
3.11. force_dummy_presence(int)
+ 3.12. force_presence_single_body(int)
+ 3.13. presence_single_body_priorities(str)
+ 3.14. presence_single_body_lookup_element(str)
3.1. db_url(str)
@@ -298,6 +310,50 @@ modparam("presence_xml", "xcapauth_userdel_reason", "rejected")
modparam("presence_xml", "force_dummy_presence", 1)
...
+3.12. force_presence_single_body(int)
+
+ Set this parameter to enable single body notify. One presentity can
+ have multiple dialogs and will by default notify all the dialogs and
+ this can be a problem when dealing with large ring-groups or
+ attendants, use this parameter to only send one body. Look at
+ presence_single_body_priorities and presence_single_body_lookup_element
+ to customize the behaviour.
+
+ Default value: “0”.
+
+ Example 1.12. Set force_presence_single_body parameter
+...
+modparam("presence_xml", "force_presence_single_body", 1)
+...
+
+3.13. presence_single_body_priorities(str)
+
+ Change this parameter to set the priorities when choosing the dialog
+ that will be the final.
+
+ Importance is left to right.
+
+ Default value: “Available|Ringing|On the Phone”.
+
+ Example 1.13. Set presence_single_body_priorities parameter
+...
+modparam("presence_xml", "presence_single_body_priorities", "Offline|Online|Busy
+|Really Busy")
+...
+
+3.14. presence_single_body_lookup_element(str)
+
+ Set the name of the element that should be used to get the priority. If
+ the value obtained is not in the list of
+ presence_single_body_priorities the priority is 0.
+
+ Default value: “note”.
+
+ Example 1.14. Set presence_single_body_lookup_element parameter
+...
+modparam("presence_xml", "presence_single_body_lookup_element", "status")
+...
+
4. Functions
4.1. pres_check_basic(presentity_uri, status)
@@ -314,7 +370,7 @@ modparam("presence_xml", "force_dummy_presence", 1)
* 1 - if a match is found.
* -1 - if a match is not found.
- Example 1.12. pres_check_basic usage
+ Example 1.15. pres_check_basic usage
...
if (pres_check_basic("$ru", "open")) {
...
@@ -338,7 +394,7 @@ modparam("presence_xml", "force_dummy_presence", 1)
* -1 - if a match is not found.
* -2 - if /presence/person or /presence/person/activity do not exist.
- Example 1.13. pres_check_activities usage
+ Example 1.16. pres_check_activities usage
...
if (pres_check_basic("$ru", "open")) {
pres_check_activities("$ru", "unknown");
<!-- 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)
- [X] 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
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
this allow notify body aggregation with priorities
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2118
-- Commit Summary --
* presence_xml: adds option to aggregate xml body with priorities
-- File Changes --
M src/modules/presence_xml/notify_body.c (112)
M src/modules/presence_xml/presence_xml.c (7)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2118.patchhttps://github.com/kamailio/kamailio/pull/2118.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/2118
<!-- 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)
- [x] 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
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
Module to produce and send messages to a Kafka server busing librdkafka library.
I copy part of README file here:
Chapter 1. Admin Guide
Table of Contents
1. Overview
2. Dependencies
2.1. Kamailio Modules
2.2. External Libraries or Applications
2.3. Parameters
2.3.1. brokers (string)
2.3.2. configuration (string)
2.3.3. topic (string)
2.4. Functions
2.4.1. kafka_send(topic, msg)
2.5. RPC Commands
2.5.1. kafka.stats
2.5.2. kafka.stats_topic
1. Overview
This module produces and sends messages to a Kafka server.
2. Dependencies
2.1. Kamailio Modules
2.2. External Libraries or Applications
2.3. Parameters
2.3.1. brokers (string)
2.3.2. configuration (string)
2.3.3. topic (string)
2.4. Functions
2.4.1. kafka_send(topic, msg)
2.5. RPC Commands
2.5.1. kafka.stats
2.5.2. kafka.stats_topic
2.1. Kamailio Modules
The following modules must be loaded before this module:
* none.
2.2. External Libraries or Applications
The following libraries or applications must be installed before
running Kamailio with this module loaded:
* librdkafka: the Apache Kafka C/C++ client library.
https://github.com/edenhill/librdkafka
2.3. Parameters
2.3.1. brokers (string)
Specifies a list of brokers separated by commas.
From librdkafka documentation:
brokerlist is a ,-separated list of brokers in the format:
<broker1>,<broker2>,
Where each broker is in either the host or URL based format:
* <host>[:<port>]
* <proto>://<host>[:port]
<proto> is either PLAINTEXT, SSL, SASL, SASL_PLAINTEXT
The two formats can be mixed but ultimately the value of the
security.protocol config property decides what brokers are allowed.
This parameter is mandatory. There is no default value.
Example 1.1. Set brokers parameter
...
modparam("kafka", "brokers", "localhost:9092")
modparam("kafka", "brokers", "broker1:10000,broker2")
modparam("kafka", "brokers", "SSL://broker3:9000,ssl://broker2")
...
2.3.2. configuration (string)
Specifies a set of general properties.
Each configuration property follows: name = value pattern. And
configuration properties are separated by ;
This parameter is optional, but if it exists it can be configured only
once.
Example 1.2. Set configuration parameter
...
modparam("kafka", "configuration", "topic.metadata.refresh.interval.ms=20000;que
ue.buffering.max.messages=1000000;metadata.request.timeout.ms=90000")
modparam("kafka", "configuration", "topic.metadata.refresh.interval.ms=20000;que
ue.buffering.max.messages=500000;debug=all;metadata.request.timeout.ms=900000")
...
2.3.3. topic (string)
Specifies a topic name and a set of topic properties.
The topic defined in topic parameter has to already exist in Kafka
servers.
Each topic property is a list of attribute = value separated by
semicolon.
name atribute indicates the topic name. It is mandatory. Other
attributes mean names of properties and are optional.
This parameter is optional. Each topic needs a topic parameter so
several topic parameters are allowed.
Example 1.3. Set topic parameter
...
modparam("kafka", "topic", "name=my_topic;request.required.acks=0;request.timeou
t.ms=10000")
modparam("kafka", "topic", "name=second_topic;request.required.acks=0;request.ti
meout.ms=10000")
modparam("kafka", "topic", "name=third_topic")
...
2.4. Functions
2.4.1. kafka_send(topic, msg)
Send a message to a specific topic via Kafka server.
Parameters:
* topic: (string) name of the topic. It is mandatory.
* msg: (string) message to send. It is mandatory.
Available via KEMI framework as kafka.send.
Example 1.4. kafka_send usage
...
# Send "test message" to topic "my_topic"
kafka_send("my_topic", "test message");
...
2.5. RPC Commands
2.5.1. kafka.stats
Show statistics about total sent messages and failed to deliver ones.
Example 1.5. kafka.stats usage
...
kamcmd kafka.stats
Total messages: 26 Errors: 0
...
2.5.2. kafka.stats_topic
Show statistics about sent messages and failed to deliver ones for a
specific topic.
Parameter: topic (string) name of the topic. Required.
Example 1.6. kafka.stats usage
...
# Show statistics for my_topic.
kamcmd kafka.stats_topic "my_topic"
Topic: my_topic Total messages: 17 Errors: 0
...
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2112
-- Commit Summary --
* kafka: module to produce and send messages to a Kafka server
-- File Changes --
A src/modules/kafka/Makefile (23)
A src/modules/kafka/doc/Makefile (4)
A src/modules/kafka/doc/kafka.xml (41)
A src/modules/kafka/doc/kafka_admin.xml (221)
A src/modules/kafka/kafka_mod.c (335)
A src/modules/kafka/kfk.c (1175)
A src/modules/kafka/kfk.h (96)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2112.patchhttps://github.com/kamailio/kamailio/pull/2112.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/2112