Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INVITE SDP Cut off (Content-Length Capped) on Invite from Drachtio->FSMRF #247

Closed
lylepratt opened this issue Dec 29, 2022 · 2 comments
Closed

Comments

@lylepratt
Copy link

Originally created this issue over in the FSMRF repo, but after looking at the code, it seems like its actually a drachtio-server issue. Let me know which I should keep open.

Original issue:
drachtio/drachtio-fsmrf#66

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. It seems the truncated INVITE always has a Content-Length of 8384. However, we were not able to find anything in code that would account for this ceiling. Also, when this happens, it seems to eventually put Drachtio into a bad state where it stops responding to requests.

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) the Msg 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

2022-12-28T21:15:45.219Z drachtio:agent wp#send 0.0.0.0:9022 - 8671#03878403-7a04-4122-9eef-a10b5f60eff9|sip||
INVITE sip:[email protected]:5038 SIP/2.0
User-Agent: drachtio-fsmrf:d33ea6ce-4142-4585-9b61-a19c468267be
X-esl-outbound: 137.184.49.198:8103
Content-Length: 8452

v=0
o=- 85472555477210657 2 IN IP4 127.0.0.1
s=-
t=0 0
{.......... LOTS OF SDP ..... }
a=ssrc-group:FID 3683095972 3429814089
a=ssrc:3683095972 cname:OKoL/EIn4ZsuRc8D
a=ssrc:3683095972 msid:DkHMBAlVaOZNLJKkWbghoXzY3U61MFpRNPEW 3b3c6746-45c8-4554-86a0-88991e0f1109
a=ssrc:3429814089 cname:OKoL/EIn4ZsuRc8D
a=ssrc:3429814089 msid:DkHMBAlVaOZNLJKkWbghoXzY3U61MFpRNPEW 3b3c6746-45c8-4554-86a0-88991e0f1109

Cut off invite...notice the last line is cut

2022-12-28T21:15:45.221Z drachtio:agent <===9058#ed9ea344-3754-414f-99b7-e46b21533c9e|response|03878403-7a04-4122-9eef-a10b5f60eff9|OK|application|8866|tcp|104.131.19.169|5038|21:15:45.221075|54495c2e-c90d-464b-8b46-1e61cfe28138|Msg sent:|
INVITE sip:[email protected]:5038 SIP/2.0
Via: SIP/2.0/TCP 137.184.49.198;branch=z9hG4bKj6a582gKg6a2H
Max-Forwards: 70
From: <sip:137.184.49.198:5060>;tag=rcDX375t8y55j
To: <sip:[email protected]:5038>
Call-ID: a23eb86d-0197-123c-1585-0242ac110002
CSeq: 61577280 INVITE
Contact: <sip:137.184.49.198:5060>
User-Agent: drachtio-fsmrf:d33ea6ce-4142-4585-9b61-a19c468267be
Content-Type: application/sdp
Content-Length: 8384
X-esl-outbound: 137.184.49.198:8103

v=0
o=- 85472555477210657 2 IN IP4 127.0.0.1
s=-
t=0 0
{.......... LOTS OF SDP ..... }
a=ssrc-group:FID 3683095972 3429814089
a=ssrc:3683095972 cname:OKoL/EIn4ZsuRc8D
a=ssrc:3683095972 msid:DkHMBAlVaOZNLJKkWbghoXzY3U61MFpRNPEW 3b3c6746-45c8-4554-86a0-88991e0f1109
a=ssrc:3429814089 cname:OKoL/EIn4ZsuRc8D
a=ssrc:3429814089 msid:DkHMBAl      < ----- NOTICE THIS IS CUT OFF
@davehorton
Copy link
Collaborator

@lylepratt can you give me a full drachtio log file showing the INVITE coming in and that going out? I can then use that example to craft my test case.

@brandonrobinson5060
Copy link

Hey Dave, I think we have two issues open. One in drachtio-server and one in drachtio-fsmrf.

The log files were posted on the other issue. (drachtio/drachtio-fsmrf#66)

Log file:
https://github.com/drachtio/drachtio-fsmrf/files/10353182/drachtio-CutOffInvite-Log9.log

davehorton added a commit that referenced this issue Jan 23, 2023
* bugfix #247 - sdp was being truncated on uac invite

* additional test cases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants