[Home]

Summary:ASTERISK-24979: Webrtc client audio output is consistently skipping or missing non-continuous audio
Reporter:r mundkowsky (rmundkowsky)Labels:
Date Opened:2015-04-20 08:30:43Date Closed:2020-01-14 11:14:12.000-0600
Priority:MajorRegression?
Status:Closed/CompleteComponents:Channels/chan_sip/General Resources/res_http_websocket
Versions:13.2.0 13.3.2 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Server: Ubuntu 14.04.1 LTS x86_64 web sockets server: Asterisk or webrtc2sip clients: sipml5 and jssipAttachments:( 0) full-ips-removed.txt
Description:Steps that Cause error:

webrtc client (WEBRTC_PUBLIC_IP using sipml5 or jssip via user 6002) makes audio call to extension 4000 on Asterisk (ASTRISK_PUBLIC_IP) via ws protocol directly or via webrtc2sip.  Asterisk answers, plays local audio file and dials SIP/4000@JVXMLcloud1 peer (BROWSER_IP). SIP/4000@JVXMLcloud1 peer then starts dialog with webrtc client. SIP/4000@JVXMLcloud1 peer handles SIP traffic, but hands off RTP to sound server (SOUNDSRV_IP). webrtc client hangs up.

Expected behavior:

webrtc client has dialog with SIP/4000@JVXMLcloud1 peer.  All audio sent from SIP/4000@JVXMLcloud1 is heard by webrtc client.

Actual behavior:

webrtc client connects to Asterisk and hears Asterisk played audio file then hears some small parts of dialog that is expected from SIP/4000@JVXMLcloud1 peer. webrtc client hangs-up before dialog is finished because no audio is heard after awhile.

Notes:

1) The audio logs on Asterisk though have the complete audio to/from SIP/4000@JVXMLcloud1, nothing is missing.  
2) Output audio sent to webrtc client is discontinuous (RTP send “hello”, pause (no RTP), …).  
3) Normal SIP/RTP clients (such as Noiper, Peers, PSTN/SIP) work correctly hearing full dialog from SIP/4000@JVXMLcloud1 peer.  
4) Output to the webrtc client is fine if the webrtc client is called from a SIP/RTP client (such as Noiper, Peers) via Asterisk server.



sip.conf snippet:
{noformat}
[6002]
transport=ws
defaultuser=6002
host=dynamic
secret=AAAAAAA
type=friend
encryption=yes
avpf=yes
force_avp=yes
icesupport=yes
directmedia=no
hasiax=no
hassip=yes
disallow=all
allow=ulaw
allow=g729
allow=g723
allow=speex
allow=ilbc
allow=gsm
dtlsenable=yes
dtlsverify=fingerprint
dtlscertfile=/export/Apps/asterisk/lib/asterisk/keys/asterisk.pem
dtlscafile=/export/Apps/asterisk/lib/asterisk/keys/ca.crt
dtlssetup=actpass



