Browse files

WHISTLE-42: Endpoint is already bound

  • Loading branch information...
1 parent 766102a commit a376b5fca4630ec825ae13faa91f7cbd7112e40d @k-anderson k-anderson committed Oct 6, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 whistle_apps/apps/callflow/src/module/cf_resources.erl
View
10 whistle_apps/apps/callflow/src/module/cf_resources.erl
@@ -96,11 +96,11 @@ create_endpoint(DestNum, JObj, Call) ->
,(wh_json:get_value(<<"suffix">>, JObj, <<>>))/binary
,$@ ,(wh_json:get_value(<<"server">>, JObj))/binary>>,
lager:debug("attempting resource ~s", [Rule]),
- Endpoint = case cf_endpoint:get(Call) of
- {ok, J} -> J;
- {error, _} -> wh_json:new()
- end,
- ForceFax = case wh_json:is_true([<<"media">>, <<"fax_option">>], Endpoint) of
+ AuthdEndpoint = case cf_endpoint:get(Call) of
+ {ok, J} -> J;
+ {error, _} -> wh_json:new()
+ end,
+ ForceFax = case wh_json:is_true([<<"media">>, <<"fax_option">>], AuthdEndpoint) of
false -> undefined;
true -> <<"peer">>
end,

0 comments on commit a376b5f

Please sign in to comment.