I was experiencing the following problem:
If enter and exit sounds are longer in duration (for example if they are set to play a caller name recording), then the announcement that plays on exit is mixed with the "alone-sound" and MOH. This is generally not a problem if the exit sound is just one "beep", but in all other cases it results in playing the announcements/MOH simultaneously and making them hard to understand.
This patch does the following:
- only starts MOH if no other file (both sync and async) is playing
- adds a variable "conference_permanent_wait_mod_moh" that controls the behavior of how the enter and exit sounds interact with the MOH when wait_mod is set. I will accept any shorter or better variable name suggestion.
Currently the enter sound interrupts the MOH, but the exit sound is mixed with the MOH. The "conference_permanent_wait_mod_moh" variable when set will always keep the MOH playing in "wait_mod conferences", even during enter/exit sounds. When not set, the current behavior (interrupt the MOH) for the enter sound is preserved and additionally the exit sound will now match this behavior as well. This should resolve the problem reported by the following user: http://lists.freeswitch.org/pipermail/freeswitch-users/2012-September/087717.html