Great gag. I wonder what else we can use this for? Hmmmm......
Peter M.
Gregory Meloche wrote:
mplayer required... I will try this tomorrow.
On 11-Feb-09, at 8:58 PM, Bill Sandiford wrote:
I've been too busy watching old episodes of Polka-Dot Door to
respond. :)
-----Original Message-----
From: Simon P. Ditner [mailto:[email protected]]
Sent: Wednesday, February 11, 2009 8:26 PM
To: [email protected]
Subject: Re: [on-asterisk] clogging the tubes
No responses? I'm so disenchanted.
On Tue, 10 Feb 2009, Simon P. Ditner wrote:
For your entertainment...
Usage:
./inject.sh 4165551212 'http://www.youtube.com/watch?v=ghWpAgFfgV0'
extensions.conf:
[inject-wav]
exten => s,1,Answer()
exten => s,n,Wait(1)
exten => s,n,Playback(${WAV})
exten => s,n,System(rm ${WAV}.wav)
[outbound]
exten => X.,1,Dial(SIP/tr...@${exten})
inject.sh:
#!/bin/sh
FILE=`tempfile`
EXTEN=$1
URL=$2
RES=`lynx -source "$URL" | grep fullscreenUrl | cut -d'&' -f4,8`
mplayer "http://www.youtube.com/get_video?$RES" -dumpaudio -dumpfile
$FILE-t.mp3
mpg123 -w $FILE-t.wav $FILE-t.mp3
sox $FILE-t.wav -c 1 -r 8000 -w $FILE.wav
# Remove temporary files
rm $FILE $FILE-t.wav $FILE-t.mp3
echo "Channel: Local/$ex...@outbound
MaxRetries: 1
RetryTime: 60
WaitTime: 30
Context: inject-wav
Extension: s
Priority: 1
Set: WAV=$FILE
" > /var/spool/asterisk/outgoing/inject-$EXTEN.call
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
Gregory Meloche - Developer
RappidDev - Rapid Application Development
Phone : 416 628 1965
Fax : 905 963 3353
www.rappiddev.com
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]