Asterisk 12 - Use WebRTC tutorial using SIPML5

Hello.

First, I’m completely new in Asterisk :smile:.
I followed WebRTC tutorial using SIPML5 at wiki.asterisk.org/wiki/display/ … ing+SIPML5.
I use Asterisk 12.3.2 on Debian. When I used 101 identity (by latest page update of pjsip.conf), I couldn’t have login (if 101 is identity of course).
When I logged in with identity 6001 and tried to make audio call, I got warning in server console:

WARNING[6979][C-00000000]: chan_sip.c:10648 process_sdp: Can't provide secure audio requested in SDP offer
I tried to add these lines in sip.conf 6001 section:

dtlsenable=yes dtlsverify=no
But I got this log in server console and no sound was played:

[Jul 9 07:36:31] WARNING[7319][C-00000000]: chan_sip.c:11172 process_sdp_a_dtls: Unsupported fingerprint hash type 'sha-2' received on dialog '1dcedee4-8748-dd12-d9df-9163eeedaac1' -- Executing [1000@from-internal:1] Answer("SIP/6001-00000000", "") in new stack [Jul 9 07:36:31] ERROR[7279]: pjsip:0 <?>: icess0x27f3cc8 ..Error sending STUN request: Invalid argument -- Executing [1000@from-internal:2] Playback("SIP/6001-00000000", "demo-congrats") in new stack -- <SIP/6001-00000000> Playing 'demo-congrats.slin' (language 'en') -- Executing [1000@from-internal:3] Hangup("SIP/6001-00000000", "") in new stack == Spawn extension (from-internal, 1000, 3) exited non-zero on 'SIP/6001-00000000'
Also, there was an error in Chrome console:

Seems that bug fix issues.asterisk.org/jira/browse/ASTERISK-22961 isn’t applied in Asterisk 12.3.2.
I downloaded it from downloads.asterisk.org/pub/telep … ent.tar.gz.
At least, definition of AST_RTP_DTLS_HASH_SHA256 in include/asterisk/rtp_engine.h file is missing.

[ul][]How can I apply patch to accept SHA-256 fingerprint to Asterisk 12.3.2?[/]
[]What is correct configuration for WebRTC. Is dtlsenable=yes parameter missing in sip.conf?[/]
[]What exactly 101 section in pjsip.conf means? Is it identity? I tried to change it also with 6001 and all references, but didn’t managed to hear audio for sample.[/][/ul]

Thanks for any suggestions.

I reinstalled Asterisk to version 11.9.0, where a SHA-256 patch is present.
Only change of wiki.asterisk.org/wiki/display/ … ing+SIPML5 tutorial I did is in sip.conf, where I added last two lines (because of first error in post above):

[code][general]
udpbindaddr=0.0.0.0:5060
realm=192.169.0.38 ;replace with your Asterisk server public IP address or host
transport=udp,ws

[6001]
host=dynamic
secret=veslo
context=from-internal
type=friend
encryption=yes
avpf=yes
icesupport=yes
directmedia=no
disallow=all
allow=ulaw

dtlsenable=yes
dtlsverify=no

[/code]I didn’t use pjsip.conf, since I moved back to 11 version.

Now, server console looks like:

[Jul 11 08:18:42] WARNING[33287][C-00000001]: chan_sip.c:10523 process_sdp: Processed DTLS [TRUE] -- Executing [1000@from-internal:1] Answer("SIP/6001-00000001", "") in new stack -- Executing [1000@from-internal:2] Playback("SIP/6001-00000001", "demo-congrats") in new stack -- <SIP/6001-00000001> Playing 'demo-congrats.gsm' (language 'en') == Spawn extension (from-internal, 1000, 2) exited non-zero on 'SIP/6001-00000001' -- Unregistered SIP '6001' == WebSocket connection from '192.168.0.30:60309' closed
Unfortunatelly I don’t hear any voice from speakers.
I also have error in Chrome console of sipml5.org demo:

And no src attribute of videoRemote element is set (should be URL of remote stream).

Any suggestions would be appreciated.
Also, is there any SHA-256 patch available for Asterisk 12?
Is it possible to play video with Playback of extensions.conf? If so, which formats?

Thanks.