本文整理汇总了PHP中FreePBX::Voicemail方法的典型用法代码示例。如果您正苦于以下问题:PHP FreePBX::Voicemail方法的具体用法?PHP FreePBX::Voicemail怎么用?PHP FreePBX::Voicemail使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FreePBX
的用法示例。
在下文中一共展示了FreePBX::Voicemail方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: unlink
unlink($aed . '/vm_email.inc');
}
if (file_exists($aed . '/vm_general.inc')) {
$contents = FreePBX::LoadConfig()->getConfig('vm_general.inc');
$final = array();
if (!empty($contents['HEADER']) && is_array($contents['HEADER'])) {
foreach ($contents['HEADER'] as $key => $val) {
$final["gen__" . $key] = $val;
$gen_settings[$key] = "";
}
}
if (!empty($final)) {
if (!function_exists('voicemail_update_settings')) {
include __DIR__ . '/functions.inc.php';
}
voicemail_update_settings("settings", "", "", $final);
}
unlink($aed . '/vm_general.inc');
}
$vmconf = \FreePBX::Voicemail()->getVoicemail(false);
if (!empty($vmconf)) {
$dsettings = $settings = \FreePBX::Voicemail()->constructSettings("general");
foreach ($dsettings as $data) {
foreach ($data['settings'] as $key => $items) {
if ($items['default'] !== '' && !isset($vmconf['general'][$key])) {
$vmconf['general'][$key] = $items['default'];
}
}
}
\FreePBX::Voicemail()->saveVoicemail($vmconf);
}
示例2: __construct
function __construct($myexten)
{
$this->exten = $myexten;
$this->vmx = FreePBX::Voicemail()->Vmx;
}
示例3: sprintf
$vmx_loops_opts[1] = sprintf(_("%s Retry"), 1);
for ($i = 2; $i < 5; $i++) {
$vmx_loops_opts[$i] = sprintf(_("%s Retries"), $i);
}
show_view(dirname(__FILE__) . '/views/dialplan.php', array('settings' => $settings, 'direct_dial_opts' => $direct_dial_opts, 'voicemail_gain_opts' => $voicemail_gain_opts, 'vmx_timeout_opts' => $vmx_timeout_opts, 'vmx_repeat_opts' => $vmx_repeat_opts, 'vmx_loops_opts' => $vmx_loops_opts));
break;
case "settings":
if (!empty($extension)) {
$level = "account";
$id_prefix = "acct";
} else {
$level = "general";
$id_prefix = "gen";
}
$level = !empty($extension) ? "account" : "general";
$d = \FreePBX::Voicemail()->constructSettings($level);
/* get settings */
$settings = voicemail_get_settings($uservm, $action, $extension);
/* Get Asterisk version. */
$ast_info = engine_getinfo();
$version = $ast_info["version"];
show_view(dirname(__FILE__) . '/views/ssettings.php', array('d' => $d, 'action' => $action, 'extension' => $extension, 'version' => $version, 'settings' => $settings, 'tooltips' => $tooltips, 'display_settings' => $acct_settings, 'display_tips' => $tooltips["account"], 'id_prefix' => $id_prefix));
break;
case "bsettings":
$output = '';
/* get settings */
$settings = voicemail_get_settings($uservm, $action, $extension);
/* Get Asterisk version. */
$ast_info = engine_getinfo();
$version = $ast_info["version"];
$text_size = 40;