MP3Player multiple streaming stations
Re: MP3Player multiple streaming stations
This forum uses the tiki wiki syntax so hash tags change to numbers. you can enter ~np~ before the hash and then again after the hash but with a / in front of the n to keep the hash intact
Re: MP3Player multiple streaming stations
The strange 1. are actually hash # do not know why they change after preview to post
MP3Player multiple streaming stations
Running Asterisk 1.8.11 CMD MP3Player refused to work on Streams so I figured out a hack.
MP3player calls /usr/bin/mpg123 and pass arguments (never did figure out the string syntax)
When a local file is called the filename in MP3Player(FILENAME) is passed as $8 $ARGV
So here is what I did
first
sudo su to gain root if not already
look to see if mpg123 has been moved to mpg123.bin under /usr/bin on Ubuntu 11.10
if not
mv /usr/bin/mpg123 /usr/bin/mpg123.bin
if already moved then /usr/bin/mpg123 will be a symbolic link so
mv /usr/bin/mpg123 /usr/bin/mpg123.bk
next
vi /usr/bin/mpg123
and enter
:wq
next
chmod +x /usr/bin/mpg123
next
mkdir /etc/asterisk/radio
next
cd /etc/asterisk/radio
next move any MP3 files you may want to play to this directory
ie...
mv /path/to/file.mp3 /etc/asterisk/radio/file.mp3
next make new FAKE mp3 files
touch FK_filename.mp3
next
vi FK_filename.mp3
:wq
or
:wq
next make the fake mp3s executable
chmod +x FK_*
chown -R asterisk /etc/asterisk/radio
chgrp -R asterisk /etc/asterisk/radio
next we add the extensions to extensions.conf create a different extension for each stream you want to create.
vi /etc/asterisk/extensions.conf
...
exten => ###,1,Answer
exten => ###,2,MP3Player(FK_filename.mp3)
...
:wq
Now just restart Asterisk and you can test by dialing in the streams will play over the phone!
For some reason Asterisk needs to be restarted after you change mpg123.
Total Hack but I just started with Asterisk in june of 2011.
Thought I would share;-)
MP3player calls /usr/bin/mpg123 and pass arguments (never did figure out the string syntax)
When a local file is called the filename in MP3Player(FILENAME) is passed as $8 $ARGV
So here is what I did
first
sudo su to gain root if not already
look to see if mpg123 has been moved to mpg123.bin under /usr/bin on Ubuntu 11.10
if not
mv /usr/bin/mpg123 /usr/bin/mpg123.bin
if already moved then /usr/bin/mpg123 will be a symbolic link so
mv /usr/bin/mpg123 /usr/bin/mpg123.bk
next
vi /usr/bin/mpg123
and enter
- !/bin/bash
:wq
next
chmod +x /usr/bin/mpg123
next
mkdir /etc/asterisk/radio
next
cd /etc/asterisk/radio
next move any MP3 files you may want to play to this directory
ie...
mv /path/to/file.mp3 /etc/asterisk/radio/file.mp3
next make new FAKE mp3 files
touch FK_filename.mp3
next
vi FK_filename.mp3
- !/bin/bash
:wq
or
- !/bin/bash
:wq
next make the fake mp3s executable
chmod +x FK_*
chown -R asterisk /etc/asterisk/radio
chgrp -R asterisk /etc/asterisk/radio
next we add the extensions to extensions.conf create a different extension for each stream you want to create.
vi /etc/asterisk/extensions.conf
...
exten => ###,1,Answer
exten => ###,2,MP3Player(FK_filename.mp3)
...
:wq
Now just restart Asterisk and you can test by dialing in the streams will play over the phone!
For some reason Asterisk needs to be restarted after you change mpg123.
Total Hack but I just started with Asterisk in june of 2011.
Thought I would share;-)
Featured -
Search:








