Exemple #1
0
function callback_getdestinfo($dest)
{
    global $active_modules;
    if (substr(trim($dest), 0, 9) == 'callback,') {
        $exten = explode(',', $dest);
        $exten = $exten[1];
        $thisexten = callback_get($exten);
        if (empty($thisexten)) {
            return array();
        } else {
            //$type = isset($active_modules['announcement']['type'])?$active_modules['announcement']['type']:'setup';
            return array('description' => sprintf(_("Callback: %s"), $thisexten['description']), 'edit_url' => 'config.php?display=callback&itemid=' . urlencode($exten));
        }
    } else {
        return false;
    }
}
Exemple #2
0
if (isset($callbacks)) {
    foreach ($callbacks as $callback) {
        echo "<li><a id=\"" . ($itemid == $callback['callback_id'] ? 'current' : '') . "\" href=\"config.php?display=" . urlencode($dispnum) . "&itemid=" . urlencode($callback['callback_id']) . "\">{$callback['description']}</a></li>";
    }
}
?>
</ul></div>

<div class="content">
<?php 
if ($action == 'delete') {
    echo '<br><h3>' . _("Callback ") . ' ' . $itemid . ' ' . _("deleted") . '!</h3>';
} else {
    if ($itemid) {
        //get details for this time condition
        $thisItem = callback_get($itemid);
    }
    $delURL = $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'] . '&action=delete';
    $delButton = "\n\t\t\t<form name=delete action=\"{$_SERVER['PHP_SELF']}\" method=POST>\n\t\t\t\t<input type=\"hidden\" name=\"display\" value=\"{$dispnum}\">\n\t\t\t\t<input type=\"hidden\" name=\"itemid\" value=\"{$itemid}\">\n\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"delete\">\n\t\t\t\t<input type=submit value=\"" . _("Delete Callback") . "\">\n\t\t\t</form>";
    ?>

	<h2><?php 
    echo $itemid ? _("Callback:") . " " . $itemid : _("Add Callback");
    ?>
</h2>
	
	<p><?php 
    echo $itemid ? '' : _("A callback will hang up on the caller and then call them back, directing them to the selected destination. This is useful for reducing mobile phone charges as well as other applications. Outbound calls will proceed according to the dial patterns in Outbound Routes.");
    ?>
</p>