[JVXMLcloud1]
type=peer
nat=no
qualify=no
host=BROWSER_IP
port=5090
dtmfmode=info
canreinvite=no
{noformat}
extensions.conf snippet:
{noformat}
[system]
exten => 4000,1,Answer()
exten => 4000,n,Playback(/export/Apps/asterisk13-3-2/var/lib/asterisk/sounds/en/custom/transferring_with_record_warning)
exten => 4000,n,NoOp(Caller ID: ${CALLERID(num)})
exten => 4000,n,NoOp(SIP Headers:: From: ${SIP_HEADER(From)}, To: ${SIP_HEADER(To)})
exten => 4000,n,NoOp(Unique ID: ${UNIQUEID}, Channel Name: ${CHANNEL}, SIP Call ID: ${SIPCALLID})
exten => 4000,n,NoOp(The current group count : ${GROUP_COUNT(outgoing)})
exten => 4000,n,GotoIf($[${GROUP_COUNT(outgoing)}>1]?ring)
exten => 4000,n,Set(GLOBAL(current_timestamp_4000)=${STRFTIME(${EPOCH},GMT+1,%s)})
exten => 4000,n,Set(GLOBAL(current_full_format_timestamp_4000)=${STRFTIME(${EPOCH},GMT-8,%d%m%Y_%H%M%S)})
exten => 4000,n,NoOp(The current timestamp : ${current_timestamp_4000})
exten => 4000,n,NoOp(The last timestamp : ${last_timestamp_4000})
exten => 4000,n,GotoIf($[(${last_timestamp_4000}+20>${current_timestamp_4000})]?ring)
exten => 4000,n,NoOp(All cases passed)
exten => 4000,n(ring),Ringing()
exten => 4000,n,Wait(2)
exten => 4000,n,Monitor(wav,SYSTEM_audio_ext_4000_${current_full_format_timestamp_4000})
exten => 4000,n,MixMonitor(SYSTEM_MixMonitor_audio_ext_4000_${current_full_format_timestamp_4000}.wav)
exten => 4000,n,NoOp(The full call corresponding to SIP Call ID: ${SIPCALLID} and Caller ID: ${CALLERID(num)} was recorded to the file: SYSTEM_MixMonitor_audio_ext_4000_${current_full_format_timestamp_4000}.wav)
exten => 4000,n,Dial(SIP/4000@JVXMLcloud1,,XgF(default^4000^14))
exten => 4000,n,Set(GLOBAL(last_timestamp_4000)=${STRFTIME(${EPOCH},GMT+1,%s)})
exten => 4000,n,Hangup()
exten => 4000,n,Ringing()
exten => 4000,n,Wait(2)
exten => 4000,n,Playback(/export/Apps/asterisk/lib/asterisk/sounds/custom/busy_later)
exten => 4000,n,Wait(1)
exten => 4000,n,Hangup()
{noformat}
rtp.conf:
{noformat}
[general]
rtpstart=10000
rtpend=20000
                       ;(min 500, max 60000, default 5000)
icesupport=true
stunaddr=stun.l.google.com:19302
{noformat}
http.conf:
{noformat}
[general]
enabled=yes
bindaddr=0.0.0.0
bindport=8088
{noformat}
Comments:By: Matt Jordan (mjordan) 2015-04-20 09:25:34.695-0500

Thank you for taking the time to report this bug and helping to make Asterisk better. Unfortunately, we cannot work on this bug because your description did not include enough information. Please read over the Asterisk Issue Guidelines [1] which discusses the information necessary for your issue to be resolved and the format that information needs to be in. We would be grateful if you would then provide a more complete description of the problem. At a minimum, we need:

1. The specific steps or actions you took that caused you to encounter the problem.
2. The behavior you expected and the location of documentation that led you to that expectation.
3. The behavior you actually encountered.

To demonstrate the issue in detail, please include Asterisk log files generated per the instructions on the wiki [2]. If applicable, please ensure that protocol-level trace debugging is enabled, e.g., 'sip set debug on' if the issue involves chan_sip, and configuration information such as dialplan and channel configuration.

Thanks!

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines

[2] https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information



By: r mundkowsky (rmundkowsky) 2015-04-20 19:04:48.919-0500

I have followed your instructions as much as possible. I don't have time to try the latest Asterisk branch, but did try 13.3.2.  Some of full log is included, but unfortunately you don't seem to have a JIRA attach file method, so pretty hard to include full log.  Note RTP debug was on.

By: Richard Mudgett (rmudgett) 2015-04-20 19:41:56.565-0500

You attach files through the *MORE* button and select {{Attach Files}}.

By: r mundkowsky (rmundkowsky) 2015-04-24 20:04:14.408-0500

attached log rather than in comment

By: Rusty Newton (rnewton) 2015-05-14 20:19:52.249-0500

