Open lylepratt opened 1 year ago
Perhaps something else worth mentioning, it seems the truncated INVITE always has a Content-Length of 8384. However, wasn't able to find anything in code that would account for this ceiling.
Wanted to also note that when this happens, it seems to eventually put Drachtio into a bad state where it stops responding to requests.
After looking at the code, it seems like its actually a drachtio-server issue. Let me know which I should keep open.
I don't think it is a drachtio server issue as it seems the message being sent over to drachtio server is truncated; ie truncation is not happening on drachtio server side
Not sure I understand what you mean. You mean the message sent over to drachtio-fsmrf? Drachtio server seems to get the Full Invite from the client (you can see this because drachtio-server logs the full invite), but when it is sent out from drachtio-server -> FSMRF, it gets cut off.
I'm referring to this log snippet
2022-12-28T21:15:45.221Z drachtio:agent <===9058
which is from drachtio-srf.
If you are indicating that the full INVITE was sent over to drachtio-server from the app, but a truncated version went out, then yes it would be a drachtio-server bug. And we would want the full drachtio server debug log
Yes that seems to be the case.
Here is a full drachtio debug log starting with the INVITE from the client. The invite that gets sent to FreeSwitch is ID cefeb7b3-0246-123c-b286-0242ac110002
on line 1467
with length 8384
. If you scroll up from there you'll see the original INVITE that is supposed to get sent to FS has a length of 8451
.
Something else to note is that the SDP content length is always capped at 8384
, but the total length returned by tport_send_msg()
is always 8866
(even if I send in a giant 10kbyte INVITE which often comes from Safari over WebRTC, these are the capped amounts that always hit the wire outbound to FS)
howdy! just following up here. Any thoughts or insights Dave?
can you recreate that with sofia-loglevel at 9 ?
working on it!
OK. Bad INVITE with Content-Length 8384 is at line 906. You can see the good version of it right above that with a full Content-Length of 10693. These invites were generated by Safari webrtc.
any insights with log level 9 turned on?
are you certain sofia logging was at 9? I expected to see more logging
well I started the container with that sofia log level command and set it to 9. can give it another shot tomorrow though. is there a way i can verify?
this should be fixed in drachtio-server release v0.8.21-rc2.
We've begin leveraging TURN servers for our WebRTC connections, and it seems to have pushed us over some kind of limit on the size of the SDP that can be sent from Drachtio -> Freeswitch. We noticed because we began getting some SIP 400s sent back to us from Freeswitch. When the SDP is cut off in a particular spot that breaks parsing, then a 400 results. Usually it seems to work anyway though because what is getting cut off doesn't seem to matter.
In the drachtio logs, I see the 2 invites (a) one from
wp#send
which contains the full SDP (I've cut off some of it to save space) and (b) theMsg sent:
log which is what is actually sent to FS. Also notice the 2 Content-Lengths are different.Do you have any idea what could be causing this?
Correct invite
Cut off invite...notice the last line is cut