<!-- 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 -->
Fixed an error in an example in the docfile
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3217
-- Commit Summary --
* secfilter: machine-parsable data structure for RPC printing data
* secfilter: updated samples [skip ci]
* secfilter: fix examples [skip ci]
-- File Changes --
M src/modules/secfilter/doc/secfilter_admin.xml (121)
M src/modules/secfilter/secfilter_rpc.c (383)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3217.patchhttps://github.com/kamailio/kamailio/pull/3217.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3217
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3217(a)github.com>
Module: kamailio
Branch: master
Commit: 252562b8fce76cb01cde993b530509e89baae95a
URL: https://github.com/kamailio/kamailio/commit/252562b8fce76cb01cde993b530509e…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2022-08-15T20:31:14+02:00
modules: readme files regenerated - xhttp ... [skip ci]
---
Modified: src/modules/xhttp/README
---
Diff: https://github.com/kamailio/kamailio/commit/252562b8fce76cb01cde993b530509e…
Patch: https://github.com/kamailio/kamailio/commit/252562b8fce76cb01cde993b530509e…
---
diff --git a/src/modules/xhttp/README b/src/modules/xhttp/README
index 781ac41392..9a59c839aa 100644
--- a/src/modules/xhttp/README
+++ b/src/modules/xhttp/README
@@ -131,11 +131,15 @@ Chapter 1. Admin Guide
3.2. Kamailio Core Settings
- SIP requires a Content-Length header for TCP transport. But most HTTP
- clients do not set the content length for normal GET requests.
- Therefore, the core must be configured to allow incoming requests
- without content length header:
- * tcp_accept_no_cl=yes
+ Related core settings:
+ * tcp_accept_no_cl=yes - SIP requires the Content-Length header for
+ TCP transport. But most HTTP clients do not set the content length
+ for normal GET requests. Therefore, the core must be configured to
+ allow incoming requests without content length header.
+ * http_reply_parse=yes - various Kamailio modules may parse what it
+ is sent out (e.g., for replication, topology management). In such
+ case errors are printed if the outgoing message is not SIP and this
+ parameter is not set.
3.3. External Libraries or Applications
Module: kamailio
Branch: master
Commit: 36b0da00b9fc08be9e855d5dd4cc878b6e3c88bf
URL: https://github.com/kamailio/kamailio/commit/36b0da00b9fc08be9e855d5dd4cc878…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-08-15T20:18:02+02:00
xhttp: docs - listed http_reply_parse core setting
---
Modified: src/modules/xhttp/doc/xhttp_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/36b0da00b9fc08be9e855d5dd4cc878…
Patch: https://github.com/kamailio/kamailio/commit/36b0da00b9fc08be9e855d5dd4cc878…
---
diff --git a/src/modules/xhttp/doc/xhttp_admin.xml b/src/modules/xhttp/doc/xhttp_admin.xml
index 507283b90f4..f0e6d3fdeb8 100644
--- a/src/modules/xhttp/doc/xhttp_admin.xml
+++ b/src/modules/xhttp/doc/xhttp_admin.xml
@@ -85,13 +85,23 @@
<section>
<title>&kamailio; Core Settings</title>
<para>
- SIP requires a Content-Length header for TCP transport. But most HTTP clients do not
- set the content length for normal GET requests. Therefore, the core must be configured
- to allow incoming requests without content length header:
+ Related core settings:
<itemizedlist>
<listitem>
<para>
- <emphasis>tcp_accept_no_cl=yes</emphasis>
+ <emphasis>tcp_accept_no_cl=yes</emphasis> - SIP requires the
+ Content-Length header for TCP transport. But most HTTP clients
+ do not set the content length for normal GET requests. Therefore,
+ the core must be configured to allow incoming requests without
+ content length header.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>http_reply_parse=yes</emphasis> - various Kamailio
+ modules may parse what it is sent out (e.g., for replication,
+ topology management). In such case errors are printed if the
+ outgoing message is not SIP and this parameter is not set.
</para>
</listitem>
</itemizedlist>
Hi all,
I was doing some tests with HOMER and a PostgreSQL backend
The HOMER schema creates the msg column as varchar(1500)
CREATE TABLE IF NOT EXISTS rtcp_capture (
id BIGSERIAL NOT NULL,
date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
micro_ts bigint NOT NULL DEFAULT '0',
correlation_id varchar(256) NOT NULL DEFAULT '',
source_ip varchar(60) NOT NULL DEFAULT '',
source_port integer NOT NULL DEFAULT 0,
destination_ip varchar(60) NOT NULL DEFAULT '',
destination_port integer NOT NULL DEFAULT 0,
proto integer NOT NULL DEFAULT 0,
family smallint DEFAULT NULL,
type integer NOT NULL DEFAULT 0,
node varchar(125) NOT NULL DEFAULT '',
msg varchar(1500) NOT NULL DEFAULT '',
PRIMARY KEY (id,date)
);
The sipcapture.c source code says that msg is DB1_BLOB
https://github.com/kamailio/kamailio/blob/master/src/modules/sipcapture/sip…
db_keys[11] = &msg_column;
db_vals[11].type = DB1_BLOB;
db_vals[11].nul = 0;
When the Kamailio PostgreSQL module db_postgres tries to store DB1_BLOB,
it converts the message text into a hex string and stores that string
like this:
'0x7b2273656e6465725f696e666f726d6174696f6e223a7b226e74705f74696d657374616d705f736563223a3338333033312c226e74705f74696d657374616d705f75736563223a32333237332c226f6374657473223a3136343030302c227274705f74696d657374616d70223a323132353238323231342c227061636b657473223a313032357d2c2273737263223a323330343334323235382c2274797065223a3230302c227265706f72745f626c6f636b73223a5b7b22736f757263655f73737263223a333737363636373030392c22686967686573745f7365715f6e6f223a31363739332c226672616374696f6e5f6c6f7374223a302c2269615f6a6974746572223a31372c227061636b6574735f6c6f7374223a302c226c7372223a3837363937393735352c22646c7372223a35303234397d5d2c227265706f72745f636f756e74223a317d'
I tried changing the msg column type to bytea (blob) and Kamailio is
still doing the same thing, storing a hex string into the column.
Then I changed the column back to varchar(1500) and I modified
sipcapture.c to use DB1_STR. With this change it is working OK.
However, I suspect that the support for DB1_BLOB conversions may need to
be reviewed in
src/modules/db_postgres/km_val.c
Regards,
Daniel
--
https://danielpocock.com
Follow with RSS: https://danielpocock.com/rss.xml
<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for feature requests.
If you have questions about using Kamailio or related to its configuration file, ask on sr-users mailing list:
* http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
If you have questions about developing extensions to Kamailio or its existing C code, ask on sr-dev mailing list:
* http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Please try to fill this template as much as possible for any issue. It helps the developers to troubleshoot the issue.
If you submit a feature request (or enhancement) add the description of what you would like to be added.
If there is no content to be filled in a section, the entire section can be removed.
You can delete the comments from the template sections when filling.
You can delete next line and everything above before submitting (it is a comment).
-->
### Description
I'm unable to add the generated `Identity` value to reply message when `kamailio` acts as a redirect server and replies with `302 Moved Temporarily` instead of relaying `INVITE`.
This code doesn't work, i.e. no `Identity` header in `302 Moved Temporarily` message:
```
if (stirshaken_add_identity($var(x5u), $var(attest), $var(origtn_val), $var(desttn_val), $var(origid)) == 1)
{
append_branch("sip:$rU@127.0.0.1:6060");
sl_send_reply("302", "Moved Temporarily");
exit;
}
```
### Expected behavior
It would be nice if the `stirshaken_add_identity_*` functions would add the generated `Identity` header to the reply messages too, or store the generated `Identity` header in a separate variable, like `$identity`, for the future processing.
--
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/2770