From f1c92b43a828dccc79d485a457274d8eb8acfb0b Mon Sep 17 00:00:00 2001 From: Alan R Evans Date: Tue, 7 Jul 2020 13:49:33 +0000 Subject: [PATCH] And also it looks like when we originate a call from Kazoo and "park" the call FS bridges the call to loopback so the test ecallmg_fs_channel:is_bridged() returns true even though it is only bridged to itself. When we then play a message to the Agent it causes ecallmgr_call_command:play() to use "broadcast" rather than "playback". And therefore the CHANNEL_EXECUTE_COMPLETE "FILE PLAYED" event is again blocked and instead only the "BROADCAST SENT" is received but this is received before the file is played and can't be used as a trigger to continue the call setup. This fixes the problem by ignoring bridge to loopback but may not be the right way to fix it. --- applications/ecallmgr/src/ecallmgr_fs_channel.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/applications/ecallmgr/src/ecallmgr_fs_channel.erl b/applications/ecallmgr/src/ecallmgr_fs_channel.erl index 804e2559cda..6206ef6a33e 100644 --- a/applications/ecallmgr/src/ecallmgr_fs_channel.erl +++ b/applications/ecallmgr/src/ecallmgr_fs_channel.erl @@ -136,7 +136,8 @@ is_bridged(UUID) -> ], case ets:select(?CHANNELS_TBL, MatchSpec) of ['undefined'] -> lager:debug("channel is not bridged"), 'false'; - [Bin] when is_binary(Bin) -> lager:debug("is bridged to: ~s", [Bin]), 'true'; + [Bin] when is_binary(Bin) + andalso Bin =/= UUID -> lager:debug("is bridged to: ~s", [Bin]), 'true'; _E -> lager:debug("not bridged: ~p", [_E]), 'false' end.