<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for bug reports.
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 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 noticed in the logs messages similar to errors (in fact, this is INFO level).
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
### Troubleshooting
#### Reproduction
Retrive **kamailioSIPSummaryOutResponses** statistic
`snmpwalk -v 2c -c public localhost .1.3.6.1.4.1.34352.3.1.1.1.3.4`
And you will see errors in log file.
<!--
If the issue can be reproduced, describe how it can be done.
-->
#### Log Messages
<!--
Check the syslog file and if there are relevant log messages printed by Kamailio, add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
```
INFO /usr/local/sbin/kamailio[15984]: INFO: snmpstats [utilities.c:116]: get_statistic(): failed to retrieve statistics for local_replies
INFO /usr/local/sbin/kamailio[15984]: INFO: snmpstats [utilities.c:116]: get_statistic(): failed to retrieve statistics for relayed_replies
```
### Possible Solutions
I found part of code
https://github.com/kamailio/kamailio/blob/026119200117d20740cbe4d162a14767f…
and it seems that tm module no longer has `local_replies` and `relayed_replies` statistics.
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.4.3 (x86_64/linux)
```
--
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/2865
PROC_SIPINIT has a special meaning representing the first SIP worker.
<!-- 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/2863
-- Commit Summary --
* <a href="https://github.com/kamailio/kamailio/pull/2863/commits/df5f41ccc3c779848bdb…">Correcting rank value passed to fork_process #2809</a>
-- File Changes --
M src/modules/ims_registrar_pcscf/ims_registrar_pcscf_mod.c (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2863.patchhttps://github.com/kamailio/kamailio/pull/2863.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/2863
<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for bug reports.
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 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).
-->
Hi !
topos+redis used in the folowing configuration:
modparam("ndb_redis", "server", "REDIS_SERVER")
modparam("ndb_redis", "init_without_redis", 1)
modparam("topos", "storage", "redis")
modparam("topos_redis", "serverid", "srv1")
modparam("topos", "contact_mode", 2)
modparam("topos", "xavu_cfg", "_tps_")
modparam("topos", "xavu_field_a_contact", "a_contact")
modparam("topos", "xavu_field_b_contact", "b_contact")
modparam("topos", "xavu_field_contact_host", "contact_host")
In the inital INVITE xavu variables a_contact and b_contact are set by script, topos work as expected at this point,
but when the following in-dalog messages from upstream have Record-Route header, topos fails with error message:
Sep 13 18:50:01 gw481 /usr/sbin/kamailio[29874]: ERROR: {1 1 ACK 1-20643(a)87.250.237.98} topos [tps_storage.c:331]: tps_storage_fill_contact(): could not evaluate a_contact xavu
Sep 13 18:50:01 gw481 /usr/sbin/kamailio[29874]: ERROR: {1 1 ACK 1-20643(a)87.250.237.98} topos [tps_storage.c:604]: tps_storage_record(): failed to store
In case of absent Record-Route headers the are no errors.
#### Debugging Data
Signaling dump and debug log in attachment.
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
kamailio 5.5.1 (x86_64/linux)
```
* **Operating System**:
<!--
Details about the operating system, the type: Linux (e.g.,: Debian 8.4, Ubuntu 16.04, CentOS 7.1, ...), MacOS, xBSD, Solaris, ...;
Kernel details (output of `lsb_release -a` and `uname -a`)
-->
```
Ubuntu 18.04.5 LTS
```
[dump.txt](https://github.com/kamailio/kamailio/files/7157118/dump.txt)
[call.log](https://github.com/kamailio/kamailio/files/7157120/call.log)
--
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/2852
Hello,
I have tested following scenario:
Alice "calls" Bob. Call is established.
At the end of the call, Bob disconnects (hangs up) first and generates a BYE message.
If there is a syntax error in FROM Header of BYE message, a 400 “Bad From header” is responded by the Proxy.
If there is a syntax error in TO Header of BYE message, the message is discarded.
According RFC 3261 this is not correct.
Is it okay, to implement the same logic for TO Header as done for FROM Header?
RFC 3261:
16.2 Stateful Proxy
……….
For all new requests, including any with unknown methods, an element intending to proxy the request MUST:
1. Validate the request (Section 16.3)
2. Preprocess routing information (Section 16.4)
3. Determine target(s) for the request (Section 16.5)
+--------------------+
| | +---+
| | | C |
| | | T |
| | +---+
+---+ | Proxy | +---+ CT = Client Transaction
| S | | "Higher" Layer | | C |
| T | | | | T | ST = Server Transaction
+---+ | | +---+
| | +---+
| | | C |
| | | T |
| | +---+
+--------------------+
Figure 3: Stateful Proxy Model
4. Forward the request to each target (Section 16.6)
5. Process all responses (Section 16.7)
16.3 Request Validation
Before an element can proxy a request, it MUST verify the message’s validity.
A valid message must pass the following checks:
1. Reasonable Syntax
2. URI scheme
3. Max-Forwards
4. (Optional) Loop Detection
5. Proxy-Require
6. Proxy-Authorization
If any of these checks fail, the element MUST behave as a user agent server (see Section 8.2) and respond with an error code.
LOGs:
BYE with syntax error in FROM header:
Sep 21 16:44:51 vict2-ims3 /usr/sbin/kamailio[12723]: [logSDID@20306 resource="core"] ERROR: <core> [core/parser/parse_addr_spec.c:555]: parse_to_param(): unexpected end of header, status 20: [;transport=UDP;tag=b3af-8e5a-1e36-79340f18;#015] .
Sep 21 16:44:51 vict2-ims3 /usr/sbin/kamailio[12723]: [logSDID@20306 resource="core"] ERROR: <core> [core/parser/parse_addr_spec.c:881]: parse_addr_spec(): invalid To - unexpected end of header in state 11
Sep 21 16:44:51 vict2-ims3 /usr/sbin/kamailio[12723]: [logSDID@20306 resource="core"] ERROR: <core> [core/parser/parse_from.c:75]: parse_from_header(): bad From header [sip:catt180@vict-ims.net;transport=UDP;tag=b3af-8e5a-1e36-79340f18;]
Sep 21 16:44:51 vict2-ims3 /usr/sbin/kamailio[12723]: [logSDID@20306 resource="pv"] ERROR: pv [pv_core.c:468]: pv_get_from_attr(): cannot parse From header
Sep 21 16:44:51 vict2-ims3 /usr/sbin/kamailio[12723]: [logSDID@20306 resource="xlog"] INFO: <script>: route BYE (<null> (193.154.113.40:5065) to sip:catt181@vict-ims.net, 1632235417904catt180, )
Sep 21 16:44:51 vict2-ims3 /usr/sbin/kamailio[12723]: [logSDID@20306 resource="xlog"] INFO: <script>: BYE (BYE sip:catt181@193.154.113.40:5065;transport=UDP;rinstance=317-catt181 SIP/2.0#015#012From: sip:catt180@vict-ims.net;transport=UDP;tag=b3af-8e5a-1e36-79340f18;#015#012To: sip:catt181@vict-ims.net;transport=UDP;tag=9d7b-d1c6-c06b-7a1dbec7#015#012Call-ID: 1632235417904catt180#015#012CSeq: 2 BYE#015#012Contact: sip:catt180@193.154.113.40:5065;transport=UDP;rinstance=317-catt180#015#012Content-Length: 0#015#012Max-Forwards: 70#015#012Route: sip:mo@172.29.21.60;r2=on;lr;ftag=b3af-8e5a-1e36-79340f18;rm=8;did=8ed.6e12#015#012Route: sip:mo@pcscf-1.vict-ims.net:5060;r2=on;lr;ftag=b3af-8e5a-1e36-79340f18;rm=8;did=8ed.6e12#015#012Route: sip:mo@vict-ims.net;lr;ftag=b3af-8e5a-1e36-79340f18;did=8ed.e7b1#015#012Route: sip:mt@vict-ims.net;lr;ftag=b3af-8e5a-1e36-79340f18;did=8ed.e7b1#015#012Route: sip:mt@pcscf-1.vict-ims.net;r2=on;lr;ftag=b3af-8e5a-1e36-79340f18;rm=7;did=8ed.7e12#015#012Route: sip:mt@172.29.21.60:5060;r2=on;lr;ftag=b3af-8e5a-1e36-79340f18;rm=7;did=8ed.7e12#015#012Via: SIP/2.0/UDP 193.154.113.40:5065;branch=z9hG4bKf7057b36-0#015#012#015#012)
Sep 21 16:44:51 vict2-ims3 /usr/sbin/kamailio[12723]: [logSDID@20306 resource="core"] ERROR: <core> [core/parser/parse_addr_spec.c:555]: parse_to_param(): unexpected end of header, status 20: [;transport=UDP;tag=b3af-8e5a-1e36-79340f18;#015] .
Sep 21 16:44:51 vict2-ims3 /usr/sbin/kamailio[12723]: [logSDID@20306 resource="core"] ERROR: <core> [core/parser/parse_addr_spec.c:881]: parse_addr_spec(): invalid To - unexpected end of header in state 11
Sep 21 16:44:51 vict2-ims3 /usr/sbin/kamailio[12723]: [logSDID@20306 resource="sanity"] WARNING: sanity [sanity.c:776]: check_parse_uris(): failed to parse From header [sip:catt180@vict-ims.net;transport=UDP;tag=b3af-8e5a-1e36-79340f18;]
Sep 21 16:44:51 vict2-ims3 /usr/sbin/kamailio[12723]: [logSDID@20306 resource="xlog"] INFO: <script>: t_relay_send_reply_sl - BYE (SIP/2.0 400 Bad From header#015#012From: sip:catt180@vict-ims.net;transport=UDP;tag=b3af-8e5a-1e36-79340f18;#015#012To: sip:catt181@vict-ims.net;transport=UDP;tag=9d7b-d1c6-c06b-7a1dbec7#015#012Call-ID: 1632235417904catt180#015#012CSeq: 2 BYE#015#012Via: SIP/2.0/UDP 193.154.113.40:5065;branch=z9hG4bKf7057b36-0#015#012Server: Kamailio P-CSCF#015#012Content-Length: 0#015#012#015#012)
BYE with syntax error in TO header:
Sep 21 16:41:07 vict2-ims3 /usr/sbin/kamailio[12733]: [logSDID@20306 resource="core"] ERROR: <core> [core/parser/parse_addr_spec.c:555]: parse_to_param(): unexpected end of header, status 20: [;transport=UDP;tag=1ba4-ff0c-82af-415174d1;#015#012] .
Sep 21 16:41:07 vict2-ims3 /usr/sbin/kamailio[12733]: [logSDID@20306 resource="core"] ERROR: <core> [core/parser/parse_addr_spec.c:881]: parse_addr_spec(): invalid To - unexpected end of header in state 13
Sep 21 16:41:07 vict2-ims3 /usr/sbin/kamailio[12733]: [logSDID@20306 resource="core"] ERROR: <core> [core/parser/msg_parser.c:167]: get_hdr_field(): bad to header
Sep 21 16:41:07 vict2-ims3 /usr/sbin/kamailio[12733]: [logSDID@20306 resource="core"] ERROR: <core> [core/parser/msg_parser.c:337]: parse_headers(): bad header field [To: sip:catt181@vict]
Sep 21 16:41:07 vict2-ims3 /usr/sbin/kamailio[12733]: [logSDID@20306 resource="core"] ERROR: <core> [core/parser/msg_parser.c:687]: parse_msg(): ERROR: parse_msg: message=<BYE sip:catt181@193.154.113.40:5065;transport=UDP;rinstance=317-catt181 SIP/2.0#015#012From: sip:catt180@vict-ims.net;transport=UDP;tag=b7fb-dd8f-30fd-2a93fc86#015#012To: sip:catt181@vict-ims.net;transport=UDP;tag=1ba4-ff0c-82af-415174d1;#015#012Call-ID: 1632235194213catt180#015#012CSeq: 2 BYE#015#012Contact: sip:catt180@193.154.113.40:5065;transport=UDP;rinstance=317-catt180#015#012Content-Length: 0#015#012Max-Forwards: 70#015#012Route: sip:mo@172.29.21.60;r2=on;lr;ftag=b7fb-dd8f-30fd-2a93fc86;rm=8;did=281.c9a1#015#012Route: sip:mo@pcscf-1.vict-ims.net:5060;r2=on;lr;ftag=b7fb-dd8f-30fd-2a93fc86;rm=8;did=281.c9a1#015#012Route: sip:mo@vict-ims.net;lr;ftag=b7fb-dd8f-30fd-2a93fc86;did=281.b871#015#012Route: sip:mt@vict-ims.net;lr;ftag=b7fb-dd8f-30fd-2a93fc86;did=281.b871#015#012Route: sip:mt@pcscf-1.vict-ims.net;r2=on;lr;ftag=b7fb-dd8f-30fd-2a93fc86;rm=7;did=281.d9a1#015#012Route: sip:mt@172.29.21.60:5060;r2=on;lr;ftag=b7fb-dd8f-30fd-2a93fc86;rm=7;did=281.d9a1#015#012Via: SIP/2.0/UDP 193.154.113.40:5065;branch=z9hG4bK0850615e-0#015#012#015#012>
Sep 21 16:41:07 vict2-ims3 /usr/sbin/kamailio[12733]: [logSDID@20306 resource="core"] ERROR: <core> [core/receive.c:199]: receive_msg(): core parsing of SIP message failed (193.154.113.40:5065/1)
BR
Theo
Module: kamailio
Branch: master
Commit: 0f851d791d1d452be079ced5271e64a1a6a2ab69
URL: https://github.com/kamailio/kamailio/commit/0f851d791d1d452be079ced5271e64a…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2021-09-30T12:31:26+02:00
modules: readme files regenerated - posops ... [skip ci]
---
Modified: src/modules/posops/README
---
Diff: https://github.com/kamailio/kamailio/commit/0f851d791d1d452be079ced5271e64a…
Patch: https://github.com/kamailio/kamailio/commit/0f851d791d1d452be079ced5271e64a…
---
diff --git a/src/modules/posops/README b/src/modules/posops/README
index fb2fbe0a8c..43a05c6833 100644
--- a/src/modules/posops/README
+++ b/src/modules/posops/README
@@ -42,6 +42,7 @@ Daniel-Constantin Mierla
4.10. pos_rfind_str(idx, val)
4.11. pos_rfindi_str(idx, val)
4.12. pos_search(idx, re)
+ 4.13. pos_rsearch(idx, re)
5. Pseudo Variables
@@ -60,6 +61,7 @@ Daniel-Constantin Mierla
1.11. pos_find_str() usage
1.12. pos_rfindi_str() usage
1.13. pos_search() usage
+ 1.14. pos_rsearch() usage
Chapter 1. Admin Guide
@@ -89,6 +91,7 @@ Chapter 1. Admin Guide
4.10. pos_rfind_str(idx, val)
4.11. pos_rfindi_str(idx, val)
4.12. pos_search(idx, re)
+ 4.13. pos_rsearch(idx, re)
5. Pseudo Variables
@@ -148,6 +151,7 @@ modparam("posops", "idx0", -200)
4.10. pos_rfind_str(idx, val)
4.11. pos_rfindi_str(idx, val)
4.12. pos_search(idx, re)
+ 4.13. pos_rsearch(idx, re)
4.1. pos_append(idx, val)
@@ -345,6 +349,26 @@ $var(idx) = pos_rfindi_str("100", "kamailio");
$var(idx) = pos_search("100", "[0-9]+");
...
+4.13. pos_rsearch(idx, re)
+
+ Return the position of last match that starts matching the regular
+ expression re in message buffer starting at idx. In case of not finding
+ it or error, the return code is negative. If val is at index 0, it
+ returns the value specified by modparam idx0.
+
+ The idx can be an integer value or a variable holding an integer. If
+ the value is negative, the position is counted from the end of the
+ buffer.
+
+ The re can be a static regular expression string.
+
+ This function can be used from ANY_ROUTE.
+
+ Example 1.14. pos_rsearch() usage
+...
+$var(idx) = pos_rsearch("100", "[0-9]+");
+...
+
5. Pseudo Variables
The module exports a pseudo-variable class, $pos(key), to access