MOH - Streaming Internet Radio

Discussion in 'General' started by Bob, Mar 27, 2008.

  1. Bob

    Bob

    Joined:
    Nov 4, 2007
    Messages:
    2,400
    Likes Received:
    1
    Just remember someone asking a few weeks ago about whats needed for MOH Streaming Internet Radio.

    Below is what I have running on one of my systems. For the record it is implemented on 0.9.2, but would expect no issues on 1.0.

    cd /usr/src
    wget http://dag.wieers.com/rpm/packages/libm ... f.i386.rpm
    wget http://dag.wieers.com/rpm/packages/libi ... f.i386.rpm
    wget http://zak.googlecode.com/files/madplay ... 5.i386.rpm
    rpm -ivh libmad*.*
    rpm -ivh libid3tag*.*
    rpm -ivh madplay*.*

    cd /var/lib/asterisk/mohmp3/
    mkdir stream

    cd stream
    touch stream.mp3

    add the following to /etc/asterisk/musiconhold_custom.conf (if other lines are in this file, just add these afterwards)

    ============================

    [easylistening]
    mode=custom
    application = /usr/bin/madplay -q -s --mono -A 3 --attenuate=-3 -r 8000 -f 8192 -b 0 http://128.177.3.80:4064/

    [classical]
    mode=custom
    application = /usr/bin/madplay -q -s --mono -A 3 --attenuate=-3 -r 8000 -f 8192 -b 0 http://216.126.84.50:8000/

    [Country]
    mode=custom
    application = /usr/bin/madplay -q -s --mono -A 3 --attenuate=-3 -r 8000 -f 8192 -b 0 http://64.236.34.106:80/stream/1075/

    [Dance]
    mode=custom
    application = /usr/bin/madplay -q -s --mono -A 3 --attenuate=-3 -r 8000 -f 8192 -b 0 http://193.138.205.194:8014/

    =============================


    The above are just examples, you can add more, or change the ones above. You may want to find some low bandwidth streams that are closer to your Country to eliminate any dropouts etc.

    Just in case formatting is incorrect, between the start of the word "Application" and the end of the HTTP address is all on one line. The same with the WGET.

    Reboot your system afterwards (I prefer it over reloads and amportal restarts)

    Then go into your trunks and extensions in freepbx and choose the MOH Stream you want for on hold music.

    Madplay?? Just offers a little more control, especially in volume/attenuation.

    Thanks to BenS for the stream addresses. I have not tested all of them, so may be dead, but the top one is definitely tested and working.

    Hope it helps someone...

    Regards
    Bob
     
  2. jjidea

    Joined:
    Jan 7, 2008
    Messages:
    15
    Likes Received:
    0
    hello bob,
    thanks a lot for your help, i will test your solution.
     
  3. ramoncio

    Joined:
    May 12, 2010
    Messages:
    1,663
    Likes Received:
    0
    This does not work at all.
    The parameters are wrong, and I think madplay has to play using a pipe, can't find the files in http://

    Anyone got this working??
     
  4. Bob

    Bob

    Joined:
    Nov 4, 2007
    Messages:
    2,400
    Likes Received:
    1
    For the record, I did mention 0.92 was version checked against and solid records were kept at the time of implementation. Thorough testing was done at the time.

    Will look at the issues with 1.0 and report any changes

    Regards

    Bob
     
  5. ramoncio

    Joined:
    May 12, 2010
    Messages:
    1,663
    Likes Received:
    0
    Thank for the answer Bob,
    But does this depend on Elastix version?

    If I run madplay using those parameters in my console I get this error:

    This looks more like madplay, not Elastix version...

    Anyway I got it working using mpg123, adding this to my musiconhold_custom.conf:

    [skyfm]
    mode=custom
    application=/usr/bin/mpg123 -q -s --mono -r 8000 -f 8192 -b 0 http://scfire-dll-aa05.stream.aol.com:80/stream/1010

    I have noticed though, that all the streams from scifire-dll-aa05.stream.aol.com work ok with this method, but many other streams just don't work.
     
  6. Bob

    Bob

    Joined:
    Nov 4, 2007
    Messages:
    2,400
    Likes Received:
    1
    Ramoncio,

    The Streaming On Hold Tutorial has been completely rewritten and re-released.

    It covers Freepbx 2.4 and 2.5 and about 20 hours of testing, rechecking, re-testing has been done.

    Any problems with it just let us know....

    http://www.elastixconnection.com

    Regards
    Bob
     
  7. rafael

    Joined:
    May 14, 2007
    Messages:
    1,454
    Likes Received:
    1
    Nice Bob, thanks a lot.

    regards,

    Rafael
     
  8. DjBac

    Joined:
    May 20, 2009
    Messages:
    137
    Likes Received:
    0
    I've once setup streaming MOH according to the tutorial and it worked fine, but now I cannot get it to work!!

    Elastix 1.6 freepbx 2.8

    Does anyone have a stream url that actual works for testing purposes?
     
  9. Terry

    Joined:
    May 25, 2007
    Messages:
    174
    Likes Received:
    0
  10. Terry

    Joined:
    May 25, 2007
    Messages:
    174
    Likes Received:
    0
    Dear All,
    Elastix 2.0.2 version

    i am delet the old link on Hold Music
    and creat new add Streaming Category But it show
    Cannot write to file () ,after my click Submit change

    and I check musiconhold_additional.config

    [default]
    mode=files
    directory=/var/lib/asterisk/mohmp3/acc_1/
    [uptemposmoothjazz]
    mode=files
    directory=/uptemposmoothjazz/
    [none]
    mode=files
    directory=/.nomusic_reserved

    Nothing is update or delet ?///

    How to do now ??/
     
  11. tataghost

    Joined:
    Apr 1, 2010
    Messages:
    46
    Likes Received:
    0
    plz i have elastix 2.00 36 i want to use this but in my elastix version how to do it ?
     
  12. fmvillares

    Joined:
    Sep 8, 2007
    Messages:
    1,785
    Likes Received:
    0
    reading...search in google about streaming radio +asterisk
     
  13. mostafa33

    Joined:
    May 25, 2010
    Messages:
    121
    Likes Received:
    0
    i have tried the steps in:
    http://www.elastixconnection.com/index. ... Itemid=109

    then used the MOH on a queue but no sound i can hear in the waiting of this queue,
    i tried to execute the command :

    /usr/bin/mpg123 -q -s --mono -r 8000 -f 8192 -b 0 http://188.165.12.67:8018


    but i face the follwoing error:


    Error: unknown mpeg MIME type audio/aacp - is it perhaps a playlist (use -@)?
    Error: If you know the stream is mpeg1/2 audio, then please report this as mpg123 bug



    any idea??
     
  14. fmvillares

    Joined:
    Sep 8, 2007
    Messages:
    1,785
    Likes Received:
    0
    Re: Re:MOH - Streaming Internet Radio

    do u have compiled mpg123?
     
  15. mostafa33

    Joined:
    May 25, 2010
    Messages:
    121
    Likes Received:
    0
    Re: Re:MOH - Streaming Internet Radio

    the problem solved by using MP3 channel stream, but how can i use a varity of streams??
     
  16. netaires

    Joined:
    Apr 13, 2010
    Messages:
    218
    Likes Received:
    1
    Hello. A time had set up an online radio as MOH.
    I noticed the following problem. If for any problems we ran out of internet service MOH remains silent. If someone calls means that our line does not work and ends up cutting off the call.
    MOH research could be configured as a local radio station by entering the Audio Line-In on the motherboard.
     
  17. fmvillares

    Joined:
    Sep 8, 2007
    Messages:
    1,785
    Likes Received:
    0
    Re: Re:MOH - Streaming Internet Radio

    the 2 options are really vaild ones...
     
  18. mostafa33

    Joined:
    May 25, 2010
    Messages:
    121
    Likes Received:
    0
    Re: Re:MOH - Streaming Internet Radio

    netaires escribió:
    please give me more details about "entering the Audio Line-In on the motherboard" ?
     
  19. netaires

    Joined:
    Apr 13, 2010
    Messages:
    218
    Likes Received:
    1
  20. itche

    Joined:
    May 3, 2010
    Messages:
    7
    Likes Received:
    0

Share This Page