本文整理汇总了PHP中FreePBX::Ivr方法的典型用法代码示例。如果您正苦于以下问题:PHP FreePBX::Ivr方法的具体用法?PHP FreePBX::Ivr怎么用?PHP FreePBX::Ivr使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FreePBX
的用法示例。
在下文中一共展示了FreePBX::Ivr方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ivr_get_details
function ivr_get_details($id = '')
{
return FreePBX::Ivr()->getDetails($id);
}
示例2: ivrHook
public function ivrHook($request)
{
if (isset($request['id'])) {
$ivr = \FreePBX::Ivr()->getDetails($request['id']);
}
$directdial = isset($ivr['directdial']) ? $ivr['directdial'] : '';
$dirs = directory_list();
$options = '$("<option />", {text: \'' . _("Disabled") . '\'}).appendTo(sel);';
$options .= '$("<option />", {val: \'ext-local\', text: \'' . _("Enabled") . '\'}).appendTo(sel);';
foreach ($dirs as $dir) {
$name = $dir['dirname'] ? $dir['dirname'] : 'Directory ' . $dir['id'];
$options .= '$("<option />", {val: \'' . $dir['id'] . '\', text: \'' . $name . '\'}).appendTo(sel);';
}
$html = '
<script type="text/javascript">
var sel = $("<select id=\\"directdial\\" name=\\"directdial\\" class=\\"form-control\\" />");
var target = $("#directdialyes").parent();
';
$html .= $options;
$html .= '
$(target).html(sel);
$("#directdial").find("option").each( function() {
var $this = $(this);
if ($this.val() == "' . $directdial . '") {
$this.attr("selected","selected");
return false;
}
});
</script>
';
return $html;
}
示例3: _
$checked = $r['id'] == $ivr['invalid_recording'] ? ' SELECTED' : '';
$invalidopts .= '<option value="' . $r['id'] . '" ' . $checked . '>' . $r['displayname'] . '</option>';
}
$timeoutretryopts = '<option value="default">' . _('Default') . '</option>';
$timeoutretryopts .= '<option value="" ' . ($ivr['timeout_retry_recording'] == '' ? 'SELECTED' : '') . '>' . _('None') . '</option>';
foreach ($recordingList as $r) {
$checked = $r['id'] == $ivr['timeout_retry_recording'] ? ' SELECTED' : '';
$timeoutretryopts .= '<option value="' . $r['id'] . '" ' . $checked . '>' . $r['displayname'] . '</option>';
}
$timeoutopts = '<option value="default">' . _('Default') . '</option>';
$timeoutopts .= '<option value="" ' . ($ivr['timeout_recording'] == '' ? 'SELECTED' : '') . '>' . _('None') . '</option>';
foreach ($recordingList as $r) {
$checked = $r['id'] == $ivr['timeout_recording'] ? ' SELECTED' : '';
$timeoutopts .= '<option value="' . $r['id'] . '" ' . $checked . '>' . $r['displayname'] . '</option>';
}
$hooks = \FreePBX::Ivr()->pageHook($_REQUEST);
$hookhtml = '';
foreach ($hooks as $key => $value) {
$hookhtml .= $value;
}
$display_mode = "advanced";
$mode = \FreePBX::Config()->get("FPBXOPMODE");
if (!empty($mode)) {
$display_mode = $mode;
}
?>
<div class="container-fluid">
<h1><?php
echo $heading;
?>
</h1>