[OpenSIPS-Users] incorrect content length in body part
Răzvan Crainea
razvan at opensips.org
Tue Mar 3 09:11:37 EST 2020
Hi, Kamlesh!
Try to remove the Content-Length too, using remove_hf("Content-Length").
If this still does not work, please open a bug report[1].
[1] https://github.com/OpenSIPS/opensips/issues
Best regards,
Răzvan
On 2/26/20 11:28 AM, Kamlesh . wrote:
> Hello,
>
> version: opensips 2.4.6 (x86_64/linux)
>
> flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC,
> F_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
>
> ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
> MAX_URI_SIZE 1024, BUF_SIZE 65535
>
> poll method support: poll, epoll, sigio_rt, select.
>
> git revision: edef893c5
>
> main.c compiled on 23:26:34 Dec 14 2019 with gcc 4.8.5
>
>
> We want to remove the body part in this packet so that we used
> remove_body_part("application/vnd.etsi.pstn+xml") exported functions. It
> was removed successfully but the Content-Length was added. You can check
> we have two Content-Length headers in the packet.
>
>
> Content-Length: 500
>
> Content-Length: 450
>
>
> INVITE sip:+xxx1204037xxx at sip.provider.com
> <mailto:sip%3A%2Bxxx1204037xxx at sip.provider.com> SIP/2.0
> Via: SIP/2.0/UDP
> 10.xxx.xxx.xxx:5060;branch=z9hG4bKysgyg576px7a357p5wyg4vawu;Role=3;Hpt=8ec2_36;TRC=ffffffff-ffffffff
> Call-ID: asbcehs9ekj9nle5h5q1ilqj5qs9f49ef9hb at B.5.281.sip.provider.com
> <mailto:asbcehs9ekj9nle5h5q1ilqj5qs9f49ef9hb at B.5.281.sip.provider.com>
> From: <sip:123456789 at sip.provider.com
> <mailto:sip%3A123456789 at sip.provider.com>>;tag=8fe9f6cr
> To: <tel:xxx1204037xxx;phone-context=+x11x>
> CSeq: 1 INVITE
> Allow:
> INVITE,ACK,OPTIONS,BYE,CANCEL,REGISTER,INFO,PRACK,SUBSCRIBE,NOTIFY,UPDATE,MESSAGE,REFER
> Contact:
> <sip:10.xxx.xxx.xxx:5060;Dpt=ed2a-200;Hpt=8ec2_16;CxtId=4;TRC=ffffffff-ffffffff>
> Max-Forwards: 62
> Supported: timer,100rel
> User-Agent: SBC UAC3000
> Session-Expires: 1800
> Min-SE: 600
> P-Asserted-Identity: <sip:+123456789 at sip.provider.com
> <mailto:sip%3A%2B123456789 at sip.provider.com>>,<tel:+123456789>
> Privacy: none
> P-Charging-Vector:
> icid-value=agcf--20200226132711-100808435;orig-ioi=PA-NOIDAE;term-ioi=SIP_982312_ABCCLOUD_112233445566
> Content-Length: 1400
> Content-Type: multipart/mixed;boundary=ssboundary-1_
>
> --ssboundary-1_
> Content-Length: 523
> Content-Type: application/vnd.etsi.pstn+xml
> Content-Disposition: signal;handling=optional
>
> <?xml version="1.0" encoding="UTF-8"?>
> <PSTN>
> <BearerCapability>
> <BCoctet3>
> <CodingStandard>00</CodingStandard>
> <InformationTransferCapability>00000</InformationTransferCapability>
> </BCoctet3>
> <BCoctet4>
> <TransferMode>00</TransferMode>
> <InformationTransferRate>10000</InformationTransferRate>
> </BCoctet4>
> <BCoctet5>
> <Layer1Identification>01</Layer1Identification>
> <UserInfoLayer1Protocol>00011</UserInfoLayer1Protocol>
> </BCoctet5>
> </BearerCapability>
> </PSTN>
> --ssboundary-1_
>
> Content-Length: 68
> Content-Type: application/vnd.etsi.pstn+xml
> Content-Disposition: signal;handling=optional
>
> <?xml version="1.0" encoding="UTF-8"?>
> <sendingCompleteIndication/>
>
> --ssboundary-1_
> Content-Length: 450
> Content-Type: application/sdp
>
> v=0
> o=- 373803451 373803451 IN IP4 10.xxx.xxx.xxx
> s=SBC call
> c=IN IP4 10.xxx.xxx.xxx
> t=0 0
> m=audio 60992 RTP/AVP 8 0 18 4 2 98 99 101 102 97
> a=rtpmap:8 PCMA/8000
> a=rtpmap:0 PCMU/8000
> a=rtpmap:18 G729/8000
> a=rtpmap:4 G723/8000
> a=rtpmap:2 G726-32/8000
> a=rtpmap:98 G726-40/8000
> a=rtpmap:99 G726-32/8000
> a=rtpmap:101 G726-24/8000
> a=rtpmap:102 G726-16/8000
> a=rtpmap:97 telephone-event/8000
> a=ptime:20
> a=fmtp:97 0-15
> a=fmtp:18 annexb=no
>
> --ssboundary-1_--
>
> ------------------- AFTER ----------------------
>
> INVITE
> sip:101 at 5.xxx.xxx.xxx:54251;transport=UDP;rinstance=5b70c35c0dfbe4c8 SIP/2.0
> Record-Route: <sip:xx.xx.xx.xx:5070;r2=on;lr;ftag=8fe9f6cr;did=2af.57bfa951>
> Record-Route:
> <sip:yy.yy.yy.yyy:5070;r2=on;lr;ftag=8fe9f6cr;did=2af.57bfa951>
> Via: SIP/2.0/UDP xx.xx.xx.xx:5070;branch=z9hG4bK9df.30fa2b25.0
> Via: SIP/2.0/UDP
> 10.xxx.xxx.xxx:5060;rport=5060;received=10.xxx.xxx.xxx;branch=z9hG4bKysgyg576px7a357p5wyg4vawu;Role=3;Hpt=8ec2_36;TRC=ffffffff-f
> fffff
> Call-ID: asbcehs9ekj9nle5h5q1ilqj5qs9f49ef9hb at B.5.281.sip.provider.com
> <mailto:asbcehs9ekj9nle5h5q1ilqj5qs9f49ef9hb at B.5.281.sip.provider.com>
> From: <sip:123456789 at sip.provider.com
> <mailto:sip%3A123456789 at sip.provider.com>>;tag=8fe9f6cr
> To: <sip:101 at 5.xxx.xxx.xxx>
> CSeq: 1 INVITE
> Allow:
> INVITE,ACK,OPTIONS,BYE,CANCEL,REGISTER,INFO,PRACK,SUBSCRIBE,NOTIFY,UPDATE,MESSAGE,REFER
> Contact:
> <sip:10.xxx.xxx.xxx:5060;Dpt=ed2a-200;Hpt=8ec2_16;CxtId=4;TRC=ffffffff-ffffffff>
> Max-Forwards: 32
> Supported: timer,100rel
> User-Agent: SBC UAC3000
> Session-Expires: 1800
> Min-SE: 600
> P-Asserted-Identity: <sip:+123456789 at sip.provider.com
> <mailto:sip%3A%2B123456789 at sip.provider.com>>,<tel:+123456789>
> Privacy: none
> P-Charging-Vector:
> icid-value=agcf--20200226132711-100808435;orig-ioi=PA-NOIDAE;term-ioi=SIP_982312_ABCCLOUD_112233445566
> Content-Length: 500
> Content-Length: 450
> Content-Type: application/sdp
>
> v=0
> o=- 373803451 373803451 IN IP4 10.xxx.xxx.xxx
> s=SBC call
> c=IN IP4 xx.xx.xx.xx
> t=0 0
> a=rtpengine:087d0852c64e
> m=audio 11054 RTP/AVP 8 0 18 4 2 98 99 101 102 97
> a=rtpmap:8 PCMA/8000
> a=rtpmap:0 PCMU/8000
> a=rtpmap:18 G729/8000
> a=rtpmap:4 G723/8000
> a=rtpmap:2 G726-32/8000
> a=rtpmap:98 G726-40/8000
> a=rtpmap:99 G726-32/8000
> a=rtpmap:101 G726-24/8000
> a=rtpmap:102 G726-16/8000
> a=rtpmap:97 telephone-event/8000
> a=fmtp:18 annexb=no
> a=fmtp:97 0-15
> a=sendrecv
> a=rtcp:11055
> a=ptime:20
>
> Regards,
> Kamlesh
>
> Disclaimer :
>
> This e-mail and any file transmitted with it are for exclusive use of
> the intended recipient(s)
> and may contain confidential and privileged information. If you are not
> the intended recipient,
> please contact the sender by replying this e-mail and destroy all copies
> and original message.
> Any unauthorized review,use, disclosure, dissemination, forwarding,
> printing and copying of this
> email or any action taken in reliance of this e-mail is strictly
> prohibited and may be unlawful.
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
--
Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com
More information about the Users
mailing list