WebRTC Bundle Enabled. ICE-UFRAG & Ports are not bundled

Hello !

First of all thanks for the hard work done on this project.

I have 2 endpoints
1/ 3000 registered through a SIP device that has multiple audio and video streams (m-lines)
2/ 99999 which is a WebRTC Gateway written in GoLang that does some RTP forwarding to our WebRTC Infrastructure

both 3000 & 99999 have direct media disabled
both 3000 & 99999 only have opus & VP8 allowed to avoid codec negotiation issues

99999 is configured with full WebRTC options enabled :
type=endpoint
aors=99999
auth=99999-auth
tos_audio=ef
tos_video=af41
cos_audio=5
cos_video=4
disallow=all
allow=opus,vp8
context=from-ubms2-custom
callerid=WebRTC Gateway <99999>

dtmf_mode=rfc4733
direct_media=no
aggregate_mwi=yes
use_avpf=yes
rtcp_mux=yes
max_audio_streams=3
max_video_streams=3
bundle=yes
ice_support=yes
media_use_received_transport=yes
trust_id_inbound=yes
user_eq_phone=no
send_connected_line=yes
media_encryption=dtls
timers=yes
timers_min_se=90
media_encryption_optimistic=no
refer_blind_progress=no
refer_blind_progress=no
rtp_timeout=30
rtp_timeout_hold=300
rtp_keepalive=0
send_pai=yes
rtp_symmetric=yes
rewrite_contact=yes
force_rport=yes
language=en
one_touch_recording=on
record_on_feature=apprecord
record_off_feature=apprecord
dtls_verify=fingerprint
dtls_setup=actpass
dtls_rekey=0
dtls_auto_generate_cert=yes

when 3000 calls any number, i have it configured to execute some custom logic. Fill out a X-Conf-Number in the SIP messages and then bridge with no pre answer Dial(PJSIP/99999)

The Gateway uses the header for some identification and then does the bridging. But the library i’m using Gateway side does not support unbundled WebRTC.

The INVITE SIP request generated by Asterisk shows that it attempts to do bundling :
[2023-11-18 19:07:43] DEBUG[28965]: res_pjsip_session.c:5233 create_local_sdp: 99999: Adding bundle groups (if available)

And actually adds the group:BUNDLE line :
<— Transmitting SIP request (2748 bytes) to UDP:… —>
INVITE …99999… SIP/2.0
Via: … …;rport;branch=z9hG4bKPj48de6daa-27b5-4e92-b504-5fdaeaaa16cb
From: “3000” <…3000…>;tag=637b4227-5506-472e-ab0b-5b0341d40e7a
To: <…99999…>
Contact: <…asterisk…>
Call-ID: ac988de0-b3f0-4b4c-b60f-e3512a903cfd
CSeq: 20660 INVITE
Allow: OPTIONS, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
P-Asserted-Identity: “3000” <…3000…>
X-Conf-Number: 37bbdd891e90eb3db9405a6a1a08544362c99e30eeafef13d2f0klp4exa6y,r-lzdRfgdU,11366,17245
Max-Forwards: 70
User-Agent: Ast (18.16.0)
Content-Type: application/sdp
Content-Length: 1904

v=0
o=- 688351932 688351932 IN IP4 …
s=Asterisk
c=IN IP4 …
t=0 0
a=group:BUNDLE audio-0 video-1 video-2
m=audio 15810 UDP/TLS/RTP/SAVPF 107 101
a=connection:new
a=setup:actpass
a=fingerprint:SHA-256 F3:86:0F:B8:69:7C:B3:27:D4:DF:80:4B:34:5B:3B:E6:D5:8F:24:23:23:67:DD:4B:EB:78:7F:89:E0:E8:55:AF
a=ice-ufrag:454e037e4da4371e65807e88634fd8d4
a=ice-pwd:575fde4741d4ddac369508351aa6ff99
a=candidate:H9387b5c9 1 UDP 2130706431 … 15810 typ host
a=candidate:Hd30485b5 1 UDP 2130706431 … 15810 typ host
a=rtpmap:107 opus/48000/2
a=fmtp:107 useinbandfec=1
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:20
a=sendrecv
a=rtcp-mux
a=ssrc:2128065493 cname:6e35e6e8-af86-46a4-89a1-8ef101fd919f
a=mid:audio-0
m=video 10692 UDP/TLS/RTP/SAVPF 100
a=connection:new
a=setup:actpass
a=fingerprint:SHA-256 84:C6:A4:63:23:3E:44:E6:5C:B4:C3:EB:05:85:A6:79:8E:20:4F:5D:BE:1F:B3:BF:E6:17:11:05:CD:01:E3:64
a=ice-ufrag:1ba2a4ce70d592b40cee378b240fbfbb
a=ice-pwd:4e27c09840510fad3c633fc536a9e17d
a=candidate:H9387b5c9 1 UDP 2130706431 … 10692 typ host
a=candidate:Hd30485b5 1 UDP 2130706431 … 10692 typ host
a=rtpmap:100 VP8/90000
a=sendrecv
a=rtcp-mux
a=ssrc:1382360482 cname:7ffae8c2-0e2a-4acb-b7e7-7422a09dd5d5
a=mid:video-1
m=video 18480 UDP/TLS/RTP/SAVPF 100
a=connection:new
a=setup:actpass
a=fingerprint:SHA-256 17:09:CE:03:9C:16:B5:12:DF:13:FC:F3:0A:62:86:4B:AE:C0:1F:AB:E9:15:9E:48:FD:78:81:1C:DA:9A:77:06
a=ice-ufrag:5abd0c662f6d9b346f57e0ee1870e363
a=ice-pwd:170751893372df492e67facb4cc75058
a=candidate:H9387b5c9 1 UDP 2130706431 … 18480 typ host
a=candidate:Hd30485b5 1 UDP 2130706431 … 18480 typ host
a=rtpmap:100 VP8/90000
a=recvonly
a=rtcp-mux
a=ssrc:1822569222 cname:3042e263-b395-4c25-91f2-fc6f861d77fb
a=mid:video-2

Is Bundling not supported when Asterisk generates the WebRTC SDP ? Or is it that the call originated from a SIP Device and went to WebRTC through a call bridge ? Thanks in advance for your help !

It’s an offer to bundle. It’s up to the answering side to accept the bundle and provide an SDP answer that is bundled.

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