Permalink
Browse files

WHISTLE-42: use qos so we dont recieve multiple alerts for the same c…

…all id
  • Loading branch information...
1 parent 32e8284 commit f04dd84c5696197cbd179c9a6b80a345216cc7d7 @k-anderson k-anderson committed May 29, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 whistle_apps/apps/hangups/src/hangups_listener.erl
@@ -28,9 +28,9 @@
-define(RESPONDERS, [{{?MODULE, handle_cdr}, [{<<"call_detail">>, <<"cdr">>}]}]).
-define(BINDINGS, [{call, [{restrict_to, [cdr]}, {callid, <<"*">>}]}]).
--define(QUEUE_NAME, <<"">>).
--define(QUEUE_OPTIONS, []).
--define(CONSUME_OPTIONS, []).
+-define(QUEUE_NAME, <<"hangups_listener">>).
+-define(QUEUE_OPTIONS, [{exclusive, false}]).
+-define(CONSUME_OPTIONS, [{exclusive, false}]).
%%%===================================================================
%%% API
@@ -49,6 +49,7 @@ start_link() ->
,{queue_name, ?QUEUE_NAME}
,{queue_options, ?QUEUE_OPTIONS}
,{consume_options, ?CONSUME_OPTIONS}
+ ,{basic_qos, 1}
], []).
-spec handle_cdr/2 :: (wh_json:json_object(), proplist()) -> no_return().

0 comments on commit f04dd84

Please sign in to comment.