<HTML><BODY><div>I’m using opensips as proxy. I got INVITE from one side, do some logics ,remove ISUP body and send INVITE to destination via dispatcher module.</div>

<div>And I see that outgoing INVITE has two content-lenth headers. Remote side after received such INVITE sends 400 </div>

<div>Bad Contenth-lenth header.</div>

<div> </div>

<div> </div>

<div> </div>

<div>Incoming INVITE:</div>

<div> </div>

<div>
<div>INVITE sip:9222992040@10.66.107.169;transport=sctp;user=phone SIP/2.0<br>
Via: SIP/2.0/SCTP 10.111.18.3:7010;branch=z9hG4bKiz5cvz9x5v5zi4bg84g4vx4zs;X-DispMsg=1408<br>
Route: <sip:10.66.107.169:5060;transport=sctp;lr><br>
Call-ID: i44czbcvax4gabcdst4iavdbaisji94s@10.18.5.64<br>
From: "9269918424"<sip:9269918424@10.111.18.3;transport=sctp;user=phone>;tag=i4z5545v-CC-1027-TRC-613805-OFC-14<br>
To: "9222992040"<sip:9222992040@10.66.107.169;transport=sctp;user=phone><br>
CSeq: 1 INVITE<br>
P-Access-Network-Info: GEN-ACCESS;"area-number=+79262000601"<br>
Max-Forwards: 70<br>
Contact: <sip:10.111.18.3:7010><br>
Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,INFO,PRACK,NOTIFY,MESSAGE,REFER,UPDATE<br>
P-Asserted-Identity: <tel:9269918424><br>
History-Info: <sip:9254462587@anonymous.invalid?reason=SIP%3Bcause%3D503%3Btext%3D%22Subscriber%20Not%20Reachable%22&Privacy=history>;index=1<br>
History-Info: <sip:9222992040@10.66.107.169:5060;transport=sctp>;index=1.1<br>
P-Early-Media: supported<br>
Supported: 100rel,timer,histinfo<br>
Min-SE: 90<br>
Session-Expires: 1800;refresher=uac<br>
Content-Length: 477<br>
Content-Type: multipart/mixed;boundary=ssboundary</div>

<div>--ssboundary<br>
Content-Length: 205<br>
Content-Type: application/sdp</div>

<div>v=0<br>
o=xyz 1154444372 1154444373 IN IP4 10.111.18.3<br>
s=SipCall<br>
c=IN IP4 10.249.66.133<br>
t=0 0<br>
m=audio 28644 RTP/AVP 8 116<br>
a=rtpmap:8 PCMA/8000<br>
a=rtpmap:116 telephone-event/8000<br>
a=ptime:20</div>

<div>--ssboundary<br>
Content-Length: 100<br>
Content-Type: application/isup;version=itu-t92+</div>

<div> </div>

<div>)"<br>
)HB()EdRx1Z )EdRxa4}à§=?bñ£9<br>
1À4À?ÀoÀuÀ<br>
--ssboundary--</div>
</div>

<div> </div>

<div> </div>

<div>Outgoing INVITE</div>

<div> </div>

<div>
<div>INVITE sip:9222992040@10.66.107.169;transport=sctp;user=phone SIP/2.0<br>
Record-Route: <sip:192.168.9.84;r2=on;lr;did=876.0b9c196><br>
Record-Route: <sip:10.66.107.169;transport=sctp;r2=on;lr;did=876.0b9c196><br>
Via: SIP/2.0/UDP 192.168.9.84:5060;branch=z9hG4bKfa6a.b4f80a51.0<br>
Via: SIP/2.0/SCTP 10.111.18.3:7010;branch=z9hG4bKiz5cvz9x5v5zi4bg84g4vx4zs;X-DispMsg=1408<br>
Call-ID: i44czbcvax4gabcdst4iavdbaisji94s@10.18.5.64<br>
From: "9269918424"<sip:9269918424@10.111.18.3;transport=sctp;user=phone>;tag=i4z5545v-CC-1027-TRC-613805-OFC-14<br>
To: "9222992040"<sip:9222992040@10.66.107.169;transport=sctp;user=phone><br>
CSeq: 1 INVITE<br>
P-Access-Network-Info: GEN-ACCESS;"area-number=+79262000601"<br>
Max-Forwards: 69<br>
Contact: <sip:10.111.18.3:7010><br>
Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,INFO,PRACK,NOTIFY,MESSAGE,REFER,UPDATE<br>
P-Asserted-Identity: <tel:9269918424><br>
History-Info: <sip:9254462587@anonymous.invalid?reason=SIP%3Bcause%3D503%3Btext%3D%22Subscriber%20Not%20Reachable%22&Privacy=history>;index=1<br>
History-Info: <sip:9222992040@10.66.107.169:5060;transport=sctp>;index=1.1<br>
P-Early-Media: supported<br>
Supported: 100rel,timer,histinfo<br>
Min-SE: 90<br>
Session-Expires: 1800;refresher=uac<br>
Content-Length: 205<br>
Content-Length: 205<br>
Content-Type: application/sdp<br>
v=0<br>
o=xyz 1154444372 1154444373 IN IP4 10.111.18.3<br>
s=SipCall<br>
c=IN IP4 10.249.66.133<br>
t=0 0<br>
m=audio 28644 RTP/AVP 8 116<br>
a=rtpmap:8 PCMA/8000<br>
a=rtpmap:116 telephone-event/8000<br>
a=ptime:20<br>
 </div>
</div>

<div> </div>

<div> </div>

<div> </div>

<div> </div>

<div data-signature-widget="container">
<div data-signature-widget="content">
<div>--<br>
Oleg Podguyko</div>
</div>
</div>
</BODY></HTML>