Trying to use sip js librarys with asterisk 14

Greetings,
i have been trying to create an web app that connects with an webrtc client (jssip, sipml5 or sip.js) to my freepbx 14, all of them give the same result to Mozilla/5.0, even back tracked to chrome 49 and have the same issues.

Audio= works perfect both ways.
Video= softphone or hardphone receives video but browser wont show video.
dtmf= works both ways.

i tested jssip, sipml5, sip.js clients demos and all gave the same problem.

i tried this kurento asterisk tutorial from webrtc ventures (cant post links), but it crashes whenever i pick up the phone with this TypeError: this.mediaHandler.hasDescription is not a function.

every information about webrtc clients is atleast 5 months old so im not even sure is it possible to achieve.

im not forced to use freepbx 14, i could revert to asterisk 11 or asterisk stand alone, but im not even sure is worth trying if it possible to connect a sip browser client with asterisk.

this is my webrtc extension:

[2000] ;kurento-appserver
host=dynamic
secret=asterikpwd
context=from-internal
transport=ws,wss,udp
type=friend
encryption=no
avpf=yes
icesupport=yes
directmedia=no
disallow=all
allow=ullaw,opus
allow=vp8
videosupport=yes
im using chan_sip cause pjsip throws forbidden 403

I’m confused, are you trying to connect Asterisk and Kurento or only a webRTC API(SIPJS, SIPML5 or JSSIP) to asterisk?
The thing is for connecting Kurento you need to do an extra step since Kurento is not protocol specific. If you are trying only the API then it should work with Asterisk(at least my last try was with v13).

Share the logs of Asterisk and browsers when you attempt the call.

well i would like to implement kurento in the future, but im having trouble implementing just webrtc with a browser client and my hard phones, what exactly is this extra step you need in kurento? is it the ssl certs? i already have installed certs.

how do i get the logs, is it asterisk -vvvvr?

here is the trace sip from mozilla

 
State machine: c0000_Started_2_Outgoing_X_oINVITE  1:24906
Video Contraints:{"mandatory":{},"optional":[]}  1:24906
ICE servers:[{"url":"stun:stun.l.google.com:19302"}]  1:24906
RTCIceServer.url is deprecated! Use urls instead.  1
onaddstream is deprecated! Use peerConnection.ontrack instead.  1
==stack event = m_permission_requested  1:24906
==session event = connecting  1:24906
onGetUserMediaSuccess  1:24906
onNegotiationNeeded  1:24906
createOffer  1:24906
==stack event = m_permission_accepted  1:24906
Attaching media stream  1:1822
==session event = m_stream_video_local_added  1:24906
onCreateSdpSuccess  1:24906
onSignalingstateChange:have-local-offer  1:24906
onSetLocalDescriptionSuccess  1:24906
onIceCandidate = gathering 1:24906
onIceCandidate = complete  1:24906
ICE GATHERING COMPLETED!  1:24906
onIceGatheringCompleted  1:24906
"SEND: INVITE sip:0005@xxxxxxxxxxxxxxxxx SIP/2.0

Via: SIP/2.0/WSS df7jal23ls0d.invalid;branch=z9hG4bKlq8ew0CIghwBcSRAKtwrtkkrHuq1ggfU;rport

From: "6001"<sip:6001@xxxxxxxxxxxxxxxxx>;tag=CTV2ShZJPCcywrt0Ipk9

To: <sip:0005@xxxxxxxxxxxxxxxxx>

Contact: "6001"<sips:6001@df7jal23ls0d.invalid;rtcweb-breaker=yes;click2call=no;transport=wss>;impi=6001;ha1=fb9da48518d9d6d53e716f7932c5e902;+g.oma.sip-im;language="en,fr"

Call-ID: 6f43008e-7b06-92b4-9876-247d2d5ef3cf

CSeq: 8016 INVITE

Content-Type: application/sdp

Content-Length: 6954

Max-Forwards: 70

User-Agent: IM-client/OMA1.0 sipML5-v1.2016.03.04

Organization: Doubango Telecom



v=0

o=mozilla...THIS_IS_SDPARTA-56.0 2574087875076301000 0 IN IP4 127.0.0.1

s=Doubango Telecom - firefox

t=0 0

a=sendrecv

a=fingerprint:sha-256 D8:8E:F2:9A:83:0A:17:11:FE:26:05:59:BC:63:37:68:72:7B:CE:68:FD:FF:B4:F6:70:5A:85:7E:66:2F:7D:A7

a=group:BUNDLE sdparta_0 sdparta_1

a=ice-options:trickle

a=msid-semantic:WMS *

m=audio 62644 UDP/TLS/RTP/SAVPF 109 9 0 8 101

c=IN IP4 186.156.113.50

a=candidate:0 1 UDP 2122187007 192.168.99.1 62641 typ host

a=candidate:2 1 UDP 2122055935 ::e079:e040:494c:d522 62642 typ host

a=candidate:4 1 UDP 2122121471 ::596c:f5b5:8155:b4c8 62643 typ host

a=candidate:6 1 UDP 2121990399 192.168.0.3 62644 typ host

a=candidate:8 1 UDP 2122252543 192.168.56.1 62645 typ host

a=candidate:10 1 TCP 2105442559 192.168.99.1 59326 typ host tcptype passive

a=candidate:10 1 TCP 2105458943 192.168.99.1 9 typ host tcptype active

