Use TextOPS module,<div><br></div><div><a href="http://www.opensips.org/html/docs/modules/1.8.x/textops.html#id250208">http://www.opensips.org/html/docs/modules/1.8.x/textops.html#id250208</a><br><div><br></div><div>You probably need to use it something like this,</div>
<div><br></div><div><div>replace_all(&quot;^\s+$&quot;, &quot;&quot;);</div></div><div><br></div><div>You have to do this BEFORE involving B2BUA stuff.</div><div><br></div><div>Thank you.</div><div><br><br><div class="gmail_quote">
On Thu, Nov 22, 2012 at 2:03 PM, Adam Raszynski <span dir="ltr">&lt;<a href="mailto:netcentrica@gmail.com" target="_blank">netcentrica@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi<div><br></div><div>I have problem with some buggy hardware ATAs and routers, some of them mess SIP requests by adding empty lines (\n or \r\n) between headers.</div><div><br></div><div>For example:</div><div><br></div>
<div>
<div>        Via: SIP/2.0/UDP 80.1.1.1:5060;branch=z9hG4bKe89.28ac75a.0</div><div>        To: sip:80.1.1.1</div><div>        From: &lt;<a href="mailto:sip%3Ausername@80.1.1.1" target="_blank">sip:username@80.1.1.1</a>&gt;;tag=13e3d64e25956fb4c1e2442af82fd0e3-c2c5</div>

<div>        CSeq: 14 INVITE<br>       </div><div>        Call-ID: <a href="mailto:1af0eccc5994a91b-19144@80.1.1.1" target="_blank">1af0eccc5994a91b-19144@80.1.1.1</a></div><div>        Max-Forwards: 70</div><div>        Content-Length: 0</div>

</div><div><br></div><div><br></div><div>Note empty line between CSeq and Call-Id. That&#39;s just example, empty lines appear in random order.</div><div><br></div><div>I route calls to sippy B2BUA wich does not accept malformed requests and throw exception in that condition.</div>

<div><br></div><div>Is it possible to detect such requests in OpenSIPS and remove unnecessary empty lines from between headers?</div><div><br></div><div>Regards</div><div><br></div><div><br></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div></div>