1 | <?php |
||
29 | class Event extends Message implements EventInterface |
||
30 | { |
||
31 | // ARI events |
||
32 | const APPLICATION_REPLACED = 'ApplicationReplaced'; |
||
33 | const BRIDGE_ATTENDED_TRANSFER = 'BridgeAttendedTransfer'; |
||
34 | const BRIDGE_BLIND_TRANSFER = 'BridgeBlindTransfer'; |
||
35 | const BRIDGE_CREATED = 'BridgeCreated'; |
||
36 | const BRIDGE_DESTROYED = 'BridgeDestroyed'; |
||
37 | const BRIDGE_MERGED = 'BridgeMerged'; |
||
38 | const BRIDGE_VIDEO_SOURCE_CHANGED = 'BridgeVideoSourceChanged'; |
||
39 | const CHANNEL_CALLER_ID = 'ChannelCallerId'; |
||
40 | const CHANNEL_CREATED = 'ChannelCreated'; |
||
41 | const CHANNEL_CONNECTED_LINE = 'ChannelConnectedLine'; |
||
42 | const CHANNEL_DESTROYED = 'ChannelDestroyed'; |
||
43 | const CHANNEL_DIALPLAN = 'ChannelDialplan'; |
||
44 | const CHANNEL_DTMF_RECEIVED = 'ChannelDtmfReceived'; |
||
45 | const CHANNEL_ENTERED_BRIDGE = 'ChannelEnteredBridge'; |
||
46 | const CHANNEL_HANGUP_REQUEST = 'ChannelHangupRequest'; |
||
47 | const CHANNEL_LEFT_BRIDGE = 'ChannelLeftBridge'; |
||
48 | const CHANNEL_STATE_CHANGE = 'ChannelStateChange'; |
||
49 | const CHANNEL_HOLD = 'ChannelHold'; |
||
50 | const CHANNEL_UNHOLD = 'ChannelUnhold'; |
||
51 | const CHANNEL_TALKING_FINISHED = 'ChannelTalkingFinished'; |
||
52 | const CHANNEL_TALKING_STARTED = 'ChannelTalkingStarted'; |
||
53 | const CHANNEL_USEREVENT = 'ChannelUserevent'; |
||
54 | const CHANNEL_VARSET = 'ChannelVarset'; |
||
55 | const DEVICE_STATE_CHANGED = 'DeviceStateChanged'; |
||
56 | const DIAL = 'Dial'; |
||
57 | const DIALED = 'Dialed'; |
||
58 | const ENDPOINT_STATE_CHANGE = 'EndpointStateChange'; |
||
59 | const PEER_STATUS_CHANGE = 'PeerStatusChange'; |
||
60 | const PLAYBACK_CONTINUING = 'PlaybackContinuing'; |
||
61 | const PLAYBACK_FINISHED = 'PlaybackFinished'; |
||
62 | const PLAYBACK_STARTED = 'PlaybackStarted'; |
||
63 | const RECORDING_FAILED = 'RecordingFailed'; |
||
64 | const RECORDING_FINISHED = 'RecordingFinished'; |
||
65 | const RECORDING_STARTED = 'RecordingStarted'; |
||
66 | const STASIS_END = 'StasisEnd'; |
||
67 | const STASIS_START = 'StasisStart'; |
||
68 | const TEXT_MESSAGE_RECEIVED = 'TextMessageReceived'; |
||
69 | |||
70 | /** |
||
71 | * @var AriClient |
||
72 | */ |
||
73 | protected $client; |
||
74 | |||
75 | /** |
||
76 | * @var string Name of the application receiving the event. |
||
77 | */ |
||
78 | private $application; |
||
79 | |||
80 | /** |
||
81 | * @var DateTime (optional) - Time at which this event was created. |
||
82 | */ |
||
83 | private $timestamp; |
||
84 | |||
85 | /** |
||
86 | * @return string Name of the application receiving the event. |
||
87 | */ |
||
88 | public function getApplication() |
||
92 | |||
93 | /** |
||
94 | * @return \DateTime (optional) - Time at which this event was created. |
||
95 | */ |
||
96 | public function getTimestamp() |
||
100 | |||
101 | /** |
||
102 | * @param AriClient $client |
||
103 | * @param string $response |
||
104 | */ |
||
105 | public function __construct(AriClient $client, $response) |
||
114 | } |
||
115 |