INVITE from some Chrome WEBRTC clients rejected with PJMEDIA_SDP_EMISSINGRTPMAP!

Hi,
in last days I notice that more and more WEBRTC clients are not able to make outgoing/invite request to asterisk server.

In log file I see following errors:

[Apr  4 10:54:28] WARNING[1000] pjproject: 	                 sdp.c .Error adding media attribute, attribute is ignored: Too many objects of the specified type (PJ_ETOOMANY)
[Apr  4 12:09:20] WARNING[1000] pjproject: 	                 sdp.c .Error adding media attribute, attribute is ignored: Too many objects of the specified type (PJ_ETOOMANY)
[Apr  4 12:09:20] WARNING[1000] pjproject: 	                 sdp.c .Error adding media attribute, attribute is ignored: Too many objects of the specified type (PJ_ETOOMANY)
[Apr  4 12:09:20] WARNING[1000] pjproject: 	                 sdp.c .Error adding media attribute, attribute is ignored: Too many objects of the specified type (PJ_ETOOMANY)
[Apr  4 12:09:20] WARNING[1000] pjproject: 	                 sdp.c .Error adding media attribute, attribute is ignored: Too many objects of the specified type (PJ_ETOOMANY)
[Apr  4 12:09:20] WARNING[1000] pjproject: 	                 sdp.c .Error adding media attribute, attribute is ignored: Too many objects of the specified type (PJ_ETOOMANY)
[Apr  4 12:09:20] WARNING[1000] pjproject: 	                 sdp.c .Error adding media attribute, attribute is ignored: Too many objects of the specified type (PJ_ETOOMANY)
[Apr  4 12:09:20] WARNING[1000] pjproject: 	                 sdp.c .Error adding media attribute, attribute is ignored: Too many objects of the specified type (PJ_ETOOMANY)
[Apr  4 12:09:20] WARNING[1000] pjproject: 	                 sdp.c .Error adding media attribute, attribute is ignored: Too many objects of the specified type (PJ_ETOOMANY)
[Apr  4 12:09:20] WARNING[1000] pjproject: 	                 sdp.c .Error adding media attribute, attribute is ignored: Too many objects of the specified type (PJ_ETOOMANY)
[Apr  4 12:09:20] WARNING[1000] pjproject: 	                 sdp.c .Error adding media attribute, attribute is ignored: Too many objects of the specified type (PJ_ETOOMANY)
[Apr  4 12:09:20] WARNING[1000] pjproject: 	                 sdp.c .Error adding media attribute, attribute is ignored: Too many objects of the specified type (PJ_ETOOMANY)
[Apr  4 12:09:20] WARNING[1000] pjproject: 	                 sdp.c .Error adding media attribute, attribute is ignored: Too many objects of the specified type (PJ_ETOOMANY)
[Apr  4 12:09:20] WARNING[1000] pjproject: 	                 sdp.c .Error adding media attribute, attribute is ignored: Too many objects of the specified type (PJ_ETOOMANY)
[Apr  4 12:09:20] WARNING[1000] pjproject: 	                 sdp.c .Error adding media attribute, attribute is ignored: Too many objects of the specified type (PJ_ETOOMANY)
[Apr  4 12:09:20] WARNING[1000] pjproject: 	                 sdp.c .Error adding media attribute, attribute is ignored: Too many objects of the specified type (PJ_ETOOMANY)
[Apr  4 12:09:20] ERROR[1000] pjproject: 	             sip_inv.c .Error parsing/validating SDP body: Missing SDP rtpmap for dynamic payload type (PJMEDIA_SDP_EMISSINGRTPMAP)

As you can see first there are many PJ_ETOOMANY warnings and then there is PJMEDIA_SDP_EMISSINGRTPMAP error.

SDP from failed INVITE is:

