Summary: | ASTERISK-27360: Audio file from ffmpeg pops in AGI (but not dialplan) | ||
Reporter: | Naftoli Gugenheim (nafg) | Labels: | |
Date Opened: | 2017-10-18 19:50:53 | Date Closed: | 2020-01-14 11:13:56.000-0600 |
Priority: | Major | Regression? | |
Status: | Closed/Complete | Components: | |
Versions: | 13.13.1 14.3.0 | Frequency of Occurrence | Constant |
Related Issues: | |||
Environment: | Reproduced in all of: * Ubuntu 17.04 official package installed directly on laptop * cleardevice/docker-asterisk-latest-pjsip-fail2ban docker image on laptop and on ubuntu 16.04.3 * cleardevice/docker-cert-asterisk13-ubuntu docker image on laptop and on ubuntu 16.04.3 | Attachments: | |
Description: | 1. Using a custom webapp and recorder.js, I record an audio file. A specimen can be accessed here: https://drive.google.com/open?id=0B2SmgnDyV1aEWjBDTzJxRVh3dHM
2. I run ffmpeg -i /tmp/upload7121127648236719621.wav -ac 1 -ar 8000 -y /tmp/test1.wav. The result can be accessed here: https://drive.google.com/open?id=0B2SmgnDyV1aEckJKZWxtRHJ6RUU 3. I run sox /tmp/test1.wav /tmp/test.wav. The result can be accessed here: https://drive.google.com/open?id=0B2SmgnDyV1aEYmNIbkNOaDhwMjA The Problem: The file from step 2 plays fine using Playback and Background in the dialplan. However when using the AGI command STREAM FILE, there is a terrible popping sound at the beginning. Here is what it sounds like listening to test1 repeated: https://drive.google.com/open?id=0B2SmgnDyV1aEZzFLczdQaXNYVTg Here is what it sounds like listening to test repeated: https://drive.google.com/open?id=0B2SmgnDyV1aEWk9KZFgxNkc5WXc The testing was done with this AGI script (changing the filename as needed): {code} #!/bin/bash checkresults() { while read line do case ${line:0:4} in "200 " ) echo $line >&2 return;; "510 " ) echo $line >&2 return;; "520 " ) echo $line >&2 return;; * ) echo $line >&2;; #keep on reading those Invlid command #command syntax until "520 End ..." esac done } declare -a array while read -e ARG && [ "$ARG" ] ; do array=(` echo $ARG | sed -e 's/://'`) export ${array[0]}=${array[1]} done # following variables are available from asterisk echo $agi_request >&2 echo $agi_channel >&2 echo $agi_language >&2 echo $agi_type >&2 echo $agi_uniqueid >&2 echo $agi_callerid >&2 echo $agi_dnid >&2 echo $agi_rdnis >&2 echo $agi_context >&2 echo $agi_extension >&2 echo $agi_priority >&2 echo $agi_enhanced >&2 echo 'ANSWER' checkresults while true; do sleep 1 echo begin >&2 echo 'STREAM FILE /tmp/test ""' echo end >&2 sleep 1 checkresults done {code} | ||
Comments: | By: Asterisk Team (asteriskteam) 2017-10-18 19:50:54.484-0500 Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report. Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process]. By: Joshua C. Colp (jcolp) 2017-10-20 12:13:51.888-0500 Please attach the console output and the dialplan that does not exhibit the problem. By: Naftoli Gugenheim (nafg) 2017-10-21 20:10:07.269-0500 The dialplan that did not exhibit the problem was essentially: ``` exten => 555,1,Answer exten => 555,n,While(true) exten => 555,n,Background(/sounds/test1) exten => 555,n,EndWhile exten => 555,n,Hangup ``` What do you mean by the console output? By: Joshua C. Colp (jcolp) 2017-10-22 06:01:36.809-0500 The Asterisk console output, what is seen from "asterisk -rvvvvvvvvvc". As well if you add a Wait(1) or Wait(2) to the dialplan logic do you hear a pop? And what are you using to hear the pops on? A SIP phone? ITSP? Analog phone? Analog card? By: Asterisk Team (asteriskteam) 2017-11-05 12:00:01.023-0600 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 |