holding_bridge: ensure moh participants get frames
authorJonathan Rose <jrose@digium.com>
Thu, 16 Jul 2015 17:16:25 +0000 (12:16 -0500)
committerJonathan Rose <jrose@digium.com>
Tue, 28 Jul 2015 22:07:14 +0000 (17:07 -0500)
commit687597ca8c2412f79b79f9b13e17f3ec0ff0ce0c
tree9b188ffb3c5dabb0e6e81e1690e428fa79c887c7
parent309dd2a4090ccdd1ea31d8d5415a645daddd3883
holding_bridge: ensure moh participants get frames

Currently, if a blank musiconhold.conf is used, musiconhold will fail
to start for a channel going into a holding bridge with an anticipation
of getting music on hold. That being the case, no frames will be written
to the channel and that can pose a problem for blind transfers in PJSIP
which may rely on frames being written to get past the REFER framehook.
This patch makes holding bridges start a silence generator if starting
music on hold fails and makes it so that if no music on hold functions
are installed that the ast_moh_start function will report a failure so
that consumers of that function will be able to respond appropriately.

ASTERISK-25271 #close

Change-Id: I06f066728604943cba0bb0b39fa7cf658a21cd99
(cherry picked from commit 8458b8d441c2f4143ff135163ff3da4f88fe14c8)
bridges/bridge_holding.c
main/channel.c