a=candidate:11 1 TCP 2105311487 ::e079:e040:494c:d522 54941 typ host tcptype passive

a=candidate:11 1 TCP 2105327871 ::e079:e040:494c:d522 9 typ host tcptype active

a=candidate:12 1 TCP 2105377023 ::596c:f5b5:8155:b4c8 64878 typ host tcptype passive

a=candidate:12 1 TCP 2105393407 ::596c:f5b5:8155:b4c8 9 typ host tcptype active

a=candidate:13 1 TCP 2105245951 192.168.0.3 60541 typ host tcptype passive

a=candidate:13 1 TCP 2105262335 192.168.0.3 9 typ host tcptype active

a=candidate:14 1 TCP 2105508095 192.168.56.1 60527 typ host tcptype passive

a=candidate:14 1 TCP 2105524479 192.168.56.1 9 typ host tcptype active

a=candidate:0 2 UDP 2122187006 192.168.99.1 62646 typ host

a=candidate:2 2 UDP 2122055934 ::e079:e040:494c:d522 62647 typ host

a=candidate:4 2 UDP 2122121470 ::596c:f5b5:8155:b4c8 62648 typ host

a=candidate:6 2 UDP 2121990398 192.168.0.3 62649 typ host

a=candidate:8 2 UDP 2122252542 192.168.56.1 62650 typ host

a=candidate:10 2 TCP 2105442558 192.168.99.1 60932 typ host tcptype passive

a=candidate:10 2 TCP 2105458942 192.168.99.1 9 typ host tcptype active

a=candidate:11 2 TCP 2105311486 ::e079:e040:494c:d522 64773 typ host tcptype passive

a=candidate:11 2 TCP 2105327870 ::e079:e040:494c:d522 9 typ host tcptype active

a=candidate:12 2 TCP 2105377022 ::596c:f5b5:8155:b4c8 63751 typ host tcptype passive

a=candidate:12 2 TCP 2105393406 ::596c:f5b5:8155:b4c8 9 typ host tcptype active

a=candidate:13 2 TCP 2105245950 192.168.0.3 64871 typ host tcptype passive

a=candidate:13 2 TCP 2105262334 192.168.0.3 9 typ host tcptype active

a=candidate:14 2 TCP 2105508094 192.168.56.1 50426 typ host tcptype passive

a=candidate:14 2 TCP 2105524478 192.168.56.1 9 typ host tcptype active

a=candidate:7 1 UDP 1685790719 186.156.113.50 62644 typ srflx raddr 192.168.0.3 rport 62644

a=candidate:7 2 UDP 1685790718 186.156.113.50 62649 typ srflx raddr 192.168.0.3 rport 62649

a=sendrecv

a=end-of-candidates

a=extmap:1/sendonly urn:ietf:params:rtp-hdrext:ssrc-audio-level

a=fmtp:109 maxplaybackrate=48000;stereo=1;useinbandfec=1

a=fmtp:101 0-15

a=ice-pwd:1c755adaa3a1c95425955cc0514d9012

a=ice-ufrag:e8f8fab8

a=mid:sdparta_0

a=msid:{afe19e3a-63b9-4668-b007-f89889ee2d6c} {9e81662b-206d-4423-bf10-eee847418b17}

a=rtcp:62649 IN IP4 186.156.113.50

a=rtcp-mux

a=rtpmap:109 opus/48000/2

a=rtpmap:9 G722/8000/1

a=rtpmap:0 PCMU/8000

a=rtpmap:8 PCMA/8000

a=rtpmap:101 telephone-event/8000

a=setup:actpass

a=ssrc:3341431639 cname:{b60999ef-9a6c-478d-9f2d-acff50a54773}

m=video 62654 UDP/TLS/RTP/SAVPF 120 121 126 97

c=IN IP4 186.156.113.50

a=candidate:0 1 UDP 2122187007 192.168.99.1 62651 typ host

a=candidate:2 1 UDP 2122055935 ::e079:e040:494c:d522 62652 typ host

a=candidate:4 1 UDP 2122121471 ::596c:f5b5:8155:b4c8 62653 typ host

a=candidate:6 1 UDP 2121990399 192.168.0.3 62654 typ host

a=candidate:8 1 UDP 2122252543 192.168.56.1 62655 typ host

a=candidate:10 1 TCP 2105442559 192.168.99.1 56567 typ host tcptype passive

a=candidate:10 1 TCP 2105458943 192.168.99.1 9 typ host tcptype active

a=candidate:11 1 TCP 2105311487 ::e079:e040:494c:d522 55558 typ host tcptype passive

a=candidate:11 1 TCP 2105327871 ::e079:e040:494c:d522 9 typ host tcptype active

a=candidate:12 1 TCP 2105377023 ::596c:f5b5:8155:b4c8 53976 typ host tcptype passive

a=candidate:12 1 TCP 2105393407 ::596c:f5b5:8155:b4c8 9 typ host tcptype active

a=candidate:13 1 TCP 2105245951 192.168.0.3 56049 typ host tcptype passive

a=candidate:13 1 TCP 2105262335 192.168.0.3 9 typ host tcptype active

a=candidate:14 1 TCP 2105508095 192.168.56.1 61235 typ host tcptype passive

a=candidate:14 1 TCP 2105524479 192.168.56.1 9 typ host tcptype active

a=candidate:0 2 UDP 2122187006 192.168.99.1 62656 typ host

a=candidate:2 2 UDP 2122055934 ::e079:e040:494c:d522 62657 typ host

