当前位置: 首页>>代码示例>>PHP>>正文


PHP FreePBX::Voicemail方法代码示例

本文整理汇总了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);
}
开发者ID:ringfreejohn,项目名称:pbxframework,代码行数:31,代码来源:install.php

示例2: __construct

 function __construct($myexten)
 {
     $this->exten = $myexten;
     $this->vmx = FreePBX::Voicemail()->Vmx;
 }
开发者ID:ringfreejohn,项目名称:pbxframework,代码行数:5,代码来源:functions.inc.php

示例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;
开发者ID:ringfreejohn,项目名称:pbxframework,代码行数:31,代码来源:page.voicemail.php


注:本文中的FreePBX::Voicemail方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。