[asterisk-bugs] [JIRA] (ASTERISK-27360) Audio file from ffmpeg pops in AGI (but not dialplan)

Naftoli Gugenheim (JIRA) noreply at issues.asterisk.org
Sat Oct 21 20:10:21 CDT 2017


    [ https://issues.asterisk.org/jira/browse/ASTERISK-27360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=239510#comment-239510 ] 

Naftoli Gugenheim commented on ASTERISK-27360:
----------------------------------------------

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?

> Audio file from ffmpeg pops in AGI (but not dialplan)
> -----------------------------------------------------
>
>                 Key: ASTERISK-27360
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27360
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>    Affects Versions: 13.13.1, 14.3.0
>         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
>            Reporter: Naftoli Gugenheim
>            Assignee: Naftoli Gugenheim
>
> 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}



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list