<!-- 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 -->
Skip cdr generation for dialogs with this dlg_var set. This is analogue to parameter in acc module.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4323
-- Commit Summary --
* acc_json: add cdr_skip parameter
-- File Changes --
M src/modules/acc_json/acc_json_mod.c (16)
M src/modules/acc_json/doc/acc_json_admin.xml (18)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4323.patchhttps://github.com/kamailio/kamailio/pull/4323.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4323
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4323(a)github.com>
Module: kamailio
Branch: master
Commit: dfd5358fd4a685d5c368753e826bff63c4e38988
URL: https://github.com/kamailio/kamailio/commit/dfd5358fd4a685d5c368753e826bff6…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2025-07-16T09:31:34+02:00
dispatcher: docs for event_callback_mode parameter
---
Modified: src/modules/dispatcher/doc/dispatcher_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/dfd5358fd4a685d5c368753e826bff6…
Patch: https://github.com/kamailio/kamailio/commit/dfd5358fd4a685d5c368753e826bff6…
---
diff --git a/src/modules/dispatcher/doc/dispatcher_admin.xml b/src/modules/dispatcher/doc/dispatcher_admin.xml
index 1f897f8335b..9429afba67f 100644
--- a/src/modules/dispatcher/doc/dispatcher_admin.xml
+++ b/src/modules/dispatcher/doc/dispatcher_admin.xml
@@ -1073,6 +1073,40 @@ end
</example>
</section>
+ <section id="dispatcher.p.event_callback_mode">
+ <title><varname>event_callback_mode</varname> (int)</title>
+ <para>
+ Controls when the event_route or the KEMI event callback function
+ are executed. If set to 0, they are executed when the destination
+ state changes based on OPTIONS keepalives or the use of config
+ functions to set the state (e.g., ds_mark_dst(...)). If set to 1,
+ they are executed only on state change due to OPTIONS keepalives.
+ </para>
+ <para>
+ Note that event routes are not executed on RPC commands setting
+ the destination state.
+ </para>
+ <para>
+ <emphasis>
+ Default value is '0'.
+ </emphasis>
+ </para>
+ <example>
+ <title>Set <varname>event_callback_mode</varname> parameter</title>
+ <programlisting format="linespecific">
+...
+modparam("dispatcher", "event_callback_mode", 1)
+...
+-- event callback function implemented in Lua
+function ksr_dispatcher_event(evname)
+ KSR.info("===== dispatcher module triggered event: " .. evname .. "\n");
+ return 1;
+end
+...
+</programlisting>
+ </example>
+ </section>
+
<section id="dispatcher.p.ds_attrs_none">
<title><varname>ds_attrs_none</varname> (int)</title>
<para>
@@ -2634,39 +2668,45 @@ setid(int) destination(sip uri) flags(int,opt) priority(int,opt) attrs(str,opt)
<section id="dispatcher.ex.event_routes">
<title>Event routes</title>
<section>
- <title>
- <function moreinfo="none">dispatcher:dst-down</function>
- </title>
- <para>
+ <title>
+ <function moreinfo="none">dispatcher:dst-down</function>
+ </title>
+ <para>
When defined, the module calls event_route[dispatcher:ds-down]
when a destination goes down (becomes probing). A typical use
case is to update NMC equipment as to the status of a destination.
- </para>
+ </para>
+ <para>
+ Its execution is controlled by event_callback_mode parameter.
+ </para>
<programlisting format="linespecific">
...
event_route[dispatcher:dst-down] {
xlog("L_ERR", "Destination down: $rm $ru ($du)\n");
}
...
- </programlisting>
+</programlisting>
</section>
<section>
- <title>
- <function moreinfo="none">dispatcher:dst-up</function>
- </title>
- <para>
+ <title>
+ <function moreinfo="none">dispatcher:dst-up</function>
+ </title>
+ <para>
When defined, the module calls event_route[dispatcher:ds-up]
when a destination that was previously down (probing) comes up.
A typical use case is to update NMC equipment as to the status
of a destination.
- </para>
+ </para>
+ <para>
+ Its execution is controlled by event_callback_mode parameter.
+ </para>
<programlisting format="linespecific">
...
event_route[dispatcher:dst-up] {
xlog("L_ERR", "Destination up: $rm $ru\n");
}
...
- </programlisting>
+</programlisting>
</section>
</section>