a=candidate:4 2 UDP 2122121470 ::596c:f5b5:8155:b4c8 62658 typ host

a=candidate:6 2 UDP 2121990398 192.168.0.3 62659 typ host

a=candidate:8 2 UDP 2122252542 192.168.56.1 62660 typ host

a=candidate:10 2 TCP 2105442558 192.168.99.1 60960 typ host tcptype passive

a=candidate:10 2 TCP 2105458942 192.168.99.1 9 typ host tcptype active

a=candidate:11 2 TCP 2105311486 ::e079:e040:494c:d522 63977 typ host tcptype passive

a=candidate:11 2 TCP 2105327870 ::e079:e040:494c:d522 9 typ host tcptype active

a=candidate:12 2 TCP 2105377022 ::596c:f5b5:8155:b4c8 59440 typ host tcptype passive

a=candidate:12 2 TCP 2105393406 ::596c:f5b5:8155:b4c8 9 typ host tcptype active

a=candidate:13 2 TCP 2105245950 192.168.0.3 63652 typ host tcptype passive

a=candidate:13 2 TCP 2105262334 192.168.0.3 9 typ host tcptype active

a=candidate:14 2 TCP 2105508094 192.168.56.1 63529 typ host tcptype passive

a=candidate:14 2 TCP 2105524478 192.168.56.1 9 typ host tcptype active

a=candidate:7 1 UDP 1685790719 186.156.113.50 62654 typ srflx raddr 192.168.0.3 rport 62654

a=candidate:7 2 UDP 1685790718 186.156.113.50 62659 typ srflx raddr 192.168.0.3 rport 62659

a=sendrecv

a=end-of-candidates

a=extmap:1 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time

a=extmap:2 urn:ietf:params:rtp-hdrext:toffset

a=fmtp:126 profile-level-id=42e01f;level-asymmetry-allowed=1;packetization-mode=1

a=fmtp:97 profile-level-id=42e01f;level-asymmetry-allowed=1

a=fmtp:120 max-fs=12288;max-fr=60

a=fmtp:121 max-fs=12288;max-fr=60

a=ice-pwd:1c755adaa3a1c95425955cc0514d9012

a=ice-ufrag:e8f8fab8

a=mid:sdparta_1

a=msid:{afe19e3a-63b9-4668-b007-f89889ee2d6c} {a7ca3521-d744-4533-8031-b953b42657e4}

a=rtcp:62659 IN IP4 186.156.113.50

a=rtcp-fb:120 nack

a=rtcp-fb:120 nack pli

a=rtcp-fb:120 ccm fir

a=rtcp-fb:120 goog-remb

a=rtcp-fb:121 nack

a=rtcp-fb:121 nack pli

a=rtcp-fb:121 ccm fir

a=rtcp-fb:121 goog-remb

a=rtcp-fb:126 nack

a=rtcp-fb:126 nack pli

a=rtcp-fb:126 ccm fir

a=rtcp-fb:126 goog-remb

a=rtcp-fb:97 nack

a=rtcp-fb:97 nack pli

a=rtcp-fb:97 ccm fir

a=rtcp-fb:97 goog-remb

a=rtcp-mux

a=rtpmap:120 VP8/90000

a=rtpmap:121 VP9/90000

a=rtpmap:126 H264/90000

a=rtpmap:97 H264/90000

a=setup:actpass

a=ssrc:3212852247 cname:{b60999ef-9a6c-478d-9f2d-acff50a54773}

"  1:24906
__tsip_transport_ws_onmessage  1:24906
recv=SIP/2.0 401 Unauthorized

Via: SIP/2.0/WSS df7jal23ls0d.invalid;rport;received=186.156.113.50;branch=z9hG4bKlq8ew0CIghwBcSRAKtwrtkkrHuq1ggfU

From: "6001"<sip:6001@xxxxxxxxxxxxxxxxx>;tag=CTV2ShZJPCcywrt0Ipk9

To: <sip:0005@xxxxxxxxxxxxxxxxx>;tag=as3e9436f0

Call-ID: 6f43008e-7b06-92b4-9876-247d2d5ef3cf

CSeq: 8016 INVITE

Content-Length: 0

Server: FPBX-14.0.1.1(14.6.0)

Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,SUBSCRIBE,NOTIFY,INFO,PUBLISH,MESSAGE

Supported: replaces,timer

WWW-Authenticate: Digest realm="asterisk",nonce="319e1fe1",stale=FALSE,algorithm=MD5



  1:24906
SEND: ACK sip:0005@xxxxxxxxxxxxxxxxx SIP/2.0

Via: SIP/2.0/WSS df7jal23ls0d.invalid;branch=z9hG4bKlq8ew0CIghwBcSRAKtwrtkkrHuq1ggfU;rport

From: "6001"<sip:6001@xxxxxxxxxxxxxxxxx>;tag=CTV2ShZJPCcywrt0Ipk9

To: <sip:0005@xxxxxxxxxxxxxxxxx>;tag=as3e9436f0

Call-ID: 6f43008e-7b06-92b4-9876-247d2d5ef3cf

CSeq: 8016 ACK

Content-Length: 0

Max-Forwards: 70



  1:24906
State machine: x0000_Any_2_Any_X_i401_407_INVITE  1:24906
"SEND: INVITE sip:0005@xxxxxxxxxxxxxxxxx SIP/2.0

