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