/
mikopbx
/
ModuleAutoDialer
Обзор
Документация
Войти
/
mikopbx
/
ModuleAutoDialer
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
master
Models/QuestionActions.php
128 строк
3 KB
Alexey Portnov
Add CRM integration, fix incoming call polling, add WaitExten timeout handling
23 мар 2026, 14:39
23 мар 2026, 14:39
d521223
Код
Авторство
О чём код?
<?php /* * MikoPBX - free phone system for small business * Copyright © 2017-2023 Alexey Portnov and Nikolay Beketov * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with this program. * If not, see <https://www.gnu.org/licenses/>. */ namespace Modules\ModuleAutoDialer\Models; use MikoPBX\Modules\Models\ModulesModelsBase; /** * Class QuestionActions * * @package Modules\ModuleAutoDialer\Models * @Indexes( * [name='questionId', columns=['questionId'], type=''], * [name='pollingId', columns=['pollingId'], type=''] * ) */ class QuestionActions extends ModulesModelsBase { public const ACTION_NONE = ''; public const ACTION_DIAL = 'dial'; public const ACTION_ANSWER = 'answer'; public const ACTION_PLAYBACK= 'playback'; public const ACTION_PLAYBACK_RECORD = 'playback_record'; public const ACTION_RESTART = 'restart'; public const ACTION_SEND_CRM = 'send_crm'; public const ACTION_PLAYBACK_FILE = 'file'; public const ACTION_PLAYBACK_TEXT = 'text'; /** * Идентификатор задачи. * @Primary * @Identity * @Column(type="integer", nullable=false) */ public $id; /** * * @Column(type="string", nullable=false) */ public $questionId; /** * * @Column(type="string", nullable=false) */ public $pollingId; /** * * @Column(type="string", nullable=true) */ public $key; /** * * @Column(type="string", nullable=true) */ public $action; /** * * @Column(type="string", nullable=true) */ public $value; /** * * @Column(type="string", nullable=true) */ public $valueOptions; /** * * @Column(type="string", nullable=true) */ public $nextQuestion; /** * Флаг необходимости распознавания речи для playback_record. * @Column(type="string", nullable=true, default="") */ public $needRecognize = ''; /** * Короткая подпись для подтверждения STT ("Ваше ФИО", "Номер счёта"). * @Column(type="string", nullable=true, default="") */ public $recognizeLabel = ''; /** * TTS-шаблон ответа CRM. Плейсхолдер <result> заменяется на ответ сервера. * @Column(type="string", nullable=true, default="") */ public $crmResponseTemplate = ''; /** * Returns dynamic relations between module models and common models * @param $calledModelObject * * @return void */ public static function getDynamicRelations(&$calledModelObject): void { } public function initialize(): void { $this->setSource('m_QuestionActions'); parent::initialize(); } }