Koozali.org: home of the SME Server

MOH - MP3's

Offline Teviot

  • *
  • 610
  • +0/-0
MOH - MP3's
« on: August 30, 2010, 09:53:37 PM »
Hi All

I would like to try changing the MOH to some of my own choice of music instead of the default MOH that is installed with asterisk.

Have uploaded the mp3's and have found that asterisk reports format errors in the console with mp3's.  Do I need to change the file format of the mp3's to wav for is there another way of doing it?
Regards
M0GLJ
......................................................
I am new to SAIL SME Server v8b6 and have been using SME for many years.
I have already done some research and only ask questions if I still can't work it out.

Offline Franco

  • *
  • 1,171
  • +0/-0
    • http://contribs.org
Re: MOH - MP3's
« Reply #1 on: August 30, 2010, 10:46:53 PM »
Hi,
I just drop them under /var/lib/asterisk/moh/
I have no problems.

Best,

Offline Teviot

  • *
  • 610
  • +0/-0
Re: MOH - MP3's
« Reply #2 on: August 31, 2010, 12:54:32 AM »
I tried that and got this from the console.  I did remove the default MOH wav files to force the mp3 file

Code: [Select]
saint*CLI>
    -- Executing [400@internal:1] AGI("SIP/401-099e4a60", "selintra|OutCluster|400") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/selintra
    -- AGI Script Executing Application: (Set) Options: (CDR(accountcode)=callerCluster)
    -- AGI Script selintra completed, returning 0
    -- Executing [400@qrxvtmny:1] AGI("SIP/401-099e4a60", "selintra|InCall|") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/selintra
    -- AGI Script Executing Application: (Dial) Options: (SIP/400|45|tT)
    -- Called 400
    -- SIP/400-09a0e240 is ringing
    -- SIP/400-09a0e240 answered SIP/401-099e4a60
[Aug 31 08:53:22] WARNING[10617]: res_musiconhold.c:660 get_mohbyname: Music on Hold class 'default' not found
[Aug 31 08:53:22] WARNING[10617]: res_musiconhold.c:660 get_mohbyname: Music on Hold class 'default' not found
    -- AGI Script selintra completed, returning 0
  == Auto fallthrough, channel 'SIP/401-099e4a60' status is 'ANSWER'
    -- Executing [h@qrxvtmny:1] Hangup("SIP/401-099e4a60", "") in new stack
  == Spawn extension (qrxvtmny, h, 1) exited non-zero on 'SIP/401-099e4a60'
saint*CLI>
Regards
M0GLJ
......................................................
I am new to SAIL SME Server v8b6 and have been using SME for many years.
I have already done some research and only ask questions if I still can't work it out.

Offline Teviot

  • *
  • 610
  • +0/-0
Re: MOH - MP3's
« Reply #3 on: August 31, 2010, 12:56:51 AM »
helps if you don't change the file locations first.  Fix the file locations and the mp3 play with no problems


I would also like to setup and extension that plays the music from the MOH directory

Anyone got any ideas?
« Last Edit: August 31, 2010, 01:48:50 AM by teviot »
Regards
M0GLJ
......................................................
I am new to SAIL SME Server v8b6 and have been using SME for many years.
I have already done some research and only ask questions if I still can't work it out.

Offline ldkeen

  • *
  • 405
  • +0/-0
Re: MOH - MP3's
« Reply #4 on: September 01, 2010, 06:32:33 AM »
Quote
I would also like to setup and extension that plays the music from the MOH directory
From:
http://www.voip-info.org/wiki/view/Asterisk+config+musiconhold.conf#SetupextensioninextensionsconftotestMusi
Just create a custom app which contains the following:
Code: [Select]
exten => 6000,1,Answer
exten => 6000,2,MusicOnHold()
Change 6000 to what ever you want.
Regards, Lloyd

Offline Teviot

  • *
  • 610
  • +0/-0
