Summary:ASTERISK-06238: Ability to rewind the musiconhold
Reporter:Dan Journo (kesher)Labels:
Date Opened:2006-02-02 08:46:46.000-0600Date Closed:2011-06-07 14:03:07
Versions:Frequency of
Description:We'd like to be able to begin dialling while playing a welcome message and then playing music. We can create two mp3 files for MoH, but we have no way to rewind the MoH to the Welcome message Mp3. A caller may be placed on Hold while the music.mp3 is playing so they wont hear the welcome mp3 for a few minutes.
Comments:By: Matt O'Gorman (mogorman) 2006-02-02 10:41:19.000-0600

why not just play the welcome message first and then play music on hold??

By: Dan Journo (kesher) 2006-02-02 10:52:07.000-0600

Because the extension takes around 30 seconds to answer.
So if we can dial before or while playing the welcome message, then by the time the MoH begins playing, the caller has already waited 10 seconds.

By: Dan Journo (kesher) 2006-02-02 14:17:57.000-0600

Ok, feel like im getting somewhere, but i need some help.

When asterisk loads, it says this:-

[res_musiconhold.so] => (Music On Hold Resource)
 == Registered application 'MusicOnHold'
 == Registered application 'WaitMusicOnHold'
 == Registered application 'SetMusicOnHold'
 == Registered application 'StartMusicOnHold'
 == Registered application 'StopMusicOnHold'
 == Parsing '/etc/asterisk/musiconhold.conf': Found

But what exactly do 'StartMusicOnHold' and 'StopMusicOnHold' do?
Can they be used to restart the MoH to the beginning of the mp3 list?

By: Jason Parker (jparker) 2006-02-02 17:54:33.000-0600

So, you just need to play a message to the callee before connecting the two channels?  Sounds like a job for the A() option to Dial().

By: Tilghman Lesher (tilghman) 2006-02-02 23:56:35.000-0600

north:  the A() option plays a message to the called party, not to the caller.

kesher:  StartMusicOnHold and StopMusicOnHold starts and stops the music, without ever actually placing a call on hold.  If you're really looking for a message, I'd suggest that you create a looping music class that repeats the message every 15 seconds or so.  Music on hold is designed to offer a single track for however many calls are listening at any one time (i.e. everybody hears the same thing).  This is considered a feature request and as such, it will be closed.  If you are really interested in this feature, I would suggest placing a bounty for this request on the Wiki.