Via: SIP/2.0/WSS df7jal23ls0d.invalid;branch=z9hG4bKZlERHCH0Kb64bdHwoKynrzZsrbqbGbbD;rport

From: "6001"<sip:6001@xxxxxxxxxxxxxxxxx>;tag=CTV2ShZJPCcywrt0Ipk9

To: <sip:0005@xxxxxxxxxxxxxxxxx>

Contact: "6001"<sips:6001@df7jal23ls0d.invalid;rtcweb-breaker=yes;click2call=no;transport=wss>;impi=6001;ha1=fb9da48518d9d6d53e716f7932c5e902;+g.oma.sip-im;language="en,fr"

Call-ID: 6f43008e-7b06-92b4-9876-247d2d5ef3cf

CSeq: 8017 INVITE

Content-Type: application/sdp

Content-Length: 6954

Max-Forwards: 70

Authorization: Digest username="6001",realm="asterisk",nonce="319e1fe1",uri="sip:0005@xxxxxxxxxxxxxxxxx",response="9b3101adcd6c2752c9dc022578fdb828",algorithm=MD5

User-Agent: IM-client/OMA1.0 sipML5-v1.2016.03.04

Organization: Doubango Telecom



v=0

o=mozilla...THIS_IS_SDPARTA-56.0 2574087875076301000 0 IN IP4 127.0.0.1

s=Doubango Telecom - firefox

t=0 0

a=sendrecv

a=fingerprint:sha-256 D8:8E:F2:9A:83:0A:17:11:FE:26:05:59:BC:63:37:68:72:7B:CE:68:FD:FF:B4:F6:70:5A:85:7E:66:2F:7D:A7

a=group:BUNDLE sdparta_0 sdparta_1

a=ice-options:trickle

a=msid-semantic:WMS *

m=audio 62644 UDP/TLS/RTP/SAVPF 109 9 0 8 101

c=IN IP4 186.156.113.50

a=candidate:0 1 UDP 2122187007 192.168.99.1 62641 typ host

a=candidate:2 1 UDP 2122055935 ::e079:e040:494c:d522 62642 typ host

a=candidate:4 1 UDP 2122121471 ::596c:f5b5:8155:b4c8 62643 typ host

a=candidate:6 1 UDP 2121990399 192.168.0.3 62644 typ host

a=candidate:8 1 UDP 2122252543 192.168.56.1 62645 typ host

a=candidate:10 1 TCP 2105442559 192.168.99.1 59326 typ host tcptype passive

a=candidate:10 1 TCP 2105458943 192.168.99.1 9 typ host tcptype active

a=candidate:11 1 TCP 2105311487 ::e079:e040:494c:d522 54941 typ host tcptype passive

a=candidate:11 1 TCP 2105327871 ::e079:e040:494c:d522 9 typ host tcptype active

a=candidate:12 1 TCP 2105377023 ::596c:f5b5:8155:b4c8 64878 typ host tcptype passive

a=candidate:12 1 TCP 2105393407 ::596c:f5b5:8155:b4c8 9 typ host tcptype active

a=candidate:13 1 TCP 2105245951 192.168.0.3 60541 typ host tcptype passive

a=candidate:13 1 TCP 2105262335 192.168.0.3 9 typ host tcptype active

a=candidate:14 1 TCP 2105508095 192.168.56.1 60527 typ host tcptype passive

a=candidate:14 1 TCP 2105524479 192.168.56.1 9 typ host tcptype active

a=candidate:0 2 UDP 2122187006 192.168.99.1 62646 typ host

a=candidate:2 2 UDP 2122055934 ::e079:e040:494c:d522 62647 typ host

a=candidate:4 2 UDP 2122121470 ::596c:f5b5:8155:b4c8 62648 typ host

a=candidate:6 2 UDP 2121990398 192.168.0.3 62649 typ host

a=candidate:8 2 UDP 2122252542 192.168.56.1 62650 typ host

a=candidate:10 2 TCP 2105442558 192.168.99.1 60932 typ host tcptype passive

a=candidate:10 2 TCP 2105458942 192.168.99.1 9 typ host tcptype active

a=candidate:11 2 TCP 2105311486 ::e079:e040:494c:d522 64773 typ host tcptype passive

a=candidate:11 2 TCP 2105327870 ::e079:e040:494c:d522 9 typ host tcptype active

a=candidate:12 2 TCP 2105377022 ::596c:f5b5:8155:b4c8 63751 typ host tcptype passive

a=candidate:12 2 TCP 2105393406 ::596c:f5b5:8155:b4c8 9 typ host tcptype active

a=candidate:13 2 TCP 2105245950 192.168.0.3 64871 typ host tcptype passive

a=candidate:13 2 TCP 2105262334 192.168.0.3 9 typ host tcptype active

a=candidate:14 2 TCP 2105508094 192.168.56.1 50426 typ host tcptype passive

a=candidate:14 2 TCP 2105524478 192.168.56.1 9 typ host tcptype active

a=candidate:7 1 UDP 1685790719 186.156.113.50 62644 typ srflx raddr 192.168.0.3 rport 62644

a=candidate:7 2 UDP 1685790718 186.156.113.50 62649 typ srflx raddr 192.168.0.3 rport 62649

a=sendrecv

a=end-of-candidates

a=extmap:1/sendonly urn:ietf:params:rtp-hdrext:ssrc-audio-level

a=fmtp:109 maxplaybackrate=48000;stereo=1;useinbandfec=1

