login | register
Wed 01 of Aug, 2007 [09:24 UTC]

voip-info.org

Search with Google
Search this site with Google. Results may not include recent changes.

Web www.voip-info.org
Shoutbox
  • Aykut, Wed 01 of Aug, 2007 [07:53 UTC]: Hi all, does anybody know about Thomson ST2030 SIP phone. I have upgraded it to latest version (1.56) but "Hold" and "Conf" features are not working after the upgrade ?? Do you know any solution or do you have Ver. 1.52 ?? Where can I find it?
  • Edward J Brown, Tue 31 of Jul, 2007 [23:33 UTC]: Has anybody experienced Choppy voice quality when using a Linksys SPA942 in an Asterisk Conference bridge? It works fine with my polycom and Cisco, but sucks with my Linksys.
  • www.astawerks.com, Fri 27 of Jul, 2007 [18:00 UTC]: does anyone use asterisk on top of clark connect? does it work good?
  • simon, Fri 27 of Jul, 2007 [14:16 UTC]: Hi All, Has anyone here managed to get the Cisco79x1 to successfully fail over to the backup proxy. I have 2 asterisk servers , handsets all register and function, except that backup proxy function doesn't work. Any working example would be very apprecia
  • Matthew Richmond, Thu 26 of Jul, 2007 [03:40 UTC]: using the page() application to page across our building...often the meetme conferences don't disconnect after the caller hangs up. Anyone else having this problem. (using Polycom phones)
  • Matthew Richmond, Wed 25 of Jul, 2007 [02:58 UTC]: thanks Nicholas Blasgen! I haven't worked with AGI before, but there's always a first! Thanks again!
  • Nicholas Blasgen, Tue 24 of Jul, 2007 [19:18 UTC]: Matthew Richmond, AGI will handle all that for you.
  • sam, Mon 23 of Jul, 2007 [16:39 UTC]: need help - certain voicemail extension will stop working and recording voicemail on asterisk - anyone know why and how to fix it? Thanks
  • john haji, Mon 23 of Jul, 2007 [14:55 UTC]: free calls to pakistan
  • bong, Sat 21 of Jul, 2007 [19:09 UTC]: hi good day to all can anyone help me how to configured the nortel sip to the signaling server and how to activate in mobile w/ sip compatible without mcs
Server Stats
  • Execution time: 0.38s
  • Memory usage: 2.25MB
  • Database queries: 29
  • GZIP: Disabled
  • Server load: 3.04

Asterisk cmd MusicOnHold

Synopsis

Play Music On Hold indefinitely.

Description

   MusicOnHold([class])

Plays hold music specified by class. If omitted, the default music source for the channel will be used. If you have configured MusicOnHold in musiconhold.conf it will get played automatically if the extension is put on hold. This command FORCES musiconhold music.

The default MusicOnHold class is set with the SetMusicOnHold command.

Example

Extension defined in extensions.conf with "forced" MusicOnHold. Remember to Answer before letting the music pour down the line. Otherwise music on hold will not work correctly.
   ; Answer required as Music On Hold does not answer the call
   exten => 6000,1,Answer
   exten => 6000,2,MusicOnHold()

It is often useful to turn off music on hold in several situations:
  1. when a particular extension calls (originates)
  2. when connectiong to a particular extension
  3. when traversing a particularly expensive network
  4. when connecting to a conference


(So, how do we do handle each situation?)

You can turn off MOH on a per call by using the SetMusicOnHold command.

Add a new class to musiconhold.conf
   [none]
   mode=files
   directory=/dev/null

Create a macro in extensions.conf to turn off MOH
   [macro-nomusic]
   exten => s,1,NoOp(Turn off MOH for this channel)
   exten => s,2,SetMusicOnHold(none)

Now call this macro when you dial an extension
    exten => 7020,1,NoOp(Dial -> IAX2/outbound/${EXTEN})
    exten => 7020,n,Dial(IAX2/outbound/${EXTEN},,M(nomusic))
    exten => 7020,n,Hangup

play-fifo (3rd party addition)

