Re: [on-asterisk] clogging the tubes

2009-02-12 Thread Peter MacFarlane

Great gag.  I wonder what else we can use this for?  H..

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:si...@uc.org]
Sent: Wednesday, February 11, 2009 8:26 PM
To: asterisk@uc.org
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: asterisk-unsubscr...@uc.org
For additional commands, e-mail: asterisk-h...@uc.org




-
To unsubscribe, e-mail: asterisk-unsubscr...@uc.org
For additional commands, e-mail: asterisk-h...@uc.org


-
To unsubscribe, e-mail: asterisk-unsubscr...@uc.org
For additional commands, e-mail: asterisk-h...@uc.org



Gregory Meloche - Developer
RappidDev - Rapid Application Development
Phone : 416 628 1965
Fax : 905 963 3353
www.rappiddev.com
gmelo...@rappiddev.com


-
To unsubscribe, e-mail: asterisk-unsubscr...@uc.org
For additional commands, e-mail: asterisk-h...@uc.org





-
To unsubscribe, e-mail: asterisk-unsubscr...@uc.org
For additional commands, e-mail: asterisk-h...@uc.org



Re: [on-asterisk] clogging the tubes

2009-02-12 Thread Jim Van Meggelen
I gave it a whirl, but I run CentOS, and there are a lot of dependencies 
that weren't in the system, and yum couldn't find. After about 15 
minutes of it I realized this was going to become a mini-project that I 
didn't have time for at that moment.


Some of the fundamental stuff here is pure gold, though.

Jim

Simon P. Ditner wrote:

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: asterisk-unsubscr...@uc.org
For additional commands, e-mail: asterisk-h...@uc.org




-
To unsubscribe, e-mail: asterisk-unsubscr...@uc.org
For additional commands, e-mail: asterisk-h...@uc.org





--

--
Jim Van Meggelen
j...@vanmeggelen.ca
http://www.oreillynet.com/pub/au/2177

A child is the ultimate startup, and I have three. 
This makes me rich.

   Guy Kawasaki
--



-
To unsubscribe, e-mail: asterisk-unsubscr...@uc.org
For additional commands, e-mail: asterisk-h...@uc.org



Re: [on-asterisk] clogging the tubes

2009-02-11 Thread Simon P. Ditner

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: asterisk-unsubscr...@uc.org
For additional commands, e-mail: asterisk-h...@uc.org




-
To unsubscribe, e-mail: asterisk-unsubscr...@uc.org
For additional commands, e-mail: asterisk-h...@uc.org



RE: [on-asterisk] clogging the tubes

2009-02-11 Thread Bill Sandiford
I've been too busy watching old episodes of Polka-Dot Door to respond. :)

-Original Message-
From: Simon P. Ditner [mailto:si...@uc.org] 
Sent: Wednesday, February 11, 2009 8:26 PM
To: asterisk@uc.org
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: asterisk-unsubscr...@uc.org
 For additional commands, e-mail: asterisk-h...@uc.org



-
To unsubscribe, e-mail: asterisk-unsubscr...@uc.org
For additional commands, e-mail: asterisk-h...@uc.org


-
To unsubscribe, e-mail: asterisk-unsubscr...@uc.org
For additional commands, e-mail: asterisk-h...@uc.org



Re: [on-asterisk] clogging the tubes

2009-02-11 Thread Gregory Meloche

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:si...@uc.org]
Sent: Wednesday, February 11, 2009 8:26 PM
To: asterisk@uc.org
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: asterisk-unsubscr...@uc.org
For additional commands, e-mail: asterisk-h...@uc.org




-
To unsubscribe, e-mail: asterisk-unsubscr...@uc.org
For additional commands, e-mail: asterisk-h...@uc.org


-
To unsubscribe, e-mail: asterisk-unsubscr...@uc.org
For additional commands, e-mail: asterisk-h...@uc.org



Gregory Meloche - Developer
RappidDev - Rapid Application Development
Phone : 416 628 1965
Fax : 905 963 3353
www.rappiddev.com
gmelo...@rappiddev.com


-
To unsubscribe, e-mail: asterisk-unsubscr...@uc.org
For additional commands, e-mail: asterisk-h...@uc.org