a=fmtp:101 0-15

a=ice-pwd:1c755adaa3a1c95425955cc0514d9012

a=ice-ufrag:e8f8fab8

a=mid:sdparta_0

a=msid:{afe19e3a-63b9-4668-b007-f89889ee2d6c} {9e81662b-206d-4423-bf10-eee847418b17}

a=rtcp:62649 IN IP4 186.156.113.50

a=rtcp-mux

a=rtpmap:109 opus/48000/2

a=rtpmap:9 G722/8000/1

a=rtpmap:0 PCMU/8000

a=rtpmap:8 PCMA/8000

a=rtpmap:101 telephone-event/8000

a=setup:actpass

a=ssrc:3341431639 cname:{b60999ef-9a6c-478d-9f2d-acff50a54773}

m=video 62654 UDP/TLS/RTP/SAVPF 120 121 126 97

c=IN IP4 186.156.113.50

a=candidate:0 1 UDP 2122187007 192.168.99.1 62651 typ host

a=candidate:2 1 UDP 2122055935 ::e079:e040:494c:d522 62652 typ host

a=candidate:4 1 UDP 2122121471 ::596c:f5b5:8155:b4c8 62653 typ host

a=candidate:6 1 UDP 2121990399 192.168.0.3 62654 typ host

a=candidate:8 1 UDP 2122252543 192.168.56.1 62655 typ host

a=candidate:10 1 TCP 2105442559 192.168.99.1 56567 typ host tcptype passive

a=candidate:10 1 TCP 2105458943 192.168.99.1 9 typ host tcptype active

a=candidate:11 1 TCP 2105311487 ::e079:e040:494c:d522 55558 typ host tcptype passive

a=candidate:11 1 TCP 2105327871 ::e079:e040:494c:d522 9 typ host tcptype active

a=candidate:12 1 TCP 2105377023 ::596c:f5b5:8155:b4c8 53976 typ host tcptype passive

a=candidate:12 1 TCP 2105393407 ::596c:f5b5:8155:b4c8 9 typ host tcptype active

a=candidate:13 1 TCP 2105245951 192.168.0.3 56049 typ host tcptype passive

a=candidate:13 1 TCP 2105262335 192.168.0.3 9 typ host tcptype active

a=candidate:14 1 TCP 2105508095 192.168.56.1 61235 typ host tcptype passive

a=candidate:14 1 TCP 2105524479 192.168.56.1 9 typ host tcptype active

a=candidate:0 2 UDP 2122187006 192.168.99.1 62656 typ host

a=candidate:2 2 UDP 2122055934 ::e079:e040:494c:d522 62657 typ host

a=candidate:4 2 UDP 2122121470 ::596c:f5b5:8155:b4c8 62658 typ host

a=candidate:6 2 UDP 2121990398 192.168.0.3 62659 typ host

a=candidate:8 2 UDP 2122252542 192.168.56.1 62660 typ host

a=candidate:10 2 TCP 2105442558 192.168.99.1 60960 typ host tcptype passive

a=candidate:10 2 TCP 2105458942 192.168.99.1 9 typ host tcptype active

a=candidate:11 2 TCP 2105311486 ::e079:e040:494c:d522 63977 typ host tcptype passive

a=candidate:11 2 TCP 2105327870 ::e079:e040:494c:d522 9 typ host tcptype active

a=candidate:12 2 TCP 2105377022 ::596c:f5b5:8155:b4c8 59440 typ host tcptype passive

a=candidate:12 2 TCP 2105393406 ::596c:f5b5:8155:b4c8 9 typ host tcptype active

a=candidate:13 2 TCP 2105245950 192.168.0.3 63652 typ host tcptype passive

a=candidate:13 2 TCP 2105262334 192.168.0.3 9 typ host tcptype active

a=candidate:14 2 TCP 2105508094 192.168.56.1 63529 typ host tcptype passive

a=candidate:14 2 TCP 2105524478 192.168.56.1 9 typ host tcptype active

a=candidate:7 1 UDP 1685790719 186.156.113.50 62654 typ srflx raddr 192.168.0.3 rport 62654

a=candidate:7 2 UDP 1685790718 186.156.113.50 62659 typ srflx raddr 192.168.0.3 rport 62659

a=sendrecv

a=end-of-candidates

a=extmap:1 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time

a=extmap:2 urn:ietf:params:rtp-hdrext:toffset

a=fmtp:126 profile-level-id=42e01f;level-asymmetry-allowed=1;packetization-mode=1

a=fmtp:97 profile-level-id=42e01f;level-asymmetry-allowed=1

a=fmtp:120 max-fs=12288;max-fr=60

a=fmtp:121 max-fs=12288;max-fr=60

a=ice-pwd:1c755adaa3a1c95425955cc0514d9012

a=ice-ufrag:e8f8fab8

a=mid:sdparta_1

a=msid:{afe19e3a-63b9-4668-b007-f89889ee2d6c} {a7ca3521-d744-4533-8031-b953b42657e4}

a=rtcp:62659 IN IP4 186.156.113.50

a=rtcp-fb:120 nack

a=rtcp-fb:120 nack pli

a=rtcp-fb:120 ccm fir

a=rtcp-fb:120 goog-remb

a=rtcp-fb:121 nack

a=rtcp-fb:121 nack pli

a=rtcp-fb:121 ccm fir

a=rtcp-fb:121 goog-remb

a=rtcp-fb:126 nack

a=rtcp-fb:126 nack pli

a=rtcp-fb:126 ccm fir

a=rtcp-fb:126 goog-remb

a=rtcp-fb:97 nack

a=rtcp-fb:97 nack pli

a=rtcp-fb:97 ccm fir

a=rtcp-fb:97 goog-remb

a=rtcp-mux

a=rtpmap:120 VP8/90000

a=rtpmap:121 VP9/90000

a=rtpmap:126 H264/90000

a=rtpmap:97 H264/90000

a=setup:actpass

a=ssrc:3212852247 cname:{b60999ef-9a6c-478d-9f2d-acff50a54773}

"  1:24906
__tsip_transport_ws_onmessage  1:24906
recv=SIP/2.0 100 Trying

Via: SIP/2.0/WSS df7jal23ls0d.invalid;rport;received=186.156.113.50;branch=z9hG4bKZlERHCH0Kb64bdHwoKynrzZsrbqbGbbD

From: "6001"<sip:6001@xxxxxxxxxxxxxxxxx>;tag=CTV2ShZJPCcywrt0Ipk9

To: <sip:0005@xxxxxxxxxxxxxxxxx>

Contact: <sip:0005@186.156.113.50;transport=ws>

Call-ID: 6f43008e-7b06-92b4-9876-247d2d5ef3cf

CSeq: 8017 INVITE

Content-Length: 0

Server: FPBX-14.0.1.1(14.6.0)

Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,SUBSCRIBE,NOTIFY,INFO,PUBLISH,MESSAGE

Supported: replaces,timer



  1:24906
State machine: x0000_Any_2_Any_X_i1xx  1:24906
==session event = i_ao_request  1:24906
__tsip_transport_ws_onmessage  1:24906
recv=SIP/2.0 180 Ringing

Via: SIP/2.0/WSS df7jal23ls0d.invalid;rport;received=186.156.113.50;branch=z9hG4bKZlERHCH0Kb64bdHwoKynrzZsrbqbGbbD

From: "6001"<sip:6001@xxxxxxxxxxxxxxxxx>;tag=CTV2ShZJPCcywrt0Ipk9

To: <sip:0005@xxxxxxxxxxxxxxxxx>;tag=as5bae442d

Contact: <sip:0005@186.156.113.50;transport=ws>

Call-ID: 6f43008e-7b06-92b4-9876-247d2d5ef3cf

CSeq: 8017 INVITE

Content-Length: 0

Server: FPBX-14.0.1.1(14.6.0)

Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,SUBSCRIBE,NOTIFY,INFO,PUBLISH,MESSAGE

Supported: replaces,timer

P-Asserted-Identity: "0005"<sip:0005@xxxxxxxxxxxxxxxxx>



  1:24906
State machine: x0000_Any_2_Any_X_i1xx  1:24906
==session event = i_ao_request  1:24906
__tsip_transport_ws_onmessage  1:24906
recv=SIP/2.0 180 Ringing

Via: SIP/2.0/WSS df7jal23ls0d.invalid;rport;received=186.156.113.50;branch=z9hG4bKZlERHCH0Kb64bdHwoKynrzZsrbqbGbbD

From: "6001"<sip:6001@xxxxxxxxxxxxxxxxx>;tag=CTV2ShZJPCcywrt0Ipk9

To: <sip:0005@xxxxxxxxxxxxxxxxx>;tag=as5bae442d

Contact: <sip:0005@186.156.113.50;transport=ws>

Call-ID: 6f43008e-7b06-92b4-9876-247d2d5ef3cf

CSeq: 8017 INVITE

Content-Length: 0

Server: FPBX-14.0.1.1(14.6.0)

Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,SUBSCRIBE,NOTIFY,INFO,PUBLISH,MESSAGE

Supported: replaces,timer



  1:24906
State machine: x0000_Any_2_Any_X_i1xx  1:24906
==session event = i_ao_request  1:24906
La conexión a wss://xxxxxxxxxxxxxxxxx:8089/asterisk/ws fue interrumpida mientras la página se cargaba.  1:1151444
__tsip_transport_ws_onerror  1:24906
__tsip_transport_ws_onclose  1:24906
==stack event = stopped  1:24906
__tsip_transport_ws_onmessage  1:24906
recv=SIP/2.0 200 OK

Via: SIP/2.0/WSS df7jal23ls0d.invalid;rport;received=186.156.113.50;branch=z9hG4bKZlERHCH0Kb64bdHwoKynrzZsrbqbGbbD

From: "6001"<sip:6001@xxxxxxxxxxxxxxxxx>;tag=CTV2ShZJPCcywrt0Ipk9

To: <sip:0005@xxxxxxxxxxxxxxxxx>;tag=as5bae442d

Contact: <sip:0005@186.156.113.50;transport=ws>

Call-ID: 6f43008e-7b06-92b4-9876-247d2d5ef3cf

CSeq: 8017 INVITE

Content-Type: application/sdp

Content-Length: 1638

Server: FPBX-14.0.1.1(14.6.0)

Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,SUBSCRIBE,NOTIFY,INFO,PUBLISH,MESSAGE

Supported: replaces,timer

P-Asserted-Identity: "0005"<sip:0005@xxxxxxxxxxxxxxxxx>



v=0

o=root 1990505477 1990505477 IN IP4 186.156.113.50

s=Asterisk PBX 14.6.0

c=IN IP4 186.156.113.50