This small C program will create if necessary, open and listen on a fifo for slinear audio and delivers it to STDOUT. If STDOUT is blocking, it discards the data. The idea is that you would use it in a custom class in res_musiconhold. Now you can use whatever means you choose in a seperate process to deliver raw 8khz mono slin to the fifo which will be heard as the music class fifo. An example would be to play your line-in into the fifo and the buffer will not overflow because this program does a poll on the STDOUT and discards STDIN when STDOUT is busy.
You can find it here, it is not part of the Asterisk distribution.

See also



Asterisk | Configuration | The Dialplan - extensions.conf | Dialplan Commands | Sound files

Created by oej, Last modification by Joao Pereira on Mon 18 of Jun, 2007 [17:20 UTC]

Comments Filter

My MOH isnt working.

by Mark Wahlman on Friday 15 of June, 2007 [03:34:44 UTC]
features
 
;MeetMeConferenceRoom 1
exten => 510,1,MeetMe(510,i,54321)

;MOH
exten => 520,n,MusicOnHold(default)

include = parkedcalls

Music on hold quality

by Paul Gentilini on Thursday 18 of January, 2007 [17:27:26 UTC]
I had some trouble with the music on hold quality and did the following:
Removed previous MPG123 which was in /usr/local

Installed different version of mpg123
1.) cd /usr/local
2.) wget http://superb-west.dl.sourceforge.net/sourceforge/mpg123/mpg123-0.59r-gpl.tar.gz
3.) tar zxvf mpg123-0.59r-gpl.tar.gz
4.) cd mpg123-0.59r-gpl
5.) make linux
6.) make install

Your etc/asterisk/musiconhold.conf configuration should look like the following:

;
; Music on Hold --
;

default
mode=quietmp3
directory=/var/lib/asterisk/mohmp3

Your /etc/asterisk/Zapata.conf should look something like the following:


channels
relaxdtmf=yes
; group 5
;
language=en
signalling=em_w
rxwink=300
switchtype=national
emdigitwait=2000
usecallerid=yes
threewaycalling=yes
transfer=yes
musiconhold=default
busydetect=no ;leave this on for detecting hangups
;jitterbuffers=10
;echocancel=yes
;echocancelwhenbridged=yes
group=5
channel => 1-24

You should also have at least one MP3 file on /var//lib/asterisk/mohmp3

Legal Requirements

by Jerry Locke on Friday 22 of September, 2006 [22:08:05 UTC]
Be sure to meet any legal requirements for music-on-hold.

I hope somebody with a legal background will comment on this because I really don't know. Are the three mp3 files included in the Asterisk distribution royalty-free or do we need to pay somebody for the right to use them in a production environment? (this is probably documented somewhere but I haven't found it yet) I do know the included files came from www.freeplaymusic.com and that the FAQ there mentions a licensing fee for music-on-hold usage, don't know if this is "grandfathered" for the three included files though. Ideas?

Cant turn it off , but can CHANGE it....

by G King on Wednesday 15 of February, 2006 [18:52:27 UTC]
I wanted to have my FAX line to ring instead of music on hold so that it does not confuse any fax machines with the music. Here is what i came up with to change it in my stealth auto attendant:

exten => 111,1,Zapateller(answer|nocallerid)
exten => 111,2,SetMusicOnHold(default)
exten => 111,3,DigitTimeout,3
exten => 111,4,ResponseTimeout,3
exten => 111,5,Background(custom/welcome)

exten => 0,1,Dial(local/420@from-internal,35,m)
exten => 0,2,VoiceMail(420@default)
exten => 0,3,Hangup
exten => 1,1,Dial(local/499@from-internal,20,m)
exten => 1,2,Hangup
exten => 7,1,Authenticate(1234)
exten => 7,2,DISA(no-password|from-internal)

