Skip to content

Commit

Permalink
WHISTLE-42: only start call event queues on route requests
Browse files Browse the repository at this point in the history
  • Loading branch information
k-anderson committed Mar 5, 2012
1 parent a6e1eb4 commit 9a18e4e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ecallmgr/src/ecallmgr_call_control.erl
Expand Up @@ -318,7 +318,7 @@ handle_cast({transferee, JObj}, #state{other_legs=Legs, node=Node, callid=PrevCa
?LOG("...call id updated, continuing post-transfer"),
{noreply, State#state{callid=NewCallId, other_legs=lists:delete(NewCallId, Legs)}}
end;
handle_cast({add_leg, JObj}, #state{other_legs=Legs, node=Node, callid=CallId}=State) ->
handle_cast({add_leg, JObj}, #state{other_legs=Legs, callid=CallId}=State) ->
LegId = case wh_json:get_value(<<"Event-Name">>, JObj) of
<<"CHANNEL_BRIDGE">> ->
wh_json:get_value(<<"Other-Leg-Unique-ID">>, JObj);
Expand All @@ -333,8 +333,6 @@ handle_cast({add_leg, JObj}, #state{other_legs=Legs, node=Node, callid=CallId}=S
_ = put(callid, CallId),
publish_leg_addition(JObj)
end),
?LOG("ensuring event listener for leg ~s exists", [LegId]),
_ = ecallmgr_call_sup:start_event_process(Node, LegId),
{noreply, State#state{other_legs=[LegId|Legs]}}
end;
handle_cast({rm_leg, JObj}, #state{other_legs=Legs, callid=CallId}=State) ->
Expand Down

0 comments on commit 9a18e4e

Please sign in to comment.