v=0
o=- 5196514386478193128 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE 0 1
a=extmap-allow-mixed
a=msid-semantic: WMS ded27b78-b57a-46c9-96d3-67ad7674c17a
m=audio 43663 UDP/TLS/RTP/SAVPF 111 63 103 104 9 0 8 106 105 13 110 112 113 126
c=IN IP4 146.212.28.109
a=rtcp:9 IN IP4 0.0.0.0
a=candidate:1342263604 1 udp 2122260223 192.168.178.43 43663 typ host generation 0 network-id 1 network-cost 10
a=candidate:2626449063 1 udp 1686052607 146.212.28.109 43663 typ srflx raddr 192.168.178.43 rport 43663 generation 0 network-id 1 network-cost 10
a=candidate:511880644 1 tcp 1518280447 192.168.178.43 9 typ host tcptype active generation 0 network-id 1 network-cost 10
a=ice-ufrag:MXq3
a=ice-pwd:NsnE9RWOa+lUDF/bSXshEu8W
a=ice-options:trickle
a=fingerprint:sha-256 52:F3:3D:E0:F7:C7:F8:25:6C:68:1A:53:E8:23:F0:84:B5:EC:39:E3:52:5F:36:01:EF:24:6D:2B:F3:C4:FC:AC
a=setup:actpass
a=mid:0
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
a=sendrecv
a=msid:ded27b78-b57a-46c9-96d3-67ad7674c17a c01d5240-234f-44dd-825a-9119ea24e2ed
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=rtcp-fb:111 transport-cc
a=fmtp:111 minptime=10;useinbandfec=1
a=rtpmap:63 red/48000/2
a=fmtp:63 111/111
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:106 CN/32000
a=rtpmap:105 CN/16000
a=rtpmap:13 CN/8000
a=rtpmap:110 telephone-event/48000
a=rtpmap:112 telephone-event/32000
a=rtpmap:113 telephone-event/16000
a=rtpmap:126 telephone-event/8000
a=ssrc:3812240580 cname:19Lenrp9czOojeyi
a=ssrc:3812240580 msid:ded27b78-b57a-46c9-96d3-67ad7674c17a c01d5240-234f-44dd-825a-9119ea24e2ed
a=ssrc:3812240580 mslabel:ded27b78-b57a-46c9-96d3-67ad7674c17a
a=ssrc:3812240580 label:c01d5240-234f-44dd-825a-9119ea24e2ed
m=video 41685 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 102 122 127 121 125 107 108 109 124 120 123 119 35 36 37 38 39 40 41 42 114 115 116 43
c=IN IP4 146.212.28.109
a=rtcp:9 IN IP4 0.0.0.0
a=candidate:1342263604 1 udp 2122260223 192.168.178.43 41685 typ host generation 0 network-id 1 network-cost 10
a=candidate:2626449063 1 udp 1686052607 146.212.28.109 41685 typ srflx raddr 192.168.178.43 rport 41685 generation 0 network-id 1 network-cost 10
a=candidate:511880644 1 tcp 1518280447 192.168.178.43 9 typ host tcptype active generation 0 network-id 1 network-cost 10
a=ice-ufrag:MXq3
a=ice-pwd:NsnE9RWOa+lUDF/bSXshEu8W
a=ice-options:trickle
a=fingerprint:sha-256 52:F3:3D:E0:F7:C7:F8:25:6C:68:1A:53:E8:23:F0:84:B5:EC:39:E3:52:5F:36:01:EF:24:6D:2B:F3:C4:FC:AC
a=setup:actpass
a=mid:1
a=extmap:14 urn:ietf:params:rtp-hdrext:toffset
a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:13 urn:3gpp:video-orientation
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:5 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay
a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type
a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing
a=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/color-space
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
a=extmap:10 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
a=extmap:11 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id
a=recvonly
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:96 VP8/90000
a=rtcp-fb:96 goog-remb
a=rtcp-fb:96 transport-cc
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli
a=rtpmap:97 rtx/90000
a=fmtp:97 apt=96
a=rtpmap:98 VP9/90000
a=rtcp-fb:98 goog-remb
a=rtcp-fb:98 transport-cc
a=rtcp-fb:98 ccm fir
a=rtcp-fb:98 nack
a=rtcp-fb:98 nack pli
a=fmtp:98 profile-id=0
a=rtpmap:99 rtx/90000
a=fmtp:99 apt=98
a=rtpmap:100 VP9/90000
a=rtcp-fb:100 goog-remb
a=rtcp-fb:100 transport-cc
a=rtcp-fb:100 ccm fir
a=rtcp-fb:100 nack
a=rtcp-fb:100 nack pli
a=fmtp:100 profile-id=2
a=rtpmap:101 rtx/90000
a=fmtp:101 apt=100
a=rtpmap:102 VP9/90000
a=rtcp-fb:102 goog-remb
a=rtcp-fb:102 transport-cc
a=rtcp-fb:102 ccm fir
a=rtcp-fb:102 nack
a=rtcp-fb:102 nack pli
a=fmtp:102 profile-id=1
a=rtpmap:122 rtx/90000
a=fmtp:122 apt=102
a=rtpmap:127 H264/90000
a=rtcp-fb:127 goog-remb
a=rtcp-fb:127 transport-cc
a=rtcp-fb:127 ccm fir
a=rtcp-fb:127 nack
a=rtcp-fb:127 nack pli
a=fmtp:127 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f
a=rtpmap:121 rtx/90000
a=fmtp:121 apt=127
a=rtpmap:125 H264/90000
a=rtcp-fb:125 goog-remb
a=rtcp-fb:125 transport-cc
a=rtcp-fb:125 ccm fir
a=rtcp-fb:125 nack
a=rtcp-fb:125 nack pli
a=fmtp:125 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42001f
a=rtpmap:107 rtx/90000
a=fmtp:107 apt=125
a=rtpmap:108 H264/90000
a=rtcp-fb:108 goog-remb
a=rtcp-fb:108 transport-cc
a=rtcp-fb:108 ccm fir
a=rtcp-fb:108 nack
a=rtcp-fb:108 nack pli
a=fmtp:108 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f
a=rtpmap:109 rtx/90000
a=fmtp:109 apt=108
a=rtpmap:124 H264/90000
a=rtcp-fb:124 goog-remb
a=rtcp-fb:124 transport-cc
a=rtcp-fb:124 ccm fir
a=rtcp-fb:124 nack
a=rtcp-fb:124 nack pli
a=fmtp:124 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42e01f
a=rtpmap:120 rtx/90000
a=fmtp:120 apt=124
a=rtpmap:123 H264/90000
a=rtcp-fb:123 goog-remb
a=rtcp-fb:123 transport-cc
a=rtcp-fb:123 ccm fir
a=rtcp-fb:123 nack
a=rtcp-fb:123 nack pli
a=fmtp:123 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=4d001f
a=rtpmap:119 rtx/90000
a=fmtp:119 apt=123
a=rtpmap:35 H264/90000
a=rtcp-fb:35 goog-remb
a=rtcp-fb:35 transport-cc
a=rtcp-fb:35 ccm fir
a=rtcp-fb:35 nack
a=rtcp-fb:35 nack pli
a=fmtp:35 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=4d001f
a=rtpmap:36 rtx/90000
a=fmtp:36 apt=35
a=rtpmap:37 H264/90000
a=rtcp-fb:37 goog-remb
a=rtcp-fb:37 transport-cc
a=rtcp-fb:37 ccm fir
a=rtcp-fb:37 nack
a=rtcp-fb:37 nack pli
a=fmtp:37 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=f4001f
a=rtpmap:38 rtx/90000
a=fmtp:38 apt=37
a=rtpmap:39 H264/90000
a=rtcp-fb:39 goog-remb
a=rtcp-fb:39 transport-cc
a=rtcp-fb:39 ccm fir
a=rtcp-fb:39 nack
a=rtcp-fb:39 nack pli
a=fmtp:39 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=f4001f
a=rtpmap:40 rtx/90000
a=fmtp:40 apt=39
a=rtpmap:41 AV1/90000
a=rtcp-fb:41 goog-remb
a=rtcp-fb:41 transport-cc
a=rtcp-fb:41 ccm fir
a=rtcp-fb:41 nack
a=rtcp-fb:41 nack pli
a=rtpmap:42 rtx/90000
a=fmtp:42 apt=41
a=rtpmap:114 red/90000
a=rtpmap:115 rtx/90000
a=fmtp:115 apt=114
a=rtpmap:116 ulpfec/90000
a=rtpmap:43 flexfec-03/90000
a=rtcp-fb:43 goog-remb
a=rtcp-fb:43 transport-cc
a=fmtp:43 repair-window=10000000

