summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/pbx_rose.erl6
1 files 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());
_ ->