[OpenSIPS-Users] Am I seeing SIP message fragmentation?

Mark Allen mark at allenclan.co.uk
Wed May 26 11:15:57 EST 2021


I'm seeing a weird, intermittent error. The most common occurrence is with
a 200OK returned by Mid-Registrar on a re-REGISTER using registration
throttling, but we see it elsewhere. It appears that the 200OK message is
getting garbled.

We have a bit of a weird setup to overcome issues we were having with
Mid-Registrar and WebSocket addressing. Mid-Registrar is looping back 200OK
to OpenSIPS before it then gets sent down the WebSocket. 90+% of the time
it's absolutely fine, but occasionally the 200OK seems to be corrupted.

Here's an example. What we are seeing in this message is...

    Contact: <sip:1234 at abc.def.com:5060>
    User-Agent: MWWRTC 3.4.21042#015#012Accept:
application/sdp,application/dtmf-relay,text/plain

...preceding...

    SIP/2.0 200 OK
    Via: SIP/2.0/TCP 192.168.1.23:5060
;received=192.168.1.23;rport=42385;branch=z9hG4bK22a8.4fa6d127.0;i=b4986fe4
    ...etc...

...so OpenSIPS is failing to parse the message.

What I'd like to know is, is this a sign of SIP message fragmentation?



Log entries (IP addresses, domains, and extensions changed to protect the
innocent!):

ERROR:core:parse_method: invalid character :
DBG:core:tcp_read_req: tcp_read_req end
INFO:core:parse_first_line: failed to parse the method
INFO:core:parse_first_line: bad message
DBG:core:parse_msg: invalid message
ERROR:core:parse_msg: message=<Contact:
<sip:1234 at abc.def.com:5060>#015#012User-Agent:
MWWRTC 3.4.21042#015#012Accept:
application/sdp,application/dtmf-relay,text/plain#015#012SIP/2.0 200
OK#015#012Via: SIP/2.0/TCP
192.168.1.23:5060;received=192.168.1.23;rport=42385;branch=z9hG4bK22a8.4fa6d127.0;i=b4986fe4#015#012Via:
SIP/2.0/WSS
98kaag0xmybq.invalid;received=4.56.78.110;branch=z9hG4bKU6O3fJQGeLvuACMTXTArJgJW73rOD5dU;rport=52570#015#012From:
<sip:1234 at abc.def.com>;tag=Lyk010G476K7xcKrE84M#015#012To: <
sip:1234 at abc.def.com>;tag=af78-6213d386c3edcd02707b0c0aa8423d3a#015#012Call-ID:
666b5e7c-cef3-f306-4b79-60d3160dc5d0#015#012CSeq: 28825
REGISTER#015#012Contact: <sips:1234 at 98kaag0xmybq.invalid
;transport=wss>;expires=60;received="sip:4.56.78.110:52570"#015#012Server:
OpenSIPS (3.1.1 (x86_64/linux))#015#012Content-Length: 0#015#012#015#012>
ERROR:core:receive_msg: Unable to parse msg received from [192.168.1.23:5060
]
ERROR:core:tcp_handle_req: receive_msg failed
DBG:core:tcp_read_req: tcp_read_req end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20210526/2246e54c/attachment.html>


More information about the Users mailing list