From 2f829bda4db4d04334b240540502a26cbb91f979 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Wed, 11 Nov 2015 19:18:38 +0100 Subject: More macros --- src/pbx_rose.erl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pbx_rose.erl b/src/pbx_rose.erl index b937115..40bf76d 100644 --- a/src/pbx_rose.erl +++ b/src/pbx_rose.erl @@ -16,8 +16,10 @@ init(_Args) -> {ok, {present, 0}}. -handle_event({invoke, Invoke = #'Invoke'{invokeId = Id, opcode = ?STATUS, argument = Data}}, _State) -> - case pbx_status:decode(Data) of +handle_event({invoke, Invoke = ?INVOKE(Id, ?STATUS, Data)}, _State) -> + Status = pbx_status:decode(Data), + io:format("Status: ~p~n", [Status]), + case Status of normal -> reply(Invoke, pbx_status:encode()); _ -> -- cgit v1.2.3