Can you attach a screen shot for the SIPML5 or JSSIP configuration you used(something we could use with the demo clients) ?

By: r mundkowsky (rmundkowsky) 2015-05-15 08:39:21.807-0500

FYI, audio that is 3.7 seconds or shorter is dropped where as 3.8 seconds works well.  

Few other notes:
1) We tried webrtc clients with Chrome and Firefox (<= v36, since v37 killed webrtc support).
2) A call from webrtc to webrtc via Asterisk seems to work fine, problem only seems to be webrtc to SIP/RTP system
3) SIP/RTP (either peers, Zoiper, or PSTN/SIP (www.ipkall.com) ) via Asterisk to the same SIP/RTP system works fine.

The sipml5 settings:

private id: 6003
public  ip: sip:6003@<asterisk extern IP>:5060
realm:<asterisk extern IP>
call: sip:4000@<asterisk extern IP>:5060
Disable Video: true
websocket: ws://<asterisk extern IP>:8088/ws
Enable RTCWeb Breaker: true or false, tried both
ICE Servers: [] , but also tried with a valid google server
Max bandwidth (kbps)
Cache the media stream: false

The JSSIP settings:
enable video: false
uri: "sip:6003@<asterisk extern IP>:5060",
ws_servers: "ws://<asterisk extern IP>:8088/ws",
authorization_user: "6003",
register: true,
hack_ip_in_contact: true,
hack_via_ws: true



By: Rusty Newton (rnewton) 2015-08-12 17:26:41.532-0500

I'm unable to reproduce this in the lab so far.

We need help to reproduce the issue.

{quote}
SIP/4000@JVXMLcloud1 peer handles SIP traffic, but hands off RTP to sound server (SOUNDSRV_IP). webrtc client hangs up.
{quote}

You'll need to provide a method with step by step instructions to reproduce what you describe here. I'm not sure what clients you are using and how the handoff happens.

Additionally we'll likely need wire-shark readable packet captures of the scenario.

This being WebRTC you'll really want to use the latest Asterisk 13 branch as there has been a few fixes goes in for relevant areas of code.

By: r mundkowsky (rmundkowsky) 2015-08-14 10:16:33.272-0500

We tried a few different versions of Asterisk. We are currently using 13.3.2.  I am going to provide you with webrtc and SIP access to our system, so that you can gather logs as need. Connection info:

id: 6001
public id: sip:6001@54.173.240.119
password: 1234
realm: 54.173.240.119
webrtc url: ws://54.173.240.119:8088/ws
ICE (i think not required): stun:stun.l.google.com:19302
call: sip:4000@54.173.240.119

You can connect via SIP to hear the difference:
id: 1000
public id: sip:6001@54.173.240.119
password: 1234
domain: 54.173.240.119
call: sip:4000@54.173.240.119



What you should hear:

Transferring you now, please note your call will be re... - this is Asterisk audio
Hello, my name is Victor ...

How did you hear about hte position?

Ok great can you tell me more...

I see, do you plan to return to ...

That is great you are interest..

Tell me about your previous jobs...

have you ever quit a job

... (few more prompts)


By: Rusty Newton (rnewton) 2015-09-15 07:42:23.773-0500

That is not going to work out. Please provide packet captures and debug logs from your system (running Asterisk 13.5.0 or the latest head of the Git 13 branch). We can't reproduce the issue at the moment but we can take a look to see if there is anything obvious in the logs or pcap. Other than that with only one report of this issue and no way to reproduce it on a fresh system with the latest version we'll have to close this out until we get more information.

https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information

By: Asterisk Team (asteriskteam) 2015-09-29 12:00:20.078-0500

Suspended due to lack of activity. This issue will be automatically re-opened if the reporter posts a comment. If you are not the reporter and would like this re-opened please create a new issue instead. If the new issue is related to this one a link will be created during the triage process. Further information on issue tracker usage can be found in the Asterisk Issue Guidlines [1].

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines