summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-11-11 19:18:38 +0100
committerDimitri Sokolyuk <demon@dim13.org>2015-11-11 19:18:38 +0100
commit2f829bda4db4d04334b240540502a26cbb91f979 (patch)
treee0684d380c3b7a42da98ebff69f45875fcf95721
parent4868c586a3ac3df13dc9e21c30d95c2efd52306d (diff)
More macros
-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());
_ ->