Re: Max message size over TLS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



That worked well after recompiling. Thanks Joshua.
Still wondering why the automatic transport switch doesn't seem to work with TLS.

On Fri, Mar 22, 2024 at 1:40 PM Joshua C. Colp <jcolp@xxxxxxxxxx> wrote:
On Fri, Mar 22, 2024 at 9:30 AM Andrés Alonso via pjsip <pjsip@xxxxxxxxxxxxxxx> wrote:
Hello,

I'm trying to send a rather large JWT token as a custom header in the REGISTER message. I'm using TLS transport.

I know the max length for UDP is 1300 bytes, and that PJSIP supposedly switches to TCP when the message length is over that threshold. But what about TLS?

After transport is connected I'm still getting this error: 

...Failed to send Request msg REGISTER/cseq=52341 (tdta0x1058206a8)! err=171023 (Message too long (PJSIP_EMSGTOOLONG))

Any feedback would be appreciated. Thank you.

PJSIP has a fixed maximum packet size. It is configurable in the config_site.h using the PJSIP_MAX_PKT_LEN define[1]. We set it to 65535 with no issues[2]. Do note after changing the value it does require a full rebuild, or else you'll encounter weird crashes.

[1] https://github.com/pjsip/pjproject/blob/master/pjlib/include/pj/config_site_sample.h#L175
[2] https://github.com/asterisk/asterisk/blob/master/third-party/pjproject/patches/config_site.h#L68

--
Joshua C. Colp
Director of Engineering | Asterisk Project Lead
Sangoma Technologies
Check us out at www.sangoma.com and www.asterisk.org
_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list -- pjsip@xxxxxxxxxxxxxxx
To unsubscribe send an email to pjsip-leave@xxxxxxxxxxxxxxx

[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux