Chrome supported WebRTC Simulator

Hi Every one,:cry:
I have plan to test Asterisk WebRTC in chrome for that i was searching for the live demo Simulators for this i have gone through the two live demo Simulators namely " SIPML5 " and " tryit.jssip(sipjs) " by using this simulators i was facing the following problems.
sipML5 :
This simulator is working when Firfox browser has a B-party. In other cases this simulator is fail to answer to A-party. while clicking the answer button call is getting terminating by client end.
tryit.jssip :
This simulator is also working fine when Firfox browser is B-party. But in other browsers call is getting connecting but A-party voice is not audible to B-party, B-party voice is audible to A-party.

I was using
Chrome version - 58.0.3029.110 (64-bit)
FirFox version - 53.0.2 (64-bit)
Opera version - 35.0.2066.68
Asterisk version -14.4.0

any one please help me for come out of this issue and suggest any other clients(simulator) that can be working.

The demo application of each Websocket Library works, what is not working according your message is the configuration or the negotiation between your server and the Browsers. You need to provide configurations on both sides and also the SIP debug of both sides as well.

Keep in mind that WebRTC is still making a lot of changes so better if you search for recent warnings on each library forum to avoid wasting time.

Thank you for your reply navaismo ,

   Configurations 

sip.conf
---
[6001]
host=dynamic
;secret=DONT_USE_THIS_INSECURE_PASSWORD
type=friend
encryption=no
avpf=yes
force_avp=yes
icesupport=yes
directmedia=yes
disallow=all
allow=ulaw, alaw, gsm, g726
dtlsenable=yes
dtlsverify=fingerprint
dtlscertfile=/etc/asterisk/keys/asterisk.pem
dtlscafile=/etc/asterisk/keys/ca.crt
dtlssetup=actpass
rtcp_mux=yes
context=play_annc
videosupport=yes
context=from-camera
canreinvite=no

extensions.conf : 
---

