<!--
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
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
some unexpected error in kamailio.log when KSR.xhttp.xhttp_reply(404...)
### Troubleshooting
#### Reproduction
cat /etc/kamailio/kamailio.cfg
```
listen=tcp:127.0.0.1:5060
tcp_accept_no_cl=yes
debug=3
log_stderror=yes
loadmodule "jsonrpcs.so"
loadmodule "tm.so"
loadmodule "sl.so"
loadmodule "pv.so"
loadmodule "xlog.so"
loadmodule "ctl.so"
loadmodule "cfg_rpc.so"
loadmodule "xhttp.so"
loadmodule "app_lua.so"
modparam("xhttp", "event_callback", "ksr_xhttp_event")
modparam("app_lua", "load", "/etc/kamailio/kamailio.lua")
cfgengine "lua"
```
cat /etc/kamailio/kamailio.lua
```
function ksr_request_route()
KSR.sl.send_reply(200, "OK")
KSR.x.exit()
end
function ksr_xhttp_event()
KSR.set_reply_no_connect()
KSR.set_reply_close()
KSR.xhttp.xhttp_reply(404, "Not Found", "", "")
KSR.x.exit()
end
```
curl http://127.0.0.1:5060 -v
<!--
If the issue can be reproduced, describe how it can be done.
-->
#### Debugging Data
<!--
If you got a core dump, use gdb to extract troubleshooting data - full backtrace,
local variables and the list of the code at the issue location.
gdb /path/to/kamailio /path/to/corefile
bt full
info locals
list
If you are familiar with gdb, feel free to attach more of what you consider to
be relevant.
-->
```
(paste your debugging data here)
```
#### 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).
-->
```
15(5845) DEBUG: <core> [core/ip_addr.c:571]: print_ip(): tcpconn_new: new tcp connection: 127.0.0.1
15(5845) DEBUG: <core> [core/tcp_main.c:1216]: tcpconn_new(): on port 54884, type 2, socket 29
15(5845) DEBUG: <core> [core/tcp_main.c:1548]: tcpconn_add(): hashes: 1846:1992:1067, 1
15(5845) DEBUG: <core> [core/io_wait.h:374]: io_watch_add(): processing io_watch_add(0x563c94544c20, 29, 2, 0x7fb2e4691088) - fd_no=23
15(5845) DEBUG: <core> [core/io_wait.h:599]: io_watch_del(): DBG: io_watch_del (0x563c94544c20, 29, -1, 0x0) fd_no=24 called
15(5845) DEBUG: <core> [core/tcp_main.c:4545]: handle_tcpconn_ev(): sending to child, events 1
15(5845) DEBUG: <core> [core/tcp_main.c:4215]: send2child(): selected tcp worker idx:0 proc:7 pid:5837 for activity on [tcp:127.0.0.1:5060], 0x7fb2e4691088
7(5837) DEBUG: <core> [core/tcp_read.c:1735]: handle_io(): received n=8 con=0x7fb2e4691088, fd=6
7(5837) DEBUG: <core> [core/parser/parse_fline.c:249]: parse_first_line(): first line type 1 (request) flags 2
7(5837) DEBUG: <core> [core/parser/parse_fline.c:249]: parse_first_line(): first line type 1 (request) flags 2
7(5837) DEBUG: <core> [core/parser/msg_parser.c:677]: parse_msg(): SIP Request:
7(5837) DEBUG: <core> [core/parser/msg_parser.c:678]: parse_msg(): method: <GET>
7(5837) DEBUG: <core> [core/parser/msg_parser.c:680]: parse_msg(): uri: </>
7(5837) DEBUG: <core> [core/parser/msg_parser.c:682]: parse_msg(): version: <HTTP/1.1>
7(5837) DEBUG: <core> [core/parser/parse_hname2.c:301]: parse_sip_header_name(): parsed header name [Host] type 0
7(5837) DEBUG: <core> [core/parser/parse_hname2.c:301]: parse_sip_header_name(): parsed header name [User-Agent] type 28
7(5837) DEBUG: <core> [core/parser/parse_hname2.c:301]: parse_sip_header_name(): parsed header name [Accept] type 23
7(5837) DEBUG: <core> [core/parser/msg_parser.c:91]: get_hdr_field(): found end of header
7(5837) DEBUG: <core> [core/receive.c:389]: receive_msg(): --- received sip message - request - call-id: [] - cseq: []
7(5837) DEBUG: <core> [core/receive.c:261]: ksr_evrt_pre_routing(): event route core:pre-routing not defined
7(5837) DEBUG: <core> [core/receive.c:426]: receive_msg(): handling non-sip request message
7(5837) DEBUG: xhttp [xhttp_mod.c:371]: xhttp_handler(): new fake msg created (112 bytes):
<GET / HTTP/1.1
Via: SIP/2.0/TCP 127.0.0.1:54884
Host: 127.0.0.1:5060
User-Agent: curl/7.74.0
Accept: */*
>
7(5837) DEBUG: <core> [core/parser/parse_fline.c:249]: parse_first_line(): first line type 1 (request) flags 2
7(5837) DEBUG: <core> [core/parser/msg_parser.c:677]: parse_msg(): SIP Request:
7(5837) DEBUG: <core> [core/parser/msg_parser.c:678]: parse_msg(): method: <GET>
7(5837) DEBUG: <core> [core/parser/msg_parser.c:680]: parse_msg(): uri: </>
7(5837) DEBUG: <core> [core/parser/msg_parser.c:682]: parse_msg(): version: <HTTP/1.1>
7(5837) DEBUG: <core> [core/parser/parse_hname2.c:301]: parse_sip_header_name(): parsed header name [Via] type 1
7(5837) DEBUG: <core> [core/parser/parse_via.c:2639]: parse_via(): end of header reached, state=5
7(5837) DEBUG: <core> [core/parser/msg_parser.c:555]: parse_headers(): Via found, flags=2
7(5837) DEBUG: <core> [core/parser/msg_parser.c:557]: parse_headers(): this is the first via
7(5837) DEBUG: app_lua [app_lua_api.c:549]: sr_lua_reload_script(): No need to reload [/etc/kamailio/kamailio.lua] is version 0
7(5837) DEBUG: app_lua [app_lua_api.c:733]: app_lua_run_ex(): executing Lua function: [[ksr_xhttp_event]]
7(5837) DEBUG: app_lua [app_lua_api.c:735]: app_lua_run_ex(): lua top index is: 11
7(5837) DEBUG: app_lua [app_lua_api.c:1067]: sr_kemi_lua_exec_func_ex(): param[0] for: xhttp_reply is int: 404
7(5837) DEBUG: app_lua [app_lua_api.c:1063]: sr_kemi_lua_exec_func_ex(): param[1] for: xhttp_reply is str: Not Found
7(5837) DEBUG: app_lua [app_lua_api.c:1063]: sr_kemi_lua_exec_func_ex(): param[2] for: xhttp_reply is str:
7(5837) DEBUG: app_lua [app_lua_api.c:1063]: sr_kemi_lua_exec_func_ex(): param[3] for: xhttp_reply is str:
7(5837) DEBUG: xhttp [xhttp_mod.c:426]: xhttp_send_reply(): sending out response: 404 Not Found
7(5837) DEBUG: <core> [core/parser/parse_hname2.c:301]: parse_sip_header_name(): parsed header name [Host] type 0
7(5837) DEBUG: <core> [core/parser/parse_hname2.c:301]: parse_sip_header_name(): parsed header name [User-Agent] type 28
7(5837) DEBUG: <core> [core/parser/parse_hname2.c:301]: parse_sip_header_name(): parsed header name [Accept] type 23
7(5837) DEBUG: <core> [core/parser/msg_parser.c:91]: get_hdr_field(): found end of header
7(5837) DEBUG: <core> [core/msg_translator.c:162]: check_via_address(): (127.0.0.1, 127.0.0.1, 0)
7(5837) DEBUG: <core> [core/tcp_main.c:1644]: _tcpconn_find(): found connection by id: 1
7(5837) DEBUG: <core> [core/tcp_main.c:2526]: tcpconn_send_put(): send from reader (5837 (7)), reusing fd
7(5837) DEBUG: <core> [core/tcp_main.c:2761]: tcpconn_do_send(): sending...
7(5837) DEBUG: <core> [core/tcp_main.c:2794]: tcpconn_do_send(): after real write: c= 0x7fb2e4691088 n=120 fd=6
7(5837) DEBUG: <core> [core/tcp_main.c:2795]: tcpconn_do_send(): buf=
HTTP/1.1 404 Not Found
Sia: SIP/2.0/TCP 127.0.0.1:54884
Server: kamailio (5.6.1 (x86_64/linux))
Content-Length: 0
15(5845) DEBUG: <core> [core/tcp_main.c:3880]: handle_ser_child(): read response= 7fb2e4691088, -1, fd -1 from 7 (5837)
7(5837) DEBUG: <core> [core/parser/parse_fline.c:255]: parse_first_line(): bad request first line
7(5837) DEBUG: <core> [core/parser/parse_fline.c:258]: parse_first_line(): at line 0 char 16:
7(5837) DEBUG: <core> [core/parser/parse_fline.c:264]: parse_first_line(): parsed so far: HTTP/1.1 404 Not
7(5837) ERROR: <core> [core/parser/parse_fline.c:271]: parse_first_line(): parse_first_line: bad message (offset: 16)
7(5837) DEBUG: <core> [core/parser/msg_parser.c:673]: parse_msg(): invalid message
7(5837) ERROR: <core> [core/parser/msg_parser.c:747]: parse_msg(): ERROR: parse_msg: message=<HTTP/1.1 404 Not Found
Sia: SIP/2.0/TCP 127.0.0.1:54884
Server: kamailio (5.6.1 (x86_64/linux))
Content-Length: 0
>
7(5837) ERROR: <core> [core/msg_translator.c:3256]: build_sip_msg_from_buf(): parsing failed 7(5837) DEBUG: app_lua [app_lua_mod.c:164]: sr_kemi_config_engine_lua(): execution of route type 513 with name [ksr_xhttp_event] returned 1
7(5837) DEBUG: <core> [core/receive.c:432]: receive_msg(): finished handling non-sip request message
7(5837) DEBUG: <core> [core/usr_avp.c:637]: destroy_avp_list(): destroying list (nil)
7(5837) DEBUG: <core> [core/usr_avp.c:637]: destroy_avp_list(): destroying list (nil)
7(5837) DEBUG: <core> [core/usr_avp.c:637]: destroy_avp_list(): destroying list (nil)
7(5837) DEBUG: <core> [core/usr_avp.c:637]: destroy_avp_list(): destroying list (nil)
7(5837) DEBUG: <core> [core/usr_avp.c:637]: destroy_avp_list(): destroying list (nil)
7(5837) DEBUG: <core> [core/usr_avp.c:637]: destroy_avp_list(): destroying list (nil)
7(5837) DEBUG: <core> [core/xavp.c:541]: xavp_destroy_list(): destroying xavp list (nil)
7(5837) DEBUG: <core> [core/xavp.c:541]: xavp_destroy_list(): destroying xavp list (nil)
7(5837) DEBUG: <core> [core/xavp.c:541]: xavp_destroy_list(): destroying xavp list (nil)
7(5837) DEBUG: <core> [core/receive.c:628]: receive_msg(): cleaning up
7(5837) DEBUG: <core> [core/io_wait.h:374]: io_watch_add(): processing io_watch_add(0x563c94588ec0, 6, 2, 0x7fb2e4691088) - fd_no=1
7(5837) DEBUG: <core> [core/io_wait.h:599]: io_watch_del(): DBG: io_watch_del (0x563c94588ec0, 6, -1, 0x10) fd_no=2 called
7(5837) DEBUG: <core> [core/tcp_read.c:1870]: handle_io(): removing from list 0x7fb2e4691088 id 1 fd 6, state -1, flags 4028, main fd -1, refcnt 1 ([127.0.0.1]:54884 -> [127.0.0.1]:5060)
7(5837) DEBUG: <core> [core/tcp_read.c:1653]: release_tcpconn(): releasing con 0x7fb2e4691088, state -2, fd=6, id=1 ([127.0.0.1]:54884 -> [127.0.0.1]:5060)
7(5837) DEBUG: <core> [core/tcp_read.c:1657]: release_tcpconn(): extra_data (nil)
15(5845) DEBUG: <core> [core/tcp_main.c:3641]: handle_tcp_child(): reader response= 7fb2e4691088, -2 from 0
15(5845) DEBUG: <core> [core/tcp_main.c:3566]: tcp_emit_closed_event(): TCP closed event creation triggered (reason: 0)
15(5845) DEBUG: <core> [core/tcp_main.c:3574]: tcp_emit_closed_event(): no callback registering for handling TCP closed event
2(5832) DEBUG: <core> [core/timer.c:422]: adjust_ticks(): adjusting timer ticks (677813966) with 312 ms (5 ticks)
2(5832) DEBUG: <core> [core/timer.c:422]: adjust_ticks(): adjusting timer ticks (677815246) with 250 ms (4 ticks)
2(5832) DEBUG: <core> [core/timer.c:422]: adjust_ticks(): adjusting timer ticks (677816206) with 250 ms (4 ticks)
2(5832) DEBUG: <core> [core/timer.c:422]: adjust_ticks(): adjusting timer ticks (677817406) with 312 ms (5 ticks)
```
#### SIP Traffic
<!--
If the issue is exposed by processing specific SIP messages, grab them with ngrep or save in a pcap file, then add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
```
(paste your sip traffic here)
```
### Possible Solutions
<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a fix.
-->
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
Kamailio5.6.1
```
* **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`)
-->
```
Debian11
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3204
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3204(a)github.com>
ubuntu 18.04 , kamailio v5.3.8 :
UE A and B register sucess on kamailio server over tcp. When UE A calls UE B, kamailio server receive the INVITE over tcp from UE A, then it send invite to UE B. But the invite sent by kamailio to UE B is over UDP. Then UE B returns ICMP Destination unreachable(Port unreachable).
Is the error configuration related or a bug?
Any kind of help is highly appreciated.
Best Regards,
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3203
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3203(a)github.com>
Module: kamailio
Branch: master
Commit: 8fa77cf95a1e985405d3471fc5655e2ec6a2e192
URL: https://github.com/kamailio/kamailio/commit/8fa77cf95a1e985405d3471fc5655e2…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2022-07-27T09:31:30+02:00
modules: readme files regenerated - acc ... [skip ci]
---
Modified: src/modules/acc/README
---
Diff: https://github.com/kamailio/kamailio/commit/8fa77cf95a1e985405d3471fc5655e2…
Patch: https://github.com/kamailio/kamailio/commit/8fa77cf95a1e985405d3471fc5655e2…
---
diff --git a/src/modules/acc/README b/src/modules/acc/README
index 878623d24f..1ea4e6f98d 100644
--- a/src/modules/acc/README
+++ b/src/modules/acc/README
@@ -529,6 +529,11 @@ Note
information given will not be stored in the CDR as they cannot be
accessed by the end of the call when the CDR is logged.
+ The dialog module needs to be engaged on the dialogs that should be
+ accounted, that they will be tracked by the server. This is usally done
+ by calling the function dlg_manage() or setting the dlg_flag. Refer to
+ the documentation of the dialog module for more information.
+
Sometimes, dialogs expire because the UA has a problem and a final
message is never transmitted. You can toggle on/off the generation of
CDR-based logging in such cases with only the dlg_vars showing by using
Module: kamailio
Branch: master
Commit: 3ec40d792df5bcee838eee3e5e0e89a2ebdcc453
URL: https://github.com/kamailio/kamailio/commit/3ec40d792df5bcee838eee3e5e0e89a…
Author: Henning Westerholt <hw(a)gilawa.com>
Committer: Henning Westerholt <hw(a)gilawa.com>
Date: 2022-07-27T07:26:57Z
acc: add some explanation that dialogs need to be tracked for CDR accounting
---
Modified: src/modules/acc/doc/acc_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/3ec40d792df5bcee838eee3e5e0e89a…
Patch: https://github.com/kamailio/kamailio/commit/3ec40d792df5bcee838eee3e5e0e89a…
---
diff --git a/src/modules/acc/doc/acc_admin.xml b/src/modules/acc/doc/acc_admin.xml
index 04fe28a8da7..42f4b88bd11 100644
--- a/src/modules/acc/doc/acc_admin.xml
+++ b/src/modules/acc/doc/acc_admin.xml
@@ -324,6 +324,13 @@ if (uri=~"sip:+40") /* calls to Romania */ {
end of the call when the CDR is logged.
</para>
+ <para>
+ The dialog module needs to be engaged on the dialogs that should be accounted, that
+ they will be tracked by the server. This is usally done by calling the function
+ <emphasis>dlg_manage()</emphasis> or setting the <emphasis>dlg_flag</emphasis>.
+ Refer to the documentation of the dialog module for more information.
+ </para>
+
<para>
Sometimes, dialogs expire because the UA has a problem and a final message is never
transmitted. You can toggle on/off the generation of CDR-based logging in such cases
Module: kamailio
Branch: master
Commit: 3a3003b42ce6eadbc9b12e45fd4668f12e783cfb
URL: https://github.com/kamailio/kamailio/commit/3a3003b42ce6eadbc9b12e45fd4668f…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2022-07-27T08:16:23+02:00
modules: readme files regenerated - nathelper ... [skip ci]
---
Modified: src/modules/nathelper/README
---
Diff: https://github.com/kamailio/kamailio/commit/3a3003b42ce6eadbc9b12e45fd4668f…
Patch: https://github.com/kamailio/kamailio/commit/3a3003b42ce6eadbc9b12e45fd4668f…
---
diff --git a/src/modules/nathelper/README b/src/modules/nathelper/README
index 0b5abfb614..e091d2018f 100644
--- a/src/modules/nathelper/README
+++ b/src/modules/nathelper/README
@@ -731,9 +731,11 @@ if(is_rfc1918("$rd")) {
5.9. set_contact_alias([trim])
Adds an “;alias=ip~port~transport” parameter to the contact URI
- containing the received ip, port, and transport protocol. The new
- contact URI is immediately visible to other modules in the way the
- fix_nated_contact() does it.
+ containing the received ip, port, and transport protocol. The update of
+ contact URI is signaled to a few other modules in the way the
+ fix_nated_contact() does it by using the internal flags. The new value
+ is not visible to pseudo-variables and it does not change the SIP
+ message buffer.
Meaning of parameters:
* trim - by default, set_contact_alias() will not detect and trim an
<!--
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
The docs for `set_contact_alias()` says:
> **The new contact URI is immediately visible to other modules** in the way the fix_nated_contact() does it.
I don't know exactly what is meant by the last part of that sentence as that isn't documented, but the first part certainly doesn't hold:
The following snippet:
```
xlog("L_INFO", " Received Contact: $ct");
if (set_contact_alias()) {
xlog("L_INFO", " Aliassed Contact: $ct");
}
```
Causes these log entries:
```
2022-07-26T15:41:57.351148+02:00 proxydev001 prx1[12116]: INFO: Received Contact: sip:sipp@unknowndomain;transport=udp
2022-07-26T15:41:57.351148+02:00 proxydev001 prx1[12116]: INFO: Aliassed Contact: sip:sipp@unknowndomain;transport=udp
```
Which clearly shows that the changed uri is **not visible** to the `pv` module (which exports `$ct`).
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3201
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3201(a)github.com>
Module: kamailio
Branch: master
Commit: c009f27578e8df9aa77ab852325dad8dc710d6c8
URL: https://github.com/kamailio/kamailio/commit/c009f27578e8df9aa77ab852325dad8…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-07-27T08:04:08+02:00
nathelper: docs - rephrased the remarks about set_contact_alias()
---
Modified: src/modules/nathelper/doc/nathelper_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/c009f27578e8df9aa77ab852325dad8…
Patch: https://github.com/kamailio/kamailio/commit/c009f27578e8df9aa77ab852325dad8…
---
diff --git a/src/modules/nathelper/doc/nathelper_admin.xml b/src/modules/nathelper/doc/nathelper_admin.xml
index d0e8a18ea4c..a8828baa74f 100644
--- a/src/modules/nathelper/doc/nathelper_admin.xml
+++ b/src/modules/nathelper/doc/nathelper_admin.xml
@@ -878,8 +878,10 @@ if(is_rfc1918("$rd")) {
<para>
Adds an <quote>;alias=ip~port~transport</quote> parameter to the
contact URI containing the received ip, port, and transport protocol.
- The new contact URI is immediately visible to other modules in the
- way the <function>fix_nated_contact()</function> does it.
+ The update of contact URI is signaled to a few other modules in the
+ way the <function>fix_nated_contact()</function> does it by using the
+ internal flags. The new value is not visible to pseudo-variables and it
+ does not change the SIP message buffer.
</para>
<para>Meaning of parameters:</para>
<itemizedlist>
### Description
Typo in function example at src/modules/siputils/doc/siputils_admin.xml:
Instead of:
...
if(is_first_hop()) { ... }
...
if(is_first_hop_mode("1")) { ... }
...
example should be:
...
if (is_first_hop()) { ... }
...
if (is_first_hop("1")) { ... }
...
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3200
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3200(a)github.com>