[OpenSIPS-Users] Fix empty lines in SIP headers generated by buggy hardware

Muhammad Shahzad shaheryarkh at gmail.com
Thu Nov 22 14:14:38 CET 2012


Use TextOPS module,

http://www.opensips.org/html/docs/modules/1.8.x/textops.html#id250208

You probably need to use it something like this,

replace_all("^\s+$", "");

You have to do this BEFORE involving B2BUA stuff.

Thank you.


On Thu, Nov 22, 2012 at 2:03 PM, Adam Raszynski <netcentrica at gmail.com>wrote:

> Hi
>
> 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.
>
> For example:
>
>         Via: SIP/2.0/UDP 80.1.1.1:5060;branch=z9hG4bKe89.28ac75a.0
>         To: sip:80.1.1.1
>         From: <sip:username at 80.1.1.1
> >;tag=13e3d64e25956fb4c1e2442af82fd0e3-c2c5
>         CSeq: 14 INVITE
>
>         Call-ID: 1af0eccc5994a91b-19144 at 80.1.1.1
>         Max-Forwards: 70
>         Content-Length: 0
>
>
> Note empty line between CSeq and Call-Id. That's just example, empty lines
> appear in random order.
>
> I route calls to sippy B2BUA wich does not accept malformed requests and
> throw exception in that condition.
>
> Is it possible to detect such requests in OpenSIPS and remove unnecessary
> empty lines from between headers?
>
> Regards
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20121122/2c03ccae/attachment.htm>


More information about the Users mailing list