[sr-dev] [kamailio/kamailio] filter_body() fails when there isn't a space after "Content-Type:" (#2748)

duarterocha91 notifications at github.com
Tue Jun 8 20:11:47 CEST 2021


Hi Daniel. Sorry for the delay.

I did a fresh install from the master branch.

My kamailio -v returns this : 

> version: kamailio 5.6.0-dev0 (x86_64/linux)
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, 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_BLOCKLIST, 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.


Now the return from the filtering is the following : 

> 2021-06-08T19:02:30.589519+01:00 dev_sbc_a_vts01 /usr/local/kamailio-5.6/sbin/kamailio[22398]: ERROR: <script>: Before filter_body
2021-06-08T19:02:30.589932+01:00 dev_sbc_a_vts01 /usr/local/kamailio-5.6/sbin/kamailio[22398]: ERROR: textops [textops.c:1616]: find_hdr_line_start(): not a header name: Content-Type:
2021-06-08T19:02:30.590254+01:00 dev_sbc_a_vts01 /usr/local/kamailio-5.6/sbin/kamailio[22398]: ERROR: <script>: Filtering failed


Here is the body from the message : 

>    Message Body
        MIME Multipart Media Encapsulation, Type: multipart/mixed, Boundary: "unique-boundary-1"
            [Type: multipart/mixed]
            First boundary: --unique-boundary-1\r\n
            Encapsulated multipart part:  (application/sdp)
                Content-Type:application/sdp\r\n\r\n
                Session Description Protocol
                    Session Description Protocol Version (v): 0
                    Owner/Creator, Session Id (o): - 1372599309 1 IN IP4 1.1.1.1
                    Session Name (s): -
                    Connection Information (c): IN IP4 1.1.3.1
                    Time Description, active time (t): 0 0
                    Media Description, name and address (m): audio 22646 RTP/AVP 8 0 18 3 13 101 96
                    Media Attribute (a): rtpmap:101 telephone-event/8000
                    Media Attribute (a): rtpmap:96 CLEARMODE/8000
            Boundary: \r\n--unique-boundary-1\r\n
            Encapsulated multipart part:  (application/isup)
                Content-Type:application/ISUP;base=itu-t92+;version=itu-t\r\n
                Content-Disposition:signal;handling=required\r\n\r\n
                ISDN User Part
                    Message Type: Initial address (1)
                    Nature of Connection Indicators : 0x0
                    Forward Call Indicators : 0x6001
                    Calling Party's category : 0xa (ordinary calling subscriber)
                    Transmission medium requirement : 0 (speech)
                    Called Party NumberCalled Party Number: 111111111
                    Pointer to start of optional part: 10
                    Parameter: (t=10, l=8) Calling party number: Calling party numberCalling Party Number: 222222222
                    Parameter: (t=192, l=9) Generic number: Generic numberGeneric Number: 222222222
                    End of optional parameters (0)
            Last boundary: \r\n--unique-boundary-1--\r\n


If you need more info let me know

-- 
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/2748#issuecomment-856985118
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20210608/c4461421/attachment.htm>


More information about the sr-dev mailing list