From 8449d1f100f72d73a601cc35bb184e199669d181 Mon Sep 17 00:00:00 2001 From: karl anderson Date: Tue, 24 Jul 2012 02:08:38 +0000 Subject: [PATCH] WHISTLE-42: fix the logic for callback --- whistle_apps/apps/callflow/src/module/cf_park.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/whistle_apps/apps/callflow/src/module/cf_park.erl b/whistle_apps/apps/callflow/src/module/cf_park.erl index 775c27e57e8..d81abae77bc 100644 --- a/whistle_apps/apps/callflow/src/module/cf_park.erl +++ b/whistle_apps/apps/callflow/src/module/cf_park.erl @@ -491,11 +491,11 @@ wait_for_pickup(SlotNumber, RingbackId, Call) -> case whapps_call_command:b_hold(?DEFAULT_RINGBACK_TM, Call) of {error, timeout} -> TmpCID = <<"Parking slot ", SlotNumber/binary>>, - Hungup = case whapps_call_command:channel_status(Call) of - {ok, _} -> false; - {error, _} -> true + ChannelUp = case whapps_call_command:channel_status(Call) of + {ok, _} -> true; + {error, _} -> false end, - case Hungup andalso ringback_parker(RingbackId, SlotNumber, TmpCID, Call) of + case ChannelUp andalso ringback_parker(RingbackId, SlotNumber, TmpCID, Call) of answered -> lager:debug("parked caller ringback was answered"), cf_exe:continue(Call);