login | register
Wed 01 of Aug, 2007 [09:26 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.28s
  • Memory usage: 2.18MB
  • Database queries: 30
  • GZIP: Disabled
  • Server load: 2.56

Asterisk cmd SetMusicOnHold

Synopsis:

 Set default Music On Hold class

Description:

 SetMusicOnHold(class)

Sets the default class for music on hold for a given channel. When music on hold is activated, this class will be used to select which music is played.

NOTE: This sets what music the perticular channel will hear. Example:
  • Channel A calls extension for channel B
  • The dialplan executes SetMusicOnHold(music_A)
  • The dialplan Dials channel B, channel B answers and the call is bridged.
  • Channel B puts channel A on hold: channel A hears "music_A" hold music.
  • Channel A puts channel B on hold: channel B hears default hold music (which may or may not be "default" depending on your musiconhold.conf and channel conf file settings).

To set the music on hold for the channel that is being dialed, you must use the M (macro) flag from the Dial command.

[context_A]
exten=B,1,SetMusicOnHold(music_B) ; channel A is the active channel, so make it hear music_B
exten=B,1,Dial(SIP/channel_B,M(setmusiconhold,music_A))
exten=C,1,SetMusicOnHold(music_C)
exten=C,1,Dial(SIP/channel_C,M(setmusiconhold,music_A))

[context_B]
exten=A,1,SetMusicOnHold(music_A)
exten=A,1,Dial(SIP/channel_A,M(setmusiconhold,music_B))
exten=C,1,SetMusicOnHold(music_C)
exten=C,1,Dial(SIP/channel_C,M(setmusiconhold,music_B))

[context_C]
exten=B,1,SetMusicOnHold(music_B)
exten=B,1,Dial(SIP/channel_B,M(setmusiconhold,music_C))
exten=C,1,SetMusicOnHold(music_C)
exten=C,1,Dial(SIP/channel_C,M(setmusiconhold,music_C))

[macro-setmusiconhold]
exten=s,1,SetMusicOnHold(${ARG1}) ; channel B is the active channel, so make is hear music_A
exten=s,2,Set(MACRO_RESULT=)


This may seem backwards, however, if you remember that SetMusicOnHold sets the music that the active channel will hear, and not the music that it will play, that should help alleviate any confusion. In the example above, you want channel A to hear the music of channel B (music_B) and you want channel B to hear channel A's music (music A). So, when channel A puts channel B on hold, channel B hears channel A's hold music.

See also




Back to Asterisk - documentation of application commands
Created by oej, Last modification by flobi on Tue 17 of Apr, 2007 [17:54 UTC]

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