1 | <?php |
||
30 | class BridgeAttendedTransfer extends Event implements IdentifiableEventInterface |
||
31 | { |
||
32 | /** |
||
33 | * @var string (optional) - Application that has been transferred into |
||
34 | */ |
||
35 | private $destinationApplication; |
||
36 | |||
37 | /** |
||
38 | * @var string (optional) - Bridge that survived the merge result |
||
39 | */ |
||
40 | private $destinationBridge; |
||
41 | |||
42 | /** |
||
43 | * @var Channel (optional) - First leg of a link transfer result |
||
44 | */ |
||
45 | private $destinationLinkFirstLeg; |
||
46 | |||
47 | /** |
||
48 | * @var Channel (optional) - Second leg of a link transfer result |
||
49 | */ |
||
50 | private $destinationLinkSecondLeg; |
||
51 | |||
52 | /** |
||
53 | * @var Bridge (optional) - Bridge that survived the threeway result |
||
54 | */ |
||
55 | private $destinationThreewayBridge; |
||
56 | |||
57 | /** |
||
58 | * @var Channel (optional) - Transferer channel that survived the threeway result |
||
59 | */ |
||
60 | private $destinationThreewayChannel; |
||
61 | |||
62 | /** |
||
63 | * @var string How the transfer was accomplished |
||
64 | */ |
||
65 | private $destinationType; |
||
66 | |||
67 | /** |
||
68 | * @var boolean Whether the transfer was externally initiated or not |
||
69 | */ |
||
70 | private $isExternal; |
||
71 | |||
72 | /** |
||
73 | * @var Channel (optional) - The channel that is replacing transferer_first_leg in the swap |
||
74 | */ |
||
75 | private $replaceChannel; |
||
76 | |||
77 | /** |
||
78 | * @var string The result of the transfer attempt |
||
79 | */ |
||
80 | private $result; |
||
81 | |||
82 | /** |
||
83 | * @var Channel (optional) - The channel that is being transferred to |
||
84 | */ |
||
85 | private $transferTarget; |
||
86 | |||
87 | /** |
||
88 | * @var Channel (optional) - The channel that is being transferred |
||
89 | */ |
||
90 | private $transferee; |
||
91 | |||
92 | /** |
||
93 | * @var Channel First leg of the transferer |
||
94 | */ |
||
95 | private $transfererFirstLeg; |
||
96 | |||
97 | /** |
||
98 | * @var Bridge (optional) - Bridge the transferer first leg is in |
||
99 | */ |
||
100 | private $transfererFirstLegBridge; |
||
101 | |||
102 | /** |
||
103 | * @var Channel Second leg of the transferer |
||
104 | */ |
||
105 | private $transfererSecondLeg; |
||
106 | |||
107 | /** |
||
108 | * @var Bridge (optional) - Bridge the transferer second leg is in |
||
109 | */ |
||
110 | private $transfererSecondLegBridge; |
||
111 | |||
112 | /** |
||
113 | * @return string (optional) - Application that has been transferred into |
||
114 | */ |
||
115 | public function getDestinationApplication() |
||
116 | { |
||
117 | return $this->destinationApplication; |
||
118 | } |
||
119 | |||
120 | /** |
||
121 | * @return string (optional) - Bridge that survived the merge result |
||
122 | */ |
||
123 | public function getDestinationBridge() |
||
124 | { |
||
125 | return $this->destinationBridge; |
||
126 | } |
||
127 | |||
128 | /** |
||
129 | * @return Channel (optional) - First leg of a link transfer result |
||
130 | */ |
||
131 | public function getDestinationLinkFirstLeg() |
||
132 | { |
||
133 | return $this->destinationLinkFirstLeg; |
||
134 | } |
||
135 | |||
136 | /** |
||
137 | * @return Channel (optional) - Second leg of a link transfer result |
||
138 | */ |
||
139 | public function getDestinationLinkSecondLeg() |
||
140 | { |
||
141 | return $this->destinationLinkSecondLeg; |
||
142 | } |
||
143 | |||
144 | /** |
||
145 | * @return Bridge (optional) - Bridge that survived the threeway result |
||
146 | */ |
||
147 | public function getDestinationThreewayBridge() |
||
148 | { |
||
149 | return $this->destinationThreewayBridge; |
||
150 | } |
||
151 | |||
152 | /** |
||
153 | * @return Channel (optional) - Transferer channel that survived the threeway result |
||
154 | */ |
||
155 | public function getDestinationThreewayChannel() |
||
156 | { |
||
157 | return $this->destinationThreewayChannel; |
||
158 | } |
||
159 | |||
160 | /** |
||
161 | * @return string How the transfer was accomplished |
||
162 | */ |
||
163 | public function getDestinationType() |
||
164 | { |
||
165 | return $this->destinationType; |
||
166 | } |
||
167 | |||
168 | /** |
||
169 | * @return boolean Whether the transfer was externally initiated or not |
||
170 | */ |
||
171 | public function isExternal() |
||
172 | { |
||
173 | return $this->isExternal; |
||
174 | } |
||
175 | |||
176 | /** |
||
177 | * @return Channel (optional) - The channel that is replacing transferer_first_leg in the swap |
||
178 | */ |
||
179 | public function getReplaceChannel() |
||
180 | { |
||
181 | return $this->replaceChannel; |
||
182 | } |
||
183 | |||
184 | /** |
||
185 | * @return string The result of the transfer attempt |
||
186 | */ |
||
187 | public function getResult() |
||
188 | { |
||
189 | return $this->result; |
||
190 | } |
||
191 | |||
192 | /** |
||
193 | * @return Channel (optional) - The channel that is being transferred to |
||
194 | */ |
||
195 | public function getTransferTarget() |
||
196 | { |
||
197 | return $this->transferTarget; |
||
198 | } |
||
199 | |||
200 | /** |
||
201 | * @return Channel (optional) - The channel that is being transferred |
||
202 | */ |
||
203 | public function getTransferee() |
||
204 | { |
||
205 | return $this->transferee; |
||
206 | } |
||
207 | |||
208 | /** |
||
209 | * @return Channel First leg of the transferer |
||
210 | */ |
||
211 | public function getTransfererFirstLeg() |
||
212 | { |
||
213 | return $this->transfererFirstLeg; |
||
214 | } |
||
215 | |||
216 | /** |
||
217 | * @return Bridge (optional) - Bridge the transferer first leg is in |
||
218 | */ |
||
219 | public function getTransfererFirstLegBridge() |
||
220 | { |
||
221 | return $this->transfererFirstLegBridge; |
||
222 | } |
||
223 | |||
224 | /** |
||
225 | * @return Channel Second leg of the transferer |
||
226 | */ |
||
227 | public function getTransfererSecondLeg() |
||
228 | { |
||
229 | return $this->transfererSecondLeg; |
||
230 | } |
||
231 | |||
232 | /** |
||
233 | * @return Bridge (optional) - Bridge the transferer second leg is in |
||
234 | */ |
||
235 | public function getTransfererSecondLegBridge() |
||
236 | { |
||
237 | return $this->transfererSecondLegBridge; |
||
238 | } |
||
239 | |||
240 | public function getEventId() |
||
241 | { |
||
242 | return "{$this->getType()}_{$this->getTransfererFirstLegBridge()->getId()}"; |
||
243 | } |
||
244 | |||
245 | /** |
||
246 | * @param AriClient $client |
||
247 | * @param string $response |
||
248 | */ |
||
249 | public function __construct(AriClient $client, $response) |
||
250 | { |
||
251 | parent::__construct($client, $response); |
||
252 | |||
253 | $this->destinationApplication = $this->getResponseValue('destination_application'); |
||
254 | $this->destinationBridge = $this->getResponseValue('destination_bridge'); |
||
255 | $this->destinationLinkFirstLeg = $this->getResponseValue('destination_link_first_leg', |
||
256 | '\phparia\Resources\Channel', $client); |
||
257 | $this->destinationLinkSecondLeg = $this->getResponseValue('destination_link_second_leg' |
||
258 | '\phparia\Resources\Channel', $client); |
||
|
|||
259 | $this->destinationThreewayBridge = $this->getResponseValue('destination_threeway_bridge', |
||
260 | '\phparia\Resources\Bridge', $client); |
||
261 | $this->destinationThreewayChannel = $this->getResponseValue('destination_threeway_channel', |
||
262 | '\phparia\Resources\Channel', $client); |
||
263 | $this->destinationType = $this->getResponseValue('destination_type'); |
||
264 | $this->isExternal = $this->getResponseValue('is_external'); |
||
265 | $this->replaceChannel = $this->getResponseValue('replace_channel', '\phparia\Resources\Channel', $client); |
||
266 | $this->result = $this->getResponseValue('result'); |
||
267 | $this->transferTarget = $this->getResponseValue('transfer_target', '\phparia\Resources\Channel', $client); |
||
268 | $this->transferee = $this->getResponseValue('transferee', '\phparia\Resources\Channel', $client); |
||
269 | $this->transfererFirstLeg = $this->getResponseValue('transferer_first_leg', '\phparia\Resources\Channel', |
||
270 | $client); |
||
271 | $this->transfererFirstLegBridge = $this->getResponseValue('transferer_first_leg_bridge', |
||
272 | '\phparia\Resources\Bridge', $client); |
||
273 | $this->transfererSecondLeg = $this->getResponseValue('transferer_second_leg', '\phparia\Resources\Channel', |
||
274 | $client); |
||
275 | $this->transfererSecondLegBridge = $this->getResponseValue('transferer_second_leg_bridge', |
||
276 | '\phparia\Resources\Bridge', $client); |
||
277 | } |
||
278 | } |
||
279 |