exten => 6003,1,Answer()
exten => 6003,n,Dial(SIP/${EXTEN},,r,wss://192.168.151.122:9191/asterisk/ws)
exten => 6003,n,Hangup() 

for your reference browser side and CLI side logs are

**sip debug logs in CLI :**


<--- SIP read from WS:192.168.73.234:55957 --->
INVITE sip:6003@192.168.151.122 SIP/2.0
Via: SIP/2.0/WSS df7jal23ls0d.invalid;branch=z9hG4bKCFW70ZF8DGelLotDycb4TtQI0F39J8nA;rport
From: "6001"<sip:6001@192.168.151.122>;tag=uIDQ8RDpdc5J9ptqyBRE
To: <sip:6003@192.168.151.122>
Contact: "6001"<sips:6001@df7jal23ls0d.invalid;rtcweb-breaker=yes;click2call=no;transport=wss>;impi=6001;ha1=2bb99fba978edee6806d454f8ab74e6f;+g.oma.sip-im;language="en,fr"
Call-ID: d1040a76-8fca-c775-ed0d-5a44f5d7d712
CSeq: 52877 INVITE
Content-Type: application/sdp
Content-Length: 1477
Max-Forwards: 70
User-Agent: IM-client/OMA1.0 sipML5-v1.2016.03.04
Organization: Doubango Telecom

v=0
o=- 8263245962208156000 2 IN IP4 127.0.0.1
s=Doubango Telecom - chrome
t=0 0
a=group:BUNDLE audio
a=msid-semantic: WMS gT2X7hBjkYQRB3Dg4G9p6PYfUKT1Af87wSn9
m=audio 51042 UDP/TLS/RTP/SAVPF 111 103 104 9 0 8 106 105 13 110 112 113 126
c=IN IP4 192.168.73.234
b=AS:64
a=rtcp:9 IN IP4 0.0.0.0
a=candidate:4173113849 1 udp 2122260223 192.168.73.234 51042 typ host generation 0 network-id 1
a=candidate:3057603849 1 tcp 1518280447 192.168.73.234 9 typ host tcptype active generation 0 network-id 1
a=ice-ufrag:pBZx
a=ice-pwd:/rWyEtMxZigmsUAA90IwB1Zc
a=fingerprint:sha-256 85:4E:25:10:20:4A:FB:9E:76:D9:71:9C:C1:62:3E:10:3D:2E:02:A2:C7:B0:B9:8F:88:00:5D:C3:50:49:38:8A
a=setup:actpass
a=mid:audio
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=sendrecv
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=rtcp-fb:111 transport-cc
a=fmtp:111 minptime=10;useinbandfec=1
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:2582822703 cname:OvoMA8ivTZJoOXV4
a=ssrc:2582822703 msid:gT2X7hBjkYQRB3Dg4G9p6PYfUKT1Af87wSn9 f3bae2ee-42a2-487e-83da-dde3df185e54
a=ssrc:2582822703 mslabel:gT2X7hBjkYQRB3Dg4G9p6PYfUKT1Af87wSn9
a=ssrc:2582822703 label:f3bae2ee-42a2-487e-83da-dde3df185e54
<------------->
--- (12 headers 39 lines) ---
Using INVITE request as basis request - d1040a76-8fca-c775-ed0d-5a44f5d7d712
Found peer '6001' for '6001' from 192.168.73.234:55957
  == DTLS ECDH initialized (secp256r1), faster PFS enabled
  == Using SIP RTP CoS mark 5
Found RTP audio format 111
Found RTP audio format 103
Found RTP audio format 104
Found RTP audio format 9
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 106
Found RTP audio format 105
Found RTP audio format 13
Found RTP audio format 110
Found RTP audio format 112
Found RTP audio format 113
Found RTP audio format 126
Found audio description format opus for ID 111
Found unknown media description format ISAC for ID 103
Found unknown media description format ISAC for ID 104
Found audio description format G722 for ID 9
Found audio description format PCMU for ID 0
Found audio description format PCMA for ID 8
Found unknown media description format CN for ID 106
Found unknown media description format CN for ID 105
Found audio description format CN for ID 13
Found unknown media description format telephone-event for ID 110
Found unknown media description format telephone-event for ID 112
Found unknown media description format telephone-event for ID 113
Found audio description format telephone-event for ID 126
Capabilities: us - (ulaw), peer - audio=(ulaw|alaw|g722|opus)/video=(nothing)/text=(nothing), combined - (ulaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x3 (telephone-event|CN|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 192.168.73.234:51042
Looking for 6003 in play_annc (domain 192.168.151.122)
sip_route_dump: route/path hop: <sips:6001@df7jal23ls0d.invalid;rtcweb-breaker=yes;click2call=no;transport=wss>

<--- Transmitting (no NAT) to 192.168.73.234:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/WSS df7jal23ls0d.invalid;branch=z9hG4bKCFW70ZF8DGelLotDycb4TtQI0F39J8nA;rport;received=192.168.73.234
From: "6001"<sip:6001@192.168.151.122>;tag=uIDQ8RDpdc5J9ptqyBRE
To: <sip:6003@192.168.151.122>
Call-ID: d1040a76-8fca-c775-ed0d-5a44f5d7d712
CSeq: 52877 INVITE
Server: Asterisk PBX 14.4.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:6003@192.168.151.122:5062;transport=ws>
Content-Length: 0


<------------>
    -- Executing [6003@play_annc:1] Answer("SIP/6001-0000001f", "") in new stack
Audio is at 19758
Adding codec ulaw to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<--- Reliably Transmitting (no NAT) to 192.168.73.234:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/WSS df7jal23ls0d.invalid;branch=z9hG4bKCFW70ZF8DGelLotDycb4TtQI0F39J8nA;rport;received=192.168.73.234
From: "6001"<sip:6001@192.168.151.122>;tag=uIDQ8RDpdc5J9ptqyBRE
To: <sip:6003@192.168.151.122>;tag=as740f7856
Call-ID: d1040a76-8fca-c775-ed0d-5a44f5d7d712
CSeq: 52877 INVITE
Server: Asterisk PBX 14.4.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:6003@192.168.151.122:5062;transport=ws>
Content-Type: application/sdp
Content-Length: 821

v=0
o=root 779722921 779722921 IN IP4 192.168.151.122
s=Asterisk PBX 14.4.0
c=IN IP4 192.168.151.122
t=0 0
m=audio 19758 RTP/SAVPF 0 126
a=rtpmap:0 PCMU/8000
a=rtpmap:126 telephone-event/8000
a=fmtp:126 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=maxptime:150
a=ice-ufrag:22a475dc7bd61a4521cd636c05768fc9
a=ice-pwd:40d377dd680fb25c4db9b1750074339e
a=candidate:Hc0a8977a 1 UDP 2130706431 192.168.151.122 19758 typ host
a=candidate:Hc0a86a2b 1 UDP 2130706431 192.168.106.43 19758 typ host
a=candidate:Hc0a8977a 2 UDP 2130706430 192.168.151.122 19759 typ host
a=candidate:Hc0a86a2b 2 UDP 2130706430 192.168.106.43 19759 typ host
a=connection:new
a=setup:active
a=fingerprint:SHA-256 C3:5A:AD:ED:60:98:32:E7:F5:74:97:13:D7:C2:79:B5:35:C8:06:16:9D:94:EC:B1:14:83:EC:FD:E8:83:03:74
a=rtcp-mux
a=sendrecv

<------------>

<--- SIP read from WS:192.168.73.234:55957 --->
ACK sip:6003@192.168.151.122:5062;transport=ws SIP/2.0
Via: SIP/2.0/WSS df7jal23ls0d.invalid;branch=z9hG4bKwMQO9cRdZBOOUhUpMNLX;rport
From: "6001"<sip:6001@192.168.151.122>;tag=uIDQ8RDpdc5J9ptqyBRE
To: <sip:6003@192.168.151.122>;tag=as740f7856
Contact: "6001"<sips:6001@df7jal23ls0d.invalid;rtcweb-breaker=yes;click2call=no;transport=wss>;+g.oma.sip-im;language="en,fr"
Call-ID: d1040a76-8fca-c775-ed0d-5a44f5d7d712
CSeq: 52877 ACK
Content-Length: 0
Max-Forwards: 70
User-Agent: IM-client/OMA1.0 sipML5-v1.2016.03.04
Organization: Doubango Telecom

<------------->
--- (11 headers 0 lines) ---
       > 0x7fe05001b3b0 -- Probation passed - setting RTP source address to 192.168.73.234:51042
    -- Executing [6003@play_annc:2] Playback("SIP/6001-0000001f", "/opt/product/WebRTC/INSTALL/var/lib/asterisk/sounds/en/WelcomePrompt") in new stack
    -- <SIP/6001-0000001f> Playing '/opt/product/WebRTC/INSTALL/var/lib/asterisk/sounds/en/WelcomePrompt.slin' (language 'en')
    -- Executing [6003@play_annc:3] Dial("SIP/6001-0000001f", "SIP/6003,,r,wss://192.168.151.122:9191/asterisk/ws") in new stack
  == DTLS ECDH initialized (secp256r1), faster PFS enabled
  == Using SIP RTP CoS mark 5
[May 12 17:56:16] ERROR[19457][C-00000011]: netsock2.c:305 ast_sockaddr_resolve: getaddrinfo("df7jal23ls0d.invalid", "(null)", ...): Temporary failure in name resolution
[May 12 17:56:16] WARNING[19457][C-00000011]: chan_sip.c:16762 __set_address_from_contact: Invalid host name in Contact: (can't resolve in DNS) : 'df7jal23ls0d.invalid'
[May 12 17:56:16] ERROR[19457][C-00000011]: netsock2.c:98 ast_sockaddr_stringify_fmt: getnameinfo(): ai_family not supported
Audio is at 13958
Adding codec ulaw to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (NAT) to 192.168.73.234:56003:
INVITE sips:6003@df7jal23ls0d.invalid;rtcweb-breaker=no;transport=wss SIP/2.0
Via: SIP/2.0/WS 192.168.151.122:5062;branch=z9hG4bK12138412;rport
Max-Forwards: 70
From: "6001" <sip:6001@192.168.151.122:5062>;tag=as2df08809
To: <sips:6003@df7jal23ls0d.invalid;rtcweb-breaker=no;transport=wss>
Contact: <sip:6001@192.168.151.122:5062;transport=ws>
Call-ID: 6ee02b89261008de1a313e9976552421@192.168.151.122:5062
CSeq: 102 INVITE
User-Agent: Asterisk PBX 14.4.0
Date: Fri, 12 May 2017 12:26:16 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 824

v=0
o=root 1046417564 1046417564 IN IP4 192.168.151.122
s=Asterisk PBX 14.4.0
c=IN IP4 192.168.151.122
t=0 0
m=audio 13958 RTP/SAVPF 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=maxptime:150
a=ice-ufrag:290fe9ea477d6cae4153edbc246877f0
a=ice-pwd:618b016e315b91db5fc9ff0459279b96
a=candidate:Hc0a8977a 1 UDP 2130706431 192.168.151.122 13958 typ host
a=candidate:Hc0a86a2b 1 UDP 2130706431 192.168.106.43 13958 typ host
a=candidate:Hc0a8977a 2 UDP 2130706430 192.168.151.122 13959 typ host
a=candidate:Hc0a86a2b 2 UDP 2130706430 192.168.106.43 13959 typ host
a=connection:new
a=setup:actpass
a=fingerprint:SHA-256 C3:5A:AD:ED:60:98:32:E7:F5:74:97:13:D7:C2:79:B5:35:C8:06:16:9D:94:EC:B1:14:83:EC:FD:E8:83:03:74
a=rtcp-mux
a=sendrecv

---
    -- Called SIP/6003

<--- SIP read from WS:192.168.73.234:56003 --->
SIP/2.0 100 Trying (sent from the Transaction Layer)
Via: SIP/2.0/WS 192.168.151.122:5062;rport=5062;branch=z9hG4bK12138412
From: "6001"<sip:6001@192.168.151.122:5062>;tag=as2df08809
To: <sips:6003@df7jal23ls0d.invalid;rtcweb-breaker=no;transport=wss>
Call-ID: 6ee02b89261008de1a313e9976552421@192.168.151.122:5062
CSeq: 102 INVITE
Content-Length: 0

<------------->
--- (7 headers 0 lines) ---

<--- SIP read from WS:192.168.73.234:56003 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/WS 192.168.151.122:5062;rport=5062;branch=z9hG4bK12138412
From: "6001"<sip:6001@192.168.151.122:5062>;tag=as2df08809
To: <sips:6003@df7jal23ls0d.invalid;rtcweb-breaker=no;transport=wss>;tag=ZpcsAsmuoGS72Ws66XTa
Contact: <sips:6003@df7jal23ls0d.invalid;transport=wss>
Call-ID: 6ee02b89261008de1a313e9976552421@192.168.151.122:5062
CSeq: 102 INVITE
Content-Length: 0
Allow: ACK, BYE, CANCEL, INVITE, MESSAGE, NOTIFY, OPTIONS, PRACK, REFER, UPDATE

<------------->
--- (9 headers 0 lines) ---
sip_route_dump: route/path hop: <sips:6003@df7jal23ls0d.invalid;transport=wss>
    -- SIP/6003-00000020 is ringing

<--- SIP read from WS:192.168.73.234:56003 --->
SIP/2.0 200 OK
Via: SIP/2.0/WS 192.168.151.122:5062;rport=5062;branch=z9hG4bK12138412
From: "6001"<sip:6001@192.168.151.122:5062>;tag=as2df08809
To: <sips:6003@df7jal23ls0d.invalid;rtcweb-breaker=no;transport=wss>;tag=ZpcsAsmuoGS72Ws66XTa
Contact: <sips:6003@df7jal23ls0d.invalid;transport=wss>
Call-ID: 6ee02b89261008de1a313e9976552421@192.168.151.122:5062
CSeq: 102 INVITE

is this correct or was a issue while uploading the config?
Also noted the[quote=“Sudhan, post:3, topic:70772”]
[May 12 17:56:16] ERROR[19457][C-00000011]: netsock2.c:305 ast_sockaddr_resolve: getaddrinfo(“df7jal23ls0d.invalid”, “(null)”, …): Temporary failure in name resolution
[/quote]
Which is an old issue check the doubango forum for the solution since i didn’t recall right now.

It basically means that you don’t have a properly configured DNS server. Apparently WebRTC uses bogus addresses in the Contact header, relying on the peer keeping up the original TCP connection. Asterisk will still try to resolve these. If you had valid DNS, you would get a definitive not found, but, as you don’t, you are getting a timeout or other temporary failure.

Hi david ,
Thank you for your response.
As you said " DNS server configuration problem " then call will not work for the Firfox also but it’s working. As off my understanding this is client side problem( i mean to say Simulator(sipML5) problem). I have gone through sipML5 code level they are supporting Firfox. Because of this reason i was asking for simulator which will support for chrome.

Both supports Chrome, the issue is the configuration, check the doubango google group for that error that is a common one. And also keep in mind that to work properly with chrome and firefox you need “Real” certificates not autogenerated.

The failure to get a definitive answer for the .invalid domain is a problem on the Asterisk side. The Asterisk machine appears not to have access to the root name servers. You will still get an error here, but it will be different, and harmless. If you are timing out, you are going to be wasting many seconds doing so.

(Using the terms client and server for SIP is confusing. The only reason that Asterisk needs the address resolving is because it might use it when acting in a client role)