Skip to content

Commit

Permalink
hotornot not returning any rates
Browse files Browse the repository at this point in the history
couchbeam:fetch accepts list of binaries in 'keys' option
 | {keys, list(binary())}
  • Loading branch information
lazedo committed Feb 16, 2014
1 parent b633b71 commit 6d0cf18
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions applications/hotornot/src/hon_util.erl
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ find_candidate_rates(DID, _) ->
build_keys(<<"+", E164/binary>>) ->
build_keys(E164);
build_keys(<<D:1/binary, Rest/binary>>) ->
build_keys(Rest, D, [wh_util:to_integer(D)]).
build_keys(Rest, D, [D]).

build_keys(<<D:1/binary, Rest/binary>>, Prefix, Acc) ->
build_keys(Rest, <<Prefix/binary, D/binary>>, [wh_util:to_integer(<<Prefix/binary, D/binary>>) | Acc]);
build_keys(Rest, <<Prefix/binary, D/binary>>, [<<Prefix/binary, D/binary>> | Acc]);
build_keys(<<>>, _, Acc) -> Acc.

%% Given a list of rates, return the list of rates whose routes regexes match the given E164
Expand Down

0 comments on commit 6d0cf18

Please sign in to comment.