<!-- 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 -->
Added secfilter module scheme to dbtext, as per using `kamdbctl create` with DBTEXT, was getting following error
```
cp: cannot stat '/usr/share/kamailio//dbtext/kamailio/secfilter': No such file or directory
```
With this patch error is gone. Secfilter DBTEXT scheme is taken from SQLite scheme.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2261
-- Commit Summary --
* kamctl: added secfilter to dbtext
-- File Changes --
A utils/kamctl/dbtext/kamailio/secfilter (1)
M utils/kamctl/dbtext/kamailio/version (1)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2261.patchhttps://github.com/kamailio/kamailio/pull/2261.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/2261
Module: kamailio
Branch: master
Commit: 5a16612493f9d6622f2c22fa83864295c7b55c9b
URL: https://github.com/kamailio/kamailio/commit/5a16612493f9d6622f2c22fa8386429…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2020-03-31T11:31:21+02:00
modules: readme files regenerated - tcpops ... [skip ci]
---
Modified: src/modules/tcpops/README
---
Diff: https://github.com/kamailio/kamailio/commit/5a16612493f9d6622f2c22fa8386429…
Patch: https://github.com/kamailio/kamailio/commit/5a16612493f9d6622f2c22fa8386429…
---
diff --git a/src/modules/tcpops/README b/src/modules/tcpops/README
index 4c08b3624b..70209686f0 100644
--- a/src/modules/tcpops/README
+++ b/src/modules/tcpops/README
@@ -32,6 +32,8 @@ Olle E. Johansson
3.5. tcp_set_connection_lifetime([conid], lifetime)
3.6. tcp_enable_closed_event([conid])
3.7. tcp_get_conid(hostport, pvname)
+ 3.8. tcp_set_otcpid(conid)
+ 3.9. tcp_set_otcpid_flag(mode)
4. Event routes
@@ -51,6 +53,8 @@ Olle E. Johansson
1.7. tcp_set_connection_lifetime usage
1.8. tcp_set_closed_event usage
1.9. tcp_get_conid usage
+ 1.10. tcp_set_otcpid usage
+ 1.11. tcp_set_otcpid_flag usage
Chapter 1. Admin Guide
@@ -71,6 +75,8 @@ Chapter 1. Admin Guide
3.5. tcp_set_connection_lifetime([conid], lifetime)
3.6. tcp_enable_closed_event([conid])
3.7. tcp_get_conid(hostport, pvname)
+ 3.8. tcp_set_otcpid(conid)
+ 3.9. tcp_set_otcpid_flag(mode)
4. Event routes
@@ -144,6 +150,8 @@ end
3.5. tcp_set_connection_lifetime([conid], lifetime)
3.6. tcp_enable_closed_event([conid])
3.7. tcp_get_conid(hostport, pvname)
+ 3.8. tcp_set_otcpid(conid)
+ 3.9. tcp_set_otcpid_flag(mode)
3.1. tcp_conid_alive(conid)
@@ -345,6 +353,53 @@ event_route[tcp:closed] {
}
...
+3.8. tcp_set_otcpid(conid)
+
+ Set the value for outbound tcp connection id.
+
+ Meaning of the parameters is as follows:
+ * conid - the value of tcp connection id. It can be an integer number
+ or a variable holding an interver value.
+
+ Return values:
+ * 1: success
+ * -1: failure
+
+ Example 1.10. tcp_set_otcpid usage
+...
+ $var(conid) = 10;
+ tcp_set_otcpid("$var(conid)");
+...
+
+3.9. tcp_set_otcpid_flag(mode)
+
+ Set or reset the internal flag for using or not the outbound tcp
+ connection id for sending out. The outbound connection id can be set by
+ module or by config using tcp_set_otcpid(...) function. An example of a
+ module setting the otcpid is register via lookup location function,
+ which sets the filed to the connection id used to receive the
+ registration request.
+
+ Meaning of the parameters is as follows:
+ * mode - if 0, then the flag is reset, otherwise it is set.
+
+ Return values:
+ * 1: success
+ * -1: failure
+
+ Note: if you set the flag to use the outbound tcp connection id, then
+ custom config changes to the destination address, like updating the
+ r-uri ($ru) or dst uri ($du) are not resetting it, so the same already
+ set connection id is used and the SIP request might be sent to the
+ unexpected destination. Reset the flag in such case, if you set it
+ previously.
+
+ Example 1.11. tcp_set_otcpid_flag usage
+...
+ $var(cmode) = 1;
+ tcp_set_otcpid_flag("$var(cmode)");
+...
+
4. Event routes
4.1. tcp:closed
Module: kamailio
Branch: master
Commit: d6e94d074a2a1f1af2964f1ed7f24602a8dd295a
URL: https://github.com/kamailio/kamailio/commit/d6e94d074a2a1f1af2964f1ed7f2460…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-03-31T11:23:20+02:00
tcpops: docs for tcp_set_otcpid() and tcp_set_otcpid_flag() functions
---
Modified: src/modules/tcpops/doc/functions.xml
---
Diff: https://github.com/kamailio/kamailio/commit/d6e94d074a2a1f1af2964f1ed7f2460…
Patch: https://github.com/kamailio/kamailio/commit/d6e94d074a2a1f1af2964f1ed7f2460…
---
diff --git a/src/modules/tcpops/doc/functions.xml b/src/modules/tcpops/doc/functions.xml
index 9c6409c4e6..94cefaa776 100644
--- a/src/modules/tcpops/doc/functions.xml
+++ b/src/modules/tcpops/doc/functions.xml
@@ -290,6 +290,87 @@ event_route[tcp:closed] {
if(tcp_get_conid("127.0.0.1:5060", "$var(conid)")) {
xlog("connection id is: $var(conid)\n");
}
+...
+ ]]></programlisting>
+ </example>
+ </section>
+ <section id="tcpops.f.tcp_set_otcpid">
+ <title>
+ <function>tcp_set_otcpid(conid)</function>
+ </title>
+ <para>
+ Set the value for outbound tcp connection id.
+ </para>
+ <para>Meaning of the parameters is as follows:</para>
+ <itemizedlist>
+ <listitem>
+ <para><emphasis>conid</emphasis> - the value of tcp connection id.
+ It can be an integer number or a variable holding an interver value.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>Return values:</para>
+ <itemizedlist>
+ <listitem>
+ <para>1: success</para>
+ </listitem>
+ <listitem>
+ <para>-1: failure</para>
+ </listitem>
+ </itemizedlist>
+ <example>
+ <title><function>tcp_set_otcpid</function> usage</title>
+ <programlisting><![CDATA[
+...
+ $var(conid) = 10;
+ tcp_set_otcpid("$var(conid)");
+...
+ ]]></programlisting>
+ </example>
+ </section>
+ <section id="tcpops.f.tcp_set_otcpid_flag">
+ <title>
+ <function>tcp_set_otcpid_flag(mode)</function>
+ </title>
+ <para>
+ Set or reset the internal flag for using or not the outbound tcp
+ connection id for sending out. The outbound connection id can be
+ set by module or by config using tcp_set_otcpid(...) function. An
+ example of a module setting the otcpid is register via lookup location
+ function, which sets the filed to the connection id used to receive
+ the registration request.
+ </para>
+ <para>Meaning of the parameters is as follows:</para>
+ <itemizedlist>
+ <listitem>
+ <para><emphasis>mode</emphasis> - if 0, then the flag is reset,
+ otherwise it is set.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>Return values:</para>
+ <itemizedlist>
+ <listitem>
+ <para>1: success</para>
+ </listitem>
+ <listitem>
+ <para>-1: failure</para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Note: if you set the flag to use the outbound tcp connection id,
+ then custom config changes to the destination address, like
+ updating the r-uri ($ru) or dst uri ($du) are not resetting it, so
+ the same already set connection id is used and the SIP request
+ might be sent to the unexpected destination. Reset the flag in such
+ case, if you set it previously.
+ </para>
+ <example>
+ <title><function>tcp_set_otcpid_flag</function> usage</title>
+ <programlisting><![CDATA[
+...
+ $var(cmode) = 1;
+ tcp_set_otcpid_flag("$var(cmode)");
...
]]></programlisting>
</example>
Module: kamailio
Branch: master
Commit: 8801ee89856d4a37709869a5c01dfa66988b8f5a
URL: https://github.com/kamailio/kamailio/commit/8801ee89856d4a37709869a5c01dfa6…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-03-31T09:11:40+02:00
core: parser - removed temporarily remark for module reserved internal flags
---
Modified: src/core/parser/msg_parser.h
---
Diff: https://github.com/kamailio/kamailio/commit/8801ee89856d4a37709869a5c01dfa6…
Patch: https://github.com/kamailio/kamailio/commit/8801ee89856d4a37709869a5c01dfa6…
---
diff --git a/src/core/parser/msg_parser.h b/src/core/parser/msg_parser.h
index ceedf2cda9..02bba6b1b9 100644
--- a/src/core/parser/msg_parser.h
+++ b/src/core/parser/msg_parser.h
@@ -111,16 +111,16 @@ typedef enum request_method {
#define FL_SIPTRACE (1<<24) /*!< message to be traced in stateless replies */
#define FL_ROUTE_ADDR (1<<25) /*!< request has Route address for next hop */
-/* WARNING: Value (1 << 28) is temporarily reserved for use in kamailio call_control
+/* WARNING: Value (1 << 28) is reserved for use in kamailio call_control
* module (flag FL_USE_CALL_CONTROL )! */
-/* WARNING: Value (1 << 29) is temporarily reserved for use in kamailio acc
+/* WARNING: Value (1 << 29) is reserved for use in kamailio acc
* module (flag FL_REQ_UPSTREAM)! */
-/* WARNING: Value (1 << 30) is temporarily reserved for use in kamailio
+/* WARNING: Value (1 << 30) is reserved for use in kamailio
* media proxy module (flag FL_USE_MEDIA_PROXY)! */
-/* WARNING: Value (1 << 31) is temporarily reserved for use in kamailio
+/* WARNING: Value (1 << 31) is reserved for use in kamailio
* nat_traversal module (flag FL_DO_KEEPALIVE)! */
#define FL_MTU_FB_MASK (FL_MTU_TCP_FB|FL_MTU_TLS_FB|FL_MTU_SCTP_FB)
<!-- Kamailio Pull Request Template -->
ims_dialog bugfix for registering dialog callbacks
ims_qos bugfix for Rx register dialog callback
<!--
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 --> 5.3
- [x] Tested changes locally --> Tested locally based on 5.1.6
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
ims_dialog bugfix for registering dialog callbacks
In Rx scenarios of parallel forking (several INVITEs with same CALLID
and FROMTAG sent to PCSCF) and INVITE for orig and term handled in
same PCSCF (means also INVITEs with identical CALLID and FROMTAG) the wrong
dialog is selected for registering the callback (i.e. the callback
for sending STR) when 200OK from terminator is processed.
Root cause is that dialog is searched with callid-fromtag-totag but at
the time of dialog insertion (processing of INVITE) no totag is available.
fix is to get ctx dialog at 200OK processing before suspending the
transaction - save dialog until AAA is received - use this dialog for
registering the STR callback.
ims_qos bugfix for Rx register dialog callback
In some scenarios like parallel forking several INVITE with identical
CALLID and FROMTAG sent to PCSCF which inserts dialogues for each INVITE.
When 200OK is received in PCSCF the dialog callback must be registered
for the respective dialog. Currently sometimes the wrong dialog is selected
by searching with CALLID FROMTAG and TOTAG thus leading to problem
no STR is sent at BYE. Fix is to pickup the right dialog before suspending
the transaction during AAR/AAA processing and reuse this saved dialog
after AAA reception for registering the dialog callback.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2263
-- Commit Summary --
* ims_dialog bugfix for registering dialog callbacks
* ims_qos bugfix for Rx register dialog callback
-- File Changes --
M src/modules/ims_dialog/dlg_cb.c (9)
M src/modules/ims_dialog/dlg_cb.h (5)
M src/modules/ims_dialog/dlg_handlers.c (1)
M src/modules/ims_qos/ims_qos_mod.c (7)
M src/modules/ims_qos/rx_aar.c (3)
M src/modules/ims_qos/rx_aar.h (1)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2263.patchhttps://github.com/kamailio/kamailio/pull/2263.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/2263
Module: kamailio
Branch: 5.2
Commit: a11379790d1477c789fb72360bf2d5a23197fdd5
URL: https://github.com/kamailio/kamailio/commit/a11379790d1477c789fb72360bf2d5a…
Author: Peter Friedrich <peter.friedrich(a)kapsch.net>
Committer: Henning Westerholt <hw(a)skalatan.de>
Date: 2020-03-30T19:09:31+02:00
ims_qos: bugfix for Rx register dialog callback
- bugfix for Rx register dialog callback
- In some scenarios like parallel forking several INVITE with identical
CALLID and FROMTAG sent to PCSCF which inserts dialogues for each INVITE.
- When 200OK is received in PCSCF the dialog callback must be registered
for the respective dialog. Currently sometimes the wrong dialog is selected
by searching with CALLID FROMTAG and TOTAG thus leading to problem
no STR is sent at BYE.
- Fix is to pickup the right dialog before suspending the transaction during
AAR/AAA processing and reuse this saved dialog.
(cherry picked from commit 2768f8ce1cf6da242674e7e40c8e76eb6c630f6b)
---
Modified: src/modules/ims_qos/ims_qos_mod.c
Modified: src/modules/ims_qos/rx_aar.c
Modified: src/modules/ims_qos/rx_aar.h
---
Diff: https://github.com/kamailio/kamailio/commit/a11379790d1477c789fb72360bf2d5a…
Patch: https://github.com/kamailio/kamailio/commit/a11379790d1477c789fb72360bf2d5a…
---
diff --git a/src/modules/ims_qos/ims_qos_mod.c b/src/modules/ims_qos/ims_qos_mod.c
index 6f68b39be1..11a2e30df5 100644
--- a/src/modules/ims_qos/ims_qos_mod.c
+++ b/src/modules/ims_qos/ims_qos_mod.c
@@ -1085,6 +1085,13 @@ static int w_rx_aar(struct sip_msg *msg, char *route, char* dir, char *c_id, int
saved_t_data->aar_update = 1; //this is an update aar - we set this so on async_aar we know this is an update and act accordingly
}
+ dlg = dlgb.get_dlg(msg);
+ if (!dlg) {
+ LM_ERR("Unable to find dialog and cannot do Rx without it\n");
+ goto error;
+ }
+ saved_t_data->dlg = dlg;
+
LM_DBG("Suspending SIP TM transaction\n");
if (tmb.t_suspend(msg, &saved_t_data->tindex, &saved_t_data->tlabel) != 0) {
LM_ERR("failed to suspend the TM processing\n");
diff --git a/src/modules/ims_qos/rx_aar.c b/src/modules/ims_qos/rx_aar.c
index 684f3a75c5..3fa9633fb5 100644
--- a/src/modules/ims_qos/rx_aar.c
+++ b/src/modules/ims_qos/rx_aar.c
@@ -176,8 +176,7 @@ void async_aar_callback(int is_timeout, void *param, AAAMessage *aaa, long elaps
passed_rx_session_id->len = 0;
STR_SHM_DUP(*passed_rx_session_id, aaa->sessionId->data, "cb_passed_rx_session_id");
LM_DBG("passed rx session id [%.*s]", passed_rx_session_id->len, passed_rx_session_id->s);
-
- dlgb.register_dlgcb_nodlg(&data->callid, &data->ftag, &data->ttag, DLGCB_TERMINATED | DLGCB_DESTROY | DLGCB_EXPIRED | DLGCB_RESPONSE_WITHIN | DLGCB_CONFIRMED | DLGCB_FAILED, callback_dialog, (void*) (passed_rx_session_id), free_dialog_data);
+ dlgb.register_dlgcb_nodlg( data->dlg, DLGCB_TERMINATED | DLGCB_DESTROY | DLGCB_EXPIRED | DLGCB_RESPONSE_WITHIN | DLGCB_CONFIRMED | DLGCB_FAILED, callback_dialog, (void*) (passed_rx_session_id), free_dialog_data);
}
result = CSCF_RETURN_TRUE;
} else {
diff --git a/src/modules/ims_qos/rx_aar.h b/src/modules/ims_qos/rx_aar.h
index f12def162f..596e0726c6 100644
--- a/src/modules/ims_qos/rx_aar.h
+++ b/src/modules/ims_qos/rx_aar.h
@@ -72,6 +72,7 @@ typedef struct saved_transaction {
str ftag;
str ttag;
unsigned int aar_update;
+ struct dlg_cell* dlg;
} saved_transaction_t;
typedef struct saved_transaction_local {