Tried append_to_reply from textutils in event_route[xhttp:request] - which is not a documented usage. It did not generate an error about a bad route, but did not seem to append the header to the response.
This may be a feature request, but wouldn't it be cool if it worked?
--
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/1548
Hello,
Could you please help check below question about parse_headers error.
Look like it cannot find a '\n' from the header body to the end of message.
Is it possible?
code:
match=q_memchr(tmp, '\n', end-tmp);
if (match){
match++;
}else {
ERR("bad body for <%s>(%d)\n", hdr->name.s, hdr->type);
/* abort(); */
tmp=end;
goto error;
}
Log:
^[[0;39;49m^[[0;31;49m 5(23) ERROR: [parser/msg_parser.c:329]: parse_headers(): bad header field [Route: <sip:pcsf-aut]
^[[0;39;49m^[[0;31;49m 5(23) ERROR: sipcapture [sipcapture.c:1209]: sip_capture_prepare(): cannot parse headers
^[[0;39;49m^[[0;31;49m 5(23) ERROR: [parser/msg_parser.c:329]: parse_headers(): bad header field [Route: <sip:pcsf-aut]
^[[0;39;49m^[[0;31;49m 5(23) ERROR: [parser/parse_ppi_pai.c:124]: parse_pai_header(): Error parsing PAI header
^[[0;39;49m^[[0;31;49m 5(23) ERROR: [parser/msg_parser.c:253]: get_hdr_field(): bad body for <Route: sip:pcsf-aut1.imsgroup0-000.qa41c.imsate.lucentlab.com;lr;ottag=ue_term;bidx=12;ac(9)
^[[0;39;49m^[[0;31;49m 5(23) ERROR: [parser/msg_parser.c:329]: parse_headers(): bad header field [Route: <sip:pcsf-aut]
^[[0;39;49m^[[0;31;49m 5(23) ERROR: [parser/parse_ppi_pai.c:171]: parse_ppi_header(): Error parsing PPI header
^[[0;39;49m^[[0;31;49m 4(22) ERROR: [parser/msg_parser.c:253]: get_hdr_field(): bad body for <P-Asserted-Identity: sip:+(50)
^[[0;39;49m^[[0;31;49m 4(22) ERROR: [parser/msg_parser.c:329]: parse_headers(): bad header field [P-Asserted-Identity:]
^[[0;39;49m^[[0;31;49m 4(22) ERROR: sipcapture [sipcapture.c:1209]: sip_capture_prepare(): cannot parse headers
^[[0;39;49m^[[0;31;49m 4(22) ERROR: [parser/msg_parser.c:253]: get_hdr_field(): bad body for <P-Asserted-Identity: sip:+(50)
^[[0;39;49m^[[0;31;49m 4(22) ERROR: [parser/msg_parser.c:329]: parse_headers(): bad header field [P-Asserted-Identity:]
^[[0;39;49m^[[0;31;49m 4(22) ERROR: [parser/parse_ppi_pai.c:124]: parse_pai_header(): Error parsing PAI header
^[[0;39;49m^[[0;31;49m 4(22) ERROR: [parser/msg_parser.c:253]: get_hdr_field(): bad body for <P-Asserted-Identity: sip:+(50)
^[[0;39;49m^[[0;31;49m 4(22) ERROR: [parser/msg_parser.c:329]: parse_headers(): bad header field [P-Asserted-Identity:]
^[[0;39;49m^[[0;31;49m 4(22) ERROR: [parser/parse_ppi_pai.c:171]: parse_ppi_header(): Error parsing PPI header
^[[0;39;49m^[[0;31;49m 3(20) ERROR: [parser/msg_parser.c:253]: get_hdr_field(): bad body for <P-Asserted-Identity: sip:+17053200002(50)
^[[0;39;49m^[[0;31;49m 3(20) ERROR: [parser/msg_parser.c:329]: parse_headers(): bad header field [P-Asserted-Identity:]
^[[0;39;49m^[[0;31;49m 3(20) ERROR: sipcapture [sipcapture.c:1209]: sip_capture_prepare(): cannot parse headers
^[[0;39;49m^[[0;31;49m 3(20) ERROR: [parser/msg_parser.c:253]: get_hdr_field(): bad body for <P-Asserted-Identity: sip:+17053200002(50)
^[[0;39;49m^[[0;31;49m 3(20) ERROR: [parser/msg_parser.c:329]: parse_headers(): bad header field [P-Asserted-Identity:]
^[[0;39;49m^[[0;31;49m 3(20) ERROR: [parser/parse_ppi_pai.c:124]: parse_pai_header(): Error parsing PAI header
^[[0;39;49m^[[0;31;49m 3(20) ERROR: [parser/msg_parser.c:253]: get_hdr_field(): bad body for <P-Asserted-Identity: sip:+17053200002(50)
^[[0;39;49m^[[0;31;49m 3(20) ERROR: [parser/msg_parser.c:329]: parse_headers(): bad header field [P-Asserted-Identity:]
^[[0;39;49m^[[0;31;49m 3(20) ERROR: [parser/parse_ppi_pai.c:171]: parse_ppi_header(): Error parsing PPI header
Thanks in advance.
--
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/1582
flex -o core/lex.yy.c core/cfg.lex
CC (gcc) [kamailio] core/lex.yy.o
CC (gcc) [kamailio] core/cfg.tab.o
LD (gcc) [kamailio] kamailio
CC (gcc) [M db_mysql.so] km_val.o
CC (gcc) [M db_mysql.so] my_fld.o
In file included from my_fld.c:22:0:
my_fld.h:37:2: error: unknown type name ‘my_bool’
my_bool is_null;
^~~~~~~
../../Makefile.rules:100: recipe for target 'my_fld.o' failed
make[2]: *** [my_fld.o] Error 1
Makefile:511: recipe for target 'modules' failed
make[1]: *** [modules] Error 1
make[1]: Leaving directory '/usr/local/src/kamailio-5.1/kamailio/src'
Makefile:27: recipe for target 'all' failed
make: *** [all] Error 2
--
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/1602
<!-- 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 -->
When using TLS with TOPOS the remote UAS could open a new TLS socket to the contact header.
The contact header must contain a domain name with a signed certitificate.
Adding the parameter to TOPOS module to control the host part of the contact headers
```
modparam("topos", "contact_hostname", "proxy.domain.com")
```
Default behavior is left unchanged
I will update documentation it his modification is confirmed to be valuable.
Else I would be curious to know how this should be handled differently.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/1596
-- Commit Summary --
* topos: adding param contact_hostname
-- File Changes --
M src/modules/topos/topos_mod.c (2)
M src/modules/topos/tps_storage.c (13)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/1596.patchhttps://github.com/kamailio/kamailio/pull/1596.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/1596
Hello,
I want to highlight that the last stable versions (for the two maintained
series: 5.0 and 5.1) include fixes for an security issues that can crash a
running instance of Kamailio, therefore it is strongly recommended to upgrade.
Details:
There exists a security vulnerability in the Kamailio SIP server related to
"To" header processing. A specially crafted SIP message with double "To"
header and an empty "To" tag causes a segmentation fault and crashes Kamailio.
The reason is missing input validation in the "build_res_buf_from_sip_req"
core function.
If an attacker sends many of this messages this would lead to a Denial of
Service of the attacked infrastructure. This is especially critical as no
authentication for the remote source is needed.
You find all the details including a proof of concept code in the published
security announcement in my blog:
https://skalatan.de/blog/advisory-hw-2018-05
A CVE report for this issue is going to be created as well in the near future.
The issues were found some months ago and were fixed quickly. The code related
to the reported issues is rather old and there are no known incidents of
exploiting these issues so far. However, once the CVE report becomes public,
there could be a higher risk of exploitation.
Please address any detailed technical questions related to this to the
developer list at sr-dev(a)lists.kamailio.org .
In case of confidential remarks related to this or other security issues,
please address them to the Kamailio Management.
Best regards,
Henning Westerholt
--
Henning Westerholt
https://skalatan.de/blog/
<!-- 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 is an implementation of sec-agree used in IMS with IPSec. It's not a complete sec-agree implementation, only the flows used by IMS. The code is usable, but needs a few improvements, which I plan to push in the near future. **My work is based on the implementation in OpenIMSCore.**
For IPSec implementation the XFRM framework from the Linux kernel is used. Security association (SA) and Policies creation/removal is performed via netlink messages. For this reason the module depends on libmnl (a minimalistic netlink library).
As XFRM is Linux specific, the code is not portable and can't be used on operating system different from Linux. The code will not compile on *BSDs too. However all platform specific code resides in ipsec.c so support for other OSes/IPSec implementations can be added relatively easy.
The README file, which is commited is generated from docs dir with xsltproc.
Issues I still work on:
- Kamailio must be run as root in order to be able to send netlink messages and create XFRM SAs and Policies.
- SAs and Policies are not deleted on Kamailio startup and shutdown.
- According to the current contact implementation in the PCSCF modules (adn the 3GPP specs) the IPSec tunnel should be created on two steps. Initial parameters should be saved in security_tmp and on confirmation - in security. At the moment everything remains in security.
As this is my first more serious contribution to the project, all kinds of feedback is highly appreciated :)
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/1605
-- Commit Summary --
* ims_ipsec_pcscf: sec-agree implementation for IMS
-- File Changes --
A src/modules/ims_ipsec_pcscf/Makefile (20)
A src/modules/ims_ipsec_pcscf/README (244)
A src/modules/ims_ipsec_pcscf/cmd.c (585)
A src/modules/ims_ipsec_pcscf/cmd.h (6)
A src/modules/ims_ipsec_pcscf/doc/Makefile (4)
A src/modules/ims_ipsec_pcscf/doc/ims_ipsec_pcscf.xml (88)
A src/modules/ims_ipsec_pcscf/doc/ims_ipsec_pcscf_admin.xml (231)
A src/modules/ims_ipsec_pcscf/ims_ipsec_pcscf_mod.c (227)
A src/modules/ims_ipsec_pcscf/ipsec.c (386)
A src/modules/ims_ipsec_pcscf/ipsec.h (24)
A src/modules/ims_ipsec_pcscf/run_spi_list_tests.sh (4)
A src/modules/ims_ipsec_pcscf/spi_gen.c (87)
A src/modules/ims_ipsec_pcscf/spi_gen.h (16)
A src/modules/ims_ipsec_pcscf/spi_list.c (123)
A src/modules/ims_ipsec_pcscf/spi_list.h (29)
A src/modules/ims_ipsec_pcscf/spi_list_tests.c (292)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/1605.patchhttps://github.com/kamailio/kamailio/pull/1605.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/1605
<!-- 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 -->
- [ ] Commit message has the format required by CONTRIBUTING guide
- [ ] Commits are split per component (core, individual modules, libs, utils, ...)
- [ ] Each component has a single commit (if not, squash them into one commit)
- [ ] 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 -->
The load_cbs and create_cbs were interchanged in line 136.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/1607
-- Commit Summary --
* Update dlg_cb.c
-- File Changes --
M src/modules/dialog/dlg_cb.c (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/1607.patchhttps://github.com/kamailio/kamailio/pull/1607.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/1607
Hello!
I am using kamailio 5.1.4.
version: kamailio 5.1.4 (x86_64/linux)
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled on 15:11:36 Jul 20 2018 with gcc 7.3.0
The problem is that if kamailio is restarted during a call the cdr would not be created.
The run_load_callbacks() should be call after acc module is loaded.
The acc module will setup DLGCB_LOADED type callback. So run_load_callbacks() should be delayed and run only once, the child_init(PROC_MAIN) is perfect for it.
<!-- 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 -->
- [ ] Commit message has the format required by CONTRIBUTING guide
- [ ] Commits are split per component (core, individual modules, libs, utils, ...)
- [ ] Each component has a single commit (if not, squash them into one commit)
- [ ] 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 -->
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/1606
-- Commit Summary --
* Fix no cdr after restart bug
-- File Changes --
M src/modules/dialog/dialog.c (5)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/1606.patchhttps://github.com/kamailio/kamailio/pull/1606.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/1606