<!-- 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
- [x] Related to issue #3831
#### Description
<!-- Describe your changes in detail -->
The `tm` currently does not trigger the `tm:local-request` event for CANCEL requests that are created by the tm.cancel RPC function. This pull request adds support for triggering the tm:local-request event for CANCEL requests.
According to [docs](https://www.kamailio.org/docs/modules/devel/modules/tm#tm.e.local-req… an event `tm:local-request` should be created for every request that is originates from kamailio and creates a transaction.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3962
-- Commit Summary --
* tm: Emit request event when cancel is called
-- File Changes --
M src/modules/tm/t_cancel.c (62)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3962.patchhttps://github.com/kamailio/kamailio/pull/3962.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3962
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3962(a)github.com>
Module: kamailio
Branch: master
Commit: 45a93b46f0845867fdc1fd07a798eda6a9480816
URL: https://github.com/kamailio/kamailio/commit/45a93b46f0845867fdc1fd07a798eda…
Author: Henning Westerholt <hw(a)gilawa.com>
Committer: Henning Westerholt <hw(a)gilawa.com>
Date: 2024-09-16T11:45:11Z
sst: small white space change in docs after dialog flag removal (commit 7e139951dc)
---
Modified: src/modules/sst/doc/sst_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/45a93b46f0845867fdc1fd07a798eda…
Patch: https://github.com/kamailio/kamailio/commit/45a93b46f0845867fdc1fd07a798eda…
---
diff --git a/src/modules/sst/doc/sst_admin.xml b/src/modules/sst/doc/sst_admin.xml
index 751dd3a2f49..6b44916ab78 100644
--- a/src/modules/sst/doc/sst_admin.xml
+++ b/src/modules/sst/doc/sst_admin.xml
@@ -54,7 +54,7 @@
All of this happens with a properly configured dialog and sst
module. You need to call the dlg_manage() function and set the
sst flag at the time any INVITE sip message is seen.
- There is no &kamailioconfig; script function call required to
+ There is no &kamailioconfig; script function call required to
set the dialog expire timeout value.
See the <quote>dialog module</quote> users guide for
more information.
@@ -312,7 +312,7 @@ modparam("sst", "sst_flag", 6)
route {
...
if (method=="INVITE") {
- dlg_manage(); # Track the dialog
+ dlg_manage(); # Track the dialog
setflag(6); # set the sst flag
}
...
<!-- 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
- [x] Tested changes locally
- [x] Related to issue #2593
#### Description
<!-- Describe your changes in detail -->
This PR removes the `dlg_flag` from the dialog module and recommends `dlg_manage()` instead in the docs.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3961
-- Commit Summary --
* dialog: Drop support for dlg_flag parameter
* dialog/doc: Remove dlg_flag docs and suggest dlg_manage() instead.
-- File Changes --
M src/modules/dialog/dialog.c (13)
M src/modules/dialog/dlg_handlers.c (22)
M src/modules/dialog/dlg_handlers.h (3)
M src/modules/dialog/doc/dialog_admin.xml (24)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3961.patchhttps://github.com/kamailio/kamailio/pull/3961.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3961
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3961(a)github.com>
Module: kamailio
Branch: master
Commit: 60a5ea45c5cc18b7074330da52ed1944cfbf3fbb
URL: https://github.com/kamailio/kamailio/commit/60a5ea45c5cc18b7074330da52ed194…
Author: Xenofon Karamanos <22965395+xkaraman(a)users.noreply.github.com>
Committer: Henning Westerholt <hw(a)gilawa.com>
Date: 2024-09-16T13:39:06+02:00
mediaproxy: Remove dlg_flag and update docs
---
Modified: src/modules/mediaproxy/doc/mediaproxy_admin.xml
Modified: src/modules/mediaproxy/mediaproxy.c
---
Diff: https://github.com/kamailio/kamailio/commit/60a5ea45c5cc18b7074330da52ed194…
Patch: https://github.com/kamailio/kamailio/commit/60a5ea45c5cc18b7074330da52ed194…
---
diff --git a/src/modules/mediaproxy/doc/mediaproxy_admin.xml b/src/modules/mediaproxy/doc/mediaproxy_admin.xml
index d89207b33a3..c75ed86e629 100644
--- a/src/modules/mediaproxy/doc/mediaproxy_admin.xml
+++ b/src/modules/mediaproxy/doc/mediaproxy_admin.xml
@@ -349,7 +349,6 @@ modparam("mediaproxy", "ice_candidate_avp", "$avp(ice_candidate)")
called internally on dialog callbacks, so for this function to
work, the dialog module must be loaded and configured.
</para>
-
<para>
This function is an advanced mechanism to use a media relay
without having to manually call a function on each message that
@@ -371,6 +370,11 @@ modparam("mediaproxy", "ice_candidate_avp", "$avp(ice_candidate)")
This function can be used from REQUEST_ROUTE.
</para>
+ <note>
+ The <emphasis>dlg_manage()</emphasis> function must be called
+ in the configuration file before using this function.
+ </note>
+
<example>
<title>Using the <function>engage_media_proxy</function> function</title>
<programlisting format="linespecific">
@@ -378,6 +382,7 @@ modparam("mediaproxy", "ice_candidate_avp", "$avp(ice_candidate)")
if (method==INVITE && !has_totag()) {
# We can also use a specific media relay if we need to
#$avp(media_relay) = "1.2.3.4";
+ dlg_manage()
engage_media_proxy();
}
...
@@ -466,4 +471,3 @@ if (method==BYE) {
</section>
</chapter>
-
diff --git a/src/modules/mediaproxy/mediaproxy.c b/src/modules/mediaproxy/mediaproxy.c
index 7b4e301bdc7..c7ccd901a1d 100644
--- a/src/modules/mediaproxy/mediaproxy.c
+++ b/src/modules/mediaproxy/mediaproxy.c
@@ -207,7 +207,6 @@ static MediaproxySocket mediaproxy_socket = {
struct dlg_binds dlg_api;
Bool have_dlg_api = False;
-static int dialog_flag = -1;
// The AVP where the caller signaling IP is stored (if defined)
static AVP_Param signaling_ip_avp = {str_init(SIGNALING_IP_AVP_SPEC), {0}, 0};
@@ -1996,7 +1995,6 @@ static int EngageMediaProxy(struct sip_msg *msg)
return -1;
}
msg->msg_flags |= FL_USE_MEDIA_PROXY;
- setflag(msg, dialog_flag); // have the dialog module trace this dialog
return 1;
}
@@ -2049,9 +2047,6 @@ static int w_EndMediaSession(struct sip_msg *msg, char *p1, char *p2)
static int mod_init(void)
{
pv_spec_t avp_spec;
- int *param;
- modparam_t type;
-
// initialize the signaling_ip_avp structure
if(!signaling_ip_avp.spec.s || signaling_ip_avp.spec.len <= 0) {
LM_WARN("missing/empty signaling_ip_avp parameter. will use "
@@ -2130,21 +2125,6 @@ static int mod_init(void)
if(load_dlg_api(&dlg_api) == 0) {
have_dlg_api = True;
- // load dlg_flag and default_timeout parameters from the dialog module
- param = find_param_export(
- find_module_by_name("dialog"), "dlg_flag", INT_PARAM, &type);
- if(!param) {
- LM_CRIT("cannot find dlg_flag parameter in the dialog module\n");
- return -1;
- }
-
- if(type != INT_PARAM) {
- LM_CRIT("dlg_flag parameter found but with wrong type: %d\n", type);
- return -1;
- }
-
- dialog_flag = *param;
-
// register dialog creation callback
if(dlg_api.register_dlgcb(
NULL, DLGCB_CREATED, __dialog_created, NULL, NULL)
Module: kamailio
Branch: master
Commit: 7e139951dc925f60bdd37ce699b38188cb223888
URL: https://github.com/kamailio/kamailio/commit/7e139951dc925f60bdd37ce699b3818…
Author: Xenofon Karamanos <22965395+xkaraman(a)users.noreply.github.com>
Committer: Henning Westerholt <hw(a)gilawa.com>
Date: 2024-09-16T13:39:06+02:00
sst: Remove dlg_flag docs
---
Modified: src/modules/sst/doc/sst_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/7e139951dc925f60bdd37ce699b3818…
Patch: https://github.com/kamailio/kamailio/commit/7e139951dc925f60bdd37ce699b3818…
---
diff --git a/src/modules/sst/doc/sst_admin.xml b/src/modules/sst/doc/sst_admin.xml
index 9c905f9e3c0..751dd3a2f49 100644
--- a/src/modules/sst/doc/sst_admin.xml
+++ b/src/modules/sst/doc/sst_admin.xml
@@ -50,12 +50,15 @@
request the use of session timers if the UAC does not request
it.</para>
- <para>All of this happens with a properly configured dialog
- and sst module and setting the dialog flag and the sst flag at
- the time any INVITE sip message is seen. There is no
- &kamailioconfig; script function call required to set the dialog
- expire timeout value. See the <quote>dialog module</quote> users guide for
- more information.</para>
+ <para>
+ All of this happens with a properly configured dialog and sst
+ module. You need to call the dlg_manage() function and set the
+ sst flag at the time any INVITE sip message is seen.
+ There is no &kamailioconfig; script function call required to
+ set the dialog expire timeout value.
+ See the <quote>dialog module</quote> users guide for
+ more information.
+ </para>
<para>The <quote>sstCheckMin()</quote> script function can be used to verify
that the Session-expires / MIN-SE header field values are not too
@@ -287,9 +290,9 @@ modparam("sst", "reject_to_small", 0)
need to tell the sst module which flag value you are
assigning to sst.</para>
- <para>In most cases whenever you set the dialog flag
- you will want to set the sst flag. If the dialog flag
- is not set and the sst flag is set, it will not have
+ <para>In most cases whenever you call dlg_manage() function
+ you will want to set the sst flag. If the dialog is not tracked
+ and the sst flag is set, it will not have
any effect.</para>
<para><emphasis>This parameter must be set or the module will
@@ -304,13 +307,12 @@ modparam("sst", "reject_to_small", 0)
<title>Set <varname>sst_flag</varname> parameter</title>
<programlisting format="linespecific">
...
-modparam("dialog", "dlg_flag", 5)
modparam("sst", "sst_flag", 6)
...
route {
...
if (method=="INVITE") {
- setflag(5); # set the dialog flag
+ dlg_manage(); # Track the dialog
setflag(6); # set the sst flag
}
...
@@ -353,7 +355,6 @@ route {
...
modparam("dialog", "timeout_avp", "$avp(i:4242)")
-modparam("dialog", "dlg_flag", 5)
...
modparam("sst", "sst_flag", 6)
modparam("sst", "timeout_avp", "$avp(i:4242)")
@@ -367,7 +368,7 @@ route {
exit;
}
# track the session timers via the dialog module
- setflag(5);
+ dlg_manage();
setflag(6);
}
}
@@ -381,7 +382,7 @@ route {
exit;
}
# track the session timers via the dialog module
- setflag(5);
+ dlg_manage();
setflag(6);
}
}
@@ -407,4 +408,3 @@ route {
<para>Just load the module and remember to set the timeout_avp and sst_flag values.</para>
</section>
</chapter>
-