[Home]

Summary:ASTERISK-10735: Restart of MOH doesn't work
Reporter:Sergey Tamkovich (sergee)Labels:
Date Opened:2007-11-10 15:03:31.000-0600Date Closed:2011-06-07 14:08:05
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Resources/res_musiconhold
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Dialplan :

[default]

exten => 1111,1,Set(CHANNEL(musicclass)=default)
exten => 1111,2,Answer()
exten => 1111,3,StartMusicOnHold()
exten => 1111,4,Wait(15)
exten => 1111,5,StopMusicOnHold()
exten => 1111,6,Wait(5)
exten => 1111,7,StartMusicOnHold()


Doesn't work:

   -- Executing [1111@default:1] Set("SIP/serg-082242b8", "CHANNEL(musicclass)=default") in new stack
   -- Executing [1111@default:2] Answer("SIP/serg-082242b8", "") in new stack
   -- Executing [1111@default:3] StartMusicOnHold("SIP/serg-082242b8", "") in new stack
   -- Started music on hold, class 'default', on SIP/serg-082242b8
   -- Executing [1111@default:4] Wait("SIP/serg-082242b8", "15") in new stack
   -- Executing [1111@default:5] StopMusicOnHold("SIP/serg-082242b8", "") in new stack
   -- Stopped music on hold on SIP/serg-082242b8
   -- Executing [1111@default:6] Wait("SIP/serg-082242b8", "5") in new stack
   -- Executing [1111@default:7] StartMusicOnHold("SIP/serg-082242b8", "") in new stack
   -- Started music on hold, class 'default', on SIP/serg-082242b8
   -- Auto fallthrough, channel 'SIP/serg-082242b8' status is 'UNKNOWN'
   -- Stopped music on hold on SIP/serg-082242b8



It fails to execute

exten => 1111,7,StartMusicOnHold()

and disconnects the call.

****** ADDITIONAL INFORMATION ******

Disconnect happens somewhere inside this call:

ast_activate_generator(chan, &moh_file_stream, mohclass);
Comments:By: Mark Michelson (mmichelson) 2007-11-10 22:19:56.000-0600

I tried this using the same dialplan you provided and had the same results. However, if I add

exten => 800,8,Wait(15)

at the end, the restart of music on hold works as expected. What's happening here is that the music on hold is successfully restarting, but since you're at the end of the dialplan, it doesn't actually have a chance to play. This is simply a misconfiguration, not a bug. Closing.