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 CHANNEL_CALLER_ID = 'ChannelCallerId'; |
||
39 | const CHANNEL_CREATED = 'ChannelCreated'; |
||
40 | const CHANNEL_CONNECTED_LINE = 'ChannelConnectedLine'; |
||
41 | const CHANNEL_DESTROYED = 'ChannelDestroyed'; |
||
42 | const CHANNEL_DTMF_RECEIVED = 'ChannelDtmfReceived'; |
||
43 | const CHANNEL_ENTERED_BRIDGE = 'ChannelEnteredBridge'; |
||
44 | const CHANNEL_HANGUP_REQUEST = 'ChannelHangupRequest'; |
||
45 | const CHANNEL_LEFT_BRIDGE = 'ChannelLeftBridge'; |
||
46 | const CHANNEL_STATE_CHANGED = 'ChannelStateChanged'; |
||
47 | const CHANNEL_TALKING_FINISHED = 'ChannelTalkingFinished'; |
||
48 | const CHANNEL_TALKING_STARTED = 'ChannelTalkingStarted'; |
||
49 | const CHANNEL_USEREVENT = 'ChannelUserevent'; |
||
50 | const CHANNEL_VARSET = 'ChannelVarset'; |
||
51 | const DEVICE_STATE_CHANGE = 'DeviceStateChange'; |
||
52 | const DIAL = 'Dial'; |
||
53 | const DIALED = 'Dialed'; |
||
54 | const ENDPOINT_STATE_CHANGE = 'EndpointStateChange'; |
||
55 | const PLAYBACK_FINISHED = 'PlaybackFinished'; |
||
56 | const PLAYBACK_STARTED = 'PlaybackStarted'; |
||
57 | const RECORDING_FAILED = 'RecordingFailed'; |
||
58 | const RECORDING_FINISHED = 'RecordingFinished'; |
||
59 | const RECORDING_STARTED = 'RecordingStarted'; |
||
60 | const STASIS_END = 'StasisEnd'; |
||
61 | const STASIS_START = 'StasisStart'; |
||
62 | const TEXT_MESSAGE_RECEIVED = 'TextMessageReceived'; |
||
63 | |||
64 | /** |
||
65 | * @var AriClient |
||
66 | */ |
||
67 | protected $client; |
||
68 | |||
69 | /** |
||
70 | * @var string Name of the application receiving the event. |
||
71 | */ |
||
72 | private $application; |
||
73 | |||
74 | /** |
||
75 | * @var DateTime (optional) - Time at which this event was created. |
||
76 | */ |
||
77 | private $timestamp; |
||
78 | |||
79 | /** |
||
80 | * @return string Name of the application receiving the event. |
||
81 | */ |
||
82 | public function getApplication() |
||
86 | |||
87 | /** |
||
88 | * @return \DateTime (optional) - Time at which this event was created. |
||
89 | */ |
||
90 | public function getTimestamp() |
||
94 | |||
95 | /** |
||
96 | * @param AriClient $client |
||
97 | * @param string $response |
||
98 | */ |
||
99 | 38 | public function __construct(AriClient $client, $response) |
|
108 | } |
||
109 |