summaryrefslogtreecommitdiff
path: root/src/pbx_monitor.erl
blob: 8b250fa9b3aee896dccfb1f774dda426c26d5061 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
-module(pbx_monitor).

-export([decode/1, encode/1, opcode/0]).

-include("opcodes.hrl").
-include("CSTA-monitor-start.hrl").
-include("CSTA-device-identifiers.hrl").

opcode() ->
	?MONITOR.

decode(Data) ->
	'CSTA-monitor-start':decode('MonitorStartResult', Data).

encode(Device) ->
	'CSTA-monitor-start':encode('MonitorStartArgument',
		#'MonitorStartArgument'{
			monitorObject = {deviceObject, #'DeviceID'{
				deviceIdentifier = Device }}}).