b=CT:512

t=0 0

m=audio 12176 RTP/SAVPF 0 8 9 109 101

a=rtpmap:0 PCMU/8000

a=rtpmap:8 PCMA/8000

a=rtpmap:9 G722/8000

a=rtpmap:109 opus/48000/2

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-16

a=maxptime:20

a=ice-ufrag:361569ad1efd26fc0fbb00f2274596cd

a=ice-pwd:1cad05ba39a6e86e01998bff02c17c60

a=candidate:Hc0a8003e 1 UDP 2130706431 192.168.0.62 12176 typ host

a=candidate:Sba9c7132 1 UDP 1694498815 186.156.113.50 12176 typ srflx raddr 192.168.0.62 rport 12176

a=candidate:Hc0a8003e 2 UDP 2130706430 192.168.0.62 12177 typ host

a=candidate:Sba9c7132 2 UDP 1694498814 186.156.113.50 12177 typ srflx raddr 192.168.0.62 rport 12177

a=connection:new

a=setup:active

a=fingerprint:SHA-256 59:AD:8F:BE:DE:AE:17:40:A4:11:70:75:D4:AC:B2:8F:A0:FF:CE:98:A9:CE:09:64:AF:C5:E8:47:63:B9:12:9F

a=rtcp-mux

a=sendrecv

m=video 18620 RTP/SAVPF 126 120

a=ice-ufrag:25aa6f3a4b41312d581f6fa27e658f27

a=ice-pwd:15b7d78e35d94b28462b605f57a53cbc

a=candidate:Hc0a8003e 1 UDP 2130706431 192.168.0.62 18620 typ host

a=candidate:Sba9c7132 1 UDP 1694498815 186.156.113.50 18620 typ srflx raddr 192.168.0.62 rport 18620

a=candidate:Hc0a8003e 2 UDP 2130706430 192.168.0.62 18621 typ host

a=candidate:Sba9c7132 2 UDP 1694498814 186.156.113.50 18621 typ srflx raddr 192.168.0.62 rport 18621

a=connection:new

a=setup:active

a=fingerprint:SHA-256 59:AD:8F:BE:DE:AE:17:40:A4:11:70:75:D4:AC:B2:8F:A0:FF:CE:98:A9:CE:09:64:AF:C5:E8:47:63:B9:12:9F

a=rtpmap:126 H264/90000

a=rtpmap:120 VP8/90000

a=rtcp-fb:* ccm fir

a=rtcp-mux

a=sendrecv

  1:24906
State machine: c0000_Outgoing_2_Connected_X_i2xxINVITE  1:24906
setRemoteDescription(answer)
v=0

o=root 1990505477 1990505477 IN IP4 186.156.113.50

s=Asterisk PBX 14.6.0

c=IN IP4 186.156.113.50

b=CT:512

t=0 0

m=audio 12176 RTP/SAVPF 0 8 9 109 101

a=rtpmap:0 PCMU/8000

a=rtpmap:8 PCMA/8000

a=rtpmap:9 G722/8000

a=rtpmap:109 opus/48000/2

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-16

a=maxptime:20

a=ice-ufrag:361569ad1efd26fc0fbb00f2274596cd

a=ice-pwd:1cad05ba39a6e86e01998bff02c17c60

a=candidate:Hc0a8003e 1 UDP 2130706431 192.168.0.62 12176 typ host

a=candidate:Sba9c7132 1 UDP 1694498815 186.156.113.50 12176 typ srflx raddr 192.168.0.62 rport 12176

a=candidate:Hc0a8003e 2 UDP 2130706430 192.168.0.62 12177 typ host

a=candidate:Sba9c7132 2 UDP 1694498814 186.156.113.50 12177 typ srflx raddr 192.168.0.62 rport 12177

a=connection:new

a=setup:active

a=fingerprint:SHA-256 59:AD:8F:BE:DE:AE:17:40:A4:11:70:75:D4:AC:B2:8F:A0:FF:CE:98:A9:CE:09:64:AF:C5:E8:47:63:B9:12:9F

a=rtcp-mux

a=sendrecv

m=video 18620 RTP/SAVPF 126 120

a=ice-ufrag:25aa6f3a4b41312d581f6fa27e658f27

a=ice-pwd:15b7d78e35d94b28462b605f57a53cbc

a=candidate:Hc0a8003e 1 UDP 2130706431 192.168.0.62 18620 typ host

a=candidate:Sba9c7132 1 UDP 1694498815 186.156.113.50 18620 typ srflx raddr 192.168.0.62 rport 18620

a=candidate:Hc0a8003e 2 UDP 2130706430 192.168.0.62 18621 typ host

a=candidate:Sba9c7132 2 UDP 1694498814 186.156.113.50 18621 typ srflx raddr 192.168.0.62 rport 18621

a=connection:new

a=setup:active

a=fingerprint:SHA-256 59:AD:8F:BE:DE:AE:17:40:A4:11:70:75:D4:AC:B2:8F:A0:FF:CE:98:A9:CE:09:64:AF:C5:E8:47:63:B9:12:9F

a=rtpmap:126 H264/90000

a=rtpmap:120 VP8/90000

a=rtcp-fb:* ccm fir

a=rtcp-mux

a=sendrecv

  1:24906
SEND: ACK sip:0005@186.156.113.50;transport=ws SIP/2.0

Via: SIP/2.0/WSS df7jal23ls0d.invalid;branch=z9hG4bK9yGwHO8XGRAUWLBiAxfM;rport

From: "6001"<sip:6001@xxxxxxxxxxxxxxxxx>;tag=CTV2ShZJPCcywrt0Ipk9

To: <sip:0005@xxxxxxxxxxxxxxxxx>;tag=as5bae442d

Contact: "6001"<sips:6001@df7jal23ls0d.invalid;rtcweb-breaker=yes;click2call=no;transport=wss>;+g.oma.sip-im;language="en,fr"

Call-ID: 6f43008e-7b06-92b4-9876-247d2d5ef3cf

CSeq: 8017 ACK

Content-Length: 0

Max-Forwards: 70

Authorization: Digest username="6001",realm="asterisk",nonce="319e1fe1",uri="sip:0005@186.156.113.50;transport=ws",response="d2a0fa6a87acff4cae4071d1f8846d23",algorithm=MD5

User-Agent: IM-client/OMA1.0 sipML5-v1.2016.03.04

Organization: Doubango Telecom



  1:24906
__on_add_stream  1:24906
onSignalingstateChange:stable  1:24906
onSetRemoteDescriptionSuccess  1:24906
==session event = m_early_media  1:24906
==session event = connected  1:24906
Attaching media stream  1:1822
==session event = m_stream_video_remote_added  1:24906
Attaching media stream  1:1822
==session event = m_stream_audio_remote_added  1:24906
__tsip_transport_ws_onmessage  1:24906
recv=OPTIONS sips:6001@df7jal23ls0d.invalid;rtcweb-breaker=yes;transport=wss SIP/2.0

Via: SIP/2.0/WS 186.156.113.50;branch=z9hG4bK61d9b59b

From: "Unknown"<sip:Unknown@186.156.113.50>;tag=as471a1e64

To: <sips:6001@df7jal23ls0d.invalid;rtcweb-breaker=yes;transport=wss>

Contact: <sip:Unknown@186.156.113.50;transport=ws>

Call-ID: 0c5f4f6501361f2d30cc7bec394421df@186.156.113.50:0

CSeq: 102 OPTIONS

Content-Length: 0

Max-Forwards: 70

User-Agent: FPBX-14.0.1.1(14.6.0)

Date: 03 Oct 2017 15:40:16 GMT;03

Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,SUBSCRIBE,NOTIFY,INFO,PUBLISH,MESSAGE

Supported: replaces,timer



  1:24906
Not implemented  1:25138
SEND: SIP/2.0 405 Method Not Allowed

Via: SIP/2.0/WS 186.156.113.50;branch=z9hG4bK61d9b59b

From: "Unknown"<sip:Unknown@186.156.113.50>;tag=as471a1e64

To: <sips:6001@df7jal23ls0d.invalid;rtcweb-breaker=yes;transport=wss>

Call-ID: 0c5f4f6501361f2d30cc7bec394421df@186.156.113.50:0

CSeq: 102 OPTIONS

Content-Length: 0



  1:24906

We need to see the complete sip debug on the asterisk side by:
asterisk -rvvvv
and then inside the cli
sip set debug on

Certificates are required to work properly, for Kurento you need to create the SIP layer between Asterisk and Kurento but for know focus on make it work normal webrtc API with asterisk.

here is my log. https://pastebin.com/frLVtuk4 i cant add more then 32k characters though.

So far the only problem is the browser not receiving video, everything else works perfectly, when i connect it via browser-legacy. im using a static ip adress with a host name and the ports are forwarded, i can make calls between video phones perfectly even remote to remote. the only place im failing is the webrtc which i want to implement for an app with asterisk ari. but im stuck at connecting asterisk to webrtc.

Your peer definition is missing some parameters like certificate paths, rtcp, encryption enabled and so, not sure if FreePBX add it in another file. Your log shows an issue with the transmission also but I dont think is related to the issue.

Fix those missing parts and try, also take a look on the Jira page since seems there are few issues not sure if related with yours. https://issues.asterisk.org/jira/browse/ASTERISK-24735?jql=text%20~%20"webrtc%20video"%20ORDER%20BY%20created%20DESC

1 Like

@navaismo

thanks for your response, just figured out what must be the problem, the browser not receiving video is caused by the codecs configuration, i downloaded a app named portgo and configured it to only accept opus&vp8and my webrtc peer with allowed codecs h264&opus using mozilla 56.0 (32-bit) and sip.js demo client, any change in the codecs will make one of the peers to not receive video.

with chrome its worse. ill keep playing with the codecs, i dont mind sticking to either chrome or mozilla, but making it work with h264 is a must :/.

so in the end that issue is relevant to my problem and gave me the hint to test the codecs one by one.

i guess since i know the configuration is working, its time to use kurento to transcode vp8 to h264.

Yeah a gateway could be the solution for that. If you’re using sipml5 try with webrtc2sip.

hi Navaismo,

I have asterisk now(freepbx) with version 13 and I want to connect my kurrento version 6.6 with it.

Please guide me how my audio and webrtc calls can work and what configuration would i required.

I am very new with it so i need to know what i have to do and using cli and which configuration files i required to change in asterisk and kurento.

Our experience is that you should not attempt to use WebRTC if you are very new to internet telephony. Success involves having a good knowledge of the detailed workings of the protocols involved.

As such, I don’t think anyone is going to give a more useful response, other then possibly any offer to do it for you, at a price, to such an open question about WebRTC.