In the Dial lines above (exten => 1,1,Dial(local/499@from-internal,20,m) the last "m" denotes play music while waiting, by simply changing the "m" to an "r" it will pass the regualr ring tone instead of music, like this:

(exten => 1,1,Dial(local/499@from-internal,20,r)

Worked great!

Cerebral

Cant turn it off , but can CHANGE it....

by G King on Wednesday 15 of February, 2006 [18:50:01 UTC]
I wanted to have my FAX line to ring instead of music on hold so that it does not confuse any fax machines with the music. Here is what i came up with to change it in my stealth auto attendant:

exten => 111,1,Zapateller(answer|nocallerid)
exten => 111,2,SetMusicOnHold(default)
exten => 111,3,DigitTimeout,3
exten => 111,4,ResponseTimeout,3
exten => 111,5,Background(custom/welcome)

exten => 0,1,Dial(local/420@from-internal,35,m)
exten => 0,2,VoiceMail(420@default)
exten => 0,3,Hangup
exten => 1,1,Dial(local/499@from-internal,20,m)
exten => 1,2,Hangup
exten => 7,1,Authenticate(1234)
exten => 7,2,DISA(no-password|from-internal)

In the Dial lines above (exten => 1,1,Dial(local/499@from-internal,20,m) the last "m" denotes play music while waiting, by simply changing the "m" to an "r" it will pass the regualr ring tone instead of music, like this:

(exten => 1,1,Dial(local/499@from-internal,20,r)

Worked great!

Cerebral

Turn OFF Music on Hold

by Russell on Friday 27 of January, 2006 [02:06:00 UTC]
Well, there's plenty of talk about how to turn MOH ON, but I see nothing on how to TURN IT OFF! I'd like to turn it off on certain phones, so as to not put out music when I happen to be on a conference call. But, I'd settle for completely turning it off, if I can't individually control it.

Ideas?

MusicOnHold never triggered!

by avizion on Thursday 29 of July, 2004 [12:41:30 UTC]
My system is Debian3 running 2.6.7 with Asterisk CVS-HEAD-07/23/04-11:30:06.

For some reason my MOH was never triggered when anyone called either of my 5 queues. I tried all setting I could think off before I turned to the mailing list.

I used some hours on this - so I hope this can help others...

This is a snippet from my mail at the asterisk-users mailing list (Link to archive):

It seems that the script /usr/sbin/safe_asterisk is never replaced when you "make install" in asterisk. While it's nice that your own hacks are preserved, I think it would be a lot nicer to have a warning if that file was updated since your last install - and it could simply backup your existing safe_asterisk and replace it with the updated version.

I did not actually find out the real reason why that safe_asterisk script did not work in the first place. Maybe someone more experienced can answer that better.

Solution: replacing the safe_asterisk with whatever HEAD version I had downloaded last made "everything" (about MOH) work.

Or: Simply run asterisk manually and/or with your own "safe" wrapper.
Edit

Re: mpg123 ver. 0.59s

by Anonymous on Monday 12 of July, 2004 [22:49:52 UTC]
mpg123 0.59s has broken -f (scaling) processing.

asterisk passes -f 32768 and -r 8000. currently only passing it -f 1 seems to work (to version 0.59s). I have not tested to see if the -r 8000 parameter is part of the problem or not.

asterisk has no current way to change the -f parameter to 1, besides a source code change. I could not find out where the problem lay in mpg123-0.59s, as the changes (between 0.59s and 0.59r) that I spotted seemed benign.

in anycase 0.59r does work with the current asterisk code. I would like to see an overhaul in the MOH options. Like being able to specify your entire commandline (so that you can run OGG files or whatever).
Edit

mpg123 ver. 0.59s

by Anonymous on Sunday 23 of May, 2004 [02:38:47 UTC]
mpg123 version 0.59s sounded bad (too loud, distorted)
Version 0.59r works fine.

mpg123

by kentec on Tuesday 30 of December, 2003 [17:10:59 UTC]
On my system at least, mpg321 will _not_ work as mpg123.

Please update this page with new information, just login and click on the "Edit" or "Add Comment" button above. Get a free login here: Register Thanks! - support@voip-info.org

Page Changes | Comments

Sponsored by:

Terms of Service Privacy Policy
© 2003-2007 Arte Marketing, Inc.

Powered by bitweaver