Hey Guys, when settings WebRTC defaults to “Yes” in Advanced section of an extension (chan_pjsip), it doesn’t work. It doesn’t turn on the required settings for WebRTC to work.
Further i thought maybe the settings are not reflected, but when i try to connect with my WebRTC client it fails, until and unless i set all the settings correct for WebRTC to work manually.
Current PBX Version: 15.0.16.49
Current System Version:12.7.6-2002-2.sng7
billsimon
(Bill Simon)
May 19, 2020, 5:35pm
2
Check out this blog post to understand what that setting is for: https://blogs.asterisk.org/2017/09/06/upcoming-webrtc-improvements-asterisk-15/
In short, it’s not a magic switch for enabling webrtc, but it does make setting some of the required parameters more convenient.
slobera
(Sergio Lobera)
May 19, 2020, 5:38pm
3
As @billsimon said you need to configure some other things in order to get WebRTC working.
You can follow this guide: https://wiki.freepbx.org/display/F2/WebRTC+Phone-UCP
jcolp
(Joshua Colp)
May 19, 2020, 5:41pm
4
It also enables the fancy quality stuff for video too. Some of that is not behind separate options because it’s strictly for WebRTC.
2 Likes
Sorry guys, i forgot to mention its not for UCP. Its for a custom WebRTC client outside UCP.
Yes i am aware its not a magic switch however if you would see this
https://wiki.asterisk.org/wiki/display/AST/Configuring+Asterisk+for+WebRTC+Clients
Under PJSIP configuration
`[webrtc_client]`
`type=endpoint`
`aors=webrtc_client`
`auth=webrtc_client`
`dtls_auto_generate_cert=yes`
`webrtc=yes`
`; Setting webrtc=yes is a shortcut ` `for` `setting the following options:`
`; use_avpf=yes`
`; media_encryption=dtls`
`; dtls_verify=fingerprint`
`; dtls_setup=actpass`
`; ice_support=yes`
`; media_use_received_transport=yes`
`; rtcp_mux=yes`
`context=` `default`
`disallow=all`
`allow=opus,ulaw`
As you can see, it says here Setting webrtc=yes is a shortcut
for
setting the following options
I thought maybe toggling that adds that to the config.
@billsimon @slobera @jcolp
billsimon
(Bill Simon)
May 19, 2020, 6:06pm
6
It effectively enables those commented-out options, as well as others (as jcolp noted), without actually spelling it out in the config.
I guess i am doing something wrong. Just noticed something anyway.
[1061]
type=endpoint
aors=1061
auth=1061-auth
tos_audio=ef
tos_video=af41
cos_audio=5
cos_video=4
allow=ulaw,alaw,gsm,g726,g722
context=from-internal
callerid=web2 <1061>
dtmf_mode=rfc4733
direct_media=yes
aggregate_mwi=yes
use_avpf=no
rtcp_mux=no
max_audio_streams=1
max_video_streams=1
bundle=yes
ice_support=no
media_use_received_transport=no
trust_id_inbound=yes
user_eq_phone=no
send_connected_line=yes
media_encryption=no
timers=yes
timers_min_se=90
media_encryption_optimistic=no
refer_blind_progress=yes
refer_blind_progress=yes
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
Here’s whats generated, i have WebRTC Defaults turned on, none of the settings are enabled related to WebRTC for it to work. As you can see avpf, rtpc_mux, ice are all still off
billsimon
(Bill Simon)
May 19, 2020, 7:01pm
8
I tried it and see the same. That should put webrtc=yes
into the endpoint config but it doesn’t. Recommend you file a bug at issues.freepbx.org .
2 Likes
Thanks for confirming it. Filed a bug .
Issue Link - https://issues.freepbx.org/browse/FREEPBX-21529
lgaetz
(Lorne Gaetz)
May 28, 2020, 11:53am
10
Since I don’t see it here, the work around until the ticket is resovled would be to add the value manually.
; in file pjsip.endpoint_custom_post.conf
[6005](+type=endpoint)
webrtc=yes
save, reload and confirm with:
# asterisk -x "pjsip show endpoint 6005" | grep webrtc
webrtc : yes
i am afraid there’s a bug with asterisk too, as i tried doing that, and the extensions wouldn’t get registered by setting ‘webrtc=yes’
The only way WebRTC worked was by toggling the settings in Advanced Tab by turning on AVPF, DTLS, RTCP MUX, ICE and Media Encryption.
Or simply adding to the config
use_avpf=yes
media_encryption=dtls
dtls_verify=fingerprint
dtls_setup=actpass
ice_support=yes
media_use_received_transport=yes
rtcp_mux=yes
Basically setting all the things manually which that one line of code was meant for
jcolp
(Joshua Colp)
May 28, 2020, 12:17pm
12
What version of Asterisk itself?
lgaetz
(Lorne Gaetz)
May 28, 2020, 12:21pm
13
Some of those settings are explicitly set by FreePBX to different values. So if the endpoint config includes both of these lines:
use_avpf=no
webrtc=yes
Which should govern?
Ahh you are right, i had not removed the settings which were explicitly set, and just added webrtc=yes
So that line is i guess ignored if the options are explicitly set along with it.
system
(system)
Closed
June 28, 2020, 3:57pm
15
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.