Re: [sr-dev] [kamailio/kamailio] rtpengine: rtpengine_offer is stripping all INVITE multipart bodies except application/sdp (#1434)
Closed #1434. -- 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/1434#event-1468934502___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] rtpengine: rtpengine_offer is stripping all INVITE multipart bodies except application/sdp (#1434)
Thanks for testing and feedback! Patch backported. -- 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/1434#issuecomment-364850593___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] rtpengine: rtpengine_offer is stripping all INVITE multipart bodies except application/sdp (#1434)
I can confirm that after applying 75c4ca0bb69bd4f1ba42c6d964697737813fa81e patch everything is working properly again. Multipart bodies are not stripped anymore. Thank you Daniel. -- 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/1434#issuecomment-364378461___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] rtpengine: rtpengine_offer is stripping all INVITE multipart bodies except application/sdp (#1434)
Thanks for the report and troubleshooting to the source of the issue. Can you try with the patch I just pushed, referenced above? -- 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/1434#issuecomment-364200983___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] rtpengine: rtpengine_offer is stripping all INVITE multipart bodies except application/sdp (#1434)
That is an issue as multipart bodies can be used when geolocation is transmitted by value. Typically, a geolocalized INVITE packet body would contain an SDP part and a second part with an LO-PIDF payload. https://www.rfc-editor.org/rfc/rfc6442.txt section 5.1 -- 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/1434#issuecomment-364196709___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] rtpengine: rtpengine_offer is stripping all INVITE multipart bodies except application/sdp (#1434)
### Description When processing a multipart INVITE using the rtpengine module. The rtpengine_offer configuration function (called with default arguments) is stripping all bodies except the application/sdp MIME type body. ### Troubleshooting Reproduction A client is sending an INVITE through a kamailio proxy paired with a rtpengine. ``` Client Proxy Server xINVITE (SDP) x x x x qq> x x x x 100 Trying x x x x x x x x 100 Trying x x x x ``` (paste your debugging data here) ``` Log Messages ``` (paste your log messages here) ``` SIP Traffic ``` (paste your sip traffic here) ``` ### Possible Solutions This issue has been introduced by the following commit : 36cb753441a78bd13ded119cd468f32623f09fbf. rtpengine.c : ``` diff @@ -3328,6 +3328,7 @@ rtpengine_offer_answer(struct sip_msg *msg, const char *flags, int op, int more) str body, newbody; struct lump *anchor; pv_value_t pv_val; + str cur_body = {0, 0}; dict = rtpp_function_call_ok(, msg, op, flags, ); if (!dict) @@ -3357,7 +3358,12 @@ rtpengine_offer_answer(struct sip_msg *msg, const char *flags, int op, int more) pkg_free(newbody.s); } else { - anchor = del_lump(msg, body.s - msg->buf, body.len, 0); + /* get the body from the message as body ptr may have changed */ + cur_body.len = 0; + cur_body.s = get_body(msg); + cur_body.len = msg->buf + msg->len - cur_body.s; + + anchor = del_lump(msg, cur_body.s - msg->buf, cur_body.len, 0); if (!anchor) { LM_ERR("del_lump failed\n"); goto error_free; ``` If this commit is removed, the previous behavior is restored. This commit fixes a segfault: "rtpengine: fixed segfault when using read_sdp_pv", so it appears to me that this may be useful. For, now I am not seeing why this is happening. ### Additional Information * **Kamailio Version** - output of `kamailio -v` seen on: ``` version: kamailio 5.1.0 (x86_64/linux) flags: STATS: Off, EXTRA_DEBUG, 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:29:43 Feb 8 2018 with gcc 4.8.4 ``` but I think that the same behavior will be seen on master. * **Operating System**: ``` (paste your output here) ``` -- 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/1434___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev