Asterisk cannot work with WebRTC, max packet length too small
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
asterisk (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Triaged
|
Low
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Asterisk is compiled against pjsip library from the OS, instead of using the bundled one. This system library (pjproject-2.7.2) is compiled with default max packet length, which is 4000 as of now. Unlike bundled pjproject, which uses a packet length of 32000. This low limit makes asterisk unusable with realistic SDP generated by browsers for WebRTC (e.g. on Chrome/85, a SDP generated for WebRTC with audio and video is 6000~7000 bytes).
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: asterisk 1:13.18.
ProcVersionSign
Uname: Linux 4.15.0-118-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.17
Architecture: amd64
Date: Mon Oct 5 11:09:21 2020
InstallationDate: Installed on 2019-01-06 (637 days ago)
InstallationMedia: Ubuntu-Server 18.04.1 LTS "Bionic Beaver" - Release amd64 (20180725)
ProcEnviron:
TERM=xterm-
PATH=(custom, no user)
XDG_RUNTIME_
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: asterisk
UpgradeStatus: No upgrade log present (probably fresh install)
Changed in asterisk (Ubuntu Bionic): | |
status: | New → Triaged |
Changed in asterisk (Ubuntu): | |
status: | Triaged → Fix Released |
Changed in asterisk (Ubuntu Focal): | |
status: | New → Fix Released |
Changed in asterisk (Ubuntu Bionic): | |
importance: | Undecided → Low |
Thanks for taking the time to report this bug and try to make Ubuntu better.
I can confirm that pjproject version 2.7.2~dfsg-1 available in Bionic has the maximum packet length set to 4000:
$ sed -n 333,339p pjsip/include/ pjsip/sip_ config. h
/**
* Maximum packet length. We set it more than MTU since a SIP PDU
* containing presence information can be quite large (>1500).
*/
#ifndef PJSIP_MAX_PKT_LEN
# define PJSIP_MAX_PKT_LEN 4000
#endif
In the latest versions (i.e. version in Focal) the pjproject source code was embedded in the asterisk source package and it does not depend on pjproject from the system anymore. I checked the file debian/ pjproject_ 2.8\~dfsg. orig.tar. bz2 (which is a DFSG free version of pjproject) in the asterisk source package version 1:16.2. 1~dfsg- 2ubuntu1 present in Focal and the defined maximum packet length is the same:
$ sed -n 357,363p pjsip/include/ pjsip/sip_ config. h
/**
* Maximum packet length. We set it more than MTU since a SIP PDU
* containing presence information can be quite large (>1500).
*/
#ifndef PJSIP_MAX_PKT_LEN
# define PJSIP_MAX_PKT_LEN 4000
#endif
The same applies to version 2.9 of pproject in the asterisk source package version 1:16.12.0~dfsg-1 in Groovy. Seen this as a pattern in all those releases I believe we should bring this to Debian and discuss this change with the asterisk maintainers there. Could you please file a bug in Debian describing your problem and link it here?