1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
CallController.php
См. документацию.
1<?php
2
3namespace Bitrix\Im\V2\Controller\Call;
4
5use Bitrix\Im\Call\Call;
6use Bitrix\Im\V2\Call\CallError;
7use Bitrix\Im\V2\Call\CallFactory;
8use Bitrix\Main\Service\MicroService\BaseReceiver;
9
15{
20 public function finishCallAction(string $callUuid): ?array
21 {
22 $call = CallFactory::searchActiveByUuid(Call::PROVIDER_BITRIX, $callUuid);
23
24 if (!isset($call))
25 {
26 $this->addError(new CallError(CallError::CALL_NOT_FOUND));
27
28 return null;
29 }
30
31 $isSuccess = $call->getSignaling()->sendFinish();
32
33 if (!$isSuccess)
34 {
35 $this->addError(new CallError(CallError::SEND_PULL_ERROR));
36
37 return null;
38 }
39
40 return ['result' => true];
41 }
42
47 public function disconnectUserAction(string $callUuid, int $userId): ?array
48 {
49 $call = CallFactory::searchActiveByUuid(Call::PROVIDER_BITRIX, $callUuid);
50
51 if (!isset($call))
52 {
53 $this->addError(new CallError(CallError::CALL_NOT_FOUND));
54
55 return null;
56 }
57
58 $isSuccess = $call->getSignaling()->sendHangup($userId, $call->getUsers(), null);
59
60 if (!$isSuccess)
61 {
62 $this->addError(new CallError(CallError::SEND_PULL_ERROR));
63
64 return null;
65 }
66
67 return ['result' => true];
68 }
69}
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
Определения check_mail.php:18
disconnectUserAction(string $callUuid, int $userId)
Определения CallController.php:47
finishCallAction(string $callUuid)
Определения CallController.php:20
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804