[OpenSIPS-Users] Am I seeing SIP message fragmentation?
Mark Allen
mark at allenclan.co.uk
Mon Jun 7 07:27:06 EST 2021
So, we now have a fix for this. Here's a summary of the error we were
seeing and the solution in case it's useful to anybody else.
The problem we were seeing was a SIP message failing to parse and raising
errors. This was particularly problematic for us when it was a REGISTER
failing. Looking at the error message we could see that there seemed to be
a fragment of another message tagged onto the front of the SIP message,
which was the source of the parsing error:
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>
On investigation, we found that our webphone had a bug when responding to
OPTIONS messages. It included a blank line partway through the 200 OK
message - e.g.
SIP/2.0 200 OK
Via: SIP/2.0/WSS 192.168.1.23:2096;branch=z9hG4bKa9ef.4dec8f71.0;i=6a378c51
Via: SIP/2.0/TCP 192.168.1.23:5060
;rport=37493;received=192.168.1.23;branch=z9hG4bK8da5c944
From: sip:pinger at 192.168.1.23;tag=8b54f607
To: sip:4.56.78.110:52570
Call-ID: 0003168-8da5c944-5d2 at 192.168.1.23
CSeq: 1 OPTIONS
Max-Forwards: 68
Content-Length: 0
Contact: <sip:1234 at abc.def.com:5060>
User-Agent: MWWRTC 3.4.21042
Accept: application/sdp,application/dtmf-relay,text/plain
...this meant that the lines from "Contact" onwards were being seen as the
start of a new message, and hence tagged onto whatever SIP message arrived
next.
The solution was raising a bug to get the webphone supplier to fix the
problem. Now we have a new version, the problem no longer occurs :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20210607/3c684137/attachment.html>
More information about the Users
mailing list