Module: kamailio
Branch: master
Commit: 1bc3bbd010705ee247345c1ed9b36210bb8d9ed1
URL: https://github.com/kamailio/kamailio/commit/1bc3bbd010705ee247345c1ed9b3621…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-04-17T19:04:16+02:00
http_async_client: do not set global avp lists from t on async callback
- they are done by fake_env() used inside t_continue()
- they were set without reset, living in the process context, resulting
in invalid access when async callback was executed with faked_msg
- related to #2286
---
Modified: src/modules/http_async_client/async_http.c
---
Diff: https://github.com/kamailio/kamailio/commit/1bc3bbd010705ee247345c1ed9b3621…
Patch: https://github.com/kamailio/kamailio/commit/1bc3bbd010705ee247345c1ed9b3621…
---
diff --git a/src/modules/http_async_client/async_http.c b/src/modules/http_async_client/async_http.c
index e468a955dc..5edf67ee5d 100644
--- a/src/modules/http_async_client/async_http.c
+++ b/src/modules/http_async_client/async_http.c
@@ -212,7 +212,7 @@ void async_http_cb(struct http_m_reply *reply, void *param)
}
strncpy(q_id, aq->id, strlen(aq->id));
-
+
q_id[strlen(aq->id)] = '\0';
cfg_update();
@@ -227,16 +227,10 @@ void async_http_cb(struct http_m_reply *reply, void *param)
free_async_query(aq);
return;
}
- // we bring the list of AVPs of the transaction to the current context
- set_avp_list(AVP_TRACK_FROM | AVP_CLASS_URI, &t->uri_avps_from);
- set_avp_list(AVP_TRACK_TO | AVP_CLASS_URI, &t->uri_avps_to);
- set_avp_list(AVP_TRACK_FROM | AVP_CLASS_USER, &t->user_avps_from);
- set_avp_list(AVP_TRACK_TO | AVP_CLASS_USER, &t->user_avps_to);
- set_avp_list(AVP_TRACK_FROM | AVP_CLASS_DOMAIN, &t->domain_avps_from);
- set_avp_list(AVP_TRACK_TO | AVP_CLASS_DOMAIN, &t->domain_avps_to);
-
- if (t)
+
+ if (t) {
tmb.unref_cell(t);
+ }
LM_DBG("resuming transaction (%d:%d)\n", tindex, tlabel);
Hi,
Most likely this is because of the change. Revert back the changes
(uncomment the section I told you), turn on debug in scscf.cfg, restart all
nodes and test once again. Then have a look on the scscf logs.
Regards,
Pavel Siderov
Hi,
Do anybody have worked orchestrating kamailio as an IMS server through osm
by launching vnfs in openstack . If so kindly reply me as I need some
inputs on that.
<!--
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
Follow-up to previous closed PR https://github.com/kamailio/kamailio/pull/1488
Had a chance to catch a live call involving rfc7335 private IPs.
It seems like either nat_uac_test() or more likely fix_nated_sdp() doesn't catch the 192.0.0.0/29 subnet as private.
### Troubleshooting
#### Reproduction
route[NATMANAGE] {
...
if (nat_uac_test("8"))
fix_nated_sdp("15");
...
}
#### 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).
-->
```
(paste your log messages here)
```
#### 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).
-->
```
U 2020/04/07 10:36:02.572802 135.19.155.163:17669 -> 65.39.1.1:5060
INVITE sip:8007777777@client.mydomain.net:5060 SIP/2.0
Via: SIP/2.0/UDP 192.0.0.254:11198;branch=z9hG4bK1066155396
From: "ME" sip:2213@client.mydomain.net:5060;tag=3901872054
To: sip:8007777777@client.mydomain.net:5060
Call-ID: 6_327133011(a)192.168.0.78
CSeq: 1 INVITE
Contact: sip:2213@192.0.0.254:11198
Content-Type: application/sdp
Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDATE, MESSAGE
Max-Forwards: 70
User-Agent: Yealink SIP-T46S 66.84.0.10
Allow-Events: talk,hold,conference,refer,check-sync
Supported: replaces
Content-Length: 305
v=0
o=- 22668 22668 IN IP4 192.168.0.78
s=SDP data
c=IN IP4 192.0.0.254
t=0 0
m=audio 22936 RTP/AVP 9 0 8 18 101
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=ptime:20
a=sendrecv
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
U 2020/04/07 10:36:02.573384 65.39.1.1:5060 -> 135.19.155.163:17669
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.0.0.254:11198;branch=z9hG4bK1066155396;rport=17669;received=135.19.155.163
From: "ME" sip:2213@client.mydomain.net:5060;tag=3901872054
To: sip:8007777777@client.mydomain.net:5060
Call-ID: 6_327133011(a)192.168.0.78
CSeq: 1 INVITE
Server: NXO
Content-Length: 0
U 2020/04/07 10:36:02.573608 65.39.1.1:5060 -> 66.199.2.2:5060
INVITE sip:8007777777@client.mydomain.net:5060 SIP/2.0
Record-Route: sip:65.39.1.1;lr;did=faf.517
Via: SIP/2.0/UDP 65.39.1.1;branch=z9hG4bK6ef8.b9248afe5375fc379eb33718de1f7481.0
Via: SIP/2.0/UDP 192.0.0.254:11198;rport=17669;received=135.19.155.163;branch=z9hG4bK1066155396
From: "ME" sip:2213@client.mydomain.net:5060;tag=3901872054
To: sip:8007777777@client.mydomain.net:5060
Call-ID: 6_327133011(a)192.168.0.78
CSeq: 1 INVITE
Contact: sip:2213@192.0.0.254:11198;alias=135.19.155.163~17669~1
Content-Type: application/sdp
Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDATE, MESSAGE
Max-Forwards: 69
Allow-Events: talk,hold,conference,refer,check-sync
Supported: replaces
Content-Length: 281
..
v=0.
o=- 22668 22668 IN IP4 192.168.0.78
s=SDP data.
c=IN IP4 192.0.0.254
t=0 0
m=audio 22936 RTP/AVP 9 0 18 101
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=ptime:20
a=sendrecv
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
```
### 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`
```
version: kamailio 5.1.10 (x86_64/linux) cfcfd5
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, 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_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: cfcfd5
compiled on 21:57:38 Feb 12 2020 with gcc 4.9.2
```
* **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 `uname -a`)
-->
```
Debian 8
Linux proxy1 2.6.32-39-pve #1 SMP Fri May 8 11:27:35 CEST 2015 x86_64 GNU/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/2277
Module: kamailio
Branch: master
Commit: 2ea7dc363b15259468fb1518208b87d3e2b6289c
URL: https://github.com/kamailio/kamailio/commit/2ea7dc363b15259468fb1518208b87d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-04-16T16:52:30+02:00
corex: docs for is_faked_msg() function
---
Modified: src/modules/corex/doc/corex_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/2ea7dc363b15259468fb1518208b87d…
Patch: https://github.com/kamailio/kamailio/commit/2ea7dc363b15259468fb1518208b87d…
---
diff --git a/src/modules/corex/doc/corex_admin.xml b/src/modules/corex/doc/corex_admin.xml
index 98c51f1470..b35efd1047 100644
--- a/src/modules/corex/doc/corex_admin.xml
+++ b/src/modules/corex/doc/corex_admin.xml
@@ -765,6 +765,36 @@ request_route {
</programlisting>
</example>
</section>
+ <section id="corex.f.is_faked_msg">
+ <title>
+ <function moreinfo="none">is_faked_msg()</function>
+ </title>
+ <para>
+ Returns 1 (native config true) if the SIP message under processing
+ is the internal faked msg structure. Returns -1 (native config false)
+ if the SIP message under processing is received from the network.
+ </para>
+ <para>
+ The function should be useful in event route blocks or async route
+ blocks where it can be processed either a message from the network
+ or the internal faked message.
+ </para>
+ <para>
+ This function can be used in ANY_ROUTE.
+ </para>
+ <example>
+ <title><function>is_faked_msg</function> usage</title>
+ <programlisting format="linespecific">
+...
+event_route[dispatcher:dst-down] {
+ if (is_faked_msg()) {
+ xinfo("Running with faked message\n");
+ }
+}
+...
+</programlisting>
+ </example>
+ </section>
</section>
<section>