Re: MOH - MP3's
« Reply #5 on: September 01, 2010, 07:00:09 AM »
Thanks Lloyd

That works the I wanted it to.  I noticed from the link you put in that some people are streaming from the internet.  That sound interesting too.

But looking at the different parts involved in setting that up, it seem a little to much past my capabilities.

Can you or someone else talk me though the process
Regards
M0GLJ
......................................................
I am new to SAIL SME Server v8b6 and have been using SME for many years.
I have already done some research and only ask questions if I still can't work it out.

Offline Franco

  • *
  • 1,171
  • +0/-0
    • http://contribs.org
Re: MOH - MP3's
« Reply #6 on: September 01, 2010, 04:31:04 PM »
« Last Edit: September 01, 2010, 11:33:27 PM by Franco »

Offline Teviot

  • *
  • 610
  • +0/-0
Re: MOH - MP3's
« Reply #7 on: September 01, 2010, 06:37:14 PM »
This is what I use:
http://www.757.org/~joat/wiki/index.php/Music_on_hold_-_configuration_alternative

Franco

Your suggestion uses /usr/bin/mpg123.  I don't have that and not sure how to install it.  Would you mind giving me information on where to get it and how to install it please.

Regards
M0GLJ
......................................................
I am new to SAIL SME Server v8b6 and have been using SME for many years.
I have already done some research and only ask questions if I still can't work it out.

Online Stefano

  • *
  • 10,894
  • +3/-0
Re: MOH - MP3's
« Reply #8 on: September 01, 2010, 08:54:20 PM »
Franco

Your suggestion uses /usr/bin/mpg123.  I don't have that and not sure how to install it.  Would you mind giving me information on where to get it and how to install it please.



setup Dag repo as per wiki instructions, then

Code: [Select]
yum --enablerepo=dag install mpg123

found after a little search with Google using "mpg123 centos4 rpm"

HTH

Offline Teviot

  • *
  • 610
  • +0/-0
Re: MOH - MP3's
« Reply #9 on: September 02, 2010, 06:04:42 AM »
setup Dag repo as per wiki instructions, then

Code: [Select]
yum --enablerepo=dag install mpg123

found after a little search with Google using "mpg123 centos4 rpm"

HTH

Stefano

Followed your instructions and the wiki instructions and got the following results

Code: [Select]
[root@saint ~]#
[root@saint ~]# /sbin/e-smith/db yum_repositories set dag repository \
> Name 'Dag - EL4' \
> BaseURL 'http://apt.sw.be/redhat/el4/en/$basearch/dag' \
> EnableGroups no \
> GPGCheck yes \
> GPGKey http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt \
> Visible no \
> Exclude freetype,htop,iptraf,rsync,syslinux \
> status disabled
[root@saint ~]# yum install mpg123 --enablerepo=dag                                                                          Loading "protect-packages" plugin
Loading "smeserver" plugin
Loading "installonlyn" plugin
Loading "fastestmirror" plugin


Error getting repository data for dag, repository not found
[root@saint ~]# yum install mpg123 --enablerepo=dag
Loading "protect-packages" plugin
Loading "smeserver" plugin
Loading "installonlyn" plugin
Loading "fastestmirror" plugin


Error getting repository data for dag, repository not found
[root@saint ~]# yum --enablerepo=dag install mpg123
Loading "protect-packages" plugin
Loading "smeserver" plugin
Loading "installonlyn" plugin
Loading "fastestmirror" plugin


Error getting repository data for dag, repository not found
[root@saint ~]#

Did I do something wrong or miss something?
Regards
M0GLJ
......................................................
I am new to SAIL SME Server v8b6 and have been using SME for many years.
I have already done some research and only ask questions if I still can't work it out.

Online Stefano

  • *
  • 10,894
  • +3/-0
Re: MOH - MP3's
« Reply #10 on: September 02, 2010, 07:35:37 AM »
did you run

Code: [Select]
signal-event yum-modify
?