本文整理匯總了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;