[Asterisk-Users] Music on hold problem

John Howard john.howard at adelix.com
Wed Sep 8 01:39:15 MST 2004


Have you tried running mpg123 from the command line?

I found that it was failing to load the mp3 cos it couldn’t open /dev/dsp.

If this is the case, then I found the following worked, although it is a
little OTT I guess...

If you have a soundcard in the machine try insmod'ing a driver for it and
then as root, run 'rm -f /dev/dsp*' and then '/dev/MAKEDEV audio'.

If you don’t have a soundcard then try just loading the sound module, that
might just be enough.

Then try again.  Ensure you stop and start asterisk again to ensure MOH
reinitialises properly.

jd

-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Karim Mardhani
Sent: 08 September 2004 05:02
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [Asterisk-Users] Music on hold problem

  Hi All:

  I am having problems with getting music on hold to work.  I get following
error

  Executing SetMusicOnHold("SIP/2000-2ddf", "default") in new stack
      -- Executing Answer("SIP/2000-2ddf", "") in new stack
      -- Executing WaitMusicOnHold("SIP/2000-2ddf", "30") in new stack
  Sep  7 15:50:47 WARNING[1190886320]: res_musiconhold.c:329 moh1_exec:
Unable to start music on hold (class '30') on channel SIP/2000-2ddf
    == Spawn extension (from-sip, 4999, 3) exited non-zero on
'SIP/2000-2ddf'
  asterisk*CLI>

  I have made sure that I have mpg123 in /usr/bin.  The version of mpg123 I
have is 0.59r.   Following is my extension.conf:

  exten => 4999,1,SetMusicOnHold(default)
  exten => 4999,2,Answer
  exten => 4999,3,WaitMusicOnHold(30)
  exten => 4999,4,Hangup

  When I change WaitMusicOnHold with
MP3Player(/var/lib/asterisk/mohmp3/sample-hold.mp3) I can hear the
sample-hold file when I dail extension 4999.

  Do both MP3Player and MOH use mpg123?

  Any help in this regard would greatly be appreciated.

  Thanks

  Karim




_______________________________________________
Asterisk-Users mailing list
Asterisk-Users at lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


This message has been scanned for viruses by MailController -
www.MailController.altohiway.com

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.745 / Virus Database: 497 - Release Date: 27/08/2004
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.745 / Virus Database: 497 - Release Date: 27/08/2004
 




More information about the asterisk-users mailing list