I checked SDP and for me it looks OK. For each dynamic payload I see corresponding rtpmap. Errors only happens on chrome browser and it looks that if customers tries from firefox it works ok.
So the problem is probably linked to generated SDP by browser. Maybe also connected to last chrome versions.

The only thing that comes to me is that pjsip cuts SDP (has some limit on SPD lenght). (Asterisk 13.10 + pjsip + WebRTC - Rx buffer overflow (PJSIP_ERXOVERFLOW) - Stack Overflow) But on my computer I can see longer SDP that is correctly processed.

Any thoughts?
Edvin

What version of Asterisk? Are you using bundled PJSIP?

If using bundled, then you can edit third-party/pjproject/patches/config_site.h and adjust the line:

#define PJMEDIA_MAX_SDP_ATTR   (PJMEDIA_MAX_SDP_FMT*2 + 4)

To:

#define PJMEDIA_MAX_SDP_ATTR   (PJMEDIA_MAX_SDP_FMT*3 + 4)

On a fresh copy of Asterisk and build it. If that works I’d suggest filing an issue[1].

[1] System Dashboard - Digium/Asterisk JIRA

Hi,
I upgraded to latest version, because I thought that this was a problem so my current version is:

Connected to Asterisk 18.11.1 currently running on dolly (pid = 965)
dolly*CLI> core show version
Asterisk 18.11.1 built by root @ dolly on a x86_64 running Linux on 2022-04-04 10:40:54 UTC
dolly*CLI> pjsip show version
PJPROJECT version currently running against: 2.10

I’m building with bundled like this:
sudo ./configure --with-pjproject-bundled --with-jansson-bundled

I will try increase PJMEDIA_MAX_SDP_ATTR and let you know

br
edvin

We experienced the exact same problem.
We believe it was triggered by the newest chrome update creating longer SDP sections and reaching that upper limit.

Can also confirm that the fix below did work:

Here is the issue to keep track of this bug.
https://issues.asterisk.org/jira/browse/ASTERISK-30015

Hi,
I was waiting for one week so that I can be sure that this fix really works. And indeed there were no more errors from any clients.

I also check some old asterisk logs and was able to see that first error came out about two month ago and becoming more frequent in last weeks.

br
edvin

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.