aboutsummaryrefslogtreecommitdiffstats
path: root/packages/freeswitch/freeswitch_extensions_edit.tmp
diff options
context:
space:
mode:
authorBill Marquette <bill.marquette@gmail.com>2009-02-06 19:18:00 -0600
committerBill Marquette <bill.marquette@gmail.com>2009-02-06 19:18:00 -0600
commit55eddd7accf2c5f9b0f52b22a010c4c4b7c130d1 (patch)
treeba4783bab1dd65f1ceef2dfac9fdbd515531d18b /packages/freeswitch/freeswitch_extensions_edit.tmp
parent67780cc9d469288742aea5bc378c29a54edd5ec5 (diff)
downloadpfsense-packages-55eddd7accf2c5f9b0f52b22a010c4c4b7c130d1.tar.gz
pfsense-packages-55eddd7accf2c5f9b0f52b22a010c4c4b7c130d1.tar.bz2
pfsense-packages-55eddd7accf2c5f9b0f52b22a010c4c4b7c130d1.zip
mv packages to config dir to match web layout
Diffstat (limited to 'packages/freeswitch/freeswitch_extensions_edit.tmp')
-rw-r--r--packages/freeswitch/freeswitch_extensions_edit.tmp351
1 files changed, 0 insertions, 351 deletions
diff --git a/packages/freeswitch/freeswitch_extensions_edit.tmp b/packages/freeswitch/freeswitch_extensions_edit.tmp
deleted file mode 100644
index 9b1639f5..00000000
--- a/packages/freeswitch/freeswitch_extensions_edit.tmp
+++ /dev/null
@@ -1,351 +0,0 @@
-<?php
-/* $Id$ */
-/*
-
- freeswitch_extensions_edit.php
- Copyright (C) 2008 Mark J Crane
- All rights reserved.
-
- FreeSWITCH (TM)
- http://www.freeswitch.org/
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-
-require("guiconfig.inc");
-require("/usr/local/pkg/freeswitch.inc");
-
-
-$a_extensions = &$config['installedpackages']['freeswitchextensions']['config'];
-
-$id = $_GET['id'];
-if (isset($_POST['id'])) {
- $id = $_POST['id'];
-}
-
-if (isset($id) && $a_extensions[$id]) {
-
- $pconfig['extension'] = $a_extensions[$id]['extension'];
- $pconfig['password'] = $a_extensions[$id]['password'];
- $pconfig['mailbox'] = $a_extensions[$id]['mailbox'];
- $pconfig['vm-password'] = $a_extensions[$id]['vm-password'];
- $pconfig['accountcode'] = $a_extensions[$id]['accountcode'];
- $pconfig['effective_caller_id_name'] = $a_extensions[$id]['effective_caller_id_name'];
- $pconfig['effective_caller_id_number'] = $a_extensions[$id]['effective_caller_id_number'];
- $pconfig['effective_caller_id_number'] = $a_extensions[$id]['effective_caller_id_number'];
- $pconfig['outbound_caller_id_name'] = $a_extensions[$id]['outbound_caller_id_name'];
- $pconfig['outbound_caller_id_number'] = $a_extensions[$id]['outbound_caller_id_number'];
- $pconfig['vm-mailto'] = $a_extensions[$id]['vm-mailto'];
- $pconfig['vm-attach-file'] = $a_extensions[$id]['vm-attach-file'];
- $pconfig['user_context'] = $a_extensions[$id]['user_context'];
- $pconfig['callgroup'] = $a_extensions[$id]['callgroup'];
- $pconfig['auth-acl'] = $a_extensions[$id]['auth-acl'];
- $pconfig['cidr'] = $a_extensions[$id]['cidr'];
- $pconfig['description'] = $a_extensions[$id]['description'];
-
-}
-
-if ($_POST) {
-
- unset($input_errors);
- $pconfig = $_POST;
-
-
- if (!$input_errors) {
-
- $ent = array();
- $ent['extension'] = $_POST['extension'];
- $ent['password'] = $_POST['password'];
- $ent['mailbox'] = $_POST['mailbox'];
- $ent['vm-password'] = $_POST['vm-password'];
- $ent['accountcode'] = $_POST['accountcode'];
- $ent['effective_caller_id_name'] = $_POST['effective_caller_id_name'];
- $ent['effective_caller_id_number'] = $_POST['effective_caller_id_number'];
- $ent['outbound_caller_id_name'] = $_POST['outbound_caller_id_name'];
- $ent['outbound_caller_id_number'] = $_POST['outbound_caller_id_number'];
- $ent['vm-mailto'] = $_POST['vm-mailto'];
- $ent['vm-attach-file'] = $_POST['vm-attach-file'];
- $ent['user_context'] = $_POST['user_context'];
- $ent['callgroup'] = $_POST['callgroup'];
- $ent['auth-acl'] = $_POST['auth-acl'];
- $ent['cidr'] = $_POST['cidr'];
-
- $ent['description'] = $_POST['description'];
-
- if (isset($id) && $a_extensions[$id]) {
- //update
- $a_extensions[$id] = $ent;
- }
- else {
- //add
- $a_extensions[] = $ent;
- }
-
- write_config();
- sync_package_freeswitch_extensions();
-
- header("Location: freeswitch_extensions.php");
- exit;
- }
-}
-
-include("head.inc");
-
-?>
-
-<script type="text/javascript" language="JavaScript">
-
-function show_advanced_config() {
- document.getElementById("showadvancedbox").innerHTML='';
- aodiv = document.getElementById('showadvanced');
- aodiv.style.display = "block";
-}
-
-</script>
-
-<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-<?php include("fbegin.inc"); ?>
-<p class="pgtitle">FreeSWITCH: Extensions: Edit</p>
-<?php if ($input_errors) print_input_errors($input_errors); ?>
-
-
-<div id="mainlevel">
-<table width="100%" border="0" cellpadding="0" cellspacing="0">
-<tr><td class="tabnavtbl">
-<?php
-
- $tab_array = array();
- $tab_array[] = array(gettext("Settings"), false, "/pkg_edit.php?xml=freeswitch.xml&amp;id=0");
- $tab_array[] = array(gettext("Dialplan"), false, "/freeswitch/freeswitch_dialplan_includes.php");
- $tab_array[] = array(gettext("Extensions"), true, "/freeswitch/freeswitch_extensions.php");
- $tab_array[] = array(gettext("External"), false, "/pkg_edit.php?xml=freeswitch_external.xml&amp;id=0");
- $tab_array[] = array(gettext("Gateways"), false, "/freeswitch/freeswitch_gateways.php");
- $tab_array[] = array(gettext("Internal"), false, "/pkg_edit.php?xml=freeswitch_internal.xml&amp;id=0");
- $tab_array[] = array(gettext("IVR"), false, "/freeswitch/freeswitch_ivr.php");
- $tab_array[] = array(gettext("Modules"), false, "/pkg_edit.php?xml=freeswitch_modules.xml&amp;id=0");
- $tab_array[] = array(gettext("Public"), false, "/freeswitch/freeswitch_public_includes.php");
- $tab_array[] = array(gettext("Rec"), false, "/freeswitch/freeswitch_recordings.php");
- $tab_array[] = array(gettext("Status"), false, "/freeswitch/freeswitch_status.php");
- $tab_array[] = array(gettext("Vars"), false, "/pkg_edit.php?xml=freeswitch_vars.xml&amp;id=0");
- display_top_tabs($tab_array);
-
-?>
-</td></tr>
-</table>
-<table width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td class="tabcont" >
-
-
- <table width="100%" border="0" cellpadding="6" cellspacing="0">
- <tr>
- <td><p><span class="vexpl"><span class="red"><strong>Extension Setup<br>
- </strong></span>
- /usr/local/freeswitch/conf/directory/default/
- </p></td>
- </tr>
- </table>
- <br />
-
- <form action="freeswitch_extensions_edit.php" method="post" name="iform" id="iform">
- <table width="100%" border="0" cellpadding="6" cellspacing="0">
-
- <tr>
- <td width="25%" valign="top" class="vncellreq">Extension</td>
- <td width="75%" class="vtable">
- <input name="extension" type="text" class="formfld" id="extension" size="40" value="<?=htmlspecialchars($pconfig['extension']);?>">
- <br><span class="vexpl">Enter the extension here. The default configuration expects extension numbers between 1000 -1019. To use 3 digit extensions adjust the dialplan 'default.xml' under name="Local_Extension" change the regular expression="^(10[01][0-9])$" to expression="^(\d{3})$".<br></span>
- </td>
- </tr>
- <tr>
- <td width="25%" valign="top" class="vncellreq">Password</td>
- <td width="75%" class="vtable">
- <input name="password" type="password" class="formfld" id="password" size="40" value="<?=htmlspecialchars($pconfig['password']);?>">
- <br><span class="vexpl">Enter the password here.<br></span>
- </td>
- </tr>
- <tr>
- <td width="25%" valign="top" class="vncellreq">Mailbox</td>
- <td width="75%" class="vtable">
- <input name="mailbox" type="text" class="formfld" id="mailbox" size="40" value="<?=htmlspecialchars($pconfig['mailbox']);?>">
- <br><span class="vexpl">Enter the mailbox here. Example: extension 1001 then mailbox 1001<br></span>
- </td>
- </tr>
- <tr>
- <td width="25%" valign="top" class="vncellreq">Voicemail Password</td>
- <td width="75%" class="vtable">
- <input name="vm-password" type="password" class="formfld" id="vm-password" size="40" value="<?=htmlspecialchars($pconfig['vm-password']);?>">
- <br><span class="vexpl">Enter the voicemail password here.<br></span>
- </td>
- </tr>
- <tr>
- <td width="25%" valign="top" class="vncellreq">Account Code</td>
- <td width="75%" class="vtable">
- <input name="accountcode" type="text" class="formfld" id="accountcode" size="40" value="<?=htmlspecialchars($pconfig['accountcode']);?>">
- <br><span class="vexpl">Enter the account code here. Example: extension 1001 then accountcode 1001<br></span>
- </td>
- </tr>
- <tr>
- <td width="25%" valign="top" class="vncellreq" nowrap>Effective Caller ID Name</td>
- <td width="75%" class="vtable">
- <input name="effective_caller_id_name" type="text" class="formfld" id="effective_caller_id_name" size="40" value="<?=htmlspecialchars($pconfig['effective_caller_id_name']);?>">
- <br><span class="vexpl">Enter the effective caller id name here.<br></span>
- </td>
- </tr>
- <tr>
- <td width="25%" valign="top" class="vncellreq" nowrap>Effective Caller ID Number</td>
- <td width="75%" class="vtable">
- <input name="effective_caller_id_number" type="text" class="formfld" id="effective_caller_id_number" size="40" value="<?=htmlspecialchars($pconfig['effective_caller_id_number']);?>">
- <br><span class="vexpl">Enter the effective caller id number here.<br></span>
- </td>
- </tr>
- <!--
- <tr>
- <td width="25%" valign="top" class="vncellreq" nowrap>Outbound Caller ID Name</td>
- <td width="75%" class="vtable">
- <input name="outbound_caller_id_name" type="text" class="formfld" id="outbound_caller_id_name" size="40" value="<?=htmlspecialchars($pconfig['outbound_caller_id_name']);?>">
- <br><span class="vexpl">Enter the outbound caller id name here.<br></span>
- </td>
- </tr>
- <tr>
- <td width="25%" valign="top" class="vncellreq" nowrap>Outbound Caller ID Number</td>
- <td width="75%" class="vtable">
- <input name="outbound_caller_id_number" type="text" class="formfld" id="outbound_caller_id_number" size="40" value="<?=htmlspecialchars($pconfig['outbound_caller_id_number']);?>">
- <br><span class="vexpl">Enter the outbound caller id number here.<br></span>
- </td>
- </tr>
- -->
- <tr>
- <td width="25%" valign="top" class="vncellreq" nowrap>Voicemail Mail To</td>
- <td width="75%" class="vtable">
- <input name="vm-mailto" type="text" class="formfld" id="vm-mailto" size="40" value="<?=htmlspecialchars($pconfig['vm-mailto']);?>">
- <br><span class="vexpl">Optional: Enter the email address to send voicemail to.<br></span>
- </td>
- </tr>
- <tr>
- <td width="25%" valign="top" class="vncellreq" nowrap>Voicemail Attach File</td>
- <td width="75%" class="vtable">
- <?php
- echo " <select name='vm-attach-file' class='formfld'>\n";
- echo " <option></option>\n";
- switch (htmlspecialchars($pconfig['vm-attach-file'])) {
- case "true":
- echo " <option value='true' selected='yes'>true</option>\n";
- echo " <option value='false'>false</option>\n";
- break;
- case "false":
- echo " <option value='true'>true</option>\n";
- echo " <option value='false' selected='yes'>false</option>\n";
-
- break;
- default:
- echo " <option value='true' selected='yes'>true</option>\n";
- echo " <option value='false'>false</option>\n";
- }
- echo " </select>\n";
- ?>
- Choose whether to attach the file to the email.
- </td>
- </tr>
- <tr>
- <td width="25%" valign="top" class="vncellreq">User Context</td>
- <td width="75%" class="vtable">
- <input name="user_context" type="text" class="formfld" id="user_context" size="40" value="<?=htmlspecialchars($pconfig['user_context']);?>">
- <br><span class="vexpl">Enter the user context here. Example: default<br></span>
- </td>
- </tr>
- <tr>
- <td width="25%" valign="top" class="vncellreq">Call Group</td>
- <td width="75%" class="vtable">
- <input name="callgroup" type="text" class="formfld" id="callgroup" size="40" value="<?=htmlspecialchars($pconfig['callgroup']);?>">
- <br><span class="vexpl">Enter the user call group here. Example: sales, support<br></span>
- </td>
- </tr>
- </table>
-
- <div id="showadvancedbox">
- <table width="100%" border="0" cellpadding="6" cellspacing="0">
- <tr>
- <td width="25%" valign="top" class="vncell">Show Advanced</td>
- <td width="75%" class="vtable">
- <input type="button" onClick="show_advanced_config()" value="Advanced"></input></a>
- </td>
- </tr>
- </table>
- </div>
- <div id="showadvanced" style="display:none">
- <table width="100%" border="0" cellpadding="6" cellspacing="0">
- <tr>
- <td width="25%" valign="top" class="vncell">Auth-ACL</td>
- <td width="75%" class="vtable">
- <input name="auth-acl" type="text" class="formfld" id="auth-acl" size="40" value="<?=htmlspecialchars($pconfig['auth-acl']);?>">
- <br> <span class="vexpl">Enter the auth acl here.<br></span>
- </td>
- </tr>
- <tr>
- <td valign="top" class="vncell">CIDR</td>
- <td class="vtable">
- <input name="cidr" type="text" class="formfld" id="cidr" size="40" value="<?=htmlspecialchars($pconfig['cidr']);?>">
- <br> <span class="vexpl">Enter the cidr here.<br></span>
- </td>
- </tr>
- </table>
- </div>
-
- <table width="100%" border="0" cellpadding="6" cellspacing="0">
- <tr>
- <td width="25%" valign="top" class="vncellreq">Extension Description</td>
- <td width="75%" class="vtable">
- <input name="description" type="text" class="formfld" id="description" size="40" value="<?=htmlspecialchars($pconfig['description']);?>">
- <br><span class="vexpl">Enter the description of the extension here.<br></span>
- </td>
- </tr>
- <tr>
- <td valign="top">&nbsp;</td>
- <td>
- <input name="outbound_caller_id_name" type="hidden" class="formfld" id="outbound_caller_id_name" size="40" value="<?=htmlspecialchars($pconfig['outbound_caller_id_name']);?>">
- <input name="outbound_caller_id_number" type="hidden" class="formfld" id="outbound_caller_id_number" size="40" value="<?=htmlspecialchars($pconfig['outbound_caller_id_number']);?>">
- <input name="Submit" type="submit" class="formbtn" value="Save"> <input class="formbtn" type="button" value="Cancel" onclick="history.back()">
- <?php if (isset($id) && $a_extensions[$id]): ?>
- <input name="id" type="hidden" value="<?=$id;?>">
- <?php endif; ?>
- </td>
- </tr>
- </table>
- </form>
-
- <br>
- <br>
- <br>
- <br>
- <br>
- <br>
-
- </td>
- </tr>
-</table>
-
-</div>
-
-<?php include("fend.inc"); ?>
-</body>
-</html>