Index: res/res_musiconhold.c =================================================================== --- res/res_musiconhold.c (revision 103679) +++ res/res_musiconhold.c (working copy) @@ -983,6 +983,8 @@ if (chan->music_state) { if (chan->stream) { + /* Give embedded frame time to get passed before we deallocate its containing structure. */ + usleep(1); ast_closestream(chan->stream